@symbo.ls/scratch 2.11.410 → 2.11.429

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.
@@ -378,10 +378,10 @@ var require_array = __commonJS({
378
378
  return [].concat(...arrays);
379
379
  };
380
380
  var mergeArray = (arr, excludeFrom = []) => {
381
- return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
381
+ return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
382
382
  };
383
383
  var mergeAndCloneIfArray = (obj) => {
384
- return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
384
+ return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
385
385
  };
386
386
  var cutArrayBeforeValue = (arr, value) => {
387
387
  const index = arr.indexOf(value);
@@ -487,6 +487,8 @@ var require_string = __commonJS({
487
487
  __export2(string_exports, {
488
488
  customDecodeURIComponent: () => customDecodeURIComponent,
489
489
  customEncodeURIComponent: () => customEncodeURIComponent,
490
+ decodeNewlines: () => decodeNewlines,
491
+ encodeNewlines: () => encodeNewlines,
490
492
  findKeyPosition: () => findKeyPosition,
491
493
  lowercaseFirstLetter: () => lowercaseFirstLetter,
492
494
  replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
@@ -590,6 +592,12 @@ var require_string = __commonJS({
590
592
  return char;
591
593
  });
592
594
  };
595
+ var encodeNewlines = (str) => {
596
+ return str.split("\n").join("/////n").split("`").join("/////tilde").split("$").join("/////dlrsgn");
597
+ };
598
+ var decodeNewlines = (encodedStr) => {
599
+ return encodedStr.split("/////n").join("\n").split("/////tilde").join("`").split("/////dlrsgn").join("$");
600
+ };
593
601
  var customEncodeURIComponent = (str) => {
594
602
  return str.split("").map((char) => {
595
603
  if (/[^a-zA-Z0-9\s]/.test(char)) {
@@ -768,7 +776,7 @@ var require_object = __commonJS({
768
776
  return o;
769
777
  };
770
778
  var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
771
- const o = (0, import_types.isArray)(obj) ? [] : {};
779
+ const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
772
780
  for (const prop in obj) {
773
781
  if (!Object.prototype.hasOwnProperty.call(obj, prop))
774
782
  continue;
@@ -1022,7 +1030,7 @@ var require_object = __commonJS({
1022
1030
  };
1023
1031
  var overwriteDeep = (obj, params, excludeFrom = []) => {
1024
1032
  for (const e in params) {
1025
- if (e === "__proto__")
1033
+ if (e === "__ref")
1026
1034
  continue;
1027
1035
  if (excludeFrom.includes(e) || e.startsWith("__"))
1028
1036
  continue;
@@ -1144,6 +1152,12 @@ var require_object = __commonJS({
1144
1152
  if (foundString || foundInArray)
1145
1153
  return el;
1146
1154
  }
1155
+ if (el.parent && el.parent.childExtend) {
1156
+ const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
1157
+ const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
1158
+ if (foundString || foundInArray)
1159
+ return el;
1160
+ }
1147
1161
  };
1148
1162
  var getExtendsInElement = (obj) => {
1149
1163
  let result = [];