@crystaldesign/web-planner-logic 26.14.0-beta.16 → 26.14.0-beta.18

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 (62) hide show
  1. package/build/cjs/{DivaBoxPlanner-4cf1b531.js → DivaBoxPlanner-a5f6ecf3.js} +2 -2
  2. package/build/cjs/{DivaStandardPlanner-e80e2d63.js → DivaStandardPlanner-b84e8c77.js} +2 -2
  3. package/build/cjs/{DoorPlanner-1e5f640f.js → DoorPlanner-00e36c65.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-2b554ff3.js → Host3DSignalR-dcb7c665.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-0ddcb080.js → LiviqueWWSHandler-c8fecd2e.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-7575298f.js → PfisterWWSHandler-efcfdb92.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-f13be448.js → PlannerHandler2D-cdf303bd.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-15928aa6.js → SeriousBasketHandler-a159f15c.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-d12a5010.js → ShelfPlanner-5329a6dc.js} +1 -1
  10. package/build/cjs/{StandardWWSHandler-4e129c94.js → StandardWWSHandler-4143da24.js} +1 -1
  11. package/build/cjs/{index-26c88bd9.js → index-df9d5ebc.js} +630 -201
  12. package/build/cjs/index.js +3 -1
  13. package/build/esm/{DivaBoxPlanner-149ec344.js → DivaBoxPlanner-604aac25.js} +2 -2
  14. package/build/esm/{DivaStandardPlanner-7a35b6d4.js → DivaStandardPlanner-7d0e4b79.js} +2 -2
  15. package/build/esm/{DoorPlanner-4e91165f.js → DoorPlanner-033934e5.js} +1 -1
  16. package/build/esm/{Host3DSignalR-c5556e93.js → Host3DSignalR-90c03467.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-96bc5a8a.js → LiviqueWWSHandler-2d57af9a.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-0733ad3d.js → PfisterWWSHandler-cb0741a1.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-60865698.js → PlannerHandler2D-d4285c6f.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-afa8c61e.js → SeriousBasketHandler-2982e2a2.js} +1 -1
  21. package/build/esm/{ShelfPlanner-bee5bd90.js → ShelfPlanner-1f5d098e.js} +1 -1
  22. package/build/esm/{StandardWWSHandler-e686fb40.js → StandardWWSHandler-ac0ddcc9.js} +1 -1
  23. package/build/esm/{index-272b9790.js → index-f62e78c3.js} +629 -202
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/index.d.ts +2 -0
  26. package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts +3 -0
  28. package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts +8 -0
  30. package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/Articles/PriceObject.d.ts +3 -0
  32. package/build/types/web-planner-logic/src/interface/Articles/PriceObject.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +2 -1
  34. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts +10 -0
  36. package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/interface/IDM/IDMCatalog.d.ts +22 -0
  38. package/build/types/web-planner-logic/src/interface/IDM/IDMCatalog.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +5 -0
  40. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
  42. package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts +17 -0
  44. package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
  45. package/build/types/web-planner-logic/src/logic/Article/idmMeasurePrice.d.ts +61 -0
  46. package/build/types/web-planner-logic/src/logic/Article/idmMeasurePrice.d.ts.map +1 -0
  47. package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts +7 -0
  48. package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts.map +1 -1
  49. package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts.map +1 -1
  50. package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts +1 -0
  51. package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
  52. package/build/types/web-planner-logic/src/model/Catalog/IDMCatalogData.d.ts +6 -0
  53. package/build/types/web-planner-logic/src/model/Catalog/IDMCatalogData.d.ts.map +1 -1
  54. package/build/types/web-planner-logic/src/test/freeTextDefaultValue.test.d.ts +2 -0
  55. package/build/types/web-planner-logic/src/test/freeTextDefaultValue.test.d.ts.map +1 -0
  56. package/build/types/web-planner-logic/src/test/idmMeasurePrice.test.d.ts +2 -0
  57. package/build/types/web-planner-logic/src/test/idmMeasurePrice.test.d.ts.map +1 -0
  58. package/build/types/web-planner-logic/src/test/idmMeasurePriceEngine.test.d.ts +2 -0
  59. package/build/types/web-planner-logic/src/test/idmMeasurePriceEngine.test.d.ts.map +1 -0
  60. package/build/types/web-planner-logic/src/test/idmPlanningSizeChoice.test.d.ts +2 -0
  61. package/build/types/web-planner-logic/src/test/idmPlanningSizeChoice.test.d.ts.map +1 -0
  62. package/package.json +3 -3
@@ -2297,9 +2297,9 @@ function propertyEncodingOf(codex, entity) {
2297
2297
  return undefined;
2298
2298
  }
2299
2299
 
2300
- function _createForOfIteratorHelper$A(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$A(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
2301
- function _unsupportedIterableToArray$A(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$A(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$A(r, a) : void 0; } }
2302
- function _arrayLikeToArray$A(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2300
+ function _createForOfIteratorHelper$B(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$B(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
2301
+ function _unsupportedIterableToArray$B(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$B(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$B(r, a) : void 0; } }
2302
+ function _arrayLikeToArray$B(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2303
2303
  var LOG$s = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
2304
2304
 
2305
2305
  /** A JSON value: an object or an array. */
@@ -2396,7 +2396,7 @@ var SHAPE_TEXTS = {
2396
2396
  // 'feature:value;feature:value;;...' - an entry without a target repairs nothing
2397
2397
  REPAIR_VARIANT_VALUES: function REPAIR_VARIANT_VALUES(text) {
2398
2398
  var repairs = {};
2399
- var _iterator = _createForOfIteratorHelper$A(text.split(';;').map(function (entry) {
2399
+ var _iterator = _createForOfIteratorHelper$B(text.split(';;').map(function (entry) {
2400
2400
  return entry.split(';');
2401
2401
  })),
2402
2402
  _step;
@@ -2564,9 +2564,9 @@ function propertyTexts(value) {
2564
2564
  return [JSON.stringify(value)];
2565
2565
  }
2566
2566
 
2567
- function _createForOfIteratorHelper$z(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$z(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
2568
- function _unsupportedIterableToArray$z(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$z(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$z(r, a) : void 0; } }
2569
- function _arrayLikeToArray$z(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2567
+ function _createForOfIteratorHelper$A(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$A(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
2568
+ function _unsupportedIterableToArray$A(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$A(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$A(r, a) : void 0; } }
2569
+ function _arrayLikeToArray$A(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2570
2570
  var LIGHT_PRESETS = ['day', 'evening'];
2571
2571
  var FLOOR_FINISHES = ['matte', 'satin', 'gloss'];
2572
2572
  var OPENING_TYPES = ['door', 'window', 'passage'];
@@ -2661,7 +2661,7 @@ function mergeStraightCorners(footprint, wallOf) {
2661
2661
  bx = _footprint$corner[0],
2662
2662
  bz = _footprint$corner[1];
2663
2663
  var length = Math.hypot(bx - ax, bz - az);
2664
- var _iterator = _createForOfIteratorHelper$z(wallOf),
2664
+ var _iterator = _createForOfIteratorHelper$A(wallOf),
2665
2665
  _step;
2666
2666
  try {
2667
2667
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -2677,7 +2677,7 @@ function mergeStraightCorners(footprint, wallOf) {
2677
2677
  _iterator.f();
2678
2678
  }
2679
2679
  footprint.splice(corner, 1);
2680
- var _iterator2 = _createForOfIteratorHelper$z(wallOf),
2680
+ var _iterator2 = _createForOfIteratorHelper$A(wallOf),
2681
2681
  _step2;
2682
2682
  try {
2683
2683
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
@@ -2699,7 +2699,7 @@ function normalizeFootprint(value) {
2699
2699
  if (!Array.isArray(value) || !value.every(isPoint)) return undefined;
2700
2700
  var footprint = [];
2701
2701
  var keptIndex = [];
2702
- var _iterator3 = _createForOfIteratorHelper$z(value),
2702
+ var _iterator3 = _createForOfIteratorHelper$A(value),
2703
2703
  _step3;
2704
2704
  try {
2705
2705
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
@@ -3028,9 +3028,9 @@ var DEFAULT_PLACEMENT_RULES = {
3028
3028
 
3029
3029
  function ownKeys$w(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3030
3030
  function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$w(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$w(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3031
- function _createForOfIteratorHelper$y(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$y(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
3032
- function _unsupportedIterableToArray$y(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$y(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$y(r, a) : void 0; } }
3033
- function _arrayLikeToArray$y(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3031
+ function _createForOfIteratorHelper$z(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$z(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
3032
+ function _unsupportedIterableToArray$z(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$z(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$z(r, a) : void 0; } }
3033
+ function _arrayLikeToArray$z(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3034
3034
 
3035
3035
  /** Where a carrier takes another element: in front of it, beside it, at its foot end, around it or under it. */
3036
3036
 
@@ -3139,7 +3139,7 @@ function toSlot(spec) {
3139
3139
  });
3140
3140
  var accepts = {};
3141
3141
  if (Array.isArray(spec.accepts)) {
3142
- var _iterator = _createForOfIteratorHelper$y(normalizePlacementTypes(spec.accepts)),
3142
+ var _iterator = _createForOfIteratorHelper$z(normalizePlacementTypes(spec.accepts)),
3143
3143
  _step;
3144
3144
  try {
3145
3145
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -3217,7 +3217,7 @@ function mergeSpecs(defaults, value) {
3217
3217
  if (!_carrier || !isRecord(carrierValue)) continue;
3218
3218
  var _carrierRules = (_merged$_carrier = merged[_carrier]) !== null && _merged$_carrier !== void 0 ? _merged$_carrier : {};
3219
3219
  merged[_carrier] = _carrierRules;
3220
- var _iterator2 = _createForOfIteratorHelper$y(RELATIONS),
3220
+ var _iterator2 = _createForOfIteratorHelper$z(RELATIONS),
3221
3221
  _step2;
3222
3222
  try {
3223
3223
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
@@ -3268,7 +3268,7 @@ function resolvePlacementOptions(rtvPreset) {
3268
3268
  carrier = _Object$entries7$_i[0],
3269
3269
  carrierRules = _Object$entries7$_i[1];
3270
3270
  var slots = {};
3271
- var _iterator3 = _createForOfIteratorHelper$y(RELATIONS),
3271
+ var _iterator3 = _createForOfIteratorHelper$z(RELATIONS),
3272
3272
  _step3;
3273
3273
  try {
3274
3274
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
@@ -3290,9 +3290,9 @@ function resolvePlacementOptions(rtvPreset) {
3290
3290
  };
3291
3291
  }
3292
3292
 
3293
- function _createForOfIteratorHelper$x(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$x(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
3294
- function _unsupportedIterableToArray$x(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$x(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$x(r, a) : void 0; } }
3295
- function _arrayLikeToArray$x(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3293
+ function _createForOfIteratorHelper$y(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$y(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
3294
+ function _unsupportedIterableToArray$y(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$y(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$y(r, a) : void 0; } }
3295
+ function _arrayLikeToArray$y(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3296
3296
 
3297
3297
  /** The article facts the placement-type chain reads. */
3298
3298
 
@@ -3303,7 +3303,7 @@ function _arrayLikeToArray$x(r, a) { (null == a || a > r.length) && (a = r.lengt
3303
3303
  function resolvePlacementType(input, paletteGroups) {
3304
3304
  var property = normalizePlacementTypes(input.placementType);
3305
3305
  if (property.length) return property;
3306
- var _iterator = _createForOfIteratorHelper$x(input.groupNames),
3306
+ var _iterator = _createForOfIteratorHelper$y(input.groupNames),
3307
3307
  _step;
3308
3308
  try {
3309
3309
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -18672,9 +18672,9 @@ function parseCornerSide(value) {
18672
18672
  return isOnValue(value) ? 'any' : undefined;
18673
18673
  }
18674
18674
 
18675
- function _createForOfIteratorHelper$w(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$w(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
18676
- function _unsupportedIterableToArray$w(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$w(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$w(r, a) : void 0; } }
18677
- function _arrayLikeToArray$w(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
18675
+ function _createForOfIteratorHelper$x(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$x(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
18676
+ function _unsupportedIterableToArray$x(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$x(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$x(r, a) : void 0; } }
18677
+ function _arrayLikeToArray$x(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
18678
18678
 
18679
18679
  //kaufmännischer Artikel
18680
18680
  var CatalogArticleData = /*#__PURE__*/function () {
@@ -19120,6 +19120,19 @@ var CatalogArticleData = /*#__PURE__*/function () {
19120
19120
  set: function set(val) {
19121
19121
  this._catalogArticle.idmPrices = val;
19122
19122
  }
19123
+ }, {
19124
+ key: "priceTypeRef",
19125
+ get: function get() {
19126
+ return this._catalogArticle.priceTypeRef;
19127
+ },
19128
+ set: function set(val) {
19129
+ this._catalogArticle.priceTypeRef = val;
19130
+ }
19131
+ }, {
19132
+ key: "basicShapeMm",
19133
+ get: function get() {
19134
+ return this._catalogArticle.basicShapeMm;
19135
+ }
19123
19136
  }, {
19124
19137
  key: "priceFeatureGroupNos",
19125
19138
  get: function get() {
@@ -19504,7 +19517,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
19504
19517
  value: function getOptionValueFromOption(opt, opv) {
19505
19518
  if (this._catalogArticle.articleOptions[opt] && this._catalogArticle.articleOptions[opt].hasOPG) {
19506
19519
  var myOPGs = this._catalogArticle.articleOptions[opt].articleOptionValues;
19507
- var _iterator = _createForOfIteratorHelper$w(myOPGs),
19520
+ var _iterator = _createForOfIteratorHelper$x(myOPGs),
19508
19521
  _step;
19509
19522
  try {
19510
19523
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -20673,9 +20686,9 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
20673
20686
  }]);
20674
20687
  }();
20675
20688
 
20676
- function _createForOfIteratorHelper$v(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$v(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
20677
- function _unsupportedIterableToArray$v(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$v(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$v(r, a) : void 0; } }
20678
- function _arrayLikeToArray$v(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
20689
+ function _createForOfIteratorHelper$w(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$w(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
20690
+ function _unsupportedIterableToArray$w(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$w(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$w(r, a) : void 0; } }
20691
+ function _arrayLikeToArray$w(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
20679
20692
  var LOG$o = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
20680
20693
 
20681
20694
  /** Catalog options already warned about a `VIEWER_TOGGLE` without `IS_STATE`: one warning per option, not per article. */
@@ -20796,7 +20809,7 @@ var ArticleOptionData = /*#__PURE__*/function () {
20796
20809
  }, {
20797
20810
  key: "getOpvByOcd",
20798
20811
  value: function getOpvByOcd(codex) {
20799
- var _iterator = _createForOfIteratorHelper$v(this.opt.articleOptionValues),
20812
+ var _iterator = _createForOfIteratorHelper$w(this.opt.articleOptionValues),
20800
20813
  _step;
20801
20814
  try {
20802
20815
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -21155,9 +21168,9 @@ var ArticleOptionData = /*#__PURE__*/function () {
21155
21168
  }]);
21156
21169
  }();
21157
21170
 
21158
- function _createForOfIteratorHelper$u(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$u(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
21159
- function _unsupportedIterableToArray$u(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$u(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$u(r, a) : void 0; } }
21160
- function _arrayLikeToArray$u(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
21171
+ function _createForOfIteratorHelper$v(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$v(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
21172
+ function _unsupportedIterableToArray$v(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$v(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$v(r, a) : void 0; } }
21173
+ function _arrayLikeToArray$v(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
21161
21174
  var LOG$n = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
21162
21175
  function addSupplierColors(set, catalogArticleData, allOPVsOfOPT, supplierColors, catalog, newOPT, rule) {
21163
21176
  var lang = catalog.api.getLanguage();
@@ -21534,7 +21547,7 @@ function getReferencedDecisions(decisions, decisionRefs) {
21534
21547
  });
21535
21548
  var enableTargets = getActionTargets(decisions, 'ENABLE_DECISION');
21536
21549
  for (var i = 0; i < evaluated.length; i++) {
21537
- var _iterator = _createForOfIteratorHelper$u(getActionTargets([evaluated[i]], 'DISABLE_DECISION')),
21550
+ var _iterator = _createForOfIteratorHelper$v(getActionTargets([evaluated[i]], 'DISABLE_DECISION')),
21538
21551
  _step;
21539
21552
  try {
21540
21553
  var _loop = function _loop() {
@@ -21561,19 +21574,19 @@ function getReferencedDecisions(decisions, decisionRefs) {
21561
21574
  /** Numbers of the decisions an action of the given type points at. */
21562
21575
  function getActionTargets(decisions, type) {
21563
21576
  var targets = new Set();
21564
- var _iterator2 = _createForOfIteratorHelper$u(decisions),
21577
+ var _iterator2 = _createForOfIteratorHelper$v(decisions),
21565
21578
  _step2;
21566
21579
  try {
21567
21580
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
21568
21581
  var _decision$DOC;
21569
21582
  var decision = _step2.value;
21570
- var _iterator3 = _createForOfIteratorHelper$u((_decision$DOC = decision.DOC) !== null && _decision$DOC !== void 0 ? _decision$DOC : []),
21583
+ var _iterator3 = _createForOfIteratorHelper$v((_decision$DOC = decision.DOC) !== null && _decision$DOC !== void 0 ? _decision$DOC : []),
21571
21584
  _step3;
21572
21585
  try {
21573
21586
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
21574
21587
  var _combination$DA;
21575
21588
  var combination = _step3.value;
21576
- var _iterator4 = _createForOfIteratorHelper$u((_combination$DA = combination.DA) !== null && _combination$DA !== void 0 ? _combination$DA : []),
21589
+ var _iterator4 = _createForOfIteratorHelper$v((_combination$DA = combination.DA) !== null && _combination$DA !== void 0 ? _combination$DA : []),
21577
21590
  _step4;
21578
21591
  try {
21579
21592
  for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
@@ -21727,9 +21740,9 @@ function getArticleOptionValueType(set, codex, jsonOPV, catalogOPV, myArticle, i
21727
21740
  return opv;
21728
21741
  }
21729
21742
 
21730
- function _createForOfIteratorHelper$t(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$t(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
21731
- function _unsupportedIterableToArray$t(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$t(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$t(r, a) : void 0; } }
21732
- function _arrayLikeToArray$t(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
21743
+ function _createForOfIteratorHelper$u(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$u(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
21744
+ function _unsupportedIterableToArray$u(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$u(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$u(r, a) : void 0; } }
21745
+ function _arrayLikeToArray$u(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
21733
21746
  var LOG$m = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
21734
21747
  var COUNT_KEY_BY_DOCKING_TYPE = {
21735
21748
  AVC: 'avc',
@@ -21824,7 +21837,7 @@ var SVGUtils = /*#__PURE__*/function () {
21824
21837
  avu: 0,
21825
21838
  avl: 0
21826
21839
  };
21827
- var _iterator = _createForOfIteratorHelper$t(this.getDPsInSVG(content)),
21840
+ var _iterator = _createForOfIteratorHelper$u(this.getDPsInSVG(content)),
21828
21841
  _step;
21829
21842
  try {
21830
21843
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -22019,7 +22032,7 @@ var SVGUtils = /*#__PURE__*/function () {
22019
22032
  keepWidth: keep === null || keep === void 0 ? void 0 : keep.width,
22020
22033
  keepDepth: keep === null || keep === void 0 ? void 0 : keep.depth
22021
22034
  });
22022
- var _iterator2 = _createForOfIteratorHelper$t(result.warnings),
22035
+ var _iterator2 = _createForOfIteratorHelper$u(result.warnings),
22023
22036
  _step2;
22024
22037
  try {
22025
22038
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
@@ -22039,9 +22052,9 @@ var SVGUtils = /*#__PURE__*/function () {
22039
22052
 
22040
22053
  function ownKeys$u(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22041
22054
  function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$u(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$u(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
22042
- function _createForOfIteratorHelper$s(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$s(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
22043
- function _unsupportedIterableToArray$s(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$s(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$s(r, a) : void 0; } }
22044
- function _arrayLikeToArray$s(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
22055
+ function _createForOfIteratorHelper$t(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$t(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
22056
+ function _unsupportedIterableToArray$t(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$t(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$t(r, a) : void 0; } }
22057
+ function _arrayLikeToArray$t(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
22045
22058
  var LOG$l = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
22046
22059
 
22047
22060
  //a decision enabled by an action may itself enable further ones; the cap keeps a cyclic catalog from looping
@@ -22132,8 +22145,9 @@ function _loadMoreFromIDMArticles() {
22132
22145
  catalogArticleData.decisionsRefs = item.decisionRefs;
22133
22146
  catalogArticleData.idmPartlist = item.partlist;
22134
22147
  catalogArticleData.idmPrices = item.prices;
22148
+ if (item.priceTypeRef) catalogArticleData.priceTypeRef = item.priceTypeRef;
22135
22149
  initIDMArticleRelations(item, catalogArticleData, catalogData, serieCatalogs);
22136
- case 8:
22150
+ case 9:
22137
22151
  case "end":
22138
22152
  return _context4.stop();
22139
22153
  }
@@ -22194,7 +22208,7 @@ function _loadMoreFromIDMArticles() {
22194
22208
  catalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[_i7], catalogData.idmOptionGroups));
22195
22209
  }
22196
22210
  }
22197
- _iterator6 = _createForOfIteratorHelper$s(toLoadPFGroups);
22211
+ _iterator6 = _createForOfIteratorHelper$t(toLoadPFGroups);
22198
22212
  _context8.prev = 36;
22199
22213
  _loop7 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop7() {
22200
22214
  var prfgNo, askedBy;
@@ -22360,7 +22374,7 @@ function _loadMoreFromIDMArticles() {
22360
22374
  _context8.next = 62;
22361
22375
  break;
22362
22376
  case 67:
22363
- _iterator7 = _createForOfIteratorHelper$s(toLoadFeatures);
22377
+ _iterator7 = _createForOfIteratorHelper$t(toLoadFeatures);
22364
22378
  _context8.prev = 68;
22365
22379
  _loop8 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop8() {
22366
22380
  var featureNo, askedBy;
@@ -22489,13 +22503,13 @@ function readAdditionalItemRefs(item) {
22489
22503
  var _item$mandatoryAdditi, _item$mandatoryAdditi2, _item$optionalAdditio, _item$optionalAdditio2;
22490
22504
  var merged = new Map();
22491
22505
  var add = function add(groups, quantity) {
22492
- var _iterator = _createForOfIteratorHelper$s(groups),
22506
+ var _iterator = _createForOfIteratorHelper$t(groups),
22493
22507
  _step;
22494
22508
  try {
22495
22509
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
22496
22510
  var _group$itemRef;
22497
22511
  var group = _step.value;
22498
- var _iterator2 = _createForOfIteratorHelper$s((_group$itemRef = group.itemRef) !== null && _group$itemRef !== void 0 ? _group$itemRef : []),
22512
+ var _iterator2 = _createForOfIteratorHelper$t((_group$itemRef = group.itemRef) !== null && _group$itemRef !== void 0 ? _group$itemRef : []),
22499
22513
  _step2;
22500
22514
  try {
22501
22515
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
@@ -22562,7 +22576,7 @@ function _loadReferencedSerieCatalogs() {
22562
22576
  });
22563
22577
  }));
22564
22578
  serieNos["delete"](String(catalogData.catalogCodex));
22565
- _iterator8 = _createForOfIteratorHelper$s(serieNos);
22579
+ _iterator8 = _createForOfIteratorHelper$t(serieNos);
22566
22580
  _context9.prev = 6;
22567
22581
  _iterator8.s();
22568
22582
  case 8:
@@ -22739,11 +22753,11 @@ function _fillMissingDockingPointCounts() {
22739
22753
  case 3:
22740
22754
  // the same accessories initIDMArticleRelations maps, each with the catalog it lives in
22741
22755
  accessories = new Map();
22742
- _iterator9 = _createForOfIteratorHelper$s(items);
22756
+ _iterator9 = _createForOfIteratorHelper$t(items);
22743
22757
  try {
22744
22758
  for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
22745
22759
  item = _step9.value;
22746
- _iterator10 = _createForOfIteratorHelper$s(readAdditionalItemRefs(item));
22760
+ _iterator10 = _createForOfIteratorHelper$t(readAdditionalItemRefs(item));
22747
22761
  try {
22748
22762
  for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
22749
22763
  ref = _step10.value;
@@ -22880,16 +22894,16 @@ var loadDecisionsReferencedByActions = /*#__PURE__*/function () {
22880
22894
  break;
22881
22895
  }
22882
22896
  toLoad = new Set();
22883
- _iterator3 = _createForOfIteratorHelper$s(catalogData.loadedDecisions);
22897
+ _iterator3 = _createForOfIteratorHelper$t(catalogData.loadedDecisions);
22884
22898
  try {
22885
22899
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
22886
22900
  decision = _step3.value;
22887
- _iterator4 = _createForOfIteratorHelper$s((_decision$optionCombi = decision.optionCombinations) !== null && _decision$optionCombi !== void 0 ? _decision$optionCombi : []);
22901
+ _iterator4 = _createForOfIteratorHelper$t((_decision$optionCombi = decision.optionCombinations) !== null && _decision$optionCombi !== void 0 ? _decision$optionCombi : []);
22888
22902
  try {
22889
22903
  for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
22890
22904
  combination = _step4.value;
22891
22905
  refs = [].concat(_toConsumableArray((_combination$projectA = (_combination$projectA2 = combination.projectActions) === null || _combination$projectA2 === void 0 ? void 0 : _combination$projectA2.disableDecision) !== null && _combination$projectA !== void 0 ? _combination$projectA : []), _toConsumableArray((_combination$projectA3 = (_combination$projectA4 = combination.projectActions) === null || _combination$projectA4 === void 0 ? void 0 : _combination$projectA4.enableDecision) !== null && _combination$projectA3 !== void 0 ? _combination$projectA3 : []));
22892
- _iterator5 = _createForOfIteratorHelper$s(refs);
22906
+ _iterator5 = _createForOfIteratorHelper$t(refs);
22893
22907
  try {
22894
22908
  for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
22895
22909
  ref = _step5.value;
@@ -23313,6 +23327,233 @@ function getArticleOption(set, option, catalogOption, feature, catalogArticleDat
23313
23327
  return opv;
23314
23328
  }
23315
23329
 
23330
+ function _createForOfIteratorHelper$s(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$s(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
23331
+ function _unsupportedIterableToArray$s(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$s(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$s(r, a) : void 0; } }
23332
+ function _arrayLikeToArray$s(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
23333
+
23334
+ /** The dimensions of an article in mm. */
23335
+
23336
+ /** How a measure-dependent catalog price became the price of the configured article. */
23337
+
23338
+ var DIMENSION_OF = {
23339
+ b: 'width',
23340
+ w: 'width',
23341
+ t: 'depth',
23342
+ d: 'depth',
23343
+ h: 'height'
23344
+ };
23345
+
23346
+ /** A price type that prices by width, depth or height; a piece price type has no basic unit. */
23347
+ function isMeasureDependent(priceType) {
23348
+ var _priceType$basicUnit;
23349
+ return !!priceType && ((_priceType$basicUnit = priceType.basicUnit) !== null && _priceType$basicUnit !== void 0 ? _priceType$basicUnit : 0) > 0 && !!(priceType.widthX || priceType.depthY || priceType.heightZ);
23350
+ }
23351
+
23352
+ /**
23353
+ * The length, area or volume a price type prices, in mm, mm² or mm³: its formula if it has one, otherwise the
23354
+ * product of the flagged dimensions. Undefined when a dimension it needs is missing or the formula cannot be read.
23355
+ */
23356
+ function priceTypeMeasure(priceType, measures) {
23357
+ var _priceType$priceTypeF;
23358
+ if ((_priceType$priceTypeF = priceType.priceTypeFormula) !== null && _priceType$priceTypeF !== void 0 && _priceType$priceTypeF.trim()) return evaluatePriceTypeFormula(priceType.priceTypeFormula, measures);
23359
+ var used = [];
23360
+ if (priceType.widthX) used.push(measures.width);
23361
+ if (priceType.depthY) used.push(measures.depth);
23362
+ if (priceType.heightZ) used.push(measures.height);
23363
+ if (!used.length || used.some(function (m) {
23364
+ return typeof m !== 'number' || !Number.isFinite(m);
23365
+ })) return undefined;
23366
+ return used.reduce(function (product, m) {
23367
+ return product * m;
23368
+ }, 1);
23369
+ }
23370
+
23371
+ /** Rounds a measure to a multiple of the rounding unit: 1 up, 2 down, 3 commercially. */
23372
+ function roundMeasure(measure, roundingUnit, roundingType) {
23373
+ if (!roundingUnit || roundingUnit <= 0) return measure;
23374
+ // Float noise is cut first: 2350 / 10 has to stay 235 steps and must not be rounded up to 236.
23375
+ var steps = Math.round(measure / roundingUnit * 1e9) / 1e9;
23376
+ switch (roundingType) {
23377
+ case 2:
23378
+ return Math.floor(steps) * roundingUnit;
23379
+ case 3:
23380
+ return Math.round(steps) * roundingUnit;
23381
+ default:
23382
+ return Math.ceil(steps) * roundingUnit;
23383
+ }
23384
+ }
23385
+
23386
+ /**
23387
+ * The price of a measure-dependent catalog price for the given dimensions. A basic price dependent type charges the
23388
+ * base price for the basic price unit and the unit price for the rest of the measure (never below zero); any other
23389
+ * type charges the unit price for the whole measure and the base price as its minimum. Undefined for a piece price
23390
+ * type, when a dimension the type needs is missing or when a formula comes out negative.
23391
+ */
23392
+ function calcMeasurePrice(unitPrice, priceType, measures, basic) {
23393
+ if (!isMeasureDependent(priceType)) return undefined;
23394
+ var raw = priceTypeMeasure(priceType, measures);
23395
+ if (raw === undefined || raw < 0) return undefined;
23396
+ var measure = roundMeasure(raw, priceType.roundingUnit, priceType.roundingType);
23397
+ var basicUnit = priceType.basicUnit;
23398
+ var basicPrice = (basic === null || basic === void 0 ? void 0 : basic.price) || undefined;
23399
+ var price;
23400
+ var minimumApplied = false;
23401
+ if (priceType.basicPriceDependent) {
23402
+ var _basic$unit;
23403
+ price = (basicPrice !== null && basicPrice !== void 0 ? basicPrice : 0) + unitPrice * Math.max(0, measure - ((_basic$unit = basic === null || basic === void 0 ? void 0 : basic.unit) !== null && _basic$unit !== void 0 ? _basic$unit : 0)) / basicUnit;
23404
+ } else {
23405
+ price = unitPrice * measure / basicUnit;
23406
+ if (basicPrice !== undefined && basicPrice > price) {
23407
+ price = basicPrice;
23408
+ minimumApplied = true;
23409
+ }
23410
+ }
23411
+ return {
23412
+ priceTypeNo: priceType.priceTypeNo,
23413
+ unitPrice: unitPrice,
23414
+ measure: measure,
23415
+ basicUnit: basicUnit,
23416
+ unit: priceUnitLabel(priceType),
23417
+ basicPrice: basicPrice,
23418
+ basicPriceDependent: priceType.basicPriceDependent || undefined,
23419
+ basicPriceUnit: priceType.basicPriceDependent ? basic === null || basic === void 0 ? void 0 : basic.unit : undefined,
23420
+ minimumApplied: minimumApplied || undefined,
23421
+ price: Math.round((price + Number.EPSILON) * 100) / 100
23422
+ };
23423
+ }
23424
+
23425
+ /**
23426
+ * The unit a price type prices per: 'm', 'cm²', 'm³', ... or the basic unit in mm when it is no such power. A formula
23427
+ * does not say how many dimensions its result has, so its unit is read from the basic unit alone.
23428
+ */
23429
+ function priceUnitLabel(priceType) {
23430
+ var _priceType$basicUnit2, _priceType$priceTypeF2;
23431
+ var basicUnit = (_priceType$basicUnit2 = priceType.basicUnit) !== null && _priceType$basicUnit2 !== void 0 ? _priceType$basicUnit2 : 0;
23432
+ var flagged = [priceType.widthX, priceType.depthY, priceType.heightZ].filter(Boolean).length;
23433
+ var dimensionCounts = (_priceType$priceTypeF2 = priceType.priceTypeFormula) !== null && _priceType$priceTypeF2 !== void 0 && _priceType$priceTypeF2.trim() ? [1, 2, 3] : [flagged];
23434
+ var _iterator = _createForOfIteratorHelper$s([['m', 1000], ['cm', 10], ['mm', 1]]),
23435
+ _step;
23436
+ try {
23437
+ var _loop = function _loop() {
23438
+ var _step$value = _slicedToArray(_step.value, 2),
23439
+ unit = _step$value[0],
23440
+ side = _step$value[1];
23441
+ var dimensions = dimensionCounts.find(function (count) {
23442
+ return count > 0 && basicUnit === Math.pow(side, count);
23443
+ });
23444
+ if (dimensions) return {
23445
+ v: unit + EXPONENT[dimensions]
23446
+ };
23447
+ },
23448
+ _ret;
23449
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
23450
+ _ret = _loop();
23451
+ if (_ret) return _ret.v;
23452
+ }
23453
+ } catch (err) {
23454
+ _iterator.e(err);
23455
+ } finally {
23456
+ _iterator.f();
23457
+ }
23458
+ return basicUnit + ' mm' + EXPONENT[flagged];
23459
+ }
23460
+ var EXPONENT = {
23461
+ 0: '',
23462
+ 1: '',
23463
+ 2: '²',
23464
+ 3: '³'
23465
+ };
23466
+
23467
+ /** The rounded measure of a price with its unit: mm, mm² or mm³ by the dimensions of the unit the price is per. */
23468
+ function measureWithUnit(_ref) {
23469
+ var _exec$, _exec;
23470
+ var measure = _ref.measure,
23471
+ unit = _ref.unit;
23472
+ return "".concat(measure, " mm").concat((_exec$ = (_exec = /[²³]$/.exec(unit)) === null || _exec === void 0 ? void 0 : _exec[0]) !== null && _exec$ !== void 0 ? _exec$ : '');
23473
+ }
23474
+
23475
+ /** The calculation in one line, e.g. '45 per m × 2.35 m = 105.75' or '100 base for 1.5 m + 40 per m × 0.85 m = 134'. */
23476
+ function describeMeasurePrice(_ref2) {
23477
+ var unitPrice = _ref2.unitPrice,
23478
+ measure = _ref2.measure,
23479
+ basicUnit = _ref2.basicUnit,
23480
+ unit = _ref2.unit,
23481
+ basicPrice = _ref2.basicPrice,
23482
+ basicPriceUnit = _ref2.basicPriceUnit,
23483
+ basicPriceDependent = _ref2.basicPriceDependent,
23484
+ minimumApplied = _ref2.minimumApplied,
23485
+ price = _ref2.price;
23486
+ // a basic unit that is no metric power is named in mm, so the measure is too
23487
+ var amount = function amount(mm) {
23488
+ return /\d/.test(unit) ? measureWithUnit({
23489
+ measure: mm,
23490
+ unit: unit
23491
+ }) : "".concat(Math.round(mm / basicUnit * 10000) / 10000, " ").concat(unit);
23492
+ };
23493
+ if (basicPriceDependent) return "".concat(basicPrice !== null && basicPrice !== void 0 ? basicPrice : 0, " base for ").concat(amount(basicPriceUnit !== null && basicPriceUnit !== void 0 ? basicPriceUnit : 0), " + ").concat(unitPrice, " per ").concat(unit, " \xD7 ").concat(amount(Math.max(0, measure - (basicPriceUnit !== null && basicPriceUnit !== void 0 ? basicPriceUnit : 0))), " = ").concat(price);
23494
+ var calculation = "".concat(unitPrice, " per ").concat(unit, " \xD7 ").concat(amount(measure));
23495
+ return minimumApplied ? "".concat(calculation, " is below the minimum: ").concat(price) : "".concat(calculation, " = ").concat(price);
23496
+ }
23497
+
23498
+ /**
23499
+ * Evaluates a PRICE_TYPE_FORMULA over the dimensions in mm: b or w is the width, t or d the depth, h the height,
23500
+ * combined with + - * / and brackets. Undefined when it uses a missing dimension or cannot be read.
23501
+ */
23502
+ function evaluatePriceTypeFormula(formula, measures) {
23503
+ var source = formula.replace(/\s+/g, '').toLowerCase();
23504
+ var pos = 0;
23505
+ var invalid = function invalid() {
23506
+ throw new Error('invalid price type formula');
23507
+ };
23508
+ var _factor = function factor() {
23509
+ var _char = source[pos];
23510
+ if (_char === '(') {
23511
+ pos++;
23512
+ var value = sum();
23513
+ if (source[pos++] !== ')') invalid();
23514
+ return value;
23515
+ }
23516
+ if (_char === '-' || _char === '+') {
23517
+ pos++;
23518
+ return _char === '-' ? -_factor() : _factor();
23519
+ }
23520
+ var dimension = DIMENSION_OF[_char];
23521
+ if (dimension) {
23522
+ pos++;
23523
+ var _value = measures[dimension];
23524
+ return typeof _value === 'number' && Number.isFinite(_value) ? _value : invalid();
23525
+ }
23526
+ var number = /^\d+(\.\d+)?/.exec(source.slice(pos));
23527
+ if (!number) return invalid();
23528
+ pos += number[0].length;
23529
+ return Number(number[0]);
23530
+ };
23531
+ var product = function product() {
23532
+ var value = _factor();
23533
+ while (source[pos] === '*' || source[pos] === '/') {
23534
+ var operator = source[pos++];
23535
+ var right = _factor();
23536
+ value = operator === '*' ? value * right : value / right;
23537
+ }
23538
+ return value;
23539
+ };
23540
+ var sum = function sum() {
23541
+ var value = product();
23542
+ while (source[pos] === '+' || source[pos] === '-') {
23543
+ var operator = source[pos++];
23544
+ var right = product();
23545
+ value = operator === '+' ? value + right : value - right;
23546
+ }
23547
+ return value;
23548
+ };
23549
+ try {
23550
+ var value = sum();
23551
+ return pos === source.length && Number.isFinite(value) ? value : undefined;
23552
+ } catch (_unused) {
23553
+ return undefined;
23554
+ }
23555
+ }
23556
+
23316
23557
  function _createForOfIteratorHelper$r(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$r(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
23317
23558
  function _unsupportedIterableToArray$r(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$r(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$r(r, a) : void 0; } }
23318
23559
  function _arrayLikeToArray$r(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
@@ -23322,7 +23563,7 @@ var LOG$k = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
23322
23563
  function initIDMCatalogData(serie, orderSet, api) {
23323
23564
  var _serie$decisions, _serie$decisions2, _serie$decisionRefs;
23324
23565
  var catalog = serie.catalogData;
23325
- var catalogData = {
23566
+ var catalogData = _objectSpread$t(_objectSpread$t({
23326
23567
  accountGuid: orderSet.AccountGUID,
23327
23568
  serieId: serie._id,
23328
23569
  accountName: '',
@@ -23354,15 +23595,55 @@ function initIDMCatalogData(serie, orderSet, api) {
23354
23595
  //digits: json.Digits,
23355
23596
  supplierILN: catalog.glnNo,
23356
23597
  // SupplierILN des Herstellers des Katalogs
23357
- supplierName: catalog.manufacturerName1,
23358
- rounding: catalog.roundingType,
23598
+ supplierName: catalog.manufacturerName1
23599
+ }, readPriceDefinition(catalog)), {}, {
23359
23600
  optionGroups: catalog.optionGroups,
23360
23601
  formulas: catalog.formulas,
23361
23602
  tabGroups: catalog.tabGroups,
23362
23603
  loadedPricefeaturegroups: []
23363
- };
23604
+ });
23364
23605
  return catalogData;
23365
23606
  }
23607
+ var PRICE_ROUNDINGS = [0, 1, 2, 3];
23608
+
23609
+ /**
23610
+ * The catalog's price types and how its prices are rounded. A price type's rounding rounds its measure: a catalog that
23611
+ * prices by measure shows its prices to the cent, any other catalog keeps the rounding it always had.
23612
+ */
23613
+ function readPriceDefinition(catalog) {
23614
+ var idmPriceTypes = readPriceTypes(catalog);
23615
+ if (idmPriceTypes.some(isMeasureDependent)) return {
23616
+ idmPriceTypes: idmPriceTypes,
23617
+ rounding: 1,
23618
+ digits: 2
23619
+ };
23620
+ return {
23621
+ idmPriceTypes: idmPriceTypes,
23622
+ rounding: PRICE_ROUNDINGS.find(function (rounding) {
23623
+ return rounding === catalog.roundingType;
23624
+ })
23625
+ };
23626
+ }
23627
+
23628
+ /** The price types of an IDM 4 catalog; read without the list it still names its first one in the flat fields. IDM 3 has no measure prices. */
23629
+ function readPriceTypes(catalog) {
23630
+ var _catalog$priceTypes, _catalog$priceTypeNo;
23631
+ if (catalog.major !== 4) return [];
23632
+ if ((_catalog$priceTypes = catalog.priceTypes) !== null && _catalog$priceTypes !== void 0 && _catalog$priceTypes.length) return catalog.priceTypes;
23633
+ if (catalog.basicUnit === undefined && catalog.widthX === undefined) return [];
23634
+ return [{
23635
+ priceTypeNo: (_catalog$priceTypeNo = catalog.priceTypeNo) !== null && _catalog$priceTypeNo !== void 0 ? _catalog$priceTypeNo : 1,
23636
+ widthX: catalog.widthX,
23637
+ depthY: catalog.depthY,
23638
+ heightZ: catalog.heightZ,
23639
+ basicUnit: catalog.basicUnit,
23640
+ roundingUnit: catalog.roundingUnit,
23641
+ roundingType: catalog.roundingType,
23642
+ basicPriceDependent: catalog.basicPriceDependent,
23643
+ priceTypeFormula: catalog.priceTypeFormula,
23644
+ priceTypeName: catalog.priceTypeName
23645
+ }];
23646
+ }
23366
23647
  function initIDMArticles(jsonItems, catalogData) {
23367
23648
  if (jsonItems !== null && jsonItems !== void 0 && jsonItems.length) {
23368
23649
  for (var i = 0; i < jsonItems.length; i++) {
@@ -23393,7 +23674,7 @@ function initIDMArticles(jsonItems, catalogData) {
23393
23674
  }
23394
23675
  }
23395
23676
  function getCatalogArticle(article, catalogData) {
23396
- var _catalogData$catalogM, _article$typeKey, _article$salesNumber, _articleMask$name, _article$flatPrice, _article$depthBasicSh, _article$depthBasicSh2, _article$depthBasicSh3, _article$widthBasicSh, _article$widthBasicSh2, _article$widthBasicSh3, _article$heightBasicS, _article$heightBasicS2, _article$heightBasicS3, _article$weightNetto, _article$detailInfos, _article$detailInfos2, _article$detailInfos3, _ref, _ref2, _articleMask$groupnam, _article$typeKey2;
23677
+ var _catalogData$catalogM, _catalogData$idmPrice, _article$typeKey, _article$salesNumber, _articleMask$name, _article$flatPrice, _article$depthBasicSh, _article$depthBasicSh2, _article$depthBasicSh3, _article$widthBasicSh, _article$widthBasicSh2, _article$widthBasicSh3, _article$heightBasicS, _article$heightBasicS2, _article$heightBasicS3, _article$weightNetto, _article$detailInfos, _article$detailInfos2, _article$detailInfos3, _ref, _ref2, _articleMask$groupnam, _article$typeKey2;
23397
23678
  var articleMask = (_catalogData$catalogM = catalogData.catalogMask) === null || _catalogData$catalogM === void 0 || (_catalogData$catalogM = _catalogData$catalogM.articles) === null || _catalogData$catalogM === void 0 ? void 0 : _catalogData$catalogM[article.typeNo];
23398
23679
  var lang = catalogData.api.getLanguageLowercase();
23399
23680
  // empty locale objects ({} or only empty strings) are truthy, so ?? alone doesn't fall back
@@ -23401,6 +23682,10 @@ function getCatalogArticle(article, catalogData) {
23401
23682
  var shortText = hasLocaleText(article.shortText) ? article.shortText : article.fullText;
23402
23683
  var featureProperties = convertProperties(article.properties, lang, 'option', 'featureNos');
23403
23684
  var optionProperties = convertProperties(article.properties, lang, 'optionValue', 'optionKeys');
23685
+ var measurePriced = isMeasureDependent((_catalogData$idmPrice = catalogData.idmPriceTypes) === null || _catalogData$idmPrice === void 0 ? void 0 : _catalogData$idmPrice.find(function (type) {
23686
+ var _article$priceTypeRef;
23687
+ return type.priceTypeNo == ((_article$priceTypeRef = article.priceTypeRef) !== null && _article$priceTypeRef !== void 0 ? _article$priceTypeRef : 1);
23688
+ }));
23404
23689
  return {
23405
23690
  areOptionsLoaded: false,
23406
23691
  arePricesLoaded: false,
@@ -23433,9 +23718,10 @@ function getCatalogArticle(article, catalogData) {
23433
23718
  properties: [].concat(_toConsumableArray(convertProperties(article.properties, lang, 'article')), _toConsumableArray(readProperties('article', articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties, lang))),
23434
23719
  optionProperties: optionProperties,
23435
23720
  featureProperties: featureProperties,
23436
- // the service decides what is complete from the list - a missing feature class alone still leaves prices to load
23437
- articleType: article.flat ? 'FLAT' : 'OPTIONTREE',
23438
- price: article.flat ? (_article$flatPrice = article.flatPrice) !== null && _article$flatPrice !== void 0 ? _article$flatPrice : 0 : 0,
23721
+ // the service decides what is complete from the list - a missing feature class alone still leaves prices to load;
23722
+ // a measure price is the price per unit, the engine still has to apply the dimensions
23723
+ articleType: article.flat && !measurePriced ? 'FLAT' : 'OPTIONTREE',
23724
+ price: article.flat && !measurePriced ? (_article$flatPrice = article.flatPrice) !== null && _article$flatPrice !== void 0 ? _article$flatPrice : 0 : 0,
23439
23725
  featureClassRefNo: article.featureClassRefNo,
23440
23726
  useEkPrices: catalogData.api.useEkPrices,
23441
23727
  depth: article.depthBasicShapeNominalValue !== undefined ? Math.floor(((_article$depthBasicSh = article.depthBasicShapeNominalValue) !== null && _article$depthBasicSh !== void 0 ? _article$depthBasicSh : 0) / 10) : undefined,
@@ -23465,6 +23751,12 @@ function getCatalogArticle(article, catalogData) {
23465
23751
  };
23466
23752
  }),
23467
23753
  idmPrices: article.prices,
23754
+ priceTypeRef: article.priceTypeRef,
23755
+ basicShapeMm: {
23756
+ width: article.widthBasicShapeNominalValue,
23757
+ depth: article.depthBasicShapeNominalValue,
23758
+ height: article.heightBasicShapeNominalValue
23759
+ },
23468
23760
  idmPartlist: article.partlist,
23469
23761
  itemIdentification: article.itemIdentification,
23470
23762
  articleRelations: [],
@@ -24947,6 +25239,12 @@ var DivaCatalogData = /*#__PURE__*/function () {
24947
25239
  get: function get() {
24948
25240
  return this.catalogData.formulas;
24949
25241
  }
25242
+ }, {
25243
+ key: "idmPriceTypes",
25244
+ get: function get() {
25245
+ var _this$catalogData$idm;
25246
+ return (_this$catalogData$idm = this.catalogData.idmPriceTypes) !== null && _this$catalogData$idm !== void 0 ? _this$catalogData$idm : [];
25247
+ }
24950
25248
  }, {
24951
25249
  key: "tabGroups",
24952
25250
  get: function get() {
@@ -26686,6 +26984,25 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
26686
26984
  var _this$val25;
26687
26985
  return (_this$val25 = this.val) === null || _this$val25 === void 0 ? void 0 : _this$val25.isFreeText;
26688
26986
  }
26987
+
26988
+ /**
26989
+ * The text a free-text value starts with: the feature's FREETEXT_DEFAULT_VALUE, kept inside the value's measure
26990
+ * range, else the range minimum. A text preset only counts for a value without a range.
26991
+ */
26992
+ }, {
26993
+ key: "defaultFreeText",
26994
+ get: function get() {
26995
+ var _this$val26, _this$val27, _this$option;
26996
+ var min = ((_this$val26 = this.val) === null || _this$val26 === void 0 ? void 0 : _this$val26.measureMinimum) || undefined;
26997
+ var max = ((_this$val27 = this.val) === null || _this$val27 === void 0 ? void 0 : _this$val27.measureMaximum) || undefined;
26998
+ var preset = (_this$option = this.option) === null || _this$option === void 0 ? void 0 : _this$option.freetextDefaultValue;
26999
+ if (preset == undefined || preset === '') return min;
27000
+ var value = Number(preset);
27001
+ if (!Number.isFinite(value)) return min || max ? min : preset;
27002
+ if (min && value < Number(min)) return min;
27003
+ if (max && value > Number(max)) return max;
27004
+ return preset;
27005
+ }
26689
27006
  }, {
26690
27007
  key: "freeText",
26691
27008
  get: function get() {
@@ -26744,8 +27061,8 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
26744
27061
  }, {
26745
27062
  key: "warning",
26746
27063
  get: function get() {
26747
- var _this$val26;
26748
- if ((_this$val26 = this.val) !== null && _this$val26 !== void 0 && _this$val26.isFreeText) {
27064
+ var _this$val28;
27065
+ if ((_this$val28 = this.val) !== null && _this$val28 !== void 0 && _this$val28.isFreeText) {
26749
27066
  if (this.val.measureMaximum && Number(this.freeText) > Number(this.val.measureMaximum) || this.val.measureMinimum && Number(this.freeText) < Number(this.val.measureMinimum)) {
26750
27067
  return 'measureWarning';
26751
27068
  }
@@ -26799,14 +27116,14 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
26799
27116
  }, {
26800
27117
  key: "customDimension",
26801
27118
  get: function get() {
26802
- var _this$val$customDimen, _this$val27;
26803
- return this.val && ((_this$val$customDimen = (_this$val27 = this.val) === null || _this$val27 === void 0 ? void 0 : _this$val27.customDimension) !== null && _this$val$customDimen !== void 0 ? _this$val$customDimen : this.option.customDimension);
27119
+ var _this$val$customDimen, _this$val29;
27120
+ return this.val && ((_this$val$customDimen = (_this$val29 = this.val) === null || _this$val29 === void 0 ? void 0 : _this$val29.customDimension) !== null && _this$val$customDimen !== void 0 ? _this$val$customDimen : this.option.customDimension);
26804
27121
  }
26805
27122
  }, {
26806
27123
  key: "addToMeasure",
26807
27124
  get: function get() {
26808
- var _this$val28;
26809
- return (_this$val28 = this.val) === null || _this$val28 === void 0 ? void 0 : _this$val28.addToMeasure;
27125
+ var _this$val30;
27126
+ return (_this$val30 = this.val) === null || _this$val30 === void 0 ? void 0 : _this$val30.addToMeasure;
26810
27127
  }
26811
27128
  }, {
26812
27129
  key: "showWarningForRequiresUserInput",
@@ -27258,10 +27575,13 @@ var DivaEngine = /*#__PURE__*/function () {
27258
27575
  } else if (freeText != undefined) {
27259
27576
  ops.freeText = freeText;
27260
27577
  } else if (ops.freeText == undefined || oldCodex !== ops.valCodex) {
27261
- var _ops$val;
27262
- if ((_ops$val = ops.val) !== null && _ops$val !== void 0 && _ops$val.measureMinimum) {
27263
- var _ops$val2;
27264
- ops.freeText = (_ops$val2 = ops.val) === null || _ops$val2 === void 0 ? void 0 : _ops$val2.measureMinimum;
27578
+ var defaultFreeText = ops.defaultFreeText;
27579
+ if (defaultFreeText) {
27580
+ ops.freeText = defaultFreeText;
27581
+ // the names above were built from the previous text
27582
+ var _this$itemInfo2 = this.itemInfo(myOPVItem, !ops.option.hideGroupNameInOrderText, ops.freeText);
27583
+ ops.name = _this$itemInfo2.name;
27584
+ ops.origName = _this$itemInfo2.origName;
27265
27585
  }
27266
27586
  }
27267
27587
  ops.isVisibleFreeText = true;
@@ -29640,7 +29960,7 @@ var IDMEngine = /*#__PURE__*/function () {
29640
29960
  if (_this4.article.CatalogData.useDiomexConfigLogic) {
29641
29961
  _this4.clearOP(featureNo, true);
29642
29962
  } else {
29643
- _this4.updateArtOPV(_this4.preferredDefaultOpv(featureNo, ops.visibleOptionValues, ops), featureNo, ops, undefined);
29963
+ _this4.selectFallbackOpv(featureNo, ops);
29644
29964
  }
29645
29965
  }
29646
29966
  doAlsoCheckFeatureNos.push(featureNo);
@@ -29730,7 +30050,7 @@ var IDMEngine = /*#__PURE__*/function () {
29730
30050
  if (_this5.article.CatalogData.useDiomexConfigLogic) {
29731
30051
  _this5.clearOP(featureNo, true);
29732
30052
  } else {
29733
- _this5.updateArtOPV(_this5.preferredDefaultOpv(featureNo, ops.visibleOptionValues, ops), featureNo, ops, undefined);
30053
+ _this5.selectFallbackOpv(featureNo, ops);
29734
30054
  }
29735
30055
  }
29736
30056
  } else if (p < sortedDeatureRefs.length - 1) {
@@ -30082,7 +30402,7 @@ var IDMEngine = /*#__PURE__*/function () {
30082
30402
  var index = _this$getMatchingOpti2[1];
30083
30403
  this.logPrice(priceFeatureGroup, index);
30084
30404
  if (index !== undefined) {
30085
- var _this$article$catalog, _this$article$catalog4, _priceFeatureGroup$fe, _priceFeatureGroup$fe2;
30405
+ var _this$article$catalog, _this$article$catalog4, _priceFeatureGroup$fe, _priceFeatureGroup$fe2, _measurePrice$price;
30086
30406
  var matichingFinish = projectFinishes[index];
30087
30407
  var priceKey = this.getFinishPriceKey(priceFeatureGroup, matichingFinish);
30088
30408
  if (((_this$article$catalog = this.article.catalogArticle.idmPrices) === null || _this$article$catalog === void 0 ? void 0 : _this$article$catalog.prices[priceKey]) === undefined) {
@@ -30091,13 +30411,16 @@ var IDMEngine = /*#__PURE__*/function () {
30091
30411
  continue;
30092
30412
  }
30093
30413
  var price = (_this$article$catalog4 = this.article.catalogArticle.idmPrices) === null || _this$article$catalog4 === void 0 ? void 0 : _this$article$catalog4.prices[priceKey];
30414
+ var measurePrice = this.getMeasurePrice(priceFeatureGroup, priceKey, price);
30415
+ if (measurePrice && this.article.set.logDecisions && this.priceDebugStack[i]) this.priceDebugStack[i].measurePrice = measurePrice;
30094
30416
  this.article.priceRefs.push({
30095
30417
  ID: matichingFinish._id,
30096
30418
  ISABP: !priceFeatureGroup.additionalPrice,
30097
30419
  IsPercentage: priceFeatureGroup.isPercentage,
30098
30420
  OPT: (_priceFeatureGroup$fe = (_priceFeatureGroup$fe2 = priceFeatureGroup.featureNos) === null || _priceFeatureGroup$fe2 === void 0 ? void 0 : _priceFeatureGroup$fe2[0]) !== null && _priceFeatureGroup$fe !== void 0 ? _priceFeatureGroup$fe : 'BASE',
30099
30421
  PPG: priceKey,
30100
- Price: price,
30422
+ Price: (_measurePrice$price = measurePrice === null || measurePrice === void 0 ? void 0 : measurePrice.price) !== null && _measurePrice$price !== void 0 ? _measurePrice$price : price,
30423
+ MeasurePrice: measurePrice,
30101
30424
  RuleDesc: DivaUtils.getLocals(priceFeatureGroup.priceFeatureGroupText, this.article.set.api.getLanguage()),
30102
30425
  RuleDesc_locales: priceFeatureGroup.priceFeatureGroupText,
30103
30426
  PriceFeatureGroupNo: priceFeatureGroup.priceFeatureGroupNo
@@ -30245,6 +30568,91 @@ var IDMEngine = /*#__PURE__*/function () {
30245
30568
  });
30246
30569
  }
30247
30570
 
30571
+ /**
30572
+ * The price of a finish whose price feature group the item prices per length, area or volume (its PRICE_TYPE_REF),
30573
+ * for the article's current dimensions; undefined for a piece price. Only the base group carries a base or minimum
30574
+ * price; a surcharge group of a basic price dependent type charges the rest beyond the item's basic price unit.
30575
+ */
30576
+ }, {
30577
+ key: "getMeasurePrice",
30578
+ value: function getMeasurePrice(priceFeatureGroup, priceKey, unitPrice) {
30579
+ var _ref7, _prices$priceTypeRefs, _prices$priceTypeRefs2, _prices$basicPrices$p, _prices$basicPrices;
30580
+ var catalogArticle = this.article.catalogArticle;
30581
+ var prices = catalogArticle.idmPrices;
30582
+ var isBase = !priceFeatureGroup.additionalPrice;
30583
+ // without a stored reference a group prices like the editor writes it: the base group by the item's type, a surcharge by type 1
30584
+ var priceTypeNo = (_ref7 = (_prices$priceTypeRefs = prices === null || prices === void 0 || (_prices$priceTypeRefs2 = prices.priceTypeRefs) === null || _prices$priceTypeRefs2 === void 0 ? void 0 : _prices$priceTypeRefs2['PRFG' + priceFeatureGroup.priceFeatureGroupNo]) !== null && _prices$priceTypeRefs !== void 0 ? _prices$priceTypeRefs : isBase ? catalogArticle.priceTypeRef : undefined) !== null && _ref7 !== void 0 ? _ref7 : 1;
30585
+ var priceType = this.article.CatalogData.idmPriceTypes.find(function (type) {
30586
+ return type.priceTypeNo == priceTypeNo;
30587
+ });
30588
+ if (!isMeasureDependent(priceType)) return undefined;
30589
+ var measurePrice = calcMeasurePrice(unitPrice, priceType, this.getMeasuresMm(), isBase ? {
30590
+ price: (_prices$basicPrices$p = prices === null || prices === void 0 || (_prices$basicPrices = prices.basicPrices) === null || _prices$basicPrices === void 0 ? void 0 : _prices$basicPrices[priceKey]) !== null && _prices$basicPrices$p !== void 0 ? _prices$basicPrices$p : undefined,
30591
+ unit: prices === null || prices === void 0 ? void 0 : prices.basicPriceUnit
30592
+ } : {
30593
+ unit: prices === null || prices === void 0 ? void 0 : prices.basicPriceUnit
30594
+ });
30595
+ if (!measurePrice) LOG$g.warn("Price type ".concat(priceTypeNo, " of ").concat(this.article.articleCodex, " needs a dimension the article does not have or a formula that cannot be read: ").concat(priceKey, " stays a piece price"));
30596
+ return measurePrice;
30597
+ }
30598
+
30599
+ /** The article's dimensions in mm: the ones its sinks set, otherwise its planned size, otherwise the item's basic shape. */
30600
+ }, {
30601
+ key: "getMeasuresMm",
30602
+ value: function getMeasuresMm() {
30603
+ var _sinks$width, _sinks$depth, _sinks$height;
30604
+ var _this$article$catalog6 = this.article.catalogArticle,
30605
+ shape = _this$article$catalog6.basicShapeMm,
30606
+ width = _this$article$catalog6.width,
30607
+ depth = _this$article$catalog6.depth,
30608
+ height = _this$article$catalog6.height;
30609
+ var sinks = this.getSinkMeasuresMm();
30610
+ var toMm = function toMm(planned, shapeMm, catalogCm) {
30611
+ // The planner holds a basic shape in whole cm: while the article has that size the shape is the exact measure
30612
+ if (planned > 0 && !(shapeMm && Math.floor(shapeMm / 10) === planned)) return Math.round(planned * 10);
30613
+ return shapeMm || (catalogCm ? catalogCm * 10 : undefined);
30614
+ };
30615
+ return {
30616
+ width: (_sinks$width = sinks.width) !== null && _sinks$width !== void 0 ? _sinks$width : toMm(this.article.calcWidth, shape === null || shape === void 0 ? void 0 : shape.width, width),
30617
+ depth: (_sinks$depth = sinks.depth) !== null && _sinks$depth !== void 0 ? _sinks$depth : toMm(this.article.calcDepth, shape === null || shape === void 0 ? void 0 : shape.depth, depth),
30618
+ height: (_sinks$height = sinks.height) !== null && _sinks$height !== void 0 ? _sinks$height : toMm(this.article.calcHeight, shape === null || shape === void 0 ? void 0 : shape.height, height)
30619
+ };
30620
+ }
30621
+
30622
+ /**
30623
+ * The measures the article's own sinks hold, in mm. They are read here and not from the planner size, which cannot tell
30624
+ * a selected 2350 mm from a basic shape of 2355 mm and never gets the sink of a hidden partlist child.
30625
+ */
30626
+ }, {
30627
+ key: "getSinkMeasuresMm",
30628
+ value: function getSinkMeasuresMm() {
30629
+ var measures = {};
30630
+ var _iterator20 = _createForOfIteratorHelper$n(this.article.articleOptionStates.values()),
30631
+ _step20;
30632
+ try {
30633
+ for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
30634
+ var _ops$option$idmVarian;
30635
+ var ops = _step20.value;
30636
+ if (!ops.val) continue;
30637
+ var art = (_ops$option$idmVarian = ops.option.idmVariantenArt) !== null && _ops$option$idmVarian !== void 0 ? _ops$option$idmVarian : 0;
30638
+ var setsWidth = [95, 1095].includes(art) || !!ops.option.diameter;
30639
+ var setsDepth = [96, 1096].includes(art) || !!ops.option.diameter;
30640
+ var setsHeight = [97, 1097].includes(art);
30641
+ if (!setsWidth && !setsDepth && !setsHeight) continue;
30642
+ var cm = this.sinkMeasureCm(ops);
30643
+ if (!(cm > 0)) continue;
30644
+ if (setsWidth) measures.width = Math.round(cm * 10);
30645
+ if (setsDepth) measures.depth = Math.round(cm * 10);
30646
+ if (setsHeight) measures.height = Math.round(cm * 10);
30647
+ }
30648
+ } catch (err) {
30649
+ _iterator20.e(err);
30650
+ } finally {
30651
+ _iterator20.f();
30652
+ }
30653
+ return measures;
30654
+ }
30655
+
30248
30656
  /** The idmPrices key of a finish. The real lookup, the zero check and the debug log must all use the same one. */
30249
30657
  }, {
30250
30658
  key: "getFinishPriceKey",
@@ -30275,12 +30683,9 @@ var IDMEngine = /*#__PURE__*/function () {
30275
30683
  // a text without a measure is a typed entry: it replaces what a formula measured before
30276
30684
  if (measureValue === undefined) myArtOPS.measureValue = undefined;
30277
30685
  } else if (myArtOPS.freeText == undefined || oldCodex !== myArtOPS.valCodex) {
30278
- var _myArtOPS$val;
30279
30686
  //another option means another measure range, so the previous freetext must not carry over
30280
- if ((_myArtOPS$val = myArtOPS.val) !== null && _myArtOPS$val !== void 0 && _myArtOPS$val.measureMinimum) {
30281
- var _myArtOPS$val2;
30282
- myArtOPS.freeText = (_myArtOPS$val2 = myArtOPS.val) === null || _myArtOPS$val2 === void 0 ? void 0 : _myArtOPS$val2.measureMinimum;
30283
- }
30687
+ var defaultFreeText = myArtOPS.defaultFreeText;
30688
+ if (defaultFreeText) myArtOPS.freeText = defaultFreeText;
30284
30689
  }
30285
30690
  myArtOPS.isVisibleFreeText = true;
30286
30691
  } else {
@@ -30339,9 +30744,9 @@ var IDMEngine = /*#__PURE__*/function () {
30339
30744
  }, {
30340
30745
  key: "evalPartlist",
30341
30746
  value: function evalPartlist(newConfigValues) {
30342
- var _this$article$catalog6;
30747
+ var _this$article$catalog7;
30343
30748
  var partlistArticlesToLoad = [];
30344
- var myPartlistArticles = (_this$article$catalog6 = this.article.catalogArticle.idmPartlist) === null || _this$article$catalog6 === void 0 ? void 0 : _this$article$catalog6.partlistPos;
30749
+ var myPartlistArticles = (_this$article$catalog7 = this.article.catalogArticle.idmPartlist) === null || _this$article$catalog7 === void 0 ? void 0 : _this$article$catalog7.partlistPos;
30345
30750
  if (!(myPartlistArticles !== null && myPartlistArticles !== void 0 && myPartlistArticles.length)) return [];
30346
30751
  if (this.article.set.logDecisions) this.article.partlistDebugEntries = [];
30347
30752
  var partlistGroup = [];
@@ -30483,7 +30888,7 @@ var IDMEngine = /*#__PURE__*/function () {
30483
30888
  _loop9(i);
30484
30889
  }
30485
30890
  if (quanitity >= 1) {
30486
- var _ref7;
30891
+ var _ref8;
30487
30892
  partlistArticlesToLoad.push({
30488
30893
  CatalogCodex: catalogCodex != null ? catalogCodex.toString() : this.article.catalogCodex,
30489
30894
  BasketID: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.basketId,
@@ -30504,7 +30909,7 @@ var IDMEngine = /*#__PURE__*/function () {
30504
30909
  PreviousPartlistArticles: previousPartlistArticle !== null && previousPartlistArticle !== void 0 && previousPartlistArticle.partlistArticles && Object.keys(previousPartlistArticle.partlistArticles).length ? previousPartlistArticle.partlistArticles : undefined,
30505
30910
  optionsForPrint: featuresForPrint,
30506
30911
  RetailArticleNr: myPartListPos.retailArticleNr && myPartListPos.retailArticleNr !== '' ? myPartListPos.retailArticleNr : undefined,
30507
- RetailPrefix: (_ref7 = myPartListPos.retailPrefix) !== null && _ref7 !== void 0 ? _ref7 : undefined
30912
+ RetailPrefix: (_ref8 = myPartListPos.retailPrefix) !== null && _ref8 !== void 0 ? _ref8 : undefined
30508
30913
  //SupplierOrderCodex: // TODO WWS IDM ,myPartListPos.SupplierOrderCodex,
30509
30914
 
30510
30915
  //optionImgForPrint,
@@ -30523,9 +30928,9 @@ var IDMEngine = /*#__PURE__*/function () {
30523
30928
  key: "getMatchingOptionCombination",
30524
30929
  value: function getMatchingOptionCombination(combinations, decisionNo, ruleSet) {
30525
30930
  for (var i = 0; i < combinations.length; i++) {
30526
- var _ref8, _ref9, _projectOptionsSetRef;
30931
+ var _ref9, _ref10, _projectOptionsSetRef;
30527
30932
  var combination = combinations[i];
30528
- var optionSetRefs = (_ref8 = (_ref9 = (_projectOptionsSetRef = combination.projectOptionsSetRefs) !== null && _projectOptionsSetRef !== void 0 ? _projectOptionsSetRef : combination.optionsSetRef) !== null && _ref9 !== void 0 ? _ref9 : combination.optionsSetRef) !== null && _ref8 !== void 0 ? _ref8 : [];
30933
+ var optionSetRefs = (_ref9 = (_ref10 = (_projectOptionsSetRef = combination.projectOptionsSetRefs) !== null && _projectOptionsSetRef !== void 0 ? _projectOptionsSetRef : combination.optionsSetRef) !== null && _ref10 !== void 0 ? _ref10 : combination.optionsSetRef) !== null && _ref9 !== void 0 ? _ref9 : [];
30529
30934
  if (optionSetRefs.length === 0) {
30530
30935
  // A conditionless LAST row is the documented fallback; a conditionless row with rows AFTER it is the fault (first match wins).
30531
30936
  var shadowsLaterRows = i < combinations.length - 1;
@@ -30604,9 +31009,9 @@ var IDMEngine = /*#__PURE__*/function () {
30604
31009
  //DecisionOptionCombination
30605
31010
  //Gibt es innerhalb einer Decision eine eine gültige DOC, die OPVs der in ValidOptionValues vorkommenden Optionen zunächst alle disabeln, werden dann über eine gültige Formel wieder enabled
30606
31011
 
30607
- var _ref10 = this.getMatchingOptionCombination(myDecision.optionCombinations, decisionNo),
30608
- _ref11 = _slicedToArray(_ref10, 1),
30609
- combination = _ref11[0];
31012
+ var _ref11 = this.getMatchingOptionCombination(myDecision.optionCombinations, decisionNo),
31013
+ _ref12 = _slicedToArray(_ref11, 1),
31014
+ combination = _ref12[0];
30610
31015
  if (combination) {
30611
31016
  isValidDOC = true;
30612
31017
  }
@@ -30623,25 +31028,25 @@ var IDMEngine = /*#__PURE__*/function () {
30623
31028
  var cached = this.featureDefaultIndex;
30624
31029
  if (cached && cached.sources[0] === sources[0] && cached.sources[1] === sources[1]) return cached.byFeature;
30625
31030
  var byFeature = new Map();
30626
- var _iterator20 = _createForOfIteratorHelper$n(this.decisions),
30627
- _step20;
31031
+ var _iterator21 = _createForOfIteratorHelper$n(this.decisions),
31032
+ _step21;
30628
31033
  try {
30629
- for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
31034
+ for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
30630
31035
  var _decision$optionCombi6;
30631
- var decision = _step20.value;
31036
+ var decision = _step21.value;
30632
31037
  if (decision.decisionType !== 2) continue;
30633
- var _iterator21 = _createForOfIteratorHelper$n((_decision$optionCombi6 = decision.optionCombinations) !== null && _decision$optionCombi6 !== void 0 ? _decision$optionCombi6 : []),
30634
- _step21;
31038
+ var _iterator22 = _createForOfIteratorHelper$n((_decision$optionCombi6 = decision.optionCombinations) !== null && _decision$optionCombi6 !== void 0 ? _decision$optionCombi6 : []),
31039
+ _step22;
30635
31040
  try {
30636
- for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
31041
+ for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
30637
31042
  var _combination$projectA10, _combination$projectA11;
30638
- var combination = _step21.value;
30639
- var _iterator22 = _createForOfIteratorHelper$n((_combination$projectA10 = (_combination$projectA11 = combination.projectActions) === null || _combination$projectA11 === void 0 ? void 0 : _combination$projectA11.setFeatureDefault) !== null && _combination$projectA10 !== void 0 ? _combination$projectA10 : []),
30640
- _step22;
31043
+ var combination = _step22.value;
31044
+ var _iterator23 = _createForOfIteratorHelper$n((_combination$projectA10 = (_combination$projectA11 = combination.projectActions) === null || _combination$projectA11 === void 0 ? void 0 : _combination$projectA11.setFeatureDefault) !== null && _combination$projectA10 !== void 0 ? _combination$projectA10 : []),
31045
+ _step23;
30641
31046
  try {
30642
- for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
31047
+ for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
30643
31048
  var _action$featureNo2, _byFeature$get;
30644
- var action = _step22.value;
31049
+ var action = _step23.value;
30645
31050
  var featureNo = (_action$featureNo2 = action.featureNo) === null || _action$featureNo2 === void 0 ? void 0 : _action$featureNo2.toString();
30646
31051
  if (!featureNo) continue;
30647
31052
  var list = (_byFeature$get = byFeature.get(featureNo)) !== null && _byFeature$get !== void 0 ? _byFeature$get : [];
@@ -30649,21 +31054,21 @@ var IDMEngine = /*#__PURE__*/function () {
30649
31054
  byFeature.set(featureNo, list);
30650
31055
  }
30651
31056
  } catch (err) {
30652
- _iterator22.e(err);
31057
+ _iterator23.e(err);
30653
31058
  } finally {
30654
- _iterator22.f();
31059
+ _iterator23.f();
30655
31060
  }
30656
31061
  }
30657
31062
  } catch (err) {
30658
- _iterator21.e(err);
31063
+ _iterator22.e(err);
30659
31064
  } finally {
30660
- _iterator21.f();
31065
+ _iterator22.f();
30661
31066
  }
30662
31067
  }
30663
31068
  } catch (err) {
30664
- _iterator20.e(err);
31069
+ _iterator21.e(err);
30665
31070
  } finally {
30666
- _iterator20.f();
31071
+ _iterator21.f();
30667
31072
  }
30668
31073
  this.featureDefaultIndex = {
30669
31074
  sources: sources,
@@ -30678,17 +31083,17 @@ var IDMEngine = /*#__PURE__*/function () {
30678
31083
  value: function setFeatureDefaultKey(featureNo) {
30679
31084
  var decisions = this.type2DefaultsByFeature().get(featureNo);
30680
31085
  if (!decisions) return undefined;
30681
- var _iterator23 = _createForOfIteratorHelper$n(decisions),
30682
- _step23;
31086
+ var _iterator24 = _createForOfIteratorHelper$n(decisions),
31087
+ _step24;
30683
31088
  try {
30684
- for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
31089
+ for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
30685
31090
  var _combination$projectA12;
30686
- var decision = _step23.value;
31091
+ var decision = _step24.value;
30687
31092
  // A decision evalType2Decision also visits would report WC_0012 twice per convergence pass — a DISABLED one it skips
30688
31093
  // entirely, so there the warning has to come from here.
30689
- var _ref12 = this.getMatchingOptionCombination(decision.optionCombinations, decision.enabled === false ? decision.decisionNo : undefined),
30690
- _ref13 = _slicedToArray(_ref12, 1),
30691
- combination = _ref13[0];
31094
+ var _ref13 = this.getMatchingOptionCombination(decision.optionCombinations, decision.enabled === false ? decision.decisionNo : undefined),
31095
+ _ref14 = _slicedToArray(_ref13, 1),
31096
+ combination = _ref14[0];
30692
31097
  var key = combination === null || combination === void 0 || (_combination$projectA12 = combination.projectActions) === null || _combination$projectA12 === void 0 || (_combination$projectA12 = _combination$projectA12.setFeatureDefault) === null || _combination$projectA12 === void 0 || (_combination$projectA12 = _combination$projectA12.find(function (a) {
30693
31098
  var _a$featureNo;
30694
31099
  return ((_a$featureNo = a.featureNo) === null || _a$featureNo === void 0 ? void 0 : _a$featureNo.toString()) === featureNo;
@@ -30696,9 +31101,9 @@ var IDMEngine = /*#__PURE__*/function () {
30696
31101
  if (key) return key;
30697
31102
  }
30698
31103
  } catch (err) {
30699
- _iterator23.e(err);
31104
+ _iterator24.e(err);
30700
31105
  } finally {
30701
- _iterator23.f();
31106
+ _iterator24.f();
30702
31107
  }
30703
31108
  return undefined;
30704
31109
  }
@@ -30707,23 +31112,35 @@ var IDMEngine = /*#__PURE__*/function () {
30707
31112
  }, {
30708
31113
  key: "preferredDefaultOpv",
30709
31114
  value: function preferredDefaultOpv(featureNo, visible, ops) {
30710
- var _ref14;
31115
+ var _ref15;
30711
31116
  // A rule may hide the chosen value for a while (metal foot hides the woods); when it frees it again the customer's pick must come back.
30712
31117
  // getVisibleOptionValue resolves THROUGH option groups; a plain map lookup misses a grouped choice.
30713
31118
  var chosen = ops !== null && ops !== void 0 && ops.userChosenOPV ? ops.getVisibleOptionValue(ops.userChosenOPV) : undefined;
30714
31119
  if (chosen) return chosen;
30715
31120
  var key = this.setFeatureDefaultKey(featureNo);
30716
- return (_ref14 = key ? visible.get(key) : undefined) !== null && _ref14 !== void 0 ? _ref14 : this.article.getDefaultOpv(visible);
31121
+ return (_ref15 = key ? visible.get(key) : undefined) !== null && _ref15 !== void 0 ? _ref15 : this.article.getDefaultOpv(visible);
31122
+ }
31123
+
31124
+ /** Replaces a value a rule just hid. That is no decision of its own: only a lock from before the rule keeps the feature fixed. */
31125
+ }, {
31126
+ key: "selectFallbackOpv",
31127
+ value: function selectFallbackOpv(featureNo, ops) {
31128
+ var wasFixed = ops.definedBySetFeatureFixed;
31129
+ this.updateArtOPV(this.preferredDefaultOpv(featureNo, ops.visibleOptionValues, ops), featureNo, ops, undefined);
31130
+ ops.definedBySetFeatureFixed = wasFixed;
30717
31131
  }
30718
31132
  }, {
30719
31133
  key: "updateIDMSpecificFeatures",
30720
31134
  value: function updateIDMSpecificFeatures() {
30721
31135
  //updaten idm planner specific options
30722
- var _iterator24 = _createForOfIteratorHelper$n(this.article.articleOptionStates.values()),
30723
- _step24;
31136
+ var _iterator25 = _createForOfIteratorHelper$n(this.article.articleOptionStates.values()),
31137
+ _step25;
30724
31138
  try {
30725
- for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
30726
- var ops = _step24.value;
31139
+ for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {
31140
+ var ops = _step25.value;
31141
+ // Picking a default or re-applying a planning size here must not lock the feature: updateArtOPV marks it
31142
+ // fixed, and a fixed feature shows only its selected option. A lock a decision set earlier in the pass stays.
31143
+ var wasFixed = ops.definedBySetFeatureFixed;
30727
31144
  //when an option has no decisions the first visible optionValue has to be selected per default
30728
31145
  if (ops.val === undefined && ops.visibleCount) {
30729
31146
  // Prefer an authored type-2 default (when visible) over the arbitrary first-visible pick.
@@ -30744,11 +31161,12 @@ var IDMEngine = /*#__PURE__*/function () {
30744
31161
  }
30745
31162
  if (validOpv) this.assignOptionValue(ops.optionCodex, (_validOpv = validOpv) === null || _validOpv === void 0 ? void 0 : _validOpv.codex);
30746
31163
  }
31164
+ ops.definedBySetFeatureFixed = wasFixed;
30747
31165
  }
30748
31166
  } catch (err) {
30749
- _iterator24.e(err);
31167
+ _iterator25.e(err);
30750
31168
  } finally {
30751
- _iterator24.f();
31169
+ _iterator25.f();
30752
31170
  }
30753
31171
  }
30754
31172
  }, {
@@ -30769,8 +31187,7 @@ var IDMEngine = /*#__PURE__*/function () {
30769
31187
  }
30770
31188
  if ([97, 1097].includes((_myArtOPS$option$idmV3 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV3 !== void 0 ? _myArtOPS$option$idmV3 : 0)) {
30771
31189
  try {
30772
- var _ref15, _ref16, _myArtOPS$measureValu;
30773
- var newHeight = this.resolvePlannerDimension(Number((_ref15 = (_ref16 = (_myArtOPS$measureValu = myArtOPS.measureValue) !== null && _myArtOPS$measureValu !== void 0 ? _myArtOPS$measureValu : this.freeTextMeasureCm(myArtOPS)) !== null && _ref16 !== void 0 ? _ref16 : myArtOPS.value) !== null && _ref15 !== void 0 ? _ref15 : myArtOPS.valueFromName), this.article.catalogArticle.height);
31190
+ var newHeight = this.resolvePlannerDimension(this.sinkMeasureCm(myArtOPS), this.article.catalogArticle.height);
30774
31191
  if (newHeight != null) {
30775
31192
  this.article.doUpdatePlannerSize = true;
30776
31193
  this.article.calcHeight = newHeight;
@@ -30781,8 +31198,7 @@ var IDMEngine = /*#__PURE__*/function () {
30781
31198
  }
30782
31199
  if ([96, 1096].includes((_myArtOPS$option$idmV4 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV4 !== void 0 ? _myArtOPS$option$idmV4 : 0) || myArtOPS.option.diameter) {
30783
31200
  try {
30784
- var _ref17, _ref18, _myArtOPS$measureValu2;
30785
- var newDepth = this.resolvePlannerDimension(Number((_ref17 = (_ref18 = (_myArtOPS$measureValu2 = myArtOPS.measureValue) !== null && _myArtOPS$measureValu2 !== void 0 ? _myArtOPS$measureValu2 : this.freeTextMeasureCm(myArtOPS)) !== null && _ref18 !== void 0 ? _ref18 : myArtOPS.value) !== null && _ref17 !== void 0 ? _ref17 : myArtOPS.valueFromName), this.article.catalogArticle.depth);
31201
+ var newDepth = this.resolvePlannerDimension(this.sinkMeasureCm(myArtOPS), this.article.catalogArticle.depth);
30786
31202
  if (newDepth != null) {
30787
31203
  this.article.doUpdatePlannerSize = true;
30788
31204
  this.article.calcDepth = newDepth;
@@ -30793,8 +31209,7 @@ var IDMEngine = /*#__PURE__*/function () {
30793
31209
  }
30794
31210
  if ([95, 1095].includes((_myArtOPS$option$idmV5 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV5 !== void 0 ? _myArtOPS$option$idmV5 : 0) || myArtOPS.option.diameter) {
30795
31211
  try {
30796
- var _ref19, _ref20, _myArtOPS$measureValu3;
30797
- var newWidth = this.resolvePlannerDimension(Number((_ref19 = (_ref20 = (_myArtOPS$measureValu3 = myArtOPS.measureValue) !== null && _myArtOPS$measureValu3 !== void 0 ? _myArtOPS$measureValu3 : this.freeTextMeasureCm(myArtOPS)) !== null && _ref20 !== void 0 ? _ref20 : myArtOPS.value) !== null && _ref19 !== void 0 ? _ref19 : myArtOPS.valueFromName), this.article.catalogArticle.width);
31212
+ var newWidth = this.resolvePlannerDimension(this.sinkMeasureCm(myArtOPS), this.article.catalogArticle.width);
30798
31213
  if (newWidth != null) {
30799
31214
  this.article.doUpdatePlannerSize = true;
30800
31215
  this.article.calcWidth = newWidth;
@@ -30835,11 +31250,11 @@ var IDMEngine = /*#__PURE__*/function () {
30835
31250
  key: "getConditionValuesOfCombination",
30836
31251
  value: function getConditionValuesOfCombination(combination, featureNo, optionKey) {
30837
31252
  var variantValues = {};
30838
- var _iterator25 = _createForOfIteratorHelper$n(combination.projectOptionsSetRefs),
30839
- _step25;
31253
+ var _iterator26 = _createForOfIteratorHelper$n(combination.projectOptionsSetRefs),
31254
+ _step26;
30840
31255
  try {
30841
- for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {
30842
- var optionSetRef = _step25.value;
31256
+ for (_iterator26.s(); !(_step26 = _iterator26.n()).done;) {
31257
+ var optionSetRef = _step26.value;
30843
31258
  var optionList = this.getOptionListOfRef(optionSetRef);
30844
31259
  if (optionSetRef.featureNo.toString() == featureNo) {
30845
31260
  return optionKey && !(optionList !== null && optionList !== void 0 && optionList.options.includes(optionKey)) ? undefined : variantValues;
@@ -30848,9 +31263,9 @@ var IDMEngine = /*#__PURE__*/function () {
30848
31263
  variantValues[optionSetRef.featureNo.toString()] = optionList.options[0];
30849
31264
  }
30850
31265
  } catch (err) {
30851
- _iterator25.e(err);
31266
+ _iterator26.e(err);
30852
31267
  } finally {
30853
- _iterator25.f();
31268
+ _iterator26.f();
30854
31269
  }
30855
31270
  return variantValues;
30856
31271
  }
@@ -30876,18 +31291,18 @@ var IDMEngine = /*#__PURE__*/function () {
30876
31291
  })) return false;
30877
31292
  return _this8.decisionRemovesOption(restriction, featureNo, optionKey);
30878
31293
  };
30879
- var _iterator26 = _createForOfIteratorHelper$n(articleDecisions),
30880
- _step26;
31294
+ var _iterator27 = _createForOfIteratorHelper$n(articleDecisions),
31295
+ _step27;
30881
31296
  try {
30882
- for (_iterator26.s(); !(_step26 = _iterator26.n()).done;) {
30883
- var gate = _step26.value;
31297
+ for (_iterator27.s(); !(_step27 = _iterator27.n()).done;) {
31298
+ var gate = _step27.value;
30884
31299
  if (gate.decisionType != 2) continue;
30885
- var _iterator27 = _createForOfIteratorHelper$n(gate.optionCombinations),
30886
- _step27;
31300
+ var _iterator28 = _createForOfIteratorHelper$n(gate.optionCombinations),
31301
+ _step28;
30887
31302
  try {
30888
- for (_iterator27.s(); !(_step27 = _iterator27.n()).done;) {
31303
+ for (_iterator28.s(); !(_step28 = _iterator28.n()).done;) {
30889
31304
  var _combination$projectA13, _combination$projectA14;
30890
- var combination = _step27.value;
31305
+ var combination = _step28.value;
30891
31306
  var enabled = (_combination$projectA13 = (_combination$projectA14 = combination.projectActions) === null || _combination$projectA14 === void 0 ? void 0 : _combination$projectA14.enableDecision) !== null && _combination$projectA13 !== void 0 ? _combination$projectA13 : [];
30892
31307
  if (!enabled.some(function (ref) {
30893
31308
  return isGatedRestriction(Number(ref.decisionNo));
@@ -30895,15 +31310,15 @@ var IDMEngine = /*#__PURE__*/function () {
30895
31310
  variantValuesArr.push.apply(variantValuesArr, _toConsumableArray(this.getValuesNotMatchingCombination(combination)));
30896
31311
  }
30897
31312
  } catch (err) {
30898
- _iterator27.e(err);
31313
+ _iterator28.e(err);
30899
31314
  } finally {
30900
- _iterator27.f();
31315
+ _iterator28.f();
30901
31316
  }
30902
31317
  }
30903
31318
  } catch (err) {
30904
- _iterator26.e(err);
31319
+ _iterator27.e(err);
30905
31320
  } finally {
30906
- _iterator26.f();
31321
+ _iterator27.f();
30907
31322
  }
30908
31323
  return variantValuesArr;
30909
31324
  }
@@ -30928,34 +31343,34 @@ var IDMEngine = /*#__PURE__*/function () {
30928
31343
  key: "getValuesNotMatchingCombination",
30929
31344
  value: function getValuesNotMatchingCombination(combination) {
30930
31345
  var variantValuesArr = [];
30931
- var _iterator28 = _createForOfIteratorHelper$n(combination.projectOptionsSetRefs),
30932
- _step28;
31346
+ var _iterator29 = _createForOfIteratorHelper$n(combination.projectOptionsSetRefs),
31347
+ _step29;
30933
31348
  try {
30934
- for (_iterator28.s(); !(_step28 = _iterator28.n()).done;) {
30935
- var optionSetRef = _step28.value;
31349
+ for (_iterator29.s(); !(_step29 = _iterator29.n()).done;) {
31350
+ var optionSetRef = _step29.value;
30936
31351
  var optionList = this.getOptionListOfRef(optionSetRef);
30937
31352
  if (!(optionList !== null && optionList !== void 0 && optionList.options.length) || ![0, 1, 2, 3].includes(optionList.operator)) continue;
30938
31353
  var conditionFeatureNo = optionSetRef.featureNo.toString();
30939
31354
  var ops = this.article.getArticleOptionState(conditionFeatureNo);
30940
31355
  if (!ops) continue;
30941
- var _iterator29 = _createForOfIteratorHelper$n(ops.visibleOPVKeys),
30942
- _step29;
31356
+ var _iterator30 = _createForOfIteratorHelper$n(ops.visibleOPVKeys),
31357
+ _step30;
30943
31358
  try {
30944
- for (_iterator29.s(); !(_step29 = _iterator29.n()).done;) {
30945
- var candidate = _step29.value;
31359
+ for (_iterator30.s(); !(_step30 = _iterator30.n()).done;) {
31360
+ var candidate = _step30.value;
30946
31361
  if (this.evalValueWithOperator(optionList.operator, optionList.options, candidate)) continue;
30947
31362
  variantValuesArr.push(_defineProperty({}, conditionFeatureNo, candidate));
30948
31363
  }
30949
31364
  } catch (err) {
30950
- _iterator29.e(err);
31365
+ _iterator30.e(err);
30951
31366
  } finally {
30952
- _iterator29.f();
31367
+ _iterator30.f();
30953
31368
  }
30954
31369
  }
30955
31370
  } catch (err) {
30956
- _iterator28.e(err);
31371
+ _iterator29.e(err);
30957
31372
  } finally {
30958
- _iterator28.f();
31373
+ _iterator29.f();
30959
31374
  }
30960
31375
  return variantValuesArr;
30961
31376
  }
@@ -30970,6 +31385,14 @@ var IDMEngine = /*#__PURE__*/function () {
30970
31385
  return null;
30971
31386
  }
30972
31387
 
31388
+ /** The dimension in cm a sink's value sets; NaN when it names none. */
31389
+ }, {
31390
+ key: "sinkMeasureCm",
31391
+ value: function sinkMeasureCm(ops) {
31392
+ var _ref16, _ref17, _ops$measureValue;
31393
+ return Number((_ref16 = (_ref17 = (_ops$measureValue = ops.measureValue) !== null && _ops$measureValue !== void 0 ? _ops$measureValue : this.freeTextMeasureCm(ops)) !== null && _ref17 !== void 0 ? _ref17 : ops.value) !== null && _ref16 !== void 0 ? _ref16 : ops.valueFromName);
31394
+ }
31395
+
30973
31396
  /** The typed freetext is not unit-converted like `value`: "25600" MMT must become 2560 cm here. */
30974
31397
  }, {
30975
31398
  key: "freeTextMeasureCm",
@@ -31014,7 +31437,7 @@ var IDMEngine = /*#__PURE__*/function () {
31014
31437
  }, {
31015
31438
  key: "updateConfigDependentMedia",
31016
31439
  value: function updateConfigDependentMedia() {
31017
- var _this$article$catalog7;
31440
+ var _this$article$catalog8;
31018
31441
  var catalogData = this.article.CatalogData;
31019
31442
  //articlebild berechnung
31020
31443
 
@@ -31028,9 +31451,9 @@ var IDMEngine = /*#__PURE__*/function () {
31028
31451
  for (var j = 0; !doUse && j < image.decisionNos.length; j++) {
31029
31452
  var decision = catalogData.getDecisionByNo(image.decisionNos[j]);
31030
31453
  if (!decision) continue;
31031
- var _ref21 = this.getMatchingOptionCombination(decision.optionCombinations, decision.decisionNo),
31032
- _ref22 = _slicedToArray(_ref21, 1),
31033
- combination = _ref22[0];
31454
+ var _ref18 = this.getMatchingOptionCombination(decision.optionCombinations, decision.decisionNo),
31455
+ _ref19 = _slicedToArray(_ref18, 1),
31456
+ combination = _ref19[0];
31034
31457
  if (combination) {
31035
31458
  doUse = true;
31036
31459
  break;
@@ -31049,18 +31472,18 @@ var IDMEngine = /*#__PURE__*/function () {
31049
31472
  }
31050
31473
 
31051
31474
  // this functions updates the images of OPVs that depend on rules
31052
- var _iterator30 = _createForOfIteratorHelper$n(this.article.articleOptionStates.values()),
31053
- _step30;
31475
+ var _iterator31 = _createForOfIteratorHelper$n(this.article.articleOptionStates.values()),
31476
+ _step31;
31054
31477
  try {
31055
- for (_iterator30.s(); !(_step30 = _iterator30.n()).done;) {
31056
- var ops = _step30.value;
31057
- var _iterator31 = _createForOfIteratorHelper$n(ops.visibleOptionValues),
31058
- _step31;
31478
+ for (_iterator31.s(); !(_step31 = _iterator31.n()).done;) {
31479
+ var ops = _step31.value;
31480
+ var _iterator32 = _createForOfIteratorHelper$n(ops.visibleOptionValues),
31481
+ _step32;
31059
31482
  try {
31060
- for (_iterator31.s(); !(_step31 = _iterator31.n()).done;) {
31061
- var _step31$value = _slicedToArray(_step31.value, 2),
31062
- jKey = _step31$value[0],
31063
- opv = _step31$value[1];
31483
+ for (_iterator32.s(); !(_step32 = _iterator32.n()).done;) {
31484
+ var _step32$value = _slicedToArray(_step32.value, 2),
31485
+ jKey = _step32$value[0],
31486
+ opv = _step32$value[1];
31064
31487
  if (opv.images) {
31065
31488
  var imageFound = false;
31066
31489
  for (var _i5 = 0; _i5 < opv.images.length; _i5++) {
@@ -31071,9 +31494,9 @@ var IDMEngine = /*#__PURE__*/function () {
31071
31494
  for (var _j2 = 0; _j2 < _image.decisionNos.length; _j2++) {
31072
31495
  var _decision5 = catalogData.getDecisionsByNo([_image.decisionNos[_j2]])[0];
31073
31496
  if (!_decision5) continue;
31074
- var _ref25 = this.getMatchingOptionCombination(_decision5.optionCombinations, _decision5.decisionNo),
31075
- _ref26 = _slicedToArray(_ref25, 1),
31076
- _combination2 = _ref26[0];
31497
+ var _ref22 = this.getMatchingOptionCombination(_decision5.optionCombinations, _decision5.decisionNo),
31498
+ _ref23 = _slicedToArray(_ref22, 1),
31499
+ _combination2 = _ref23[0];
31077
31500
  if (_combination2) {
31078
31501
  _doUse = true;
31079
31502
  break;
@@ -31090,25 +31513,25 @@ var IDMEngine = /*#__PURE__*/function () {
31090
31513
  }
31091
31514
  }
31092
31515
  } catch (err) {
31093
- _iterator31.e(err);
31516
+ _iterator32.e(err);
31094
31517
  } finally {
31095
- _iterator31.f();
31518
+ _iterator32.f();
31096
31519
  }
31097
31520
  }
31098
31521
 
31099
31522
  // this function calculates an Svg to the current configuration if neccessary (SVG Tausch)
31100
31523
  // if the Article has no SVG Tausch nothing is done
31101
31524
  } catch (err) {
31102
- _iterator30.e(err);
31525
+ _iterator31.e(err);
31103
31526
  } finally {
31104
- _iterator30.f();
31527
+ _iterator31.f();
31105
31528
  }
31106
31529
  var newSVGFile = null;
31107
31530
  var svgChangedViaSvgTausch = false;
31108
- if (!((_this$article$catalog7 = this.article.catalogArticle.svgs) !== null && _this$article$catalog7 !== void 0 && _this$article$catalog7.length)) {
31109
- var _this$article$catalog8;
31531
+ if (!((_this$article$catalog8 = this.article.catalogArticle.svgs) !== null && _this$article$catalog8 !== void 0 && _this$article$catalog8.length)) {
31532
+ var _this$article$catalog9;
31110
31533
  //falls der Arikel kein SVG hat könnte eines seiner ParlistArtikel eines haben
31111
- if (this.article.hasPartlistArticle && !((_this$article$catalog8 = this.article.catalogArticle.catalogPlannerArticle) !== null && _this$article$catalog8 !== void 0 && _this$article$catalog8.topSvg)) {
31534
+ if (this.article.hasPartlistArticle && !((_this$article$catalog9 = this.article.catalogArticle.catalogPlannerArticle) !== null && _this$article$catalog9 !== void 0 && _this$article$catalog9.topSvg)) {
31112
31535
  for (var key in this.article.partlistArticles) if (this.article.partlistArticles[key].actPlannerData) {
31113
31536
  this.article.plannerData = this.article.partlistArticles[key].actPlannerData;
31114
31537
  newSVGFile = true;
@@ -31131,9 +31554,9 @@ var IDMEngine = /*#__PURE__*/function () {
31131
31554
  for (var _j = 0; _j < svg.decisionNos.length; _j++) {
31132
31555
  var _decision4 = catalogData.getDecisionsByNo([svg.decisionNos[_j]])[0];
31133
31556
  if (!_decision4) continue;
31134
- var _ref23 = this.getMatchingOptionCombination(_decision4.optionCombinations, _decision4.decisionNo),
31135
- _ref24 = _slicedToArray(_ref23, 1),
31136
- _combination = _ref24[0];
31557
+ var _ref20 = this.getMatchingOptionCombination(_decision4.optionCombinations, _decision4.decisionNo),
31558
+ _ref21 = _slicedToArray(_ref20, 1),
31559
+ _combination = _ref21[0];
31137
31560
  if (_combination) {
31138
31561
  svgValid = _decision4;
31139
31562
  break;
@@ -34359,7 +34782,7 @@ var DivaArticle = /*#__PURE__*/function () {
34359
34782
  break;
34360
34783
  }
34361
34784
  _context.next = 4;
34362
- return import('./ShelfPlanner-bee5bd90.js');
34785
+ return import('./ShelfPlanner-1f5d098e.js');
34363
34786
  case 4:
34364
34787
  _yield$import = _context.sent;
34365
34788
  ShelfPlanner = _yield$import["default"];
@@ -35837,7 +36260,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
35837
36260
  var _initCfgValues = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(article, variantValues,
35838
36261
  // Werte aus einem Basiskonfigurat,
35839
36262
  variantItems) {
35840
- var myCatalogArticleOptions, i, _article$set$ViewConf, attr, foundItem, _foundItem$opt, opss, _i3, ops, opv, _iterator3, _step3, _Array$from$0$codex, _Array$from$, _ops, value, optionValueCodex, _i4, variantItem, possibleValues, j, possibleValue, _i5, _variantItem, val;
36263
+ var myCatalogArticleOptions, i, _article$set$ViewConf, attr, foundItem, _foundItem$opt, opss, _i3, ops, opv, _iterator3, _step3, _Array$from$0$codex, _Array$from$, _ops, value, optionValueCodex, _i4, variantItem, possibleValues, j, possibleValue, _i5, _variantItem, val, _ops$defaultFreeText, _ops$valCodex, optionValue;
35841
36264
  return _regeneratorRuntime.wrap(function _callee9$(_context10) {
35842
36265
  while (1) switch (_context10.prev = _context10.next) {
35843
36266
  case 0:
@@ -35931,12 +36354,16 @@ var DivaArticleHandler = /*#__PURE__*/function () {
35931
36354
  if (value == undefined && _ops.isFreeText && !variantValues[_ops.optionCodex + '_val']) {
35932
36355
  val = _ops.option.freetextDefaultValue;
35933
36356
  if (val) {
35934
- value = val;
35935
- _ops.freeText = val;
36357
+ value = (_ops$defaultFreeText = _ops.defaultFreeText) !== null && _ops$defaultFreeText !== void 0 ? _ops$defaultFreeText : val;
36358
+ _ops.freeText = value;
36359
+ // the default is clamped to the selected free value's range, so set it on that value
36360
+ optionValueCodex = (_ops$valCodex = _ops.valCodex) !== null && _ops$valCodex !== void 0 ? _ops$valCodex : optionValueCodex;
35936
36361
  }
35937
36362
  }
35938
36363
  if (value != undefined) {
35939
- article.engine.setOP(_ops.option.codex, _ops.option.articleOptionValues.get(optionValueCodex), value, true);
36364
+ // a grouped option keys its values by group, so the selected value may be no direct key
36365
+ optionValue = _ops.valCodex === optionValueCodex ? _ops.val : _ops.option.articleOptionValues.get(optionValueCodex);
36366
+ article.engine.setOP(_ops.option.codex, optionValue, value, true);
35940
36367
  }
35941
36368
  case 16:
35942
36369
  _context10.next = 7;
@@ -43207,7 +43634,7 @@ var DivaSet = /*#__PURE__*/function () {
43207
43634
  break;
43208
43635
  }
43209
43636
  _context5.next = 3;
43210
- return import('./DoorPlanner-4e91165f.js');
43637
+ return import('./DoorPlanner-033934e5.js');
43211
43638
  case 3:
43212
43639
  _yield$import = _context5.sent;
43213
43640
  DoorPlanner = _yield$import["default"];
@@ -51530,7 +51957,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
51530
51957
  break;
51531
51958
  case 3:
51532
51959
  _context13.next = 5;
51533
- return import('./PfisterWWSHandler-0733ad3d.js');
51960
+ return import('./PfisterWWSHandler-cb0741a1.js');
51534
51961
  case 5:
51535
51962
  _yield$import = _context13.sent;
51536
51963
  PfisterWWSHandler = _yield$import["default"];
@@ -51538,7 +51965,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
51538
51965
  return _context13.abrupt("break", 27);
51539
51966
  case 9:
51540
51967
  _context13.next = 11;
51541
- return import('./LiviqueWWSHandler-96bc5a8a.js');
51968
+ return import('./LiviqueWWSHandler-2d57af9a.js');
51542
51969
  case 11:
51543
51970
  _yield$import2 = _context13.sent;
51544
51971
  LiviqueWWSHandler = _yield$import2["default"];
@@ -51546,7 +51973,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
51546
51973
  return _context13.abrupt("break", 27);
51547
51974
  case 15:
51548
51975
  _context13.next = 17;
51549
- return import('./SeriousBasketHandler-afa8c61e.js');
51976
+ return import('./SeriousBasketHandler-2982e2a2.js');
51550
51977
  case 17:
51551
51978
  _yield$import3 = _context13.sent;
51552
51979
  SeriousWWSHandler = _yield$import3["default"];
@@ -51554,7 +51981,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
51554
51981
  return _context13.abrupt("break", 27);
51555
51982
  case 21:
51556
51983
  _context13.next = 23;
51557
- return import('./StandardWWSHandler-e686fb40.js');
51984
+ return import('./StandardWWSHandler-ac0ddcc9.js');
51558
51985
  case 23:
51559
51986
  _yield$import4 = _context13.sent;
51560
51987
  StandardWWSHandler = _yield$import4["default"];
@@ -52952,7 +53379,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
52952
53379
  //If we need real time rendering initialize the SignalR and 3D host connection Handler
52953
53380
  bootMark('signalr: chunk import start');
52954
53381
  _context3.next = 3;
52955
- return import('./Host3DSignalR-c5556e93.js');
53382
+ return import('./Host3DSignalR-90c03467.js');
52956
53383
  case 3:
52957
53384
  _yield$import = _context3.sent;
52958
53385
  Host3DSignalR = _yield$import["default"];
@@ -57358,7 +57785,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
57358
57785
  break;
57359
57786
  case 9:
57360
57787
  _context5.next = 11;
57361
- return import('./DivaStandardPlanner-7a35b6d4.js');
57788
+ return import('./DivaStandardPlanner-7d0e4b79.js');
57362
57789
  case 11:
57363
57790
  _yield$import = _context5.sent;
57364
57791
  DivaStandardPlanner = _yield$import["default"];
@@ -57373,7 +57800,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
57373
57800
  return _context5.abrupt("break", 22);
57374
57801
  case 16:
57375
57802
  _context5.next = 18;
57376
- return import('./DivaBoxPlanner-149ec344.js');
57803
+ return import('./DivaBoxPlanner-604aac25.js');
57377
57804
  case 18:
57378
57805
  _yield$import2 = _context5.sent;
57379
57806
  DivaBoxPlanner = _yield$import2["default"];
@@ -82291,4 +82718,4 @@ function _withTimeout() {
82291
82718
  return _withTimeout.apply(this, arguments);
82292
82719
  }
82293
82720
 
82294
- export { propertyEncodingOf as $, moveSlotMember as A, moveShape as B, layersCollide as C, shapesCollide as D, parseGuestPlacement as E, saveElementArticleCodex as F, Grid as G, parseSetPlanData as H, isSavePlannerV2 as I, BoundingBox as J, movePoints as K, bootMark as L, MAX_GUEST_DEPTH as M, HQRenderScript as N, DivaWebPlanner as O, PlannerElementData as P, DivaArticle as Q, Rendering as R, SVGUtils as S, DivaCatalogData as T, OptionCatalogData as U, Vector3 as V, Cell as W, loadAndRepairBasket as X, DivaBasketHandler as Y, CatalogPlannerArticleData as Z, PROPERTY_SCHEMAS as _, articleHandlerInstance as a, JsonDataCache as a0, getSeriousSetNamePlaceholder as a1, bootMarksEnabled as a2, bootNetworkMark as a3, bootNow as a4, bootRequestName as a5, canSwitchTo as a6, dockingFiltersMatch as a7, switchElementOf as a8, switchInitParamsOf as a9, getViewerStateToggles as aa, setViewerStateToggle as ab, Vector4 as ac, creatRenderOrders as ad, getOrigProductId as ae, headlessSession as af, collectStructureStepKeys as ag, runHeadlessArtifactPass as ah, runHeadlessArtifactPassBatch as ai, ArtifactGenerationError as aj, setHandlerInstance as b, getDockingGroups as c, getElementShape as d, getCarrierSlots as e, familyMembersOf as f, getSnapPlace as g, getSlotPlaces as h, isSamePose as i, getGroupBlock as j, fitsInsideRoom as k, keepInsideRoom as l, moveGroupRigidly as m, bindToWalls as n, sameGeoExtent as o, poseOf as p, getCornerEnd as q, getDoorClearanceRects as r, summaryHandlerInstance as s, rectCorners as t, Vector2 as u, slotExempt as v, bodiesOverlap as w, getNearestMember as x, toPlacementOffset as y, getTurnDeg as z };
82721
+ export { propertyEncodingOf as $, moveSlotMember as A, moveShape as B, layersCollide as C, shapesCollide as D, parseGuestPlacement as E, saveElementArticleCodex as F, Grid as G, parseSetPlanData as H, isSavePlannerV2 as I, BoundingBox as J, movePoints as K, bootMark as L, MAX_GUEST_DEPTH as M, HQRenderScript as N, DivaWebPlanner as O, PlannerElementData as P, DivaArticle as Q, Rendering as R, SVGUtils as S, DivaCatalogData as T, OptionCatalogData as U, Vector3 as V, Cell as W, loadAndRepairBasket as X, DivaBasketHandler as Y, CatalogPlannerArticleData as Z, PROPERTY_SCHEMAS as _, articleHandlerInstance as a, JsonDataCache as a0, getSeriousSetNamePlaceholder as a1, bootMarksEnabled as a2, bootNetworkMark as a3, bootNow as a4, bootRequestName as a5, canSwitchTo as a6, dockingFiltersMatch as a7, switchElementOf as a8, switchInitParamsOf as a9, getViewerStateToggles as aa, setViewerStateToggle as ab, Vector4 as ac, creatRenderOrders as ad, getOrigProductId as ae, describeMeasurePrice as af, measureWithUnit as ag, headlessSession as ah, collectStructureStepKeys as ai, runHeadlessArtifactPass as aj, runHeadlessArtifactPassBatch as ak, ArtifactGenerationError as al, setHandlerInstance as b, getDockingGroups as c, getElementShape as d, getCarrierSlots as e, familyMembersOf as f, getSnapPlace as g, getSlotPlaces as h, isSamePose as i, getGroupBlock as j, fitsInsideRoom as k, keepInsideRoom as l, moveGroupRigidly as m, bindToWalls as n, sameGeoExtent as o, poseOf as p, getCornerEnd as q, getDoorClearanceRects as r, summaryHandlerInstance as s, rectCorners as t, Vector2 as u, slotExempt as v, bodiesOverlap as w, getNearestMember as x, toPlacementOffset as y, getTurnDeg as z };