@crystaldesign/web-planner-logic 25.6.0 → 25.6.1

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 (30) hide show
  1. package/build/cjs/{DivaBoxPlanner-0eaf08cc.js → DivaBoxPlanner-2dc34f33.js} +2 -2
  2. package/build/cjs/{DivaStandardPlanner-a14951d4.js → DivaStandardPlanner-423caca8.js} +2 -2
  3. package/build/cjs/{DoorPlanner-9ae30ca0.js → DoorPlanner-a7fa6b76.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-ab9900a0.js → Host3DSignalR-8d390be0.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-7885b19a.js → LiviqueWWSHandler-14886aec.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-2ecab0f7.js → PfisterWWSHandler-b4e4c2c6.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-7121cd3f.js → PlannerHandler2D-67cedbd6.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-0428906b.js → SeriousBasketHandler-3844da54.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-f4cad91a.js → ShelfPlanner-c94b07c7.js} +1 -1
  10. package/build/cjs/{StandardWWSHandler-29d549eb.js → StandardWWSHandler-45cd4430.js} +1 -1
  11. package/build/cjs/{index-2d611483.js → index-57f9fcc1.js} +527 -568
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-40f9f5f6.js → DivaBoxPlanner-ee88278b.js} +2 -2
  14. package/build/esm/{DivaStandardPlanner-57cc3328.js → DivaStandardPlanner-1394465e.js} +2 -2
  15. package/build/esm/{DoorPlanner-f3c5b6de.js → DoorPlanner-8db028c7.js} +1 -1
  16. package/build/esm/{Host3DSignalR-ab7a0f74.js → Host3DSignalR-a642ea3a.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-32b22f3a.js → LiviqueWWSHandler-bf8f2ef0.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-c12b85ee.js → PfisterWWSHandler-fcca8610.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-e651e396.js → PlannerHandler2D-56decfab.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-ccf356e8.js → SeriousBasketHandler-14e91c9c.js} +1 -1
  21. package/build/esm/{ShelfPlanner-6df3ba51.js → ShelfPlanner-6365350d.js} +1 -1
  22. package/build/esm/{StandardWWSHandler-2d5a27e8.js → StandardWWSHandler-72906b84.js} +1 -1
  23. package/build/esm/{index-7bf96b22.js → index-1d11ac8e.js} +527 -568
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +0 -1
  26. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  28. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +0 -1
  29. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  30. package/package.json +2 -2
@@ -27693,7 +27693,7 @@ var DivaArticle = /*#__PURE__*/function () {
27693
27693
  break;
27694
27694
  }
27695
27695
  _context.next = 4;
27696
- return import('./ShelfPlanner-6df3ba51.js');
27696
+ return import('./ShelfPlanner-6365350d.js');
27697
27697
  case 4:
27698
27698
  _yield$import = _context.sent;
27699
27699
  ShelfPlanner = _yield$import["default"];
@@ -28990,26 +28990,6 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28990
28990
  return _initCfgValues.apply(this, arguments);
28991
28991
  }
28992
28992
  return initCfgValues;
28993
- }())
28994
- }, {
28995
- key: "setValidVariantValues",
28996
- value: function () {
28997
- var _setValidVariantValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(article) {
28998
- return _regeneratorRuntime.wrap(function _callee10$(_context12) {
28999
- while (1) switch (_context12.prev = _context12.next) {
29000
- case 0:
29001
- _context12.next = 2;
29002
- return this.updateCfgValues(article, article.getValidValues(article.VariantValues, undefined, true), {});
29003
- case 2:
29004
- case "end":
29005
- return _context12.stop();
29006
- }
29007
- }, _callee10, this);
29008
- }));
29009
- function setValidVariantValues(_x27) {
29010
- return _setValidVariantValues.apply(this, arguments);
29011
- }
29012
- return setValidVariantValues;
29013
28993
  }()
29014
28994
  /**
29015
28995
  * This function recalcs the configuration the a specific Article considering all the different and complicated rules
@@ -29020,13 +29000,14 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29020
29000
  * @param newConfigValues newConfigValues to change the configuration
29021
29001
  * @param alreadyInitializedValues these Values are filled when the article gets initialized from for expample a BasisKonfigurat. These are more important then default Values which get init by evalSetFeatureDefaultDecisions.
29022
29002
  */
29003
+ )
29023
29004
  }, {
29024
29005
  key: "updateCfgValues",
29025
29006
  value: (function () {
29026
- var _updateCfgValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(article, newConfigValues, alreadyInitializedValues, dontCalcPrice, dontLoadPartlist, calcVariantPrice, onlyUpdateOnce) {
29007
+ var _updateCfgValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(article, newConfigValues, alreadyInitializedValues, dontCalcPrice, dontLoadPartlist, calcVariantPrice, onlyUpdateOnce) {
29027
29008
  var maxPriceOfGroupCodex, setByFeatureVariantValues, key, partlistArticlesToLoad;
29028
- return _regeneratorRuntime.wrap(function _callee11$(_context13) {
29029
- while (1) switch (_context13.prev = _context13.next) {
29009
+ return _regeneratorRuntime.wrap(function _callee10$(_context12) {
29010
+ while (1) switch (_context12.prev = _context12.next) {
29030
29011
  case 0:
29031
29012
  if (!!article.CatalogData.bundleRules) dontLoadPartlist = true;
29032
29013
  //es wird versucht die neuen Optionswerte zu setzten
@@ -29052,24 +29033,24 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29052
29033
  article.engine.evalDecisions(onlyUpdateOnce);
29053
29034
  }
29054
29035
  if (calcVariantPrice) {
29055
- _context13.next = 9;
29036
+ _context12.next = 9;
29056
29037
  break;
29057
29038
  }
29058
- _context13.next = 9;
29039
+ _context12.next = 9;
29059
29040
  return article.updateShelfPlannerState(newConfigValues);
29060
29041
  case 9:
29061
29042
  if (!(!dontCalcPrice && !calcVariantPrice)) {
29062
- _context13.next = 12;
29043
+ _context12.next = 12;
29063
29044
  break;
29064
29045
  }
29065
- _context13.next = 12;
29046
+ _context12.next = 12;
29066
29047
  return this.updateLastElement(article);
29067
29048
  case 12:
29068
- _context13.next = 14;
29049
+ _context12.next = 14;
29069
29050
  return this.evalAndLoadPartlistArticles(article, dontLoadPartlist, newConfigValues);
29070
29051
  case 14:
29071
- partlistArticlesToLoad = _context13.sent;
29072
- _context13.next = 17;
29052
+ partlistArticlesToLoad = _context12.sent;
29053
+ _context12.next = 17;
29073
29054
  return this.evalOpvsOnOpvsConstructionRules(article);
29074
29055
  case 17:
29075
29056
  //danach Preise berechnen
@@ -29080,14 +29061,14 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29080
29061
  article.engine.updateConfigDependentMedia();
29081
29062
  }
29082
29063
  }
29083
- return _context13.abrupt("return", partlistArticlesToLoad);
29064
+ return _context12.abrupt("return", partlistArticlesToLoad);
29084
29065
  case 19:
29085
29066
  case "end":
29086
- return _context13.stop();
29067
+ return _context12.stop();
29087
29068
  }
29088
- }, _callee11, this);
29069
+ }, _callee10, this);
29089
29070
  }));
29090
- function updateCfgValues(_x28, _x29, _x30, _x31, _x32, _x33, _x34) {
29071
+ function updateCfgValues(_x27, _x28, _x29, _x30, _x31, _x32, _x33) {
29091
29072
  return _updateCfgValues.apply(this, arguments);
29092
29073
  }
29093
29074
  return updateCfgValues;
@@ -29095,10 +29076,10 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29095
29076
  }, {
29096
29077
  key: "updateLastElement",
29097
29078
  value: function () {
29098
- var _updateLastElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(article) {
29079
+ var _updateLastElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(article) {
29099
29080
  var isIDM, opsLastElement, lastElement, opsLastPlannedAccessoire, opsFirstAccessoire, _article$accessoirePa, _article$accessoirePa2, accessoires, i;
29100
- return _regeneratorRuntime.wrap(function _callee12$(_context14) {
29101
- while (1) switch (_context14.prev = _context14.next) {
29081
+ return _regeneratorRuntime.wrap(function _callee11$(_context13) {
29082
+ while (1) switch (_context13.prev = _context13.next) {
29102
29083
  case 0:
29103
29084
  isIDM = article.CatalogData.isIDMFormat;
29104
29085
  opsLastElement = article.getArticleOptionState((!isIDM ? 'OPT' : '') + 'ELEMENTPOSITION');
@@ -29122,29 +29103,29 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29122
29103
  }
29123
29104
  opsFirstAccessoire = article.getArticleOptionState((!isIDM ? 'OPT' : '') + 'FIRSTACCESSOIRE');
29124
29105
  if (!opsFirstAccessoire) {
29125
- _context14.next = 15;
29106
+ _context13.next = 15;
29126
29107
  break;
29127
29108
  }
29128
29109
  accessoires = (_article$accessoirePa = (_article$accessoirePa2 = article.accessoireParentArticle) === null || _article$accessoirePa2 === void 0 ? void 0 : _article$accessoirePa2.getAccessoireByArticleCodex(article.articleCodex)) !== null && _article$accessoirePa !== void 0 ? _article$accessoirePa : [];
29129
29110
  i = 0;
29130
29111
  case 9:
29131
29112
  if (!(i < accessoires.length)) {
29132
- _context14.next = 15;
29113
+ _context13.next = 15;
29133
29114
  break;
29134
29115
  }
29135
- _context14.next = 12;
29116
+ _context13.next = 12;
29136
29117
  return this.updateOption(accessoires[i], (!isIDM ? 'OPT' : '') + 'FIRSTACCESSOIRE', (!isIDM ? 'OPV' : '') + (i + 1).toString(), i === 0 ? (!isIDM ? 'OPV' : '') + 'FIRSTACCESSOIRE' : (!isIDM ? 'OPV' : '') + 'NOTFIRSTACCESSOIRE');
29137
29118
  case 12:
29138
29119
  i++;
29139
- _context14.next = 9;
29120
+ _context13.next = 9;
29140
29121
  break;
29141
29122
  case 15:
29142
29123
  case "end":
29143
- return _context14.stop();
29124
+ return _context13.stop();
29144
29125
  }
29145
- }, _callee12, this);
29126
+ }, _callee11, this);
29146
29127
  }));
29147
- function updateLastElement(_x35) {
29128
+ function updateLastElement(_x34) {
29148
29129
  return _updateLastElement.apply(this, arguments);
29149
29130
  }
29150
29131
  return updateLastElement;
@@ -29152,41 +29133,41 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29152
29133
  }, {
29153
29134
  key: "updateOption",
29154
29135
  value: function () {
29155
- var _updateOption = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(article, optionCodex, newCodex, fallbackNewCodex) {
29136
+ var _updateOption = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(article, optionCodex, newCodex, fallbackNewCodex) {
29156
29137
  var _ops$val, _ops$visibleOptionVal;
29157
29138
  var ops, oldCodex, newVal;
29158
- return _regeneratorRuntime.wrap(function _callee13$(_context15) {
29159
- while (1) switch (_context15.prev = _context15.next) {
29139
+ return _regeneratorRuntime.wrap(function _callee12$(_context14) {
29140
+ while (1) switch (_context14.prev = _context14.next) {
29160
29141
  case 0:
29161
29142
  ops = article.getArticleOptionState(optionCodex);
29162
29143
  if (ops) {
29163
- _context15.next = 3;
29144
+ _context14.next = 3;
29164
29145
  break;
29165
29146
  }
29166
- return _context15.abrupt("return");
29147
+ return _context14.abrupt("return");
29167
29148
  case 3:
29168
29149
  oldCodex = (_ops$val = ops.val) === null || _ops$val === void 0 ? void 0 : _ops$val.codex;
29169
29150
  newVal = (_ops$visibleOptionVal = ops.visibleOptionValues[newCodex]) !== null && _ops$visibleOptionVal !== void 0 ? _ops$visibleOptionVal : fallbackNewCodex ? ops.visibleOptionValues[fallbackNewCodex] : undefined;
29170
29151
  if (!(oldCodex === (newVal === null || newVal === void 0 ? void 0 : newVal.codex))) {
29171
- _context15.next = 7;
29152
+ _context14.next = 7;
29172
29153
  break;
29173
29154
  }
29174
- return _context15.abrupt("return");
29155
+ return _context14.abrupt("return");
29175
29156
  case 7:
29176
29157
  if (!newVal) {
29177
- _context15.next = 11;
29158
+ _context14.next = 11;
29178
29159
  break;
29179
29160
  }
29180
29161
  ops.val = newVal;
29181
- _context15.next = 11;
29162
+ _context14.next = 11;
29182
29163
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(article.set, {}, []);
29183
29164
  case 11:
29184
29165
  case "end":
29185
- return _context15.stop();
29166
+ return _context14.stop();
29186
29167
  }
29187
- }, _callee13);
29168
+ }, _callee12);
29188
29169
  }));
29189
- function updateOption(_x36, _x37, _x38, _x39) {
29170
+ function updateOption(_x35, _x36, _x37, _x38) {
29190
29171
  return _updateOption.apply(this, arguments);
29191
29172
  }
29192
29173
  return updateOption;
@@ -29196,23 +29177,23 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29196
29177
  }, {
29197
29178
  key: "evalAndLoadPartlistArticles",
29198
29179
  value: (function () {
29199
- var _evalAndLoadPartlistArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(article, dontLoadPartlist, newConfigValues) {
29180
+ var _evalAndLoadPartlistArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(article, dontLoadPartlist, newConfigValues) {
29200
29181
  var partlistArticlesToLoad;
29201
- return _regeneratorRuntime.wrap(function _callee14$(_context16) {
29202
- while (1) switch (_context16.prev = _context16.next) {
29182
+ return _regeneratorRuntime.wrap(function _callee13$(_context15) {
29183
+ while (1) switch (_context15.prev = _context15.next) {
29203
29184
  case 0:
29204
29185
  partlistArticlesToLoad = [];
29205
29186
  if (!article.hasPartlistArticle) {
29206
- _context16.next = 8;
29187
+ _context15.next = 8;
29207
29188
  break;
29208
29189
  }
29209
29190
  article.deletePartlistArticles(); //alle aktellen PartlistArticles des Articles löschen!
29210
29191
  partlistArticlesToLoad = article.engine.evalPartlist(newConfigValues);
29211
29192
  if (dontLoadPartlist) {
29212
- _context16.next = 8;
29193
+ _context15.next = 8;
29213
29194
  break;
29214
29195
  }
29215
- _context16.next = 7;
29196
+ _context15.next = 7;
29216
29197
  return this.loadPartlistArticles(partlistArticlesToLoad, article, article.VariantValues);
29217
29198
  case 7:
29218
29199
  partlistArticlesToLoad = [];
@@ -29221,14 +29202,14 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29221
29202
  partlistArticlesToLoad = this.bundlePartlistArticles(partlistArticlesToLoad, article.bundleRules, _defineProperty({}, article.basketId, article));
29222
29203
  }
29223
29204
  article.hasPartlistArticleInitialized = true;
29224
- return _context16.abrupt("return", partlistArticlesToLoad);
29205
+ return _context15.abrupt("return", partlistArticlesToLoad);
29225
29206
  case 11:
29226
29207
  case "end":
29227
- return _context16.stop();
29208
+ return _context15.stop();
29228
29209
  }
29229
- }, _callee14, this);
29210
+ }, _callee13, this);
29230
29211
  }));
29231
- function evalAndLoadPartlistArticles(_x40, _x41, _x42) {
29212
+ function evalAndLoadPartlistArticles(_x39, _x40, _x41) {
29232
29213
  return _evalAndLoadPartlistArticles.apply(this, arguments);
29233
29214
  }
29234
29215
  return evalAndLoadPartlistArticles;
@@ -29236,13 +29217,13 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29236
29217
  }, {
29237
29218
  key: "loadPartlistArticles",
29238
29219
  value: function () {
29239
- var _loadPartlistArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(partlistArticlesToLoad, article, newConfigValues) {
29220
+ var _loadPartlistArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(partlistArticlesToLoad, article, newConfigValues) {
29240
29221
  var _this = this;
29241
29222
  var i;
29242
- return _regeneratorRuntime.wrap(function _callee15$(_context17) {
29243
- while (1) switch (_context17.prev = _context17.next) {
29223
+ return _regeneratorRuntime.wrap(function _callee14$(_context16) {
29224
+ while (1) switch (_context16.prev = _context16.next) {
29244
29225
  case 0:
29245
- _context17.next = 2;
29226
+ _context16.next = 2;
29246
29227
  return this.preLoadArticles(article.set, partlistArticlesToLoad.map(function (p) {
29247
29228
  return _this.partlistArticleInitData(article, p);
29248
29229
  }));
@@ -29250,24 +29231,24 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29250
29231
  i = 0;
29251
29232
  case 3:
29252
29233
  if (!(i < partlistArticlesToLoad.length)) {
29253
- _context17.next = 9;
29234
+ _context16.next = 9;
29254
29235
  break;
29255
29236
  }
29256
- _context17.next = 6;
29237
+ _context16.next = 6;
29257
29238
  return this.loadPartlistArticle(partlistArticlesToLoad[i], article, newConfigValues);
29258
29239
  case 6:
29259
29240
  i++;
29260
- _context17.next = 3;
29241
+ _context16.next = 3;
29261
29242
  break;
29262
29243
  case 9:
29263
29244
  article.sortPartlistArticles(partlistArticlesToLoad);
29264
29245
  case 10:
29265
29246
  case "end":
29266
- return _context17.stop();
29247
+ return _context16.stop();
29267
29248
  }
29268
- }, _callee15, this);
29249
+ }, _callee14, this);
29269
29250
  }));
29270
- function loadPartlistArticles(_x43, _x44, _x45) {
29251
+ function loadPartlistArticles(_x42, _x43, _x44) {
29271
29252
  return _loadPartlistArticles.apply(this, arguments);
29272
29253
  }
29273
29254
  return loadPartlistArticles;
@@ -29276,31 +29257,31 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29276
29257
  }, {
29277
29258
  key: "loadPartlistArticle",
29278
29259
  value: function () {
29279
- var _loadPartlistArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(doLoadItem, article, newConfigValues) {
29260
+ var _loadPartlistArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(doLoadItem, article, newConfigValues) {
29280
29261
  var nArticle, _doLoadItem$VariantVa;
29281
- return _regeneratorRuntime.wrap(function _callee16$(_context18) {
29282
- while (1) switch (_context18.prev = _context18.next) {
29262
+ return _regeneratorRuntime.wrap(function _callee15$(_context17) {
29263
+ while (1) switch (_context17.prev = _context17.next) {
29283
29264
  case 0:
29284
- _context18.next = 2;
29265
+ _context17.next = 2;
29285
29266
  return this.loadArticle(article.set, doLoadItem.ArticleCodex, this.partlistArticleInitData(article, doLoadItem));
29286
29267
  case 2:
29287
- nArticle = _context18.sent;
29268
+ nArticle = _context17.sent;
29288
29269
  if (!nArticle) {
29289
- _context18.next = 8;
29270
+ _context17.next = 8;
29290
29271
  break;
29291
29272
  }
29292
29273
  doLoadItem.BasketID = nArticle.basketId;
29293
- _context18.next = 7;
29274
+ _context17.next = 7;
29294
29275
  return this.toDoAfterArticleLoaded(nArticle, {}, nArticle.variantValuesForPla(nArticle.partlistArticleStandalone, (_doLoadItem$VariantVa = doLoadItem.VariantValues) !== null && _doLoadItem$VariantVa !== void 0 ? _doLoadItem$VariantVa : {}, newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}), 'initializingPartlist', doLoadItem.VariantItemData);
29295
29276
  case 7:
29296
29277
  article.addPartlistArticle(nArticle);
29297
29278
  case 8:
29298
29279
  case "end":
29299
- return _context18.stop();
29280
+ return _context17.stop();
29300
29281
  }
29301
- }, _callee16, this);
29282
+ }, _callee15, this);
29302
29283
  }));
29303
- function loadPartlistArticle(_x46, _x47, _x48) {
29284
+ function loadPartlistArticle(_x45, _x46, _x47) {
29304
29285
  return _loadPartlistArticle.apply(this, arguments);
29305
29286
  }
29306
29287
  return loadPartlistArticle;
@@ -29340,11 +29321,11 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29340
29321
  }, {
29341
29322
  key: "evalOpvsOnOpvsConstructionRules",
29342
29323
  value: (function () {
29343
- var _evalOpvsOnOpvsConstructionRules = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(article) {
29324
+ var _evalOpvsOnOpvsConstructionRules = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(article) {
29344
29325
  var _article$CatalogData$;
29345
29326
  var somethingChanged, previousRules, _key, actRules, item, _iterator4, _step4, ops, myOPVs, key2, opv, opvGroupName, _article$catalogArtic, _article$catalogArtic2, disable, onOpv, onOpvArr, invaliOPVs, invalidOPVArr, j, opvRule, ops2, i, invalidOpv, ops3, key, constructionRule, notifications, _i4, _item;
29346
- return _regeneratorRuntime.wrap(function _callee17$(_context19) {
29347
- while (1) switch (_context19.prev = _context19.next) {
29327
+ return _regeneratorRuntime.wrap(function _callee16$(_context18) {
29328
+ while (1) switch (_context18.prev = _context18.next) {
29348
29329
  case 0:
29349
29330
  somethingChanged = false;
29350
29331
  previousRules = {};
@@ -29418,26 +29399,26 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29418
29399
  _iterator4.f();
29419
29400
  }
29420
29401
  if (!((_article$CatalogData$ = article.CatalogData.warningRules) !== null && _article$CatalogData$ !== void 0 && _article$CatalogData$.length)) {
29421
- _context19.next = 20;
29402
+ _context18.next = 20;
29422
29403
  break;
29423
29404
  }
29424
29405
  notifications = this.checkNotificationRules(article.CatalogData.warningRules, _defineProperty({}, article.basketId, article), {});
29425
29406
  if (!(notifications !== null && notifications !== void 0 && notifications.length)) {
29426
- _context19.next = 20;
29407
+ _context18.next = 20;
29427
29408
  break;
29428
29409
  }
29429
29410
  _i4 = 0;
29430
29411
  case 11:
29431
29412
  if (!(_i4 < notifications.length)) {
29432
- _context19.next = 19;
29413
+ _context18.next = 19;
29433
29414
  break;
29434
29415
  }
29435
29416
  _item = notifications[_i4];
29436
29417
  if (_item.showAsWarning) {
29437
- _context19.next = 15;
29418
+ _context18.next = 15;
29438
29419
  break;
29439
29420
  }
29440
- return _context19.abrupt("continue", 16);
29421
+ return _context18.abrupt("continue", 16);
29441
29422
  case 15:
29442
29423
  article.addUpdatedOPVbyOPVConstructionRules(_item.showAsWarning.option + ';' + _item.showAsWarning.optionValue, article.updateOPVConstruction((!article.CatalogData.isIDMFormat ? 'OPT' : '') + _item.showAsWarning.option, (!article.CatalogData.isIDMFormat ? 'OPV' : '') + _item.showAsWarning.optionValue, {
29443
29424
  message: _item.message,
@@ -29445,24 +29426,24 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29445
29426
  }));
29446
29427
  case 16:
29447
29428
  _i4++;
29448
- _context19.next = 11;
29429
+ _context18.next = 11;
29449
29430
  break;
29450
29431
  case 19:
29451
29432
  somethingChanged = true;
29452
29433
  case 20:
29453
29434
  if (!(somethingChanged && JSON.stringify(previousRules) != JSON.stringify(article.updatedOPVbyOPVConstructionRules))) {
29454
- _context19.next = 23;
29435
+ _context18.next = 23;
29455
29436
  break;
29456
29437
  }
29457
- _context19.next = 23;
29438
+ _context18.next = 23;
29458
29439
  return this.updateCfgValues(article, {}, {});
29459
29440
  case 23:
29460
29441
  case "end":
29461
- return _context19.stop();
29442
+ return _context18.stop();
29462
29443
  }
29463
- }, _callee17, this);
29444
+ }, _callee16, this);
29464
29445
  }));
29465
- function evalOpvsOnOpvsConstructionRules(_x49) {
29446
+ function evalOpvsOnOpvsConstructionRules(_x48) {
29466
29447
  return _evalOpvsOnOpvsConstructionRules.apply(this, arguments);
29467
29448
  }
29468
29449
  return evalOpvsOnOpvsConstructionRules;
@@ -29641,31 +29622,31 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29641
29622
  }, {
29642
29623
  key: "triggerShelfplannerVisibility",
29643
29624
  value: function () {
29644
- var _triggerShelfplannerVisibility = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(artices, gridGroup) {
29625
+ var _triggerShelfplannerVisibility = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(artices, gridGroup) {
29645
29626
  var key, _artice$shelfPlanner, artice;
29646
- return _regeneratorRuntime.wrap(function _callee18$(_context20) {
29647
- while (1) switch (_context20.prev = _context20.next) {
29627
+ return _regeneratorRuntime.wrap(function _callee17$(_context19) {
29628
+ while (1) switch (_context19.prev = _context19.next) {
29648
29629
  case 0:
29649
- _context20.t0 = _regeneratorRuntime.keys(artices);
29630
+ _context19.t0 = _regeneratorRuntime.keys(artices);
29650
29631
  case 1:
29651
- if ((_context20.t1 = _context20.t0()).done) {
29652
- _context20.next = 8;
29632
+ if ((_context19.t1 = _context19.t0()).done) {
29633
+ _context19.next = 8;
29653
29634
  break;
29654
29635
  }
29655
- key = _context20.t1.value;
29636
+ key = _context19.t1.value;
29656
29637
  artice = artices[key];
29657
- _context20.next = 6;
29638
+ _context19.next = 6;
29658
29639
  return (_artice$shelfPlanner = artice.shelfPlanner) === null || _artice$shelfPlanner === void 0 ? void 0 : _artice$shelfPlanner.triggerVisibility(gridGroup);
29659
29640
  case 6:
29660
- _context20.next = 1;
29641
+ _context19.next = 1;
29661
29642
  break;
29662
29643
  case 8:
29663
29644
  case "end":
29664
- return _context20.stop();
29645
+ return _context19.stop();
29665
29646
  }
29666
- }, _callee18);
29647
+ }, _callee17);
29667
29648
  }));
29668
- function triggerShelfplannerVisibility(_x50, _x51) {
29649
+ function triggerShelfplannerVisibility(_x49, _x50) {
29669
29650
  return _triggerShelfplannerVisibility.apply(this, arguments);
29670
29651
  }
29671
29652
  return triggerShelfplannerVisibility;
@@ -29936,21 +29917,21 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29936
29917
  }, {
29937
29918
  key: "correctPartlistArticlesByGlobalRules",
29938
29919
  value: (function () {
29939
- var _correctPartlistArticlesByGlobalRules = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(set, partlistArticlesToLoad, bundleRules, doChangeRetailArticleNumbers) {
29920
+ var _correctPartlistArticlesByGlobalRules = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(set, partlistArticlesToLoad, bundleRules, doChangeRetailArticleNumbers) {
29940
29921
  var _loop5, i, article;
29941
- return _regeneratorRuntime.wrap(function _callee19$(_context22) {
29942
- while (1) switch (_context22.prev = _context22.next) {
29922
+ return _regeneratorRuntime.wrap(function _callee18$(_context21) {
29923
+ while (1) switch (_context21.prev = _context21.next) {
29943
29924
  case 0:
29944
29925
  if (bundleRules) partlistArticlesToLoad = this.bundlePartlistArticles(partlistArticlesToLoad, bundleRules, set.getDivaArticles());
29945
29926
  //Correct RetailArticleNumbers
29946
29927
  if (!(doChangeRetailArticleNumbers !== null && doChangeRetailArticleNumbers !== void 0 && doChangeRetailArticleNumbers.doChange && doChangeRetailArticleNumbers.retailArticleRules)) {
29947
- _context22.next = 9;
29928
+ _context21.next = 9;
29948
29929
  break;
29949
29930
  }
29950
29931
  _loop5 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop5(i) {
29951
29932
  var rule;
29952
- return _regeneratorRuntime.wrap(function _loop5$(_context21) {
29953
- while (1) switch (_context21.prev = _context21.next) {
29933
+ return _regeneratorRuntime.wrap(function _loop5$(_context20) {
29934
+ while (1) switch (_context20.prev = _context20.next) {
29954
29935
  case 0:
29955
29936
  //Run through articleCodexes to repair:
29956
29937
  rule = doChangeRetailArticleNumbers.retailArticleRules.find(function (item) {
@@ -29962,34 +29943,34 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29962
29943
  }
29963
29944
  case 2:
29964
29945
  case "end":
29965
- return _context21.stop();
29946
+ return _context20.stop();
29966
29947
  }
29967
29948
  }, _loop5);
29968
29949
  });
29969
29950
  i = 0;
29970
29951
  case 4:
29971
29952
  if (!(i < partlistArticlesToLoad.length)) {
29972
- _context22.next = 9;
29953
+ _context21.next = 9;
29973
29954
  break;
29974
29955
  }
29975
- return _context22.delegateYield(_loop5(i), "t0", 6);
29956
+ return _context21.delegateYield(_loop5(i), "t0", 6);
29976
29957
  case 6:
29977
29958
  i++;
29978
- _context22.next = 4;
29959
+ _context21.next = 4;
29979
29960
  break;
29980
29961
  case 9:
29981
29962
  article = Object.values(set.getDivaArticles()).find(function (article) {
29982
29963
  return article.hasPartlistArticle && !article.deleted;
29983
29964
  });
29984
- _context22.next = 12;
29965
+ _context21.next = 12;
29985
29966
  return this.loadPartlistArticles(partlistArticlesToLoad, article, {});
29986
29967
  case 12:
29987
29968
  case "end":
29988
- return _context22.stop();
29969
+ return _context21.stop();
29989
29970
  }
29990
- }, _callee19, this);
29971
+ }, _callee18, this);
29991
29972
  }));
29992
- function correctPartlistArticlesByGlobalRules(_x52, _x53, _x54, _x55) {
29973
+ function correctPartlistArticlesByGlobalRules(_x51, _x52, _x53, _x54) {
29993
29974
  return _correctPartlistArticlesByGlobalRules.apply(this, arguments);
29994
29975
  }
29995
29976
  return correctPartlistArticlesByGlobalRules;
@@ -32182,7 +32163,7 @@ var DivaSet = /*#__PURE__*/function () {
32182
32163
  break;
32183
32164
  }
32184
32165
  _context5.next = 3;
32185
- return import('./DoorPlanner-f3c5b6de.js');
32166
+ return import('./DoorPlanner-8db028c7.js');
32186
32167
  case 3:
32187
32168
  _yield$import = _context5.sent;
32188
32169
  DoorPlanner = _yield$import["default"];
@@ -34173,7 +34154,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
34173
34154
  var newConfigStep = this.createConfigStep(set, singleOPVOnly, ops.valName, [basketId], configStepKey, stepType, optionCodex, configTree, isAccessoire, undefined, ops.warning, ops.isDefined, configInAccessoire, ops, plaBasketIds);
34174
34155
  configTree.addConfigStep(tabGroupCodex, optionCodex, configStepKey, newConfigStep);
34175
34156
  } else {
34176
- stepAlreadyExists.targetArticles.push(basketId);
34157
+ if (!stepAlreadyExists.targetArticles.includes(basketId)) stepAlreadyExists.targetArticles.push(basketId);
34177
34158
  }
34178
34159
  if (mainConfigStepKey) {
34179
34160
  // when options are in the accessoire step but need to be added at the configuration tree aswell
@@ -34182,7 +34163,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
34182
34163
  var newMainConfigStep = this.createConfigStep(set, singleOPVOnly, ops.valName, [basketId], mainConfigStepKey, stepType, optionCodex, configTree, isAccessoire, undefined, ops.warning, ops.isDefined, false, ops, plaBasketIds);
34183
34164
  configTree.addConfigStep(tabGroupCodex, optionCodex, mainConfigStepKey, newMainConfigStep);
34184
34165
  } else {
34185
- mainStepAlreadyExists.targetArticles.push(basketId);
34166
+ if (!mainStepAlreadyExists.targetArticles.includes(basketId)) mainStepAlreadyExists.targetArticles.push(basketId);
34186
34167
  }
34187
34168
  }
34188
34169
  }
@@ -35533,28 +35514,6 @@ var DivaSetHandler = /*#__PURE__*/function () {
35533
35514
  var _set$getArticleByElem;
35534
35515
  return (_set$getArticleByElem = set.getArticleByElementId(elementId)) === null || _set$getArticleByElem === void 0 ? void 0 : _set$getArticleByElem.VariantValues;
35535
35516
  }
35536
- }, {
35537
- key: "setValidatedVariantValues",
35538
- value: function () {
35539
- var _setValidatedVariantValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(article) {
35540
- return _regeneratorRuntime.wrap(function _callee8$(_context10) {
35541
- while (1) switch (_context10.prev = _context10.next) {
35542
- case 0:
35543
- _context10.next = 2;
35544
- return articleHandlerInstance.setValidVariantValues(article);
35545
- case 2:
35546
- this.updatePosNrOfAccessoiresOfTargetArticles(article.set, [article.getBaseParent().basketId]);
35547
- case 3:
35548
- case "end":
35549
- return _context10.stop();
35550
- }
35551
- }, _callee8, this);
35552
- }));
35553
- function setValidatedVariantValues(_x22) {
35554
- return _setValidatedVariantValues.apply(this, arguments);
35555
- }
35556
- return setValidatedVariantValues;
35557
- }()
35558
35517
  }, {
35559
35518
  key: "getAllViewPlannerElements",
35560
35519
  value: function getAllViewPlannerElements(set) {
@@ -35604,28 +35563,28 @@ var DivaSetHandler = /*#__PURE__*/function () {
35604
35563
  }, {
35605
35564
  key: "copyArticleByElementId",
35606
35565
  value: (function () {
35607
- var _copyArticleByElementId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(set, elementId, ignoreOptionsToCopy) {
35566
+ var _copyArticleByElementId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(set, elementId, ignoreOptionsToCopy) {
35608
35567
  var origArticle, variantValuesToCopy, i, newArticle;
35609
- return _regeneratorRuntime.wrap(function _callee9$(_context11) {
35610
- while (1) switch (_context11.prev = _context11.next) {
35568
+ return _regeneratorRuntime.wrap(function _callee8$(_context10) {
35569
+ while (1) switch (_context10.prev = _context10.next) {
35611
35570
  case 0:
35612
35571
  origArticle = set.getArticleByElementId(elementId);
35613
35572
  variantValuesToCopy = origArticle.VariantValues;
35614
35573
  if (ignoreOptionsToCopy !== null && ignoreOptionsToCopy !== void 0 && ignoreOptionsToCopy.length) for (i = 0; i < ignoreOptionsToCopy.length; i++) variantValuesToCopy[ignoreOptionsToCopy[i]] = '';
35615
- _context11.next = 5;
35574
+ _context10.next = 5;
35616
35575
  return this.addArticleToActSet(set, set.getArticleCodex(elementId), {
35617
35576
  variantValues: variantValuesToCopy
35618
35577
  }, true);
35619
35578
  case 5:
35620
- newArticle = _context11.sent;
35621
- return _context11.abrupt("return", newArticle);
35579
+ newArticle = _context10.sent;
35580
+ return _context10.abrupt("return", newArticle);
35622
35581
  case 7:
35623
35582
  case "end":
35624
- return _context11.stop();
35583
+ return _context10.stop();
35625
35584
  }
35626
- }, _callee9, this);
35585
+ }, _callee8, this);
35627
35586
  }));
35628
- function copyArticleByElementId(_x23, _x24, _x25) {
35587
+ function copyArticleByElementId(_x22, _x23, _x24) {
35629
35588
  return _copyArticleByElementId.apply(this, arguments);
35630
35589
  }
35631
35590
  return copyArticleByElementId;
@@ -35633,22 +35592,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
35633
35592
  }, {
35634
35593
  key: "resetArticle",
35635
35594
  value: function () {
35636
- var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(set, basketId) {
35595
+ var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(set, basketId) {
35637
35596
  var article;
35638
- return _regeneratorRuntime.wrap(function _callee10$(_context12) {
35639
- while (1) switch (_context12.prev = _context12.next) {
35597
+ return _regeneratorRuntime.wrap(function _callee9$(_context11) {
35598
+ while (1) switch (_context11.prev = _context11.next) {
35640
35599
  case 0:
35641
35600
  article = set.getDivaArticles()[basketId];
35642
35601
  article.clearArticleOptionStates();
35643
- _context12.next = 4;
35602
+ _context11.next = 4;
35644
35603
  return articleHandlerInstance.toDoAfterArticleLoaded(article, {}, {}, 'initializing');
35645
35604
  case 4:
35646
35605
  case "end":
35647
- return _context12.stop();
35606
+ return _context11.stop();
35648
35607
  }
35649
- }, _callee10);
35608
+ }, _callee9);
35650
35609
  }));
35651
- function resetArticle(_x26, _x27) {
35610
+ function resetArticle(_x25, _x26) {
35652
35611
  return _resetArticle.apply(this, arguments);
35653
35612
  }
35654
35613
  return resetArticle;
@@ -35656,7 +35615,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
35656
35615
  }, {
35657
35616
  key: "addArticleToActSet",
35658
35617
  value: function () {
35659
- var _addArticleToActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(set, articleCodex, initParams, ignorePlanner) {
35618
+ var _addArticleToActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(set, articleCodex, initParams, ignorePlanner) {
35660
35619
  var from,
35661
35620
  newArticle,
35662
35621
  _set$getArticleByBask2,
@@ -35666,17 +35625,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
35666
35625
  _newArticle$catalogAr,
35667
35626
  rule,
35668
35627
  value,
35669
- _args13 = arguments;
35670
- return _regeneratorRuntime.wrap(function _callee11$(_context13) {
35671
- while (1) switch (_context13.prev = _context13.next) {
35628
+ _args12 = arguments;
35629
+ return _regeneratorRuntime.wrap(function _callee10$(_context12) {
35630
+ while (1) switch (_context12.prev = _context12.next) {
35672
35631
  case 0:
35673
- from = _args13.length > 4 && _args13[4] !== undefined ? _args13[4] : 'initializing';
35674
- _context13.next = 3;
35632
+ from = _args12.length > 4 && _args12[4] !== undefined ? _args12[4] : 'initializing';
35633
+ _context12.next = 3;
35675
35634
  return articleHandlerInstance.loadArticle(set, articleCodex, initParams);
35676
35635
  case 3:
35677
- newArticle = _context13.sent;
35636
+ newArticle = _context12.sent;
35678
35637
  if (newArticle) {
35679
- _context13.next = 6;
35638
+ _context12.next = 6;
35680
35639
  break;
35681
35640
  }
35682
35641
  throw new Error("articleCodex '" + articleCodex + "' not found in article list. Could be due to exclusivity or a bug in the application!");
@@ -35706,11 +35665,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
35706
35665
  }
35707
35666
  }
35708
35667
  if (!(from !== 'toDeleteShelf')) {
35709
- _context13.next = 15;
35668
+ _context12.next = 15;
35710
35669
  break;
35711
35670
  }
35712
35671
  set.addArticle(newArticle);
35713
- _context13.next = 15;
35672
+ _context12.next = 15;
35714
35673
  return articleHandlerInstance.toDoAfterArticleLoaded(newArticle, defaultHeaderValues, {}, from, undefined, ignorePlanner);
35715
35674
  case 15:
35716
35675
  if (newArticle.relatedToBasketId) {
@@ -35728,14 +35687,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
35728
35687
  }
35729
35688
  });
35730
35689
  }
35731
- return _context13.abrupt("return", newArticle);
35690
+ return _context12.abrupt("return", newArticle);
35732
35691
  case 17:
35733
35692
  case "end":
35734
- return _context13.stop();
35693
+ return _context12.stop();
35735
35694
  }
35736
- }, _callee11);
35695
+ }, _callee10);
35737
35696
  }));
35738
- function addArticleToActSet(_x28, _x29, _x30, _x31) {
35697
+ function addArticleToActSet(_x27, _x28, _x29, _x30) {
35739
35698
  return _addArticleToActSet.apply(this, arguments);
35740
35699
  }
35741
35700
  return addArticleToActSet;
@@ -35743,10 +35702,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
35743
35702
  }, {
35744
35703
  key: "updateAccessoireQuantity",
35745
35704
  value: function () {
35746
- var _updateAccessoireQuantity = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(set, accessoireItem, relatedToBasketId, nQuantity, forceConfigSingle) {
35705
+ var _updateAccessoireQuantity = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(set, accessoireItem, relatedToBasketId, nQuantity, forceConfigSingle) {
35747
35706
  var changed3D, somethingChanged, articleCodex, parentArticle, configSingle, _accessoire$quantity, _accessoire, accessoire, curQuantity, delta, newQuantity;
35748
- return _regeneratorRuntime.wrap(function _callee12$(_context14) {
35749
- while (1) switch (_context14.prev = _context14.next) {
35707
+ return _regeneratorRuntime.wrap(function _callee11$(_context13) {
35708
+ while (1) switch (_context13.prev = _context13.next) {
35750
35709
  case 0:
35751
35710
  //Falls das Accessoire bereits existiert nur die Quantity Updaten. Ansonsten das Accessoire neu laden.
35752
35711
  //Falls die Neue Quantity == 0 ist muss es gelöscht werden
@@ -35756,7 +35715,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
35756
35715
  parentArticle = set.getArticleByBasketId(relatedToBasketId);
35757
35716
  configSingle = forceConfigSingle || set.CatalogData.forceConfigAllAccessoires;
35758
35717
  if (!parentArticle) {
35759
- _context14.next = 29;
35718
+ _context13.next = 29;
35760
35719
  break;
35761
35720
  }
35762
35721
  accessoire = parentArticle.getAccessoireByArticleCodex(articleCodex)[0];
@@ -35764,25 +35723,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
35764
35723
  delta = nQuantity - curQuantity;
35765
35724
  newQuantity = !configSingle ? delta : nQuantity;
35766
35725
  if (!(delta + ((_accessoire$quantity = (_accessoire = accessoire) === null || _accessoire === void 0 ? void 0 : _accessoire.quantity) !== null && _accessoire$quantity !== void 0 ? _accessoire$quantity : 0) > 0)) {
35767
- _context14.next = 24;
35726
+ _context13.next = 24;
35768
35727
  break;
35769
35728
  }
35770
35729
  if (!(accessoire == undefined || !configSingle)) {
35771
- _context14.next = 17;
35730
+ _context13.next = 17;
35772
35731
  break;
35773
35732
  }
35774
- _context14.next = 14;
35733
+ _context13.next = 14;
35775
35734
  return this.addArticleToActSet(set, articleCodex, {
35776
35735
  quantity: newQuantity,
35777
35736
  relatedToBasketId: relatedToBasketId,
35778
35737
  notDocking: true
35779
35738
  });
35780
35739
  case 14:
35781
- accessoire = _context14.sent;
35782
- _context14.next = 19;
35740
+ accessoire = _context13.sent;
35741
+ _context13.next = 19;
35783
35742
  break;
35784
35743
  case 17:
35785
- _context14.next = 19;
35744
+ _context13.next = 19;
35786
35745
  return articleHandlerInstance.updateAccessoireQuantity(accessoire, newQuantity);
35787
35746
  case 19:
35788
35747
  if (accessoireItem.isVisualized && !accessoireItem.isPlannerElement) {
@@ -35791,11 +35750,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
35791
35750
  }
35792
35751
  set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(relatedToBasketId).basketId);
35793
35752
  somethingChanged = true;
35794
- _context14.next = 29;
35753
+ _context13.next = 29;
35795
35754
  break;
35796
35755
  case 24:
35797
35756
  if (!(delta < 0 && accessoire != undefined)) {
35798
- _context14.next = 29;
35757
+ _context13.next = 29;
35799
35758
  break;
35800
35759
  }
35801
35760
  if (accessoireItem.isVisualized && !accessoireItem.isPlannerElement) {
@@ -35803,20 +35762,20 @@ var DivaSetHandler = /*#__PURE__*/function () {
35803
35762
  changed3D = true;
35804
35763
  }
35805
35764
  somethingChanged = true;
35806
- _context14.next = 29;
35765
+ _context13.next = 29;
35807
35766
  return this.deleteElementFromSet(set, accessoire);
35808
35767
  case 29:
35809
- return _context14.abrupt("return", {
35768
+ return _context13.abrupt("return", {
35810
35769
  somethingChanged: somethingChanged,
35811
35770
  changed3D: changed3D
35812
35771
  });
35813
35772
  case 30:
35814
35773
  case "end":
35815
- return _context14.stop();
35774
+ return _context13.stop();
35816
35775
  }
35817
- }, _callee12, this);
35776
+ }, _callee11, this);
35818
35777
  }));
35819
- function updateAccessoireQuantity(_x32, _x33, _x34, _x35, _x36) {
35778
+ function updateAccessoireQuantity(_x31, _x32, _x33, _x34, _x35) {
35820
35779
  return _updateAccessoireQuantity.apply(this, arguments);
35821
35780
  }
35822
35781
  return updateAccessoireQuantity;
@@ -35824,36 +35783,36 @@ var DivaSetHandler = /*#__PURE__*/function () {
35824
35783
  }, {
35825
35784
  key: "deleteElementFromSetByElemId",
35826
35785
  value: function () {
35827
- var _deleteElementFromSetByElemId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(set, elementId, autoCorrectAVL_AVR, deletionType) {
35786
+ var _deleteElementFromSetByElemId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(set, elementId, autoCorrectAVL_AVR, deletionType) {
35828
35787
  var article;
35829
- return _regeneratorRuntime.wrap(function _callee13$(_context15) {
35830
- while (1) switch (_context15.prev = _context15.next) {
35788
+ return _regeneratorRuntime.wrap(function _callee12$(_context14) {
35789
+ while (1) switch (_context14.prev = _context14.next) {
35831
35790
  case 0:
35832
35791
  if (!set) {
35833
- _context15.next = 6;
35792
+ _context14.next = 6;
35834
35793
  break;
35835
35794
  }
35836
35795
  article = set.getArticleByElementId(elementId);
35837
35796
  if (!article) {
35838
- _context15.next = 6;
35797
+ _context14.next = 6;
35839
35798
  break;
35840
35799
  }
35841
- _context15.next = 5;
35800
+ _context14.next = 5;
35842
35801
  return this.deleteElementFromSet(set, article, autoCorrectAVL_AVR, deletionType);
35843
35802
  case 5:
35844
- return _context15.abrupt("return", _context15.sent);
35803
+ return _context14.abrupt("return", _context14.sent);
35845
35804
  case 6:
35846
- return _context15.abrupt("return", {
35805
+ return _context14.abrupt("return", {
35847
35806
  success: false,
35848
35807
  setId: set.getSetId()
35849
35808
  });
35850
35809
  case 7:
35851
35810
  case "end":
35852
- return _context15.stop();
35811
+ return _context14.stop();
35853
35812
  }
35854
- }, _callee13, this);
35813
+ }, _callee12, this);
35855
35814
  }));
35856
- function deleteElementFromSetByElemId(_x37, _x38, _x39, _x40) {
35815
+ function deleteElementFromSetByElemId(_x36, _x37, _x38, _x39) {
35857
35816
  return _deleteElementFromSetByElemId.apply(this, arguments);
35858
35817
  }
35859
35818
  return deleteElementFromSetByElemId;
@@ -35861,18 +35820,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
35861
35820
  }, {
35862
35821
  key: "deleteElementFromSet",
35863
35822
  value: function () {
35864
- var _deleteElementFromSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(set, article, autoCorrectAVL_AVR, deletionType, dontReload, dontCheckInfluencedPlannerElements) {
35823
+ var _deleteElementFromSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(set, article, autoCorrectAVL_AVR, deletionType, dontReload, dontCheckInfluencedPlannerElements) {
35865
35824
  var _deletedArticle$doorP, _set$CatalogData;
35866
35825
  var setId, success, newSelectedElement, allElementsToDelete, i, art, deletedArticle, articles, key, oldTransform, result, _set$getArticleByBask3;
35867
- return _regeneratorRuntime.wrap(function _callee14$(_context16) {
35868
- while (1) switch (_context16.prev = _context16.next) {
35826
+ return _regeneratorRuntime.wrap(function _callee13$(_context15) {
35827
+ while (1) switch (_context15.prev = _context15.next) {
35869
35828
  case 0:
35870
35829
  setId = set.getSetId();
35871
35830
  if (!(set == undefined)) {
35872
- _context16.next = 3;
35831
+ _context15.next = 3;
35873
35832
  break;
35874
35833
  }
35875
- return _context16.abrupt("return", {
35834
+ return _context15.abrupt("return", {
35876
35835
  success: false,
35877
35836
  selectElementId: undefined,
35878
35837
  setId: setId
@@ -35881,49 +35840,49 @@ var DivaSetHandler = /*#__PURE__*/function () {
35881
35840
  success = false;
35882
35841
  newSelectedElement = undefined;
35883
35842
  if (dontCheckInfluencedPlannerElements) {
35884
- _context16.next = 15;
35843
+ _context15.next = 15;
35885
35844
  break;
35886
35845
  }
35887
35846
  allElementsToDelete = set.plannerHandler.getPlannerElementsInfluencedByDeletion(setId, article.elementId, deletionType);
35888
35847
  i = 0;
35889
35848
  case 8:
35890
35849
  if (!(i < allElementsToDelete.length)) {
35891
- _context16.next = 15;
35850
+ _context15.next = 15;
35892
35851
  break;
35893
35852
  }
35894
35853
  art = set.getArticleByElementId(allElementsToDelete[i]);
35895
- _context16.next = 12;
35854
+ _context15.next = 12;
35896
35855
  return this.deleteElementFromSet(set, art, undefined, 'STD_DONTUPDATE', true, true);
35897
35856
  case 12:
35898
35857
  i++;
35899
- _context16.next = 8;
35858
+ _context15.next = 8;
35900
35859
  break;
35901
35860
  case 15:
35902
35861
  deletedArticle = article; //accessoires löschen
35903
35862
  articles = set.getAccessoiresOfBasketId(article.basketId);
35904
- _context16.t0 = _regeneratorRuntime.keys(articles);
35863
+ _context15.t0 = _regeneratorRuntime.keys(articles);
35905
35864
  case 18:
35906
- if ((_context16.t1 = _context16.t0()).done) {
35907
- _context16.next = 24;
35865
+ if ((_context15.t1 = _context15.t0()).done) {
35866
+ _context15.next = 24;
35908
35867
  break;
35909
35868
  }
35910
- key = _context16.t1.value;
35911
- _context16.next = 22;
35869
+ key = _context15.t1.value;
35870
+ _context15.next = 22;
35912
35871
  return this.deleteElementFromSet(set, articles[key], undefined, undefined, true);
35913
35872
  case 22:
35914
- _context16.next = 18;
35873
+ _context15.next = 18;
35915
35874
  break;
35916
35875
  case 24:
35917
35876
  oldTransform = undefined;
35918
35877
  if (deletedArticle) deletedArticle.deleted = true;
35919
35878
  if (!(deletedArticle !== null && deletedArticle !== void 0 && deletedArticle.hasCatalogPlannerArticle)) {
35920
- _context16.next = 32;
35879
+ _context15.next = 32;
35921
35880
  break;
35922
35881
  }
35923
- _context16.next = 29;
35882
+ _context15.next = 29;
35924
35883
  return set.plannerHandler.deletePlannerElement(setId, deletedArticle.elementId, autoCorrectAVL_AVR, deletionType);
35925
35884
  case 29:
35926
- result = _context16.sent;
35885
+ result = _context15.sent;
35927
35886
  newSelectedElement = result.newElementToSelect;
35928
35887
  oldTransform = result.transform;
35929
35888
  case 32:
@@ -35936,13 +35895,13 @@ var DivaSetHandler = /*#__PURE__*/function () {
35936
35895
  deletedArticle === null || deletedArticle === void 0 || (_deletedArticle$doorP = deletedArticle.doorPlanner) === null || _deletedArticle$doorP === void 0 || _deletedArticle$doorP.deleteElement(deletedArticle.basketId);
35937
35896
  success = set.deleteArticle(article.basketId);
35938
35897
  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)) {
35939
- _context16.next = 38;
35898
+ _context15.next = 38;
35940
35899
  break;
35941
35900
  }
35942
- _context16.next = 38;
35901
+ _context15.next = 38;
35943
35902
  return this.updateArticlesOptionStatesOfActSet(set, {}, []);
35944
35903
  case 38:
35945
- return _context16.abrupt("return", {
35904
+ return _context15.abrupt("return", {
35946
35905
  success: success,
35947
35906
  selectElementId: newSelectedElement,
35948
35907
  setId: setId,
@@ -35950,11 +35909,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
35950
35909
  });
35951
35910
  case 39:
35952
35911
  case "end":
35953
- return _context16.stop();
35912
+ return _context15.stop();
35954
35913
  }
35955
- }, _callee14, this);
35914
+ }, _callee13, this);
35956
35915
  }));
35957
- function deleteElementFromSet(_x41, _x42, _x43, _x44, _x45, _x46) {
35916
+ function deleteElementFromSet(_x40, _x41, _x42, _x43, _x44, _x45) {
35958
35917
  return _deleteElementFromSet.apply(this, arguments);
35959
35918
  }
35960
35919
  return deleteElementFromSet;
@@ -35962,22 +35921,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
35962
35921
  }, {
35963
35922
  key: "addAccessorieOnShelfPlanner",
35964
35923
  value: function () {
35965
- var _addAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(set, gridIndex, cellIndex, parentBasketId, params) {
35924
+ var _addAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(set, gridIndex, cellIndex, parentBasketId, params) {
35966
35925
  var parentArticle, articleCodex, accessoire, doesFit;
35967
- return _regeneratorRuntime.wrap(function _callee15$(_context17) {
35968
- while (1) switch (_context17.prev = _context17.next) {
35926
+ return _regeneratorRuntime.wrap(function _callee14$(_context16) {
35927
+ while (1) switch (_context16.prev = _context16.next) {
35969
35928
  case 0:
35970
35929
  parentArticle = set.getArticleByBasketId(parentBasketId);
35971
35930
  if (!(parentArticle !== null && parentArticle !== void 0 && parentArticle.shelfPlanner)) {
35972
- _context17.next = 24;
35931
+ _context16.next = 24;
35973
35932
  break;
35974
35933
  }
35975
35934
  articleCodex = parentArticle.shelfPlanner.getActAccessoireOfGrid(gridIndex);
35976
35935
  if (!articleCodex) {
35977
- _context17.next = 24;
35936
+ _context16.next = 24;
35978
35937
  break;
35979
35938
  }
35980
- _context17.next = 6;
35939
+ _context16.next = 6;
35981
35940
  return this.addArticleToActSet(set, articleCodex, {
35982
35941
  relatedToBasketId: parentBasketId,
35983
35942
  relatedToShelf: parentBasketId,
@@ -35985,52 +35944,52 @@ var DivaSetHandler = /*#__PURE__*/function () {
35985
35944
  partlistCodexToInit: params === null || params === void 0 ? void 0 : params.partlistCodexToInit
35986
35945
  });
35987
35946
  case 6:
35988
- accessoire = _context17.sent;
35947
+ accessoire = _context16.sent;
35989
35948
  doesFit = parentArticle.shelfPlanner.tryFitOnShelfOfGrid(gridIndex, cellIndex, accessoire);
35990
35949
  if (!(doesFit !== false && doesFit.type != 'doesNotFit' && doesFit.type != 'notAllowedByParentRule' && doesFit.type != 'notAllowedByAccessoireRule' && doesFit.type != 'notAllowedByMaxQuantityReached' && doesFit.index !== undefined)) {
35991
- _context17.next = 20;
35950
+ _context16.next = 20;
35992
35951
  break;
35993
35952
  }
35994
- _context17.next = 11;
35953
+ _context16.next = 11;
35995
35954
  return parentArticle.shelfPlanner.addAccessoireInCellInGrid(accessoire, gridIndex, doesFit.index, doesFit.type, params);
35996
35955
  case 11:
35997
35956
  set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(parentBasketId).basketId);
35998
35957
  if (!parentArticle.shelfPlanner.allMontageOptions.length) {
35999
- _context17.next = 15;
35958
+ _context16.next = 15;
36000
35959
  break;
36001
35960
  }
36002
- _context17.next = 15;
35961
+ _context16.next = 15;
36003
35962
  return this.updateArticlesOptionStatesOfActSet(set, {}, [parentArticle.basketId], true, 'initializing');
36004
35963
  case 15:
36005
35964
  if (params !== null && params !== void 0 && params.byInit) {
36006
- _context17.next = 18;
35965
+ _context16.next = 18;
36007
35966
  break;
36008
35967
  }
36009
- _context17.next = 18;
35968
+ _context16.next = 18;
36010
35969
  return parentArticle.shelfPlanner.onConfigChanged({});
36011
35970
  case 18:
36012
- _context17.next = 22;
35971
+ _context16.next = 22;
36013
35972
  break;
36014
35973
  case 20:
36015
- _context17.next = 22;
35974
+ _context16.next = 22;
36016
35975
  return this.deleteElementFromSet(set, accessoire);
36017
35976
  case 22:
36018
35977
  if (!(doesFit !== false)) {
36019
- _context17.next = 24;
35978
+ _context16.next = 24;
36020
35979
  break;
36021
35980
  }
36022
- return _context17.abrupt("return", _objectSpread$9(_objectSpread$9({}, doesFit), {}, {
35981
+ return _context16.abrupt("return", _objectSpread$9(_objectSpread$9({}, doesFit), {}, {
36023
35982
  accessoire: accessoire
36024
35983
  }));
36025
35984
  case 24:
36026
- return _context17.abrupt("return", false);
35985
+ return _context16.abrupt("return", false);
36027
35986
  case 25:
36028
35987
  case "end":
36029
- return _context17.stop();
35988
+ return _context16.stop();
36030
35989
  }
36031
- }, _callee15, this);
35990
+ }, _callee14, this);
36032
35991
  }));
36033
- function addAccessorieOnShelfPlanner(_x47, _x48, _x49, _x50, _x51) {
35992
+ function addAccessorieOnShelfPlanner(_x46, _x47, _x48, _x49, _x50) {
36034
35993
  return _addAccessorieOnShelfPlanner.apply(this, arguments);
36035
35994
  }
36036
35995
  return addAccessorieOnShelfPlanner;
@@ -36038,29 +35997,29 @@ var DivaSetHandler = /*#__PURE__*/function () {
36038
35997
  }, {
36039
35998
  key: "moveShelfItem",
36040
35999
  value: function () {
36041
- var _moveShelfItem = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(set, grid, initialIndex, finalIndex) {
36000
+ var _moveShelfItem = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(set, grid, initialIndex, finalIndex) {
36042
36001
  var article;
36043
- return _regeneratorRuntime.wrap(function _callee16$(_context18) {
36044
- while (1) switch (_context18.prev = _context18.next) {
36002
+ return _regeneratorRuntime.wrap(function _callee15$(_context17) {
36003
+ while (1) switch (_context17.prev = _context17.next) {
36045
36004
  case 0:
36046
36005
  article = set.getArticleByBasketId(grid.basketId);
36047
36006
  if (!(article && article.shelfPlanner)) {
36048
- _context18.next = 5;
36007
+ _context17.next = 5;
36049
36008
  break;
36050
36009
  }
36051
- _context18.next = 4;
36010
+ _context17.next = 4;
36052
36011
  return article.shelfPlanner.grids[grid.ShelfIndex].moveCell(initialIndex, finalIndex);
36053
36012
  case 4:
36054
- return _context18.abrupt("return", _context18.sent);
36013
+ return _context17.abrupt("return", _context17.sent);
36055
36014
  case 5:
36056
- return _context18.abrupt("return", 'NOTHING_CHANGED');
36015
+ return _context17.abrupt("return", 'NOTHING_CHANGED');
36057
36016
  case 6:
36058
36017
  case "end":
36059
- return _context18.stop();
36018
+ return _context17.stop();
36060
36019
  }
36061
- }, _callee16);
36020
+ }, _callee15);
36062
36021
  }));
36063
- function moveShelfItem(_x52, _x53, _x54, _x55) {
36022
+ function moveShelfItem(_x51, _x52, _x53, _x54) {
36064
36023
  return _moveShelfItem.apply(this, arguments);
36065
36024
  }
36066
36025
  return moveShelfItem;
@@ -36081,11 +36040,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
36081
36040
  }, {
36082
36041
  key: "getFreeShelfGrids",
36083
36042
  value: function () {
36084
- var _getFreeShelfGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(set, gridGroup) {
36043
+ var _getFreeShelfGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(set, gridGroup) {
36085
36044
  var _article$shelfPlanner;
36086
36045
  var articles, article, articleCodex, accessoire, ret;
36087
- return _regeneratorRuntime.wrap(function _callee17$(_context19) {
36088
- while (1) switch (_context19.prev = _context19.next) {
36046
+ return _regeneratorRuntime.wrap(function _callee16$(_context18) {
36047
+ while (1) switch (_context18.prev = _context18.next) {
36089
36048
  case 0:
36090
36049
  articles = set.getDivaArticlesByGridGroup(gridGroup);
36091
36050
  article = Object.values(articles).find(function (a) {
@@ -36094,38 +36053,38 @@ var DivaSetHandler = /*#__PURE__*/function () {
36094
36053
  });
36095
36054
  articleCodex = article === null || article === void 0 || (_article$shelfPlanner = article.shelfPlanner) === null || _article$shelfPlanner === void 0 ? void 0 : _article$shelfPlanner.getSelectedAccessoireById(gridGroup);
36096
36055
  if (!(!article || !articleCodex)) {
36097
- _context19.next = 5;
36056
+ _context18.next = 5;
36098
36057
  break;
36099
36058
  }
36100
- return _context19.abrupt("return", undefined);
36059
+ return _context18.abrupt("return", undefined);
36101
36060
  case 5:
36102
- _context19.next = 7;
36061
+ _context18.next = 7;
36103
36062
  return this.addArticleToActSet(set, articleCodex, {
36104
36063
  relatedToBasketId: article.basketId,
36105
36064
  relatedToShelf: article.basketId,
36106
36065
  relatedToShelfGrid: 0
36107
36066
  }, false, 'toDeleteShelf');
36108
36067
  case 7:
36109
- accessoire = _context19.sent;
36110
- _context19.next = 10;
36068
+ accessoire = _context18.sent;
36069
+ _context18.next = 10;
36111
36070
  return accessoire.updateShelfPlannerState({});
36112
36071
  case 10:
36113
36072
  articleHandlerInstance.initCfgValues(accessoire, {});
36114
- _context19.next = 13;
36073
+ _context18.next = 13;
36115
36074
  return articleHandlerInstance.updateCfgValues(accessoire, {}, {}, true, true);
36116
36075
  case 13:
36117
36076
  ret = this.getFreePlaces(gridGroup, articles, accessoire);
36118
- _context19.next = 16;
36077
+ _context18.next = 16;
36119
36078
  return this.deleteElementFromSet(set, accessoire, undefined, undefined, true);
36120
36079
  case 16:
36121
- return _context19.abrupt("return", ret);
36080
+ return _context18.abrupt("return", ret);
36122
36081
  case 17:
36123
36082
  case "end":
36124
- return _context19.stop();
36083
+ return _context18.stop();
36125
36084
  }
36126
- }, _callee17, this);
36085
+ }, _callee16, this);
36127
36086
  }));
36128
- function getFreeShelfGrids(_x56, _x57) {
36087
+ function getFreeShelfGrids(_x55, _x56) {
36129
36088
  return _getFreeShelfGrids.apply(this, arguments);
36130
36089
  }
36131
36090
  return getFreeShelfGrids;
@@ -36184,62 +36143,62 @@ var DivaSetHandler = /*#__PURE__*/function () {
36184
36143
  }, {
36185
36144
  key: "moveShelfItemToGrid",
36186
36145
  value: function () {
36187
- var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(set, accessoireBasketId, parentBasketId, gridName, cellIndex) {
36146
+ var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(set, accessoireBasketId, parentBasketId, gridName, cellIndex) {
36188
36147
  var _oldGrid$Cells$find;
36189
36148
  var artices, accessoire, oldParent, newParent, oldGrid, newGrid, index;
36190
- return _regeneratorRuntime.wrap(function _callee18$(_context20) {
36191
- while (1) switch (_context20.prev = _context20.next) {
36149
+ return _regeneratorRuntime.wrap(function _callee17$(_context19) {
36150
+ while (1) switch (_context19.prev = _context19.next) {
36192
36151
  case 0:
36193
36152
  artices = set.getDivaArticles();
36194
36153
  accessoire = artices[accessoireBasketId];
36195
36154
  oldParent = accessoire.accessoireParentArticle;
36196
36155
  newParent = artices[parentBasketId];
36197
36156
  if (!(accessoire.relatedToShelfGrid === undefined)) {
36198
- _context20.next = 6;
36157
+ _context19.next = 6;
36199
36158
  break;
36200
36159
  }
36201
- return _context20.abrupt("return");
36160
+ return _context19.abrupt("return");
36202
36161
  case 6:
36203
36162
  if (oldParent !== null && oldParent !== void 0 && oldParent.shelfPlanner) {
36204
- _context20.next = 8;
36163
+ _context19.next = 8;
36205
36164
  break;
36206
36165
  }
36207
- return _context20.abrupt("return");
36166
+ return _context19.abrupt("return");
36208
36167
  case 8:
36209
36168
  if (newParent !== null && newParent !== void 0 && newParent.shelfPlanner) {
36210
- _context20.next = 10;
36169
+ _context19.next = 10;
36211
36170
  break;
36212
36171
  }
36213
- return _context20.abrupt("return");
36172
+ return _context19.abrupt("return");
36214
36173
  case 10:
36215
36174
  oldGrid = oldParent.shelfPlanner.getGridByIndex(accessoire.relatedToShelfGrid);
36216
36175
  newGrid = newParent.shelfPlanner.getGridByGridName(gridName);
36217
36176
  if (oldGrid) {
36218
- _context20.next = 14;
36177
+ _context19.next = 14;
36219
36178
  break;
36220
36179
  }
36221
- return _context20.abrupt("return");
36180
+ return _context19.abrupt("return");
36222
36181
  case 14:
36223
36182
  if (newGrid) {
36224
- _context20.next = 16;
36183
+ _context19.next = 16;
36225
36184
  break;
36226
36185
  }
36227
- return _context20.abrupt("return");
36186
+ return _context19.abrupt("return");
36228
36187
  case 16:
36229
36188
  index = oldGrid === null || oldGrid === void 0 || (_oldGrid$Cells$find = oldGrid.Cells.find(function (c, i) {
36230
36189
  var _c$Article;
36231
36190
  return c.Index === c.InUse && ((_c$Article = c.Article) === null || _c$Article === void 0 ? void 0 : _c$Article.basketId) == accessoire.basketId;
36232
36191
  })) === null || _oldGrid$Cells$find === void 0 ? void 0 : _oldGrid$Cells$find.Index;
36233
36192
  if (!(index === undefined)) {
36234
- _context20.next = 19;
36193
+ _context19.next = 19;
36235
36194
  break;
36236
36195
  }
36237
- return _context20.abrupt("return");
36196
+ return _context19.abrupt("return");
36238
36197
  case 19:
36239
- _context20.next = 21;
36198
+ _context19.next = 21;
36240
36199
  return oldParent.shelfPlanner.deleteAccessoireOfCellInGrid(accessoire.relatedToShelfGrid, index);
36241
36200
  case 21:
36242
- _context20.next = 23;
36201
+ _context19.next = 23;
36243
36202
  return newParent.shelfPlanner.addAccessoireInCellInGrid(accessoire, newGrid.ShelfIndex, cellIndex, 'fitsOn');
36244
36203
  case 23:
36245
36204
  accessoire.relatedToShelfGrid = newGrid.ShelfIndex;
@@ -36251,17 +36210,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
36251
36210
  set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(oldParent.basketId).basketId);
36252
36211
  }
36253
36212
  set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(newParent.basketId).basketId);
36254
- _context20.next = 28;
36213
+ _context19.next = 28;
36255
36214
  return this.updateArticlesOptionStatesOfActSet(set, {}, [oldParent.basketId, newParent.basketId]);
36256
36215
  case 28:
36257
- return _context20.abrupt("return", newGrid.getGridIdByArticleCodex(accessoire.articleCodex));
36216
+ return _context19.abrupt("return", newGrid.getGridIdByArticleCodex(accessoire.articleCodex));
36258
36217
  case 29:
36259
36218
  case "end":
36260
- return _context20.stop();
36219
+ return _context19.stop();
36261
36220
  }
36262
- }, _callee18, this);
36221
+ }, _callee17, this);
36263
36222
  }));
36264
- function moveShelfItemToGrid(_x58, _x59, _x60, _x61, _x62) {
36223
+ function moveShelfItemToGrid(_x57, _x58, _x59, _x60, _x61) {
36265
36224
  return _moveShelfItemToGrid.apply(this, arguments);
36266
36225
  }
36267
36226
  return moveShelfItemToGrid;
@@ -36269,33 +36228,33 @@ var DivaSetHandler = /*#__PURE__*/function () {
36269
36228
  }, {
36270
36229
  key: "deleteAccessorieOnShelfPlanner",
36271
36230
  value: function () {
36272
- var _deleteAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(set, gridIndex, cellIndex, parentBasketId, dontReload) {
36231
+ var _deleteAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(set, gridIndex, cellIndex, parentBasketId, dontReload) {
36273
36232
  var _parentArticle$shelfP2;
36274
36233
  var parentArticle, articeToDelete, _parentArticle$shelfP3;
36275
- return _regeneratorRuntime.wrap(function _callee19$(_context21) {
36276
- while (1) switch (_context21.prev = _context21.next) {
36234
+ return _regeneratorRuntime.wrap(function _callee18$(_context20) {
36235
+ while (1) switch (_context20.prev = _context20.next) {
36277
36236
  case 0:
36278
36237
  parentArticle = set.getArticleByBasketId(parentBasketId);
36279
- _context21.next = 3;
36238
+ _context20.next = 3;
36280
36239
  return parentArticle === null || parentArticle === void 0 || (_parentArticle$shelfP2 = parentArticle.shelfPlanner) === null || _parentArticle$shelfP2 === void 0 ? void 0 : _parentArticle$shelfP2.deleteAccessoireOfCellInGrid(gridIndex, cellIndex);
36281
36240
  case 3:
36282
- articeToDelete = _context21.sent;
36241
+ articeToDelete = _context20.sent;
36283
36242
  if (!articeToDelete) {
36284
- _context21.next = 9;
36243
+ _context20.next = 9;
36285
36244
  break;
36286
36245
  }
36287
- _context21.next = 7;
36246
+ _context20.next = 7;
36288
36247
  return this.deleteElementFromSet(set, articeToDelete, false, undefined, dontReload);
36289
36248
  case 7:
36290
- _context21.next = 9;
36249
+ _context20.next = 9;
36291
36250
  return parentArticle === null || parentArticle === void 0 || (_parentArticle$shelfP3 = parentArticle.shelfPlanner) === null || _parentArticle$shelfP3 === void 0 ? void 0 : _parentArticle$shelfP3.onConfigChanged({});
36292
36251
  case 9:
36293
36252
  case "end":
36294
- return _context21.stop();
36253
+ return _context20.stop();
36295
36254
  }
36296
- }, _callee19, this);
36255
+ }, _callee18, this);
36297
36256
  }));
36298
- function deleteAccessorieOnShelfPlanner(_x63, _x64, _x65, _x66, _x67) {
36257
+ function deleteAccessorieOnShelfPlanner(_x62, _x63, _x64, _x65, _x66) {
36299
36258
  return _deleteAccessorieOnShelfPlanner.apply(this, arguments);
36300
36259
  }
36301
36260
  return deleteAccessorieOnShelfPlanner;
@@ -36303,25 +36262,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
36303
36262
  }, {
36304
36263
  key: "updatePlannerTrans",
36305
36264
  value: function () {
36306
- var _updatePlannerTrans = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(set, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
36265
+ var _updatePlannerTrans = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(set, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
36307
36266
  var updateConfig;
36308
- return _regeneratorRuntime.wrap(function _callee20$(_context22) {
36309
- while (1) switch (_context22.prev = _context22.next) {
36267
+ return _regeneratorRuntime.wrap(function _callee19$(_context21) {
36268
+ while (1) switch (_context21.prev = _context21.next) {
36310
36269
  case 0:
36311
36270
  updateConfig = set.plannerHandler.updatePlannerTrans(set.getSetId(), plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance);
36312
36271
  if (!updateConfig) {
36313
- _context22.next = 4;
36272
+ _context21.next = 4;
36314
36273
  break;
36315
36274
  }
36316
- _context22.next = 4;
36275
+ _context21.next = 4;
36317
36276
  return this.updateArticlesOptionStatesOfActSet(set, {}, [], true, 'initializingAfterTrans');
36318
36277
  case 4:
36319
36278
  case "end":
36320
- return _context22.stop();
36279
+ return _context21.stop();
36321
36280
  }
36322
- }, _callee20, this);
36281
+ }, _callee19, this);
36323
36282
  }));
36324
- function updatePlannerTrans(_x68, _x69, _x70, _x71, _x72, _x73, _x74) {
36283
+ function updatePlannerTrans(_x67, _x68, _x69, _x70, _x71, _x72, _x73) {
36325
36284
  return _updatePlannerTrans.apply(this, arguments);
36326
36285
  }
36327
36286
  return updatePlannerTrans;
@@ -36397,10 +36356,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
36397
36356
  }, {
36398
36357
  key: "deleteAccessoire",
36399
36358
  value: function () {
36400
- var _deleteAccessoire = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(set, articleCodex, parentBasketId) {
36359
+ var _deleteAccessoire = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(set, articleCodex, parentBasketId) {
36401
36360
  var divaArticles, articlesToDelete, key, articleToDelete, maxQuantity, i;
36402
- return _regeneratorRuntime.wrap(function _callee21$(_context23) {
36403
- while (1) switch (_context23.prev = _context23.next) {
36361
+ return _regeneratorRuntime.wrap(function _callee20$(_context22) {
36362
+ while (1) switch (_context22.prev = _context22.next) {
36404
36363
  case 0:
36405
36364
  divaArticles = set.getDivaArticles();
36406
36365
  articlesToDelete = [];
@@ -36412,7 +36371,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
36412
36371
  }
36413
36372
  }
36414
36373
  if (!(articlesToDelete.length > 0)) {
36415
- _context23.next = 17;
36374
+ _context22.next = 17;
36416
36375
  break;
36417
36376
  }
36418
36377
  articlesToDelete.sort(function (a, b) {
@@ -36426,27 +36385,27 @@ var DivaSetHandler = /*#__PURE__*/function () {
36426
36385
  }
36427
36386
  }
36428
36387
  if (!(articleToDelete.quantity > 1)) {
36429
- _context23.next = 14;
36388
+ _context22.next = 14;
36430
36389
  break;
36431
36390
  }
36432
- _context23.next = 11;
36391
+ _context22.next = 11;
36433
36392
  return articleHandlerInstance.updateAccessoireQuantity(articleToDelete, articleToDelete.quantity - 1);
36434
36393
  case 11:
36435
- return _context23.abrupt("return", true);
36394
+ return _context22.abrupt("return", true);
36436
36395
  case 14:
36437
- _context23.next = 16;
36396
+ _context22.next = 16;
36438
36397
  return this.deleteElementFromSet(articleToDelete.set, articleToDelete);
36439
36398
  case 16:
36440
- return _context23.abrupt("return", _context23.sent);
36399
+ return _context22.abrupt("return", _context22.sent);
36441
36400
  case 17:
36442
- return _context23.abrupt("return", false);
36401
+ return _context22.abrupt("return", false);
36443
36402
  case 18:
36444
36403
  case "end":
36445
- return _context23.stop();
36404
+ return _context22.stop();
36446
36405
  }
36447
- }, _callee21, this);
36406
+ }, _callee20, this);
36448
36407
  }));
36449
- function deleteAccessoire(_x75, _x76, _x77) {
36408
+ function deleteAccessoire(_x74, _x75, _x76) {
36450
36409
  return _deleteAccessoire.apply(this, arguments);
36451
36410
  }
36452
36411
  return deleteAccessoire;
@@ -36572,19 +36531,19 @@ var DivaSetHandler = /*#__PURE__*/function () {
36572
36531
  }, {
36573
36532
  key: "configSingleIsChanged",
36574
36533
  value: (function () {
36575
- var _configSingleIsChanged = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(set, newIsConfigSingle, groupedOptions, groupedArticles) {
36534
+ var _configSingleIsChanged = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(set, newIsConfigSingle, groupedOptions, groupedArticles) {
36576
36535
  var _set$getArticleByBask4, variantValues, key;
36577
- return _regeneratorRuntime.wrap(function _callee22$(_context24) {
36578
- while (1) switch (_context24.prev = _context24.next) {
36536
+ return _regeneratorRuntime.wrap(function _callee21$(_context23) {
36537
+ while (1) switch (_context23.prev = _context23.next) {
36579
36538
  case 0:
36580
36539
  set.configSingle = newIsConfigSingle;
36581
36540
  if (!(!set.configSingle && !set.CatalogData.onConfigSingleDontGeneralize && groupedOptions && groupedArticles)) {
36582
- _context24.next = 7;
36541
+ _context23.next = 7;
36583
36542
  break;
36584
36543
  }
36585
36544
  variantValues = (_set$getArticleByBask4 = set.getArticleByBasketId(groupedArticles[0])) === null || _set$getArticleByBask4 === void 0 ? void 0 : _set$getArticleByBask4.VariantValues;
36586
36545
  if (!variantValues) {
36587
- _context24.next = 7;
36546
+ _context23.next = 7;
36588
36547
  break;
36589
36548
  }
36590
36549
  for (key in variantValues) {
@@ -36592,15 +36551,15 @@ var DivaSetHandler = /*#__PURE__*/function () {
36592
36551
  delete variantValues[key];
36593
36552
  }
36594
36553
  }
36595
- _context24.next = 7;
36554
+ _context23.next = 7;
36596
36555
  return this.updateArticlesOptionStatesOfActSet(set, variantValues, groupedArticles);
36597
36556
  case 7:
36598
36557
  case "end":
36599
- return _context24.stop();
36558
+ return _context23.stop();
36600
36559
  }
36601
- }, _callee22, this);
36560
+ }, _callee21, this);
36602
36561
  }));
36603
- function configSingleIsChanged(_x78, _x79, _x80, _x81) {
36562
+ function configSingleIsChanged(_x77, _x78, _x79, _x80) {
36604
36563
  return _configSingleIsChanged.apply(this, arguments);
36605
36564
  }
36606
36565
  return configSingleIsChanged;
@@ -36697,26 +36656,26 @@ var DivaSetHandler = /*#__PURE__*/function () {
36697
36656
  }, {
36698
36657
  key: "loadConfigItemsOfActSetByConfigStepKey",
36699
36658
  value: function () {
36700
- var _loadConfigItemsOfActSetByConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(set, configStepKey, visible) {
36659
+ var _loadConfigItemsOfActSetByConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(set, configStepKey, visible) {
36701
36660
  var _configItems$option;
36702
36661
  var configItems, paletteType, filterType, stepInfo, contentItemId;
36703
- return _regeneratorRuntime.wrap(function _callee23$(_context25) {
36704
- while (1) switch (_context25.prev = _context25.next) {
36662
+ return _regeneratorRuntime.wrap(function _callee22$(_context24) {
36663
+ while (1) switch (_context24.prev = _context24.next) {
36705
36664
  case 0:
36706
- _context25.next = 2;
36665
+ _context24.next = 2;
36707
36666
  return configTreeHandler.getConifgItemsForView(set, configStepKey);
36708
36667
  case 2:
36709
- configItems = _context25.sent;
36668
+ configItems = _context24.sent;
36710
36669
  paletteType = set.configTree.getCurPaletteType(set, configStepKey);
36711
36670
  configItems.configItems = this.removeDockingInfluencableconfigItems(set, configItems.configItems, configStepKey);
36712
- _context25.next = 7;
36671
+ _context24.next = 7;
36713
36672
  return this.variantsEvaluator(set, configItems.configItems, configStepKey, paletteType);
36714
36673
  case 7:
36715
- configItems.configItems = _context25.sent;
36674
+ configItems.configItems = _context24.sent;
36716
36675
  filterType = set.configTree.getCurFilterType(configStepKey, configItems.configItems);
36717
36676
  stepInfo = set.configTree.getStepInfo(configStepKey);
36718
36677
  contentItemId = (_configItems$option = configItems.option) === null || _configItems$option === void 0 ? void 0 : _configItems$option.contentItemId;
36719
- return _context25.abrupt("return", _objectSpread$9(_objectSpread$9(_objectSpread$9({
36678
+ return _context24.abrupt("return", _objectSpread$9(_objectSpread$9(_objectSpread$9({
36720
36679
  isRenderedNotInSettingPalette: set.configTree.isRenderedNotInSettingPalette(configStepKey),
36721
36680
  isRenderedInAccessorieStep: set.configTree.isRenderedInAccessorieStep(configStepKey),
36722
36681
  visible: set.configTree.getVisibility(configStepKey, visible, set.CatalogData)
@@ -36729,11 +36688,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
36729
36688
  }));
36730
36689
  case 12:
36731
36690
  case "end":
36732
- return _context25.stop();
36691
+ return _context24.stop();
36733
36692
  }
36734
- }, _callee23, this);
36693
+ }, _callee22, this);
36735
36694
  }));
36736
- function loadConfigItemsOfActSetByConfigStepKey(_x82, _x83, _x84) {
36695
+ function loadConfigItemsOfActSetByConfigStepKey(_x81, _x82, _x83) {
36737
36696
  return _loadConfigItemsOfActSetByConfigStepKey.apply(this, arguments);
36738
36697
  }
36739
36698
  return loadConfigItemsOfActSetByConfigStepKey;
@@ -36775,45 +36734,45 @@ var DivaSetHandler = /*#__PURE__*/function () {
36775
36734
  }, {
36776
36735
  key: "variantsEvaluator",
36777
36736
  value: (function () {
36778
- var _variantsEvaluator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(set, configItems, configStepKey, paletteType) {
36737
+ var _variantsEvaluator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(set, configItems, configStepKey, paletteType) {
36779
36738
  var _configItems$0$option,
36780
36739
  _set$api$ReturnToFrom,
36781
36740
  _set$CatalogData$show,
36782
36741
  _set$CatalogData$hide,
36783
36742
  _this = this;
36784
36743
  var opt, previewType, targetArticles, variants;
36785
- return _regeneratorRuntime.wrap(function _callee24$(_context26) {
36786
- while (1) switch (_context26.prev = _context26.next) {
36744
+ return _regeneratorRuntime.wrap(function _callee23$(_context25) {
36745
+ while (1) switch (_context25.prev = _context25.next) {
36787
36746
  case 0:
36788
36747
  if (configItems[0]) {
36789
- _context26.next = 2;
36748
+ _context25.next = 2;
36790
36749
  break;
36791
36750
  }
36792
- return _context26.abrupt("return", configItems);
36751
+ return _context25.abrupt("return", configItems);
36793
36752
  case 2:
36794
36753
  opt = set.CatalogData.getOption((_configItems$0$option = configItems[0].optionOcd) !== null && _configItems$0$option !== void 0 ? _configItems$0$option : configItems[0].op);
36795
36754
  previewType = set.api.pricePreview;
36796
36755
  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'))) {
36797
- _context26.next = 6;
36756
+ _context25.next = 6;
36798
36757
  break;
36799
36758
  }
36800
- return _context26.abrupt("return", configItems);
36759
+ return _context25.abrupt("return", configItems);
36801
36760
  case 6:
36802
36761
  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)))) {
36803
- _context26.next = 9;
36762
+ _context25.next = 9;
36804
36763
  break;
36805
36764
  }
36806
36765
  if (set.logTotalStateForVariants) {
36807
- _context26.next = 9;
36766
+ _context25.next = 9;
36808
36767
  break;
36809
36768
  }
36810
- return _context26.abrupt("return", configItems);
36769
+ return _context25.abrupt("return", configItems);
36811
36770
  case 9:
36812
36771
  targetArticles = set.configTree.getTargetArticles(configStepKey);
36813
- _context26.next = 12;
36772
+ _context25.next = 12;
36814
36773
  return this.calcVariants(set, configItems, targetArticles, opt.codex);
36815
36774
  case 12:
36816
- variants = _context26.sent;
36775
+ variants = _context25.sent;
36817
36776
  if (previewType) {
36818
36777
  configItems.map(function (c, index) {
36819
36778
  return c.pricePreviewPromise = {
@@ -36822,14 +36781,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
36822
36781
  };
36823
36782
  });
36824
36783
  }
36825
- return _context26.abrupt("return", configItems);
36784
+ return _context25.abrupt("return", configItems);
36826
36785
  case 15:
36827
36786
  case "end":
36828
- return _context26.stop();
36787
+ return _context25.stop();
36829
36788
  }
36830
- }, _callee24, this);
36789
+ }, _callee23, this);
36831
36790
  }));
36832
- function variantsEvaluator(_x85, _x86, _x87, _x88) {
36791
+ function variantsEvaluator(_x84, _x85, _x86, _x87) {
36833
36792
  return _variantsEvaluator.apply(this, arguments);
36834
36793
  }
36835
36794
  return variantsEvaluator;
@@ -36837,10 +36796,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
36837
36796
  }, {
36838
36797
  key: "calcVariants",
36839
36798
  value: function () {
36840
- var _calcVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(realSet, configItems, targetArticles, optionCodex) {
36799
+ var _calcVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(realSet, configItems, targetArticles, optionCodex) {
36841
36800
  var variantInfo, set, articles, origPrice, articleConfigs, i, basketId, totalConfig, key, parentNames, _i5, configItem, _ref, _ref2;
36842
- return _regeneratorRuntime.wrap(function _callee25$(_context27) {
36843
- while (1) switch (_context27.prev = _context27.next) {
36801
+ return _regeneratorRuntime.wrap(function _callee24$(_context26) {
36802
+ while (1) switch (_context26.prev = _context26.next) {
36844
36803
  case 0:
36845
36804
  variantInfo = [];
36846
36805
  set = realSet.cloneSet();
@@ -36865,37 +36824,37 @@ var DivaSetHandler = /*#__PURE__*/function () {
36865
36824
  _i5 = 0;
36866
36825
  case 10:
36867
36826
  if (!(_i5 < configItems.length)) {
36868
- _context27.next = 23;
36827
+ _context26.next = 23;
36869
36828
  break;
36870
36829
  }
36871
36830
  configItem = configItems[_i5];
36872
36831
  if (!(configItem.isParentOPVG || configItem.idmOpgValCodex)) {
36873
- _context27.next = 19;
36832
+ _context26.next = 19;
36874
36833
  break;
36875
36834
  }
36876
36835
  if (!parentNames.includes((_ref = configItem.isParentOPVG ? configItem.parentName : configItem.idmOpgValCodex) !== null && _ref !== void 0 ? _ref : '')) {
36877
- _context27.next = 18;
36836
+ _context26.next = 18;
36878
36837
  break;
36879
36838
  }
36880
36839
  variantInfo.push(variantInfo[_i5 - 1]);
36881
- return _context27.abrupt("continue", 20);
36840
+ return _context26.abrupt("continue", 20);
36882
36841
  case 18:
36883
36842
  parentNames.push((_ref2 = configItem.isParentOPVG ? configItem.parentName : configItem.idmOpgValCodex) !== null && _ref2 !== void 0 ? _ref2 : '');
36884
36843
  case 19:
36885
36844
  variantInfo.push(this.getVariant(set, configItem, articleConfigs, totalConfig, targetArticles, optionCodex, origPrice, _i5, variantInfo[_i5 - 1]));
36886
36845
  case 20:
36887
36846
  _i5++;
36888
- _context27.next = 10;
36847
+ _context26.next = 10;
36889
36848
  break;
36890
36849
  case 23:
36891
- return _context27.abrupt("return", variantInfo);
36850
+ return _context26.abrupt("return", variantInfo);
36892
36851
  case 24:
36893
36852
  case "end":
36894
- return _context27.stop();
36853
+ return _context26.stop();
36895
36854
  }
36896
- }, _callee25, this);
36855
+ }, _callee24, this);
36897
36856
  }));
36898
- function calcVariants(_x89, _x90, _x91, _x92) {
36857
+ function calcVariants(_x88, _x89, _x90, _x91) {
36899
36858
  return _calcVariants.apply(this, arguments);
36900
36859
  }
36901
36860
  return calcVariants;
@@ -36903,40 +36862,40 @@ var DivaSetHandler = /*#__PURE__*/function () {
36903
36862
  }, {
36904
36863
  key: "getVariant",
36905
36864
  value: function () {
36906
- var _getVariant = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(set, item, origConfigs, totalConfig, targetArticles, optionCodex, origPrice, index, previousPromise) {
36865
+ var _getVariant = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(set, item, origConfigs, totalConfig, targetArticles, optionCodex, origPrice, index, previousPromise) {
36907
36866
  var firstPrice, prevProm, startTime, doUseConfigs, hashVariantValues, variantValues, i, basketId, origConfig, key, hash, dataHash, _i6, endTime, calcTime, price, priceObj;
36908
- return _regeneratorRuntime.wrap(function _callee26$(_context28) {
36909
- while (1) switch (_context28.prev = _context28.next) {
36867
+ return _regeneratorRuntime.wrap(function _callee25$(_context27) {
36868
+ while (1) switch (_context27.prev = _context27.next) {
36910
36869
  case 0:
36911
36870
  if (!item.idmOpgValCodex) {
36912
- _context28.next = 5;
36871
+ _context27.next = 5;
36913
36872
  break;
36914
36873
  }
36915
- _context28.next = 3;
36874
+ _context27.next = 3;
36916
36875
  return DivaUtils.Sleep(index == 0 ? 200 : 10);
36917
36876
  case 3:
36918
- _context28.next = 8;
36877
+ _context27.next = 8;
36919
36878
  break;
36920
36879
  case 5:
36921
36880
  if (!(index == 0)) {
36922
- _context28.next = 8;
36881
+ _context27.next = 8;
36923
36882
  break;
36924
36883
  }
36925
- _context28.next = 8;
36884
+ _context27.next = 8;
36926
36885
  return DivaUtils.Sleep(400);
36927
36886
  case 8:
36928
36887
  firstPrice = undefined;
36929
36888
  prevProm = undefined;
36930
36889
  if (!previousPromise) {
36931
- _context28.next = 17;
36890
+ _context27.next = 17;
36932
36891
  break;
36933
36892
  }
36934
- _context28.next = 13;
36893
+ _context27.next = 13;
36935
36894
  return previousPromise;
36936
36895
  case 13:
36937
- prevProm = _context28.sent;
36896
+ prevProm = _context27.sent;
36938
36897
  firstPrice = prevProm.firstPrice;
36939
- _context28.next = 18;
36898
+ _context27.next = 18;
36940
36899
  break;
36941
36900
  case 17:
36942
36901
  firstPrice = set.getSetPrice();
@@ -36969,11 +36928,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
36969
36928
  hash = md5(JSON.stringify([].concat(hashVariantValues, _toConsumableArray(Object.values(totalConfig)))));
36970
36929
  dataHash = set.CatalogData.getVariantsPriceByHash(hash);
36971
36930
  if (!(dataHash && (!set.logTotalStateForVariants || dataHash.articleSnapshot))) {
36972
- _context28.next = 29;
36931
+ _context27.next = 29;
36973
36932
  break;
36974
36933
  }
36975
36934
  LOG$9.debug('calcingVariant from Option:' + optionCodex + ' and index: ' + index + ' hash hit!', dataHash, [].concat(hashVariantValues, _toConsumableArray(Object.values(totalConfig))), targetArticles);
36976
- return _context28.abrupt("return", _objectSpread$9(_objectSpread$9({}, dataHash), {}, {
36935
+ return _context27.abrupt("return", _objectSpread$9(_objectSpread$9({}, dataHash), {}, {
36977
36936
  origPrice: origPrice,
36978
36937
  firstPrice: firstPrice
36979
36938
  }));
@@ -36981,14 +36940,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
36981
36940
  _i6 = 0;
36982
36941
  case 30:
36983
36942
  if (!(_i6 < variantValues.length)) {
36984
- _context28.next = 36;
36943
+ _context27.next = 36;
36985
36944
  break;
36986
36945
  }
36987
- _context28.next = 33;
36946
+ _context27.next = 33;
36988
36947
  return this.updateArticlesOptionStatesOfActSet(set, variantValues[_i6], [targetArticles[_i6]], true, 'calcVariant');
36989
36948
  case 33:
36990
36949
  _i6++;
36991
- _context28.next = 30;
36950
+ _context27.next = 30;
36992
36951
  break;
36993
36952
  case 36:
36994
36953
  endTime = new Date();
@@ -37007,14 +36966,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
37007
36966
  articleSnapshot: set.logTotalStateForVariants ? set.cloneSet().getDivaArticles() : undefined
37008
36967
  };
37009
36968
  set.CatalogData.setVariantsPriceByHash(hash, priceObj);
37010
- return _context28.abrupt("return", priceObj);
36969
+ return _context27.abrupt("return", priceObj);
37011
36970
  case 43:
37012
36971
  case "end":
37013
- return _context28.stop();
36972
+ return _context27.stop();
37014
36973
  }
37015
- }, _callee26, this);
36974
+ }, _callee25, this);
37016
36975
  }));
37017
- function getVariant(_x93, _x94, _x95, _x96, _x97, _x98, _x99, _x100, _x101) {
36976
+ function getVariant(_x92, _x93, _x94, _x95, _x96, _x97, _x98, _x99, _x100) {
37018
36977
  return _getVariant.apply(this, arguments);
37019
36978
  }
37020
36979
  return getVariant;
@@ -37022,53 +36981,53 @@ var DivaSetHandler = /*#__PURE__*/function () {
37022
36981
  }, {
37023
36982
  key: "checkIfPriceDiffers",
37024
36983
  value: function () {
37025
- var _checkIfPriceDiffers = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(promises) {
36984
+ var _checkIfPriceDiffers = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(promises) {
37026
36985
  var results, i, price, j;
37027
- return _regeneratorRuntime.wrap(function _callee27$(_context29) {
37028
- while (1) switch (_context29.prev = _context29.next) {
36986
+ return _regeneratorRuntime.wrap(function _callee26$(_context28) {
36987
+ while (1) switch (_context28.prev = _context28.next) {
37029
36988
  case 0:
37030
36989
  results = [];
37031
36990
  i = 0;
37032
36991
  case 2:
37033
36992
  if (!(i < promises.length)) {
37034
- _context29.next = 19;
36993
+ _context28.next = 19;
37035
36994
  break;
37036
36995
  }
37037
- _context29.t0 = results;
37038
- _context29.next = 6;
36996
+ _context28.t0 = results;
36997
+ _context28.next = 6;
37039
36998
  return promises[i];
37040
36999
  case 6:
37041
- _context29.t1 = _context29.sent;
37042
- _context29.t0.push.call(_context29.t0, _context29.t1);
37000
+ _context28.t1 = _context28.sent;
37001
+ _context28.t0.push.call(_context28.t0, _context28.t1);
37043
37002
  price = results[0].price;
37044
37003
  j = 1;
37045
37004
  case 10:
37046
37005
  if (!(j < results.length)) {
37047
- _context29.next = 16;
37006
+ _context28.next = 16;
37048
37007
  break;
37049
37008
  }
37050
37009
  if (!(price !== results[j].price)) {
37051
- _context29.next = 13;
37010
+ _context28.next = 13;
37052
37011
  break;
37053
37012
  }
37054
- return _context29.abrupt("return", true);
37013
+ return _context28.abrupt("return", true);
37055
37014
  case 13:
37056
37015
  j++;
37057
- _context29.next = 10;
37016
+ _context28.next = 10;
37058
37017
  break;
37059
37018
  case 16:
37060
37019
  i++;
37061
- _context29.next = 2;
37020
+ _context28.next = 2;
37062
37021
  break;
37063
37022
  case 19:
37064
- return _context29.abrupt("return", false);
37023
+ return _context28.abrupt("return", false);
37065
37024
  case 20:
37066
37025
  case "end":
37067
- return _context29.stop();
37026
+ return _context28.stop();
37068
37027
  }
37069
- }, _callee27);
37028
+ }, _callee26);
37070
37029
  }));
37071
- function checkIfPriceDiffers(_x102) {
37030
+ function checkIfPriceDiffers(_x101) {
37072
37031
  return _checkIfPriceDiffers.apply(this, arguments);
37073
37032
  }
37074
37033
  return checkIfPriceDiffers;
@@ -37082,11 +37041,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
37082
37041
  }, {
37083
37042
  key: "updateArticlesOptionStatesOfActSet",
37084
37043
  value: (function () {
37085
- var _updateArticlesOptionStatesOfActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(set, myValues, targetArticlesWithNewValues, ignorePlanner, from, partlistDiff) {
37044
+ var _updateArticlesOptionStatesOfActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(set, myValues, targetArticlesWithNewValues, ignorePlanner, from, partlistDiff) {
37086
37045
  var _resultPlannerUpdate;
37087
37046
  var elementsToDeleteById, targetArticlesToUpdateOnly, retValues, diff, resultPlannerUpdate, targetElementIds, i, articleToDel, index, result, articleCopyRelation, newArticle;
37088
- return _regeneratorRuntime.wrap(function _callee28$(_context30) {
37089
- while (1) switch (_context30.prev = _context30.next) {
37047
+ return _regeneratorRuntime.wrap(function _callee27$(_context29) {
37048
+ while (1) switch (_context29.prev = _context29.next) {
37090
37049
  case 0:
37091
37050
  elementsToDeleteById = [];
37092
37051
  targetArticlesToUpdateOnly = [];
@@ -37098,50 +37057,50 @@ var DivaSetHandler = /*#__PURE__*/function () {
37098
37057
  } else {
37099
37058
  targetArticlesToUpdateOnly = targetArticlesWithNewValues;
37100
37059
  }
37101
- _context30.next = 5;
37060
+ _context29.next = 5;
37102
37061
  return articleHandlerInstance.updateArticlesOptionStates(myValues, targetArticlesWithNewValues, targetArticlesToUpdateOnly, set.getDivaArticles(true), from);
37103
37062
  case 5:
37104
- retValues = _context30.sent;
37063
+ retValues = _context29.sent;
37105
37064
  targetArticlesWithNewValues = retValues.targetArticlesToUpdate;
37106
37065
  if (!(retValues.partlistArticlesToLoad.length > 0)) {
37107
- _context30.next = 16;
37066
+ _context29.next = 16;
37108
37067
  break;
37109
37068
  }
37110
37069
  diff = targetArticlesToUpdateOnly.length - Object.keys(set.getDivaArticles()).length;
37111
37070
  if (!(diff == 0 || partlistDiff == diff)) {
37112
- _context30.next = 14;
37071
+ _context29.next = 14;
37113
37072
  break;
37114
37073
  }
37115
- _context30.next = 12;
37074
+ _context29.next = 12;
37116
37075
  return articleHandlerInstance.correctPartlistArticlesByGlobalRules(set, retValues.partlistArticlesToLoad, set.CatalogData.bundleRules, {
37117
37076
  doChange: false
37118
37077
  });
37119
37078
  case 12:
37120
- _context30.next = 16;
37079
+ _context29.next = 16;
37121
37080
  break;
37122
37081
  case 14:
37123
- _context30.next = 16;
37082
+ _context29.next = 16;
37124
37083
  return this.updateArticlesOptionStatesOfActSet(set, {}, targetArticlesWithNewValues, ignorePlanner, from, diff);
37125
37084
  case 16:
37126
37085
  if (!(from !== 'initializingPartlist')) {
37127
- _context30.next = 19;
37086
+ _context29.next = 19;
37128
37087
  break;
37129
37088
  }
37130
- _context30.next = 19;
37089
+ _context29.next = 19;
37131
37090
  return this.updateEdoArticles(set, retValues.newEDOExtraArticles);
37132
37091
  case 19:
37133
37092
  if (set.CatalogData.hasAlternateRenderings) set.CatalogData.updateAlternativeRenderings(set.getDivaArticles());
37134
37093
 
37135
37094
  //Update Planner - check if planner data changed
37136
37095
  if (!(!ignorePlanner && from != 'calcVariant')) {
37137
- _context30.next = 55;
37096
+ _context29.next = 55;
37138
37097
  break;
37139
37098
  }
37140
37099
  targetElementIds = this.getElementIdsOfArticles(set, targetArticlesWithNewValues);
37141
- _context30.next = 24;
37100
+ _context29.next = 24;
37142
37101
  return set.plannerHandler.updatePlanner(set.getSetId(), myValues, targetElementIds);
37143
37102
  case 24:
37144
- resultPlannerUpdate = _context30.sent;
37103
+ resultPlannerUpdate = _context29.sent;
37145
37104
  elementsToDeleteById = resultPlannerUpdate.elemIdsToDelete;
37146
37105
  for (i = 0; i < resultPlannerUpdate.elemIdsToDelete.length; i++) {
37147
37106
  articleToDel = set.getArticleByElementId(resultPlannerUpdate.elemIdsToDelete[i]);
@@ -37151,35 +37110,35 @@ var DivaSetHandler = /*#__PURE__*/function () {
37151
37110
  }
37152
37111
  }
37153
37112
  if (!resultPlannerUpdate.doDeleteBackGrid) {
37154
- _context30.next = 34;
37113
+ _context29.next = 34;
37155
37114
  break;
37156
37115
  }
37157
- _context30.next = 30;
37116
+ _context29.next = 30;
37158
37117
  return this.deleteElementFromSetByElemId(set, resultPlannerUpdate.elemIdsToDelete[0], false, resultPlannerUpdate.deletionType);
37159
37118
  case 30:
37160
- result = _context30.sent;
37119
+ result = _context29.sent;
37161
37120
  //Others are deleted recursive
37162
37121
  if (result.selectElementId) {
37163
37122
  resultPlannerUpdate.elementIdsToUpdateSelection = [result.selectElementId];
37164
37123
  }
37165
- _context30.next = 41;
37124
+ _context29.next = 41;
37166
37125
  break;
37167
37126
  case 34:
37168
37127
  i = 0;
37169
37128
  case 35:
37170
37129
  if (!(i < resultPlannerUpdate.elemIdsToDelete.length)) {
37171
- _context30.next = 41;
37130
+ _context29.next = 41;
37172
37131
  break;
37173
37132
  }
37174
- _context30.next = 38;
37133
+ _context29.next = 38;
37175
37134
  return this.deleteElementFromSetByElemId(set, resultPlannerUpdate.elemIdsToDelete[i], false, resultPlannerUpdate.deletionType);
37176
37135
  case 38:
37177
37136
  i++;
37178
- _context30.next = 35;
37137
+ _context29.next = 35;
37179
37138
  break;
37180
37139
  case 41:
37181
37140
  if (!(resultPlannerUpdate.elementIdToCopy && resultPlannerUpdate.elementIdToCopy.length > 0)) {
37182
- _context30.next = 54;
37141
+ _context29.next = 54;
37183
37142
  break;
37184
37143
  }
37185
37144
  //Todo copy these elements
@@ -37187,20 +37146,20 @@ var DivaSetHandler = /*#__PURE__*/function () {
37187
37146
  i = 0;
37188
37147
  case 44:
37189
37148
  if (!(i < resultPlannerUpdate.elementIdToCopy.length)) {
37190
- _context30.next = 52;
37149
+ _context29.next = 52;
37191
37150
  break;
37192
37151
  }
37193
- _context30.next = 47;
37152
+ _context29.next = 47;
37194
37153
  return this.copyArticleByElementId(set, resultPlannerUpdate.elementIdToCopy[i], resultPlannerUpdate.ignoreOptionsToCopy);
37195
37154
  case 47:
37196
- newArticle = _context30.sent;
37155
+ newArticle = _context29.sent;
37197
37156
  articleCopyRelation.set(resultPlannerUpdate.elementIdToCopy[i], newArticle.basketId);
37198
37157
  case 49:
37199
37158
  i++;
37200
- _context30.next = 44;
37159
+ _context29.next = 44;
37201
37160
  break;
37202
37161
  case 52:
37203
- _context30.next = 54;
37162
+ _context29.next = 54;
37204
37163
  return set.plannerHandler.copyPlannerElements(set.getSetId(), articleCopyRelation, {
37205
37164
  dpType: resultPlannerUpdate.copyDPType ? resultPlannerUpdate.copyDPType : 'NO',
37206
37165
  copyType: resultPlannerUpdate.copyType,
@@ -37210,18 +37169,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
37210
37169
  case 54:
37211
37170
  this.updatePosNrOfAccessoiresOfTargetArticles(set, targetArticlesWithNewValues);
37212
37171
  case 55:
37213
- return _context30.abrupt("return", {
37172
+ return _context29.abrupt("return", {
37214
37173
  articleCountChanged: elementsToDeleteById.length > 0,
37215
37174
  elementIdsToUpdateSelection: (_resultPlannerUpdate = resultPlannerUpdate) === null || _resultPlannerUpdate === void 0 ? void 0 : _resultPlannerUpdate.elementIdsToUpdateSelection,
37216
37175
  setId: set.getSetId()
37217
37176
  });
37218
37177
  case 56:
37219
37178
  case "end":
37220
- return _context30.stop();
37179
+ return _context29.stop();
37221
37180
  }
37222
- }, _callee28, this);
37181
+ }, _callee27, this);
37223
37182
  }));
37224
- function updateArticlesOptionStatesOfActSet(_x103, _x104, _x105, _x106, _x107, _x108) {
37183
+ function updateArticlesOptionStatesOfActSet(_x102, _x103, _x104, _x105, _x106, _x107) {
37225
37184
  return _updateArticlesOptionStatesOfActSet.apply(this, arguments);
37226
37185
  }
37227
37186
  return updateArticlesOptionStatesOfActSet;
@@ -37258,32 +37217,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
37258
37217
  }, {
37259
37218
  key: "updateEdoArticles",
37260
37219
  value: function () {
37261
- var _updateEdoArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(set, edoArticlesToLoad) {
37220
+ var _updateEdoArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(set, edoArticlesToLoad) {
37262
37221
  var oldBasketIds, i, article, newArticles, _i7, _i8;
37263
- return _regeneratorRuntime.wrap(function _callee29$(_context31) {
37264
- while (1) switch (_context31.prev = _context31.next) {
37222
+ return _regeneratorRuntime.wrap(function _callee28$(_context30) {
37223
+ while (1) switch (_context30.prev = _context30.next) {
37265
37224
  case 0:
37266
37225
  if (!(set.edoExtraArticles.length > 0 || edoArticlesToLoad.length > 0)) {
37267
- _context31.next = 22;
37226
+ _context30.next = 22;
37268
37227
  break;
37269
37228
  }
37270
37229
  oldBasketIds = _toConsumableArray(set.edoExtraArticles);
37271
37230
  i = 0;
37272
37231
  case 3:
37273
37232
  if (!(i < set.edoExtraArticles.length)) {
37274
- _context31.next = 11;
37233
+ _context30.next = 11;
37275
37234
  break;
37276
37235
  }
37277
37236
  article = set.getArticleByBasketId(set.edoExtraArticles[i]);
37278
37237
  if (!article) {
37279
- _context31.next = 8;
37238
+ _context30.next = 8;
37280
37239
  break;
37281
37240
  }
37282
- _context31.next = 8;
37241
+ _context30.next = 8;
37283
37242
  return this.deleteElementFromSet(set, article);
37284
37243
  case 8:
37285
37244
  i++;
37286
- _context31.next = 3;
37245
+ _context30.next = 3;
37287
37246
  break;
37288
37247
  case 11:
37289
37248
  set.edoExtraArticles = [];
@@ -37291,18 +37250,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
37291
37250
  _i7 = 0;
37292
37251
  case 14:
37293
37252
  if (!(_i7 < edoArticlesToLoad.length)) {
37294
- _context31.next = 21;
37253
+ _context30.next = 21;
37295
37254
  break;
37296
37255
  }
37297
- _context31.next = 17;
37256
+ _context30.next = 17;
37298
37257
  return this.addArticleToActSet(set, edoArticlesToLoad[_i7].ArticleCodex, _objectSpread$9(_objectSpread$9({}, edoArticlesToLoad[_i7]), {}, {
37299
37258
  basketId: oldBasketIds[_i7]
37300
37259
  }), true);
37301
37260
  case 17:
37302
- newArticles[_i7] = _context31.sent;
37261
+ newArticles[_i7] = _context30.sent;
37303
37262
  case 18:
37304
37263
  _i7++;
37305
- _context31.next = 14;
37264
+ _context30.next = 14;
37306
37265
  break;
37307
37266
  case 21:
37308
37267
  for (_i8 = 0; _i8 < newArticles.length; _i8++) {
@@ -37310,11 +37269,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
37310
37269
  }
37311
37270
  case 22:
37312
37271
  case "end":
37313
- return _context31.stop();
37272
+ return _context30.stop();
37314
37273
  }
37315
- }, _callee29, this);
37274
+ }, _callee28, this);
37316
37275
  }));
37317
- function updateEdoArticles(_x109, _x110) {
37276
+ function updateEdoArticles(_x108, _x109) {
37318
37277
  return _updateEdoArticles.apply(this, arguments);
37319
37278
  }
37320
37279
  return updateEdoArticles;
@@ -37480,11 +37439,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
37480
37439
  }, {
37481
37440
  key: "fillOrderLinesAndOrderSets",
37482
37441
  value: function () {
37483
- var _fillOrderLinesAndOrderSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(sets, divaBasketHandler, repairOnly, setPlanner, returnTo) {
37442
+ var _fillOrderLinesAndOrderSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(sets, divaBasketHandler, repairOnly, setPlanner, returnTo) {
37484
37443
  var _set$getMatchingProdu2, _set$getMatchingProdu3;
37485
37444
  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;
37486
- return _regeneratorRuntime.wrap(function _callee30$(_context32) {
37487
- while (1) switch (_context32.prev = _context32.next) {
37445
+ return _regeneratorRuntime.wrap(function _callee29$(_context31) {
37446
+ while (1) switch (_context31.prev = _context31.next) {
37488
37447
  case 0:
37489
37448
  orderSets = [];
37490
37449
  basketData = divaBasketHandler.actBasket;
@@ -37496,32 +37455,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
37496
37455
  }
37497
37456
  basketData.MatchingProductId = set === null || set === void 0 || (_set$getMatchingProdu2 = set.getMatchingProduct()) === null || _set$getMatchingProdu2 === void 0 ? void 0 : _set$getMatchingProdu2._id;
37498
37457
  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();
37499
- _context32.t0 = _regeneratorRuntime.keys(sets);
37458
+ _context31.t0 = _regeneratorRuntime.keys(sets);
37500
37459
  case 8:
37501
- if ((_context32.t1 = _context32.t0()).done) {
37502
- _context32.next = 32;
37460
+ if ((_context31.t1 = _context31.t0()).done) {
37461
+ _context31.next = 32;
37503
37462
  break;
37504
37463
  }
37505
- key = _context32.t1.value;
37464
+ key = _context31.t1.value;
37506
37465
  _set = sets[key];
37507
37466
  catalogData = _set.CatalogData;
37508
37467
  articles = _set.getDivaArticles();
37509
- _context32.next = 15;
37468
+ _context31.next = 15;
37510
37469
  return this.getOrderSet(_set, catalogData, divaBasketHandler.actDivaNr, repairOnly, returnTo);
37511
37470
  case 15:
37512
- newOrderSet = _context32.sent;
37471
+ newOrderSet = _context31.sent;
37513
37472
  basketData.setIsPlanning(_set.SetType == 'PLANNING' ? '1' : '0');
37514
- _context32.next = 19;
37473
+ _context31.next = 19;
37515
37474
  return _set.getCustomDimensionsOfActSet();
37516
37475
  case 19:
37517
- customDimensions = _context32.sent;
37476
+ customDimensions = _context31.sent;
37518
37477
  OrderLinesOfActSet = articleHandlerInstance.getOrderLinesOfArticles(articles, customDimensions, repairOnly, !!((_set$basketConfigVari = _set.basketConfigVariants) !== null && _set$basketConfigVari !== void 0 && _set$basketConfigVari.length));
37519
37478
  articleHandlerInstance.checkForRoundingError(OrderLinesOfActSet, _set);
37520
37479
  if (OrderLinesOfActSet.length) {
37521
- _context32.next = 24;
37480
+ _context31.next = 24;
37522
37481
  break;
37523
37482
  }
37524
- return _context32.abrupt("continue", 8);
37483
+ return _context31.abrupt("continue", 8);
37525
37484
  case 24:
37526
37485
  OrderLinesOfActSet = divaBasketHandler.divaWWSHandler.repairWWSFlags(articles, OrderLinesOfActSet);
37527
37486
  if (newOrderSet.SetImage == '' && (_OrderLinesOfActSet$ = OrderLinesOfActSet[0]) !== null && _OrderLinesOfActSet$ !== void 0 && _OrderLinesOfActSet$.Image && _set.PlannerMode == 'No') {
@@ -37543,7 +37502,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37543
37502
  }
37544
37503
  newOrderSet.setOrderLines(OrderLinesOfActSet);
37545
37504
  orderSets.push(newOrderSet);
37546
- _context32.next = 8;
37505
+ _context31.next = 8;
37547
37506
  break;
37548
37507
  case 32:
37549
37508
  //fill diva3DProject for renderings & AR Converter
@@ -37551,7 +37510,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37551
37510
  i = 0;
37552
37511
  case 34:
37553
37512
  if (!(i < ((_basketData$OrderSets = basketData.OrderSets) === null || _basketData$OrderSets === void 0 ? void 0 : _basketData$OrderSets.length))) {
37554
- _context32.next = 49;
37513
+ _context31.next = 49;
37555
37514
  break;
37556
37515
  }
37557
37516
  oderSetsIsInActPlanning = false;
@@ -37559,18 +37518,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
37559
37518
  j = 0;
37560
37519
  case 38:
37561
37520
  if (!(j < orderSets.length)) {
37562
- _context32.next = 45;
37521
+ _context31.next = 45;
37563
37522
  break;
37564
37523
  }
37565
37524
  if (!(orderSets[j].SetID == setId)) {
37566
- _context32.next = 42;
37525
+ _context31.next = 42;
37567
37526
  break;
37568
37527
  }
37569
37528
  oderSetsIsInActPlanning = true;
37570
- return _context32.abrupt("break", 45);
37529
+ return _context31.abrupt("break", 45);
37571
37530
  case 42:
37572
37531
  j++;
37573
- _context32.next = 38;
37532
+ _context31.next = 38;
37574
37533
  break;
37575
37534
  case 45:
37576
37535
  if (!oderSetsIsInActPlanning && !((_basketData$SetPlanne = basketData.SetPlannerInfos) !== null && _basketData$SetPlanne !== void 0 && _basketData$SetPlanne.InvolvedSetIds.includes(setId))) {
@@ -37578,7 +37537,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37578
37537
  }
37579
37538
  case 46:
37580
37539
  i++;
37581
- _context32.next = 34;
37540
+ _context31.next = 34;
37582
37541
  break;
37583
37542
  case 49:
37584
37543
  basketData.SetPlannerInfos = setPlanner ? this.getSetPlannerInfos(Object.keys(sets), orderSets) : undefined;
@@ -37590,14 +37549,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
37590
37549
  } else {
37591
37550
  basketData.setOrderSets(orderSets);
37592
37551
  }
37593
- return _context32.abrupt("return", basketData);
37552
+ return _context31.abrupt("return", basketData);
37594
37553
  case 53:
37595
37554
  case "end":
37596
- return _context32.stop();
37555
+ return _context31.stop();
37597
37556
  }
37598
- }, _callee30, this);
37557
+ }, _callee29, this);
37599
37558
  }));
37600
- function fillOrderLinesAndOrderSets(_x111, _x112, _x113, _x114, _x115) {
37559
+ function fillOrderLinesAndOrderSets(_x110, _x111, _x112, _x113, _x114) {
37601
37560
  return _fillOrderLinesAndOrderSets.apply(this, arguments);
37602
37561
  }
37603
37562
  return fillOrderLinesAndOrderSets;
@@ -37686,11 +37645,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
37686
37645
  }, {
37687
37646
  key: "getOrderSet",
37688
37647
  value: function () {
37689
- var _getOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(set, catalogData, divaNr, repairOnly, returnTo) {
37648
+ var _getOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(set, catalogData, divaNr, repairOnly, returnTo) {
37690
37649
  var _Object$values$, _set$getDivaArticles, _hqRenderScript, _set$basketConfigVari2, _set$basketConfigVari3;
37691
37650
  var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, alternateSetImages, hqRenderScript, dimensions, promise3D, promise2D, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, promiseHQRenderScript, _yield$Promise$all3, _yield$Promise$all4, plannerWarnings, bruttoPrice;
37692
- return _regeneratorRuntime.wrap(function _callee31$(_context33) {
37693
- while (1) switch (_context33.prev = _context33.next) {
37651
+ return _regeneratorRuntime.wrap(function _callee30$(_context32) {
37652
+ while (1) switch (_context32.prev = _context32.next) {
37694
37653
  case 0:
37695
37654
  dontGenerateImages = repairOnly || returnTo == 'DONT_SAVE_BASKET' || returnTo == 'TEST_CONFIGURATORLOGIC';
37696
37655
  DivaUtils.startSpanOfApm('GetSet3D und 2D Image');
@@ -37702,7 +37661,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37702
37661
  hqRenderScript = undefined;
37703
37662
  dimensions = {};
37704
37663
  if (dontGenerateImages) {
37705
- _context33.next = 28;
37664
+ _context32.next = 28;
37706
37665
  break;
37707
37666
  }
37708
37667
  promise3D = this.getSetImage(set, typeof window === 'undefined');
@@ -37710,10 +37669,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
37710
37669
  if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
37711
37670
  promise3DAlternate = this.getAlternateSetImages(set);
37712
37671
  }
37713
- _context33.next = 15;
37672
+ _context32.next = 15;
37714
37673
  return Promise.all([promise3D, promise2D, promise3DAlternate]);
37715
37674
  case 15:
37716
- _yield$Promise$all = _context33.sent;
37675
+ _yield$Promise$all = _context32.sent;
37717
37676
  _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
37718
37677
  _yield$Promise$all2$ = _yield$Promise$all2[0];
37719
37678
  setImage = _yield$Promise$all2$.url;
@@ -37721,10 +37680,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
37721
37680
  urlToPlanning2D = _yield$Promise$all2[1];
37722
37681
  alternateSetImages = _yield$Promise$all2[2];
37723
37682
  promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
37724
- _context33.next = 25;
37683
+ _context32.next = 25;
37725
37684
  return Promise.all([promiseHQRenderScript]);
37726
37685
  case 25:
37727
- _yield$Promise$all3 = _context33.sent;
37686
+ _yield$Promise$all3 = _context32.sent;
37728
37687
  _yield$Promise$all4 = _slicedToArray(_yield$Promise$all3, 1);
37729
37688
  hqRenderScript = _yield$Promise$all4[0];
37730
37689
  case 28:
@@ -37789,14 +37748,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
37789
37748
  MetaData: !((_set$basketConfigVari2 = set.basketConfigVariants) !== null && _set$basketConfigVari2 !== void 0 && _set$basketConfigVari2.length) ? set.MetaData : undefined,
37790
37749
  MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
37791
37750
  });
37792
- return _context33.abrupt("return", orderSet);
37751
+ return _context32.abrupt("return", orderSet);
37793
37752
  case 34:
37794
37753
  case "end":
37795
- return _context33.stop();
37754
+ return _context32.stop();
37796
37755
  }
37797
- }, _callee31, this);
37756
+ }, _callee30, this);
37798
37757
  }));
37799
- function getOrderSet(_x116, _x117, _x118, _x119, _x120) {
37758
+ function getOrderSet(_x115, _x116, _x117, _x118, _x119) {
37800
37759
  return _getOrderSet.apply(this, arguments);
37801
37760
  }
37802
37761
  return getOrderSet;
@@ -37809,31 +37768,31 @@ var DivaSetHandler = /*#__PURE__*/function () {
37809
37768
  }, {
37810
37769
  key: "getSetImage",
37811
37770
  value: (function () {
37812
- var _getSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(set, overwriteLastSavedRendering) {
37771
+ var _getSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(set, overwriteLastSavedRendering) {
37813
37772
  var is3D, _yield$set$plannerHan, dimensions, url;
37814
- return _regeneratorRuntime.wrap(function _callee32$(_context34) {
37815
- while (1) switch (_context34.prev = _context34.next) {
37773
+ return _regeneratorRuntime.wrap(function _callee31$(_context33) {
37774
+ while (1) switch (_context33.prev = _context33.next) {
37816
37775
  case 0:
37817
37776
  is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
37818
37777
  if (!is3D) {
37819
- _context34.next = 10;
37778
+ _context33.next = 10;
37820
37779
  break;
37821
37780
  }
37822
- _context34.next = 4;
37781
+ _context33.next = 4;
37823
37782
  return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
37824
37783
  case 4:
37825
- _context34.next = 6;
37784
+ _context33.next = 6;
37826
37785
  return set.plannerHandler.getSetImageAsUrl(set.getSetId());
37827
37786
  case 6:
37828
- _yield$set$plannerHan = _context34.sent;
37787
+ _yield$set$plannerHan = _context33.sent;
37829
37788
  dimensions = _yield$set$plannerHan.dimensions;
37830
37789
  url = _yield$set$plannerHan.url;
37831
- return _context34.abrupt("return", {
37790
+ return _context33.abrupt("return", {
37832
37791
  dimensions: dimensions,
37833
37792
  url: url
37834
37793
  });
37835
37794
  case 10:
37836
- return _context34.abrupt("return", {
37795
+ return _context33.abrupt("return", {
37837
37796
  dimensions: {
37838
37797
  w: undefined,
37839
37798
  h: undefined,
@@ -37842,11 +37801,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
37842
37801
  });
37843
37802
  case 11:
37844
37803
  case "end":
37845
- return _context34.stop();
37804
+ return _context33.stop();
37846
37805
  }
37847
- }, _callee32);
37806
+ }, _callee31);
37848
37807
  }));
37849
- function getSetImage(_x121, _x122) {
37808
+ function getSetImage(_x120, _x121) {
37850
37809
  return _getSetImage.apply(this, arguments);
37851
37810
  }
37852
37811
  return getSetImage;
@@ -37854,45 +37813,45 @@ var DivaSetHandler = /*#__PURE__*/function () {
37854
37813
  }, {
37855
37814
  key: "getHQRenderScript",
37856
37815
  value: function () {
37857
- var _getHQRenderScript = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(set, divaNr) {
37816
+ var _getHQRenderScript = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(set, divaNr) {
37858
37817
  var is3D, hqRenderScript, createdHQRenderScript;
37859
- return _regeneratorRuntime.wrap(function _callee33$(_context35) {
37860
- while (1) switch (_context35.prev = _context35.next) {
37818
+ return _regeneratorRuntime.wrap(function _callee32$(_context34) {
37819
+ while (1) switch (_context34.prev = _context34.next) {
37861
37820
  case 0:
37862
37821
  //if not 3d
37863
37822
  is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
37864
37823
  if (is3D) {
37865
- _context35.next = 3;
37824
+ _context34.next = 3;
37866
37825
  break;
37867
37826
  }
37868
- return _context35.abrupt("return");
37827
+ return _context34.abrupt("return");
37869
37828
  case 3:
37870
- _context35.next = 5;
37829
+ _context34.next = 5;
37871
37830
  return set.plannerHandler.saveSetHQRenderScript();
37872
37831
  case 5:
37873
37832
  hqRenderScript = set.plannerHandler.getSetHQRenderScript();
37874
37833
  if (hqRenderScript) {
37875
- _context35.next = 8;
37834
+ _context34.next = 8;
37876
37835
  break;
37877
37836
  }
37878
- return _context35.abrupt("return");
37837
+ return _context34.abrupt("return");
37879
37838
  case 8:
37880
- _context35.next = 10;
37839
+ _context34.next = 10;
37881
37840
  return set.api.postHQRenderScript({
37882
37841
  divaNr: divaNr,
37883
37842
  hqRenderscript: hqRenderScript,
37884
37843
  organization: set.api.OrganizationId
37885
37844
  });
37886
37845
  case 10:
37887
- createdHQRenderScript = _context35.sent;
37888
- return _context35.abrupt("return", createdHQRenderScript);
37846
+ createdHQRenderScript = _context34.sent;
37847
+ return _context34.abrupt("return", createdHQRenderScript);
37889
37848
  case 12:
37890
37849
  case "end":
37891
- return _context35.stop();
37850
+ return _context34.stop();
37892
37851
  }
37893
- }, _callee33);
37852
+ }, _callee32);
37894
37853
  }));
37895
- function getHQRenderScript(_x123, _x124) {
37854
+ function getHQRenderScript(_x122, _x123) {
37896
37855
  return _getHQRenderScript.apply(this, arguments);
37897
37856
  }
37898
37857
  return getHQRenderScript;
@@ -37906,34 +37865,34 @@ var DivaSetHandler = /*#__PURE__*/function () {
37906
37865
  }, {
37907
37866
  key: "getAlternateSetImages",
37908
37867
  value: (function () {
37909
- var _getAlternateSetImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(set) {
37868
+ var _getAlternateSetImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(set) {
37910
37869
  var is2D, catalogData, setImages;
37911
- return _regeneratorRuntime.wrap(function _callee34$(_context36) {
37912
- while (1) switch (_context36.prev = _context36.next) {
37870
+ return _regeneratorRuntime.wrap(function _callee33$(_context35) {
37871
+ while (1) switch (_context35.prev = _context35.next) {
37913
37872
  case 0:
37914
37873
  is2D = !['3DImage', '3DCOMB', 'BoxPlanner'].includes(set.getPlannerMode());
37915
37874
  if (!(is2D || set.onlyRunLogic)) {
37916
- _context36.next = 3;
37875
+ _context35.next = 3;
37917
37876
  break;
37918
37877
  }
37919
- return _context36.abrupt("return", []);
37878
+ return _context35.abrupt("return", []);
37920
37879
  case 3:
37921
37880
  catalogData = set.CatalogData;
37922
- _context36.next = 6;
37881
+ _context35.next = 6;
37923
37882
  return set.plannerHandler.saveAlternateSetImages(catalogData.catalogCodex, catalogData.catalogGuid);
37924
37883
  case 6:
37925
- _context36.next = 8;
37884
+ _context35.next = 8;
37926
37885
  return set.plannerHandler.getAlternateSetImagesAsSetImageData(set.getSetId());
37927
37886
  case 8:
37928
- setImages = _context36.sent;
37929
- return _context36.abrupt("return", setImages);
37887
+ setImages = _context35.sent;
37888
+ return _context35.abrupt("return", setImages);
37930
37889
  case 10:
37931
37890
  case "end":
37932
- return _context36.stop();
37891
+ return _context35.stop();
37933
37892
  }
37934
- }, _callee34);
37893
+ }, _callee33);
37935
37894
  }));
37936
- function getAlternateSetImages(_x125) {
37895
+ function getAlternateSetImages(_x124) {
37937
37896
  return _getAlternateSetImages.apply(this, arguments);
37938
37897
  }
37939
37898
  return getAlternateSetImages;
@@ -37941,30 +37900,30 @@ var DivaSetHandler = /*#__PURE__*/function () {
37941
37900
  }, {
37942
37901
  key: "get2DSetImage",
37943
37902
  value: function () {
37944
- var _get2DSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(set) {
37903
+ var _get2DSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(set) {
37945
37904
  var urlToPlanning2D, catalogData, planning2DAsJPGBase64;
37946
- return _regeneratorRuntime.wrap(function _callee35$(_context37) {
37947
- while (1) switch (_context37.prev = _context37.next) {
37905
+ return _regeneratorRuntime.wrap(function _callee34$(_context36) {
37906
+ while (1) switch (_context36.prev = _context36.next) {
37948
37907
  case 0:
37949
37908
  urlToPlanning2D = undefined, catalogData = set.CatalogData;
37950
37909
  planning2DAsJPGBase64 = set.getPlanning2DAsJpg();
37951
37910
  if (!(planning2DAsJPGBase64 != undefined && planning2DAsJPGBase64 != '' && planning2DAsJPGBase64 != 'data:,')) {
37952
- _context37.next = 6;
37911
+ _context36.next = 6;
37953
37912
  break;
37954
37913
  }
37955
- _context37.next = 5;
37914
+ _context36.next = 5;
37956
37915
  return set.plannerHandler.saveSet2DImage(set.getSetId(), catalogData.catalogCodex, catalogData.catalogGuid, planning2DAsJPGBase64);
37957
37916
  case 5:
37958
- urlToPlanning2D = _context37.sent;
37917
+ urlToPlanning2D = _context36.sent;
37959
37918
  case 6:
37960
- return _context37.abrupt("return", urlToPlanning2D);
37919
+ return _context36.abrupt("return", urlToPlanning2D);
37961
37920
  case 7:
37962
37921
  case "end":
37963
- return _context37.stop();
37922
+ return _context36.stop();
37964
37923
  }
37965
- }, _callee35);
37924
+ }, _callee34);
37966
37925
  }));
37967
- function get2DSetImage(_x126) {
37926
+ function get2DSetImage(_x125) {
37968
37927
  return _get2DSetImage.apply(this, arguments);
37969
37928
  }
37970
37929
  return get2DSetImage;
@@ -38004,25 +37963,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
38004
37963
  }, {
38005
37964
  key: "addOrderSetArticlesToExistingSet",
38006
37965
  value: function () {
38007
- var _addOrderSetArticlesToExistingSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee36(set, orderSet, lastSetToInitialize) {
38008
- return _regeneratorRuntime.wrap(function _callee36$(_context38) {
38009
- while (1) switch (_context38.prev = _context38.next) {
37966
+ var _addOrderSetArticlesToExistingSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(set, orderSet, lastSetToInitialize) {
37967
+ return _regeneratorRuntime.wrap(function _callee35$(_context37) {
37968
+ while (1) switch (_context37.prev = _context37.next) {
38010
37969
  case 0:
38011
37970
  //TODO: GLOBAL STUFF
38012
37971
  //this.updateActSet(set);
38013
37972
  orderSet.changeBasketIds();
38014
- _context38.next = 3;
37973
+ _context37.next = 3;
38015
37974
  return this.initOrderLineArticles(set, orderSet);
38016
37975
  case 3:
38017
- _context38.next = 5;
37976
+ _context37.next = 5;
38018
37977
  return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
38019
37978
  case 5:
38020
37979
  case "end":
38021
- return _context38.stop();
37980
+ return _context37.stop();
38022
37981
  }
38023
- }, _callee36, this);
37982
+ }, _callee35, this);
38024
37983
  }));
38025
- function addOrderSetArticlesToExistingSet(_x127, _x128, _x129) {
37984
+ function addOrderSetArticlesToExistingSet(_x126, _x127, _x128) {
38026
37985
  return _addOrderSetArticlesToExistingSet.apply(this, arguments);
38027
37986
  }
38028
37987
  return addOrderSetArticlesToExistingSet;
@@ -39085,7 +39044,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39085
39044
  break;
39086
39045
  case 3:
39087
39046
  _context12.next = 5;
39088
- return import('./PfisterWWSHandler-c12b85ee.js');
39047
+ return import('./PfisterWWSHandler-fcca8610.js');
39089
39048
  case 5:
39090
39049
  _yield$import = _context12.sent;
39091
39050
  PfisterWWSHandler = _yield$import["default"];
@@ -39093,7 +39052,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39093
39052
  return _context12.abrupt("break", 27);
39094
39053
  case 9:
39095
39054
  _context12.next = 11;
39096
- return import('./LiviqueWWSHandler-32b22f3a.js');
39055
+ return import('./LiviqueWWSHandler-bf8f2ef0.js');
39097
39056
  case 11:
39098
39057
  _yield$import2 = _context12.sent;
39099
39058
  LiviqueWWSHandler = _yield$import2["default"];
@@ -39101,7 +39060,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39101
39060
  return _context12.abrupt("break", 27);
39102
39061
  case 15:
39103
39062
  _context12.next = 17;
39104
- return import('./SeriousBasketHandler-ccf356e8.js');
39063
+ return import('./SeriousBasketHandler-14e91c9c.js');
39105
39064
  case 17:
39106
39065
  _yield$import3 = _context12.sent;
39107
39066
  SeriousWWSHandler = _yield$import3["default"];
@@ -39109,7 +39068,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39109
39068
  return _context12.abrupt("break", 27);
39110
39069
  case 21:
39111
39070
  _context12.next = 23;
39112
- return import('./StandardWWSHandler-2d5a27e8.js');
39071
+ return import('./StandardWWSHandler-72906b84.js');
39113
39072
  case 23:
39114
39073
  _yield$import4 = _context12.sent;
39115
39074
  StandardWWSHandler = _yield$import4["default"];
@@ -40537,7 +40496,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
40537
40496
  while (1) switch (_context3.prev = _context3.next) {
40538
40497
  case 0:
40539
40498
  _context3.next = 2;
40540
- return import('./Host3DSignalR-ab7a0f74.js');
40499
+ return import('./Host3DSignalR-a642ea3a.js');
40541
40500
  case 2:
40542
40501
  _yield$import = _context3.sent;
40543
40502
  Host3DSignalR = _yield$import["default"];
@@ -42094,7 +42053,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
42094
42053
  break;
42095
42054
  case 8:
42096
42055
  _context4.next = 10;
42097
- return import('./DivaStandardPlanner-57cc3328.js');
42056
+ return import('./DivaStandardPlanner-1394465e.js');
42098
42057
  case 10:
42099
42058
  _yield$import = _context4.sent;
42100
42059
  DivaStandardPlanner = _yield$import["default"];
@@ -42105,7 +42064,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
42105
42064
  return _context4.abrupt("break", 21);
42106
42065
  case 15:
42107
42066
  _context4.next = 17;
42108
- return import('./DivaBoxPlanner-40f9f5f6.js');
42067
+ return import('./DivaBoxPlanner-ee88278b.js');
42109
42068
  case 17:
42110
42069
  _yield$import2 = _context4.sent;
42111
42070
  DivaBoxPlanner = _yield$import2["default"];
@@ -43430,10 +43389,10 @@ var DivaWebPlanner = /*#__PURE__*/function () {
43430
43389
  return setHandlerInstance.addPlannerElement(set, articleCodex, initParams);
43431
43390
  case 11:
43432
43391
  article = _context4.sent;
43392
+ _context4.next = 14;
43393
+ return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, article.getValidValues(article.VariantValues, undefined, true), [article.basketId], undefined, 'initializing');
43394
+ case 14:
43433
43395
  (_this$actions8 = _this.actions) === null || _this$actions8 === void 0 || (_this$actions8$toggle = _this$actions8.toggleLoading) === null || _this$actions8$toggle === void 0 || _this$actions8$toggle.call(_this$actions8, 'plannerswitch' + articleCodex, false, false);
43434
- _context4.next = 15;
43435
- return setHandlerInstance.setValidatedVariantValues(article);
43436
- case 15:
43437
43396
  _this.updateConfigStructure();
43438
43397
  (_this$updateViewPlann2 = _this.updateViewPlannerElements) === null || _this$updateViewPlann2 === void 0 || _this$updateViewPlann2.call(_this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set));
43439
43398
  _this.updatePlannerView('SWITCH_PLANNER_ELEMENT');