@symbo.ls/scratch 2.11.470 → 2.11.497

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.
@@ -336,6 +336,7 @@ var require_array = __commonJS({
336
336
  addItemAfterEveryElement: () => addItemAfterEveryElement,
337
337
  arrayContainsOtherArray: () => arrayContainsOtherArray,
338
338
  arraysEqual: () => arraysEqual,
339
+ checkIfStringIsInArray: () => checkIfStringIsInArray,
339
340
  cutArrayAfterValue: () => cutArrayAfterValue,
340
341
  cutArrayBeforeValue: () => cutArrayBeforeValue,
341
342
  filterArrays: () => filterArrays,
@@ -382,11 +383,11 @@ var require_array = __commonJS({
382
383
  var joinArrays = (...arrays) => {
383
384
  return [].concat(...arrays);
384
385
  };
385
- var mergeArray = (arr, excludeFrom = []) => {
386
- return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
386
+ var mergeArray = (arr, exclude = []) => {
387
+ return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, { exclude }), exclude), {});
387
388
  };
388
389
  var mergeAndCloneIfArray = (obj) => {
389
- return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
390
+ return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
390
391
  };
391
392
  var cutArrayBeforeValue = (arr, value) => {
392
393
  const index = arr.indexOf(value);
@@ -455,6 +456,11 @@ var require_array = __commonJS({
455
456
  const excludeSet = new Set(excludeArr);
456
457
  return sourceArr.filter((item) => !excludeSet.has(item));
457
458
  };
459
+ var checkIfStringIsInArray = (string, arr) => {
460
+ if (!string)
461
+ return;
462
+ return arr.filter((v) => string.includes(v)).length;
463
+ };
458
464
  }
459
465
  });
460
466
 
@@ -509,14 +515,15 @@ var require_string = __commonJS({
509
515
  2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
510
516
  3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
511
517
  };
512
- var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
518
+ function replaceLiteralsWithObjectFields(str, options = {}, forcedState) {
513
519
  if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
514
520
  return str;
515
521
  const reg = brackRegex[options.bracketsLength || 2];
522
+ const obj = forcedState || this.state || {};
516
523
  return str.replace(reg, (_, parentPath, variable) => {
517
524
  if (parentPath) {
518
525
  const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
519
- let parentState = state;
526
+ let parentState = obj;
520
527
  for (let i = 0; i < parentLevels; i++) {
521
528
  parentState = parentState.parent;
522
529
  if (!parentState) {
@@ -526,11 +533,11 @@ var require_string = __commonJS({
526
533
  const value = parentState[variable.trim()];
527
534
  return value !== void 0 ? `${value}` : "";
528
535
  } else {
529
- const value = state[variable.trim()];
536
+ const value = obj[variable.trim()];
530
537
  return value !== void 0 ? `${value}` : "";
531
538
  }
532
539
  });
533
- };
540
+ }
534
541
  var lowercaseFirstLetter = (inputString) => {
535
542
  return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
536
543
  };
@@ -635,8 +642,6 @@ var require_object = __commonJS({
635
642
  createNestedObject: () => createNestedObject,
636
643
  createObjectWithoutPrototype: () => createObjectWithoutPrototype,
637
644
  deepClone: () => deepClone2,
638
- deepCloneExclude: () => deepCloneExclude,
639
- deepCloneWithExtend: () => deepCloneWithExtend,
640
645
  deepContains: () => deepContains,
641
646
  deepDestringify: () => deepDestringify,
642
647
  deepDiff: () => deepDiff,
@@ -730,78 +735,56 @@ var require_object = __commonJS({
730
735
  }
731
736
  return o;
732
737
  };
733
- var deepCloneExclude = (obj, excludeFrom = []) => {
734
- if ((0, import_types.isArray)(obj)) {
735
- return obj.map((x) => deepCloneExclude(x, excludeFrom));
736
- }
737
- const o = {};
738
- for (const k in obj) {
739
- const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
740
- if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
741
- continue;
742
- let v = obj[k];
743
- if (k === "extend" && (0, import_types.isArray)(v)) {
744
- v = mergeArrayExclude(v, excludeFrom);
745
- }
746
- if ((0, import_types.isArray)(v)) {
747
- o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
748
- } else if ((0, import_types.isObject)(v)) {
749
- o[k] = deepCloneExclude(v, excludeFrom);
750
- } else
751
- o[k] = v;
752
- }
753
- return o;
754
- };
755
- var mergeArrayExclude = (arr, excl = []) => {
756
- return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
738
+ var mergeArrayExclude = (arr, exclude = []) => {
739
+ return arr.reduce((acc, curr) => deepMerge2(acc, deepClone2(curr, { exclude })), {});
757
740
  };
758
- var deepClone2 = (obj, exclude = [], cleanUndefined = false, visited = /* @__PURE__ */ new WeakMap()) => {
759
- if (!(0, import_types.isObjectLike)(obj) || (0, import_node.isDOMNode)(obj))
741
+ var deepClone2 = (obj, options = {}) => {
742
+ const {
743
+ exclude = [],
744
+ cleanUndefined = false,
745
+ cleanNull = false,
746
+ window: targetWindow,
747
+ visited = /* @__PURE__ */ new WeakMap(),
748
+ handleExtend = false
749
+ } = options;
750
+ if (!(0, import_types.isObjectLike)(obj) || (0, import_node.isDOMNode)(obj)) {
760
751
  return obj;
761
- if (visited.has(obj))
752
+ }
753
+ if (visited.has(obj)) {
762
754
  return visited.get(obj);
763
- const clone2 = (0, import_types.isArray)(obj) ? [] : {};
755
+ }
756
+ const clone2 = targetWindow ? (0, import_types.isArray)(obj) ? new targetWindow.Array() : new targetWindow.Object() : (0, import_types.isArray)(obj) ? [] : {};
764
757
  visited.set(obj, clone2);
765
758
  for (const key in obj) {
766
- if (Object.prototype.hasOwnProperty.call(obj, key) && !exclude.includes(key)) {
767
- const value = obj[key];
768
- if ((0, import_node.isDOMNode)(value)) {
769
- clone2[key] = value;
770
- } else if (key === "extend" && (0, import_types.isArray)(value)) {
771
- clone2[key] = (0, import_array.mergeArray)(value, exclude);
772
- } else if ((0, import_types.isObjectLike)(value)) {
773
- clone2[key] = deepClone2(value, exclude, cleanUndefined, visited);
774
- } else {
775
- clone2[key] = value;
776
- }
777
- }
778
- }
779
- return clone2;
780
- };
781
- var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}, visited = /* @__PURE__ */ new WeakSet()) => {
782
- if ((0, import_types.isObjectLike)(obj)) {
783
- if (visited.has(obj)) {
784
- return obj;
759
+ if (!Object.prototype.hasOwnProperty.call(obj, key))
760
+ continue;
761
+ if (exclude.includes(key) || key.startsWith("__") || key === "__proto__")
762
+ continue;
763
+ const value = obj[key];
764
+ if (cleanUndefined && (0, import_types.isUndefined)(value) || cleanNull && (0, import_types.isNull)(value))
765
+ continue;
766
+ if ((0, import_node.isDOMNode)(value)) {
767
+ clone2[key] = value;
768
+ continue;
785
769
  }
786
- visited.add(obj);
787
- }
788
- const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
789
- for (const prop in obj) {
790
- if (!Object.prototype.hasOwnProperty.call(obj, prop))
770
+ if (handleExtend && key === "extend" && (0, import_types.isArray)(value)) {
771
+ clone2[key] = (0, import_array.mergeArray)(value, exclude);
791
772
  continue;
792
- const objProp = obj[prop];
793
- if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp)) {
773
+ }
774
+ if ((0, import_types.isFunction)(value) && targetWindow) {
775
+ clone2[key] = targetWindow.eval("(" + value.toString() + ")");
794
776
  continue;
795
777
  }
796
- if ((0, import_types.isObjectLike)(objProp)) {
797
- o[prop] = deepCloneWithExtend(objProp, excludeFrom, options, visited);
798
- } else if ((0, import_types.isFunction)(objProp) && options.window) {
799
- o[prop] = (options.window || import_globals3.window).eval("(" + objProp.toString() + ")");
778
+ if ((0, import_types.isObjectLike)(value)) {
779
+ clone2[key] = deepClone2(value, {
780
+ ...options,
781
+ visited
782
+ });
800
783
  } else {
801
- o[prop] = objProp;
784
+ clone2[key] = value;
802
785
  }
803
786
  }
804
- return o;
787
+ return clone2;
805
788
  };
806
789
  var deepStringify = (obj, stringified = {}) => {
807
790
  var _a, _b;
@@ -1711,6 +1694,7 @@ var require_component = __commonJS({
1711
1694
  checkIfKeyIsProperty: () => checkIfKeyIsProperty,
1712
1695
  checkIfSugar: () => checkIfSugar,
1713
1696
  extendizeByKey: () => extendizeByKey,
1697
+ extractComponentKeyFromKey: () => extractComponentKeyFromKey,
1714
1698
  getCapitalCaseKeys: () => getCapitalCaseKeys,
1715
1699
  getChildrenComponentsByKey: () => getChildrenComponentsByKey,
1716
1700
  getExtendsInElement: () => getExtendsInElement,
@@ -1767,11 +1751,14 @@ var require_component = __commonJS({
1767
1751
  }
1768
1752
  return !hasComponentAttrs || childProps || extendProps || children || childExtends;
1769
1753
  };
1754
+ var extractComponentKeyFromKey = (key) => {
1755
+ return key.includes("+") ? key.split("+") : key.includes("_") ? [key.split("_")[0]] : key.includes(".") && !checkIfKeyIsComponent(key.split(".")[1]) ? [key.split(".")[0]] : [key];
1756
+ };
1770
1757
  var extendizeByKey = (element, parent, key) => {
1771
1758
  const { context } = parent;
1772
1759
  const { tag, extend, childExtends } = element;
1773
1760
  const isSugar = checkIfSugar(element, parent, key);
1774
- const extendFromKey = key.includes("+") ? key.split("+") : key.includes("_") ? [key.split("_")[0]] : key.includes(".") && !checkIfKeyIsComponent(key.split(".")[1]) ? [key.split(".")[0]] : [key];
1761
+ const extendFromKey = extractComponentKeyFromKey(key);
1775
1762
  const isExtendKeyComponent = context && context.components[extendFromKey];
1776
1763
  if (element === isExtendKeyComponent)
1777
1764
  return element;
@@ -1820,7 +1807,7 @@ var require_component = __commonJS({
1820
1807
  if (newChild === null)
1821
1808
  assignChild(null);
1822
1809
  else if (!childElem)
1823
- assignChild((0, import__.deepCloneWithExtend)(newChild));
1810
+ assignChild((0, import__.deepClone)(newChild));
1824
1811
  else {
1825
1812
  const isSugarChildElem = checkIfSugar(childElem, parent, key);
1826
1813
  if (isSugarChildElem)
@@ -1891,7 +1878,7 @@ var require_component = __commonJS({
1891
1878
  if (checkIfKeyIsComponent(key)) {
1892
1879
  result.push(key);
1893
1880
  }
1894
- if (key === "extend") {
1881
+ if (key === "extend" || key === "extends") {
1895
1882
  if (typeof o[key] === "string") {
1896
1883
  result.push(o[key]);
1897
1884
  } else if (Array.isArray(o[key])) {
@@ -2250,6 +2237,7 @@ var require_cjs3 = __commonJS({
2250
2237
  addItemAfterEveryElement: () => addItemAfterEveryElement,
2251
2238
  arrayContainsOtherArray: () => arrayContainsOtherArray,
2252
2239
  arraysEqual: () => arraysEqual,
2240
+ checkIfStringIsInArray: () => checkIfStringIsInArray,
2253
2241
  cutArrayAfterValue: () => cutArrayAfterValue,
2254
2242
  cutArrayBeforeValue: () => cutArrayBeforeValue,
2255
2243
  filterArrays: () => filterArrays,
@@ -2296,11 +2284,11 @@ var require_cjs3 = __commonJS({
2296
2284
  var joinArrays = (...arrays) => {
2297
2285
  return [].concat(...arrays);
2298
2286
  };
2299
- var mergeArray = (arr, excludeFrom = []) => {
2300
- return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
2287
+ var mergeArray = (arr, exclude = []) => {
2288
+ return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, { exclude }), exclude), {});
2301
2289
  };
2302
2290
  var mergeAndCloneIfArray = (obj) => {
2303
- return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
2291
+ return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
2304
2292
  };
2305
2293
  var cutArrayBeforeValue = (arr, value) => {
2306
2294
  const index = arr.indexOf(value);
@@ -2369,6 +2357,11 @@ var require_cjs3 = __commonJS({
2369
2357
  const excludeSet = new Set(excludeArr);
2370
2358
  return sourceArr.filter((item) => !excludeSet.has(item));
2371
2359
  };
2360
+ var checkIfStringIsInArray = (string, arr) => {
2361
+ if (!string)
2362
+ return;
2363
+ return arr.filter((v) => string.includes(v)).length;
2364
+ };
2372
2365
  }
2373
2366
  });
2374
2367
  var require_string2 = __commonJS2({
@@ -2421,14 +2414,15 @@ var require_cjs3 = __commonJS({
2421
2414
  2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
2422
2415
  3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
2423
2416
  };
2424
- var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
2417
+ function replaceLiteralsWithObjectFields(str, options = {}, forcedState) {
2425
2418
  if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
2426
2419
  return str;
2427
2420
  const reg = brackRegex[options.bracketsLength || 2];
2421
+ const obj = forcedState || this.state || {};
2428
2422
  return str.replace(reg, (_, parentPath, variable) => {
2429
2423
  if (parentPath) {
2430
2424
  const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
2431
- let parentState = state;
2425
+ let parentState = obj;
2432
2426
  for (let i = 0; i < parentLevels; i++) {
2433
2427
  parentState = parentState.parent;
2434
2428
  if (!parentState) {
@@ -2438,11 +2432,11 @@ var require_cjs3 = __commonJS({
2438
2432
  const value = parentState[variable.trim()];
2439
2433
  return value !== void 0 ? `${value}` : "";
2440
2434
  } else {
2441
- const value = state[variable.trim()];
2435
+ const value = obj[variable.trim()];
2442
2436
  return value !== void 0 ? `${value}` : "";
2443
2437
  }
2444
2438
  });
2445
- };
2439
+ }
2446
2440
  var lowercaseFirstLetter = (inputString) => {
2447
2441
  return `${inputString.charAt(0).toLowerCase()}${inputString.slice(1)}`;
2448
2442
  };
@@ -2545,8 +2539,6 @@ var require_cjs3 = __commonJS({
2545
2539
  createNestedObject: () => createNestedObject,
2546
2540
  createObjectWithoutPrototype: () => createObjectWithoutPrototype,
2547
2541
  deepClone: () => deepClone2,
2548
- deepCloneExclude: () => deepCloneExclude,
2549
- deepCloneWithExtend: () => deepCloneWithExtend,
2550
2542
  deepContains: () => deepContains,
2551
2543
  deepDestringify: () => deepDestringify,
2552
2544
  deepDiff: () => deepDiff,
@@ -2640,78 +2632,56 @@ var require_cjs3 = __commonJS({
2640
2632
  }
2641
2633
  return o;
2642
2634
  };
2643
- var deepCloneExclude = (obj, excludeFrom = []) => {
2644
- if ((0, import_types.isArray)(obj)) {
2645
- return obj.map((x) => deepCloneExclude(x, excludeFrom));
2646
- }
2647
- const o = {};
2648
- for (const k in obj) {
2649
- const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj, k);
2650
- if (!hasOwnProperty2 || excludeFrom.includes(k) || k.startsWith("__"))
2651
- continue;
2652
- let v = obj[k];
2653
- if (k === "extend" && (0, import_types.isArray)(v)) {
2654
- v = mergeArrayExclude(v, excludeFrom);
2655
- }
2656
- if ((0, import_types.isArray)(v)) {
2657
- o[k] = v.map((x) => deepCloneExclude(x, excludeFrom));
2658
- } else if ((0, import_types.isObject)(v)) {
2659
- o[k] = deepCloneExclude(v, excludeFrom);
2660
- } else
2661
- o[k] = v;
2662
- }
2663
- return o;
2664
- };
2665
- var mergeArrayExclude = (arr, excl = []) => {
2666
- return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
2635
+ var mergeArrayExclude = (arr, exclude = []) => {
2636
+ return arr.reduce((acc, curr) => deepMerge2(acc, deepClone2(curr, { exclude })), {});
2667
2637
  };
2668
- var deepClone2 = (obj, exclude = [], cleanUndefined = false, visited = /* @__PURE__ */ new WeakMap()) => {
2669
- if (!(0, import_types.isObjectLike)(obj) || (0, import_node.isDOMNode)(obj))
2638
+ var deepClone2 = (obj, options = {}) => {
2639
+ const {
2640
+ exclude = [],
2641
+ cleanUndefined = false,
2642
+ cleanNull = false,
2643
+ window: targetWindow,
2644
+ visited = /* @__PURE__ */ new WeakMap(),
2645
+ handleExtend = false
2646
+ } = options;
2647
+ if (!(0, import_types.isObjectLike)(obj) || (0, import_node.isDOMNode)(obj)) {
2670
2648
  return obj;
2671
- if (visited.has(obj))
2649
+ }
2650
+ if (visited.has(obj)) {
2672
2651
  return visited.get(obj);
2673
- const clone2 = (0, import_types.isArray)(obj) ? [] : {};
2652
+ }
2653
+ const clone2 = targetWindow ? (0, import_types.isArray)(obj) ? new targetWindow.Array() : new targetWindow.Object() : (0, import_types.isArray)(obj) ? [] : {};
2674
2654
  visited.set(obj, clone2);
2675
2655
  for (const key in obj) {
2676
- if (Object.prototype.hasOwnProperty.call(obj, key) && !exclude.includes(key)) {
2677
- const value = obj[key];
2678
- if ((0, import_node.isDOMNode)(value)) {
2679
- clone2[key] = value;
2680
- } else if (key === "extend" && (0, import_types.isArray)(value)) {
2681
- clone2[key] = (0, import_array.mergeArray)(value, exclude);
2682
- } else if ((0, import_types.isObjectLike)(value)) {
2683
- clone2[key] = deepClone2(value, exclude, cleanUndefined, visited);
2684
- } else {
2685
- clone2[key] = value;
2686
- }
2687
- }
2688
- }
2689
- return clone2;
2690
- };
2691
- var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}, visited = /* @__PURE__ */ new WeakSet()) => {
2692
- if ((0, import_types.isObjectLike)(obj)) {
2693
- if (visited.has(obj)) {
2694
- return obj;
2656
+ if (!Object.prototype.hasOwnProperty.call(obj, key))
2657
+ continue;
2658
+ if (exclude.includes(key) || key.startsWith("__") || key === "__proto__")
2659
+ continue;
2660
+ const value = obj[key];
2661
+ if (cleanUndefined && (0, import_types.isUndefined)(value) || cleanNull && (0, import_types.isNull)(value))
2662
+ continue;
2663
+ if ((0, import_node.isDOMNode)(value)) {
2664
+ clone2[key] = value;
2665
+ continue;
2695
2666
  }
2696
- visited.add(obj);
2697
- }
2698
- const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
2699
- for (const prop in obj) {
2700
- if (!Object.prototype.hasOwnProperty.call(obj, prop))
2667
+ if (handleExtend && key === "extend" && (0, import_types.isArray)(value)) {
2668
+ clone2[key] = (0, import_array.mergeArray)(value, exclude);
2701
2669
  continue;
2702
- const objProp = obj[prop];
2703
- if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp)) {
2670
+ }
2671
+ if ((0, import_types.isFunction)(value) && targetWindow) {
2672
+ clone2[key] = targetWindow.eval("(" + value.toString() + ")");
2704
2673
  continue;
2705
2674
  }
2706
- if ((0, import_types.isObjectLike)(objProp)) {
2707
- o[prop] = deepCloneWithExtend(objProp, excludeFrom, options, visited);
2708
- } else if ((0, import_types.isFunction)(objProp) && options.window) {
2709
- o[prop] = (options.window || import_globals3.window).eval("(" + objProp.toString() + ")");
2675
+ if ((0, import_types.isObjectLike)(value)) {
2676
+ clone2[key] = deepClone2(value, {
2677
+ ...options,
2678
+ visited
2679
+ });
2710
2680
  } else {
2711
- o[prop] = objProp;
2681
+ clone2[key] = value;
2712
2682
  }
2713
2683
  }
2714
- return o;
2684
+ return clone2;
2715
2685
  };
2716
2686
  var deepStringify = (obj, stringified = {}) => {
2717
2687
  var _a, _b;
@@ -3611,6 +3581,7 @@ var require_cjs3 = __commonJS({
3611
3581
  checkIfKeyIsProperty: () => checkIfKeyIsProperty,
3612
3582
  checkIfSugar: () => checkIfSugar,
3613
3583
  extendizeByKey: () => extendizeByKey,
3584
+ extractComponentKeyFromKey: () => extractComponentKeyFromKey,
3614
3585
  getCapitalCaseKeys: () => getCapitalCaseKeys,
3615
3586
  getChildrenComponentsByKey: () => getChildrenComponentsByKey,
3616
3587
  getExtendsInElement: () => getExtendsInElement,
@@ -3667,11 +3638,14 @@ var require_cjs3 = __commonJS({
3667
3638
  }
3668
3639
  return !hasComponentAttrs || childProps || extendProps || children || childExtends;
3669
3640
  };
3641
+ var extractComponentKeyFromKey = (key) => {
3642
+ return key.includes("+") ? key.split("+") : key.includes("_") ? [key.split("_")[0]] : key.includes(".") && !checkIfKeyIsComponent(key.split(".")[1]) ? [key.split(".")[0]] : [key];
3643
+ };
3670
3644
  var extendizeByKey = (element, parent, key) => {
3671
3645
  const { context } = parent;
3672
3646
  const { tag, extend, childExtends } = element;
3673
3647
  const isSugar = checkIfSugar(element, parent, key);
3674
- const extendFromKey = key.includes("+") ? key.split("+") : key.includes("_") ? [key.split("_")[0]] : key.includes(".") && !checkIfKeyIsComponent(key.split(".")[1]) ? [key.split(".")[0]] : [key];
3648
+ const extendFromKey = extractComponentKeyFromKey(key);
3675
3649
  const isExtendKeyComponent = context && context.components[extendFromKey];
3676
3650
  if (element === isExtendKeyComponent)
3677
3651
  return element;
@@ -3720,7 +3694,7 @@ var require_cjs3 = __commonJS({
3720
3694
  if (newChild === null)
3721
3695
  assignChild(null);
3722
3696
  else if (!childElem)
3723
- assignChild((0, import__.deepCloneWithExtend)(newChild));
3697
+ assignChild((0, import__.deepClone)(newChild));
3724
3698
  else {
3725
3699
  const isSugarChildElem = checkIfSugar(childElem, parent, key);
3726
3700
  if (isSugarChildElem)
@@ -3791,7 +3765,7 @@ var require_cjs3 = __commonJS({
3791
3765
  if (checkIfKeyIsComponent(key)) {
3792
3766
  result.push(key);
3793
3767
  }
3794
- if (key === "extend") {
3768
+ if (key === "extend" || key === "extends") {
3795
3769
  if (typeof o[key] === "string") {
3796
3770
  result.push(o[key]);
3797
3771
  } else if (Array.isArray(o[key])) {