@symbo.ls/scratch 2.11.429 → 2.11.430
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.
- package/dist/cjs/defaultConfig/index.js +3 -1
- package/dist/cjs/defaultConfig/responsive.js +3 -1
- package/dist/cjs/factory.js +58 -40
- package/dist/cjs/index.js +84 -50
- package/dist/cjs/set.js +84 -50
- package/dist/cjs/system/color.js +84 -50
- package/dist/cjs/system/document.js +84 -50
- package/dist/cjs/system/font.js +84 -50
- package/dist/cjs/system/index.js +84 -50
- package/dist/cjs/system/reset.js +84 -50
- package/dist/cjs/system/shadow.js +84 -50
- package/dist/cjs/system/spacing.js +84 -50
- package/dist/cjs/system/svg.js +84 -50
- package/dist/cjs/system/theme.js +84 -50
- package/dist/cjs/system/timing.js +84 -50
- package/dist/cjs/system/typography.js +84 -50
- package/dist/cjs/transforms/index.js +84 -50
- package/dist/cjs/utils/color.js +57 -41
- package/dist/cjs/utils/index.js +84 -50
- package/dist/cjs/utils/sequence.js +84 -50
- package/dist/cjs/utils/sprite.js +58 -40
- package/dist/cjs/utils/var.js +84 -50
- package/package.json +2 -2
- package/src/defaultConfig/responsive.js +3 -1
|
@@ -365,10 +365,10 @@ var require_cjs = __commonJS({
|
|
|
365
365
|
return [].concat(...arrays);
|
|
366
366
|
};
|
|
367
367
|
var mergeArray = (arr, excludeFrom = []) => {
|
|
368
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.
|
|
368
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
|
|
369
369
|
};
|
|
370
370
|
var mergeAndCloneIfArray = (obj) => {
|
|
371
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.
|
|
371
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
|
|
372
372
|
};
|
|
373
373
|
var cutArrayBeforeValue = (arr, value) => {
|
|
374
374
|
const index = arr.indexOf(value);
|
|
@@ -472,6 +472,8 @@ var require_cjs = __commonJS({
|
|
|
472
472
|
__export22(string_exports, {
|
|
473
473
|
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
474
474
|
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
475
|
+
decodeNewlines: () => decodeNewlines,
|
|
476
|
+
encodeNewlines: () => encodeNewlines,
|
|
475
477
|
findKeyPosition: () => findKeyPosition,
|
|
476
478
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
477
479
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
@@ -575,6 +577,12 @@ var require_cjs = __commonJS({
|
|
|
575
577
|
return char;
|
|
576
578
|
});
|
|
577
579
|
};
|
|
580
|
+
var encodeNewlines = (str) => {
|
|
581
|
+
return str.split("\n").join("/////n").split("`").join("/////tilde").split("$").join("/////dlrsgn");
|
|
582
|
+
};
|
|
583
|
+
var decodeNewlines = (encodedStr) => {
|
|
584
|
+
return encodedStr.split("/////n").join("\n").split("/////tilde").join("`").split("/////dlrsgn").join("$");
|
|
585
|
+
};
|
|
578
586
|
var customEncodeURIComponent = (str) => {
|
|
579
587
|
return str.split("").map((char) => {
|
|
580
588
|
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
@@ -1005,7 +1013,7 @@ var require_cjs = __commonJS({
|
|
|
1005
1013
|
};
|
|
1006
1014
|
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
1007
1015
|
for (const e in params) {
|
|
1008
|
-
if (e === "
|
|
1016
|
+
if (e === "__ref")
|
|
1009
1017
|
continue;
|
|
1010
1018
|
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
1011
1019
|
continue;
|
|
@@ -1529,6 +1537,7 @@ var require_cjs = __commonJS({
|
|
|
1529
1537
|
var src_exports = {};
|
|
1530
1538
|
__export2(src_exports, {
|
|
1531
1539
|
arrayzeValue: () => arrayzeValue2,
|
|
1540
|
+
copyJavaScriptToClipboard: () => copyJavaScriptToClipboard,
|
|
1532
1541
|
copyStringToClipboard: () => copyStringToClipboard,
|
|
1533
1542
|
fibonacciNumberByIndex: () => fibonacciNumberByIndex,
|
|
1534
1543
|
findClosestNumber: () => findClosestNumber,
|
|
@@ -1656,15 +1665,22 @@ var require_cjs = __commonJS({
|
|
|
1656
1665
|
}
|
|
1657
1666
|
};
|
|
1658
1667
|
var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
|
|
1659
|
-
var copyStringToClipboard = (str) => {
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
+
var copyStringToClipboard = async (str) => {
|
|
1669
|
+
try {
|
|
1670
|
+
await navigator.clipboard.writeText(str);
|
|
1671
|
+
} catch (err) {
|
|
1672
|
+
console.warn("Failed to copy text: ", err);
|
|
1673
|
+
}
|
|
1674
|
+
};
|
|
1675
|
+
var copyJavaScriptToClipboard = async (jsCode) => {
|
|
1676
|
+
try {
|
|
1677
|
+
const blob = new Blob([jsCode], { type: "text/javascript" });
|
|
1678
|
+
const clipboardItem = new window.ClipboardItem({ "text/plain": blob });
|
|
1679
|
+
await navigator.clipboard.write([clipboardItem]);
|
|
1680
|
+
console.log("JavaScript code copied to clipboard as text/javascript");
|
|
1681
|
+
} catch (err) {
|
|
1682
|
+
console.error("Failed to copy JavaScript code: ", err);
|
|
1683
|
+
}
|
|
1668
1684
|
};
|
|
1669
1685
|
var removeChars = (str) => {
|
|
1670
1686
|
return str.replace(/[^a-zA-Z0-9_]/g, "");
|
|
@@ -1836,6 +1852,7 @@ var require_node = __commonJS({
|
|
|
1836
1852
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1837
1853
|
var node_exports = {};
|
|
1838
1854
|
__export2(node_exports, {
|
|
1855
|
+
isDOMNode: () => isDOMNode,
|
|
1839
1856
|
isHtmlElement: () => isHtmlElement,
|
|
1840
1857
|
isNode: () => isNode
|
|
1841
1858
|
});
|
|
@@ -1847,6 +1864,9 @@ var require_node = __commonJS({
|
|
|
1847
1864
|
var isHtmlElement = (obj) => {
|
|
1848
1865
|
return (typeof HTMLElement === "object" ? obj instanceof import_globals2.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
1849
1866
|
};
|
|
1867
|
+
var isDOMNode = (obj) => {
|
|
1868
|
+
return typeof import_globals2.window !== "undefined" && (obj instanceof import_globals2.window.Node || obj instanceof import_globals2.window.Window || obj === import_globals2.window || obj === document);
|
|
1869
|
+
};
|
|
1850
1870
|
}
|
|
1851
1871
|
});
|
|
1852
1872
|
|
|
@@ -2309,6 +2329,7 @@ var require_object = __commonJS({
|
|
|
2309
2329
|
var import_types = require_types();
|
|
2310
2330
|
var import_array = require_array();
|
|
2311
2331
|
var import_string = require_string();
|
|
2332
|
+
var import_node = require_node();
|
|
2312
2333
|
var exec = (param, element, state, context) => {
|
|
2313
2334
|
if ((0, import_types.isFunction)(param)) {
|
|
2314
2335
|
return param(
|
|
@@ -2387,27 +2408,28 @@ var require_object = __commonJS({
|
|
|
2387
2408
|
var mergeArrayExclude = (arr, excl = []) => {
|
|
2388
2409
|
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
2389
2410
|
};
|
|
2390
|
-
var deepClone2 = (obj,
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2411
|
+
var deepClone2 = (obj, exclude = [], cleanUndefined = false, visited = /* @__PURE__ */ new WeakMap()) => {
|
|
2412
|
+
if (!(0, import_types.isObjectLike)(obj) || (0, import_node.isDOMNode)(obj))
|
|
2413
|
+
return obj;
|
|
2414
|
+
if (visited.has(obj))
|
|
2415
|
+
return visited.get(obj);
|
|
2416
|
+
const clone2 = (0, import_types.isArray)(obj) ? [] : {};
|
|
2417
|
+
visited.set(obj, clone2);
|
|
2418
|
+
for (const key in obj) {
|
|
2419
|
+
if (Object.prototype.hasOwnProperty.call(obj, key) && !exclude.includes(key)) {
|
|
2420
|
+
const value = obj[key];
|
|
2421
|
+
if ((0, import_node.isDOMNode)(value)) {
|
|
2422
|
+
clone2[key] = value;
|
|
2423
|
+
} else if (key === "extend" && (0, import_types.isArray)(value)) {
|
|
2424
|
+
clone2[key] = (0, import_array.mergeArray)(value, exclude);
|
|
2425
|
+
} else if ((0, import_types.isObjectLike)(value)) {
|
|
2426
|
+
clone2[key] = deepClone2(value, exclude, cleanUndefined, visited);
|
|
2427
|
+
} else {
|
|
2428
|
+
clone2[key] = value;
|
|
2429
|
+
}
|
|
2404
2430
|
}
|
|
2405
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
2406
|
-
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
2407
|
-
} else
|
|
2408
|
-
o[prop] = objProp;
|
|
2409
2431
|
}
|
|
2410
|
-
return
|
|
2432
|
+
return clone2;
|
|
2411
2433
|
};
|
|
2412
2434
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
2413
2435
|
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
@@ -2718,30 +2740,40 @@ var require_object = __commonJS({
|
|
|
2718
2740
|
}
|
|
2719
2741
|
return true;
|
|
2720
2742
|
};
|
|
2721
|
-
var deepContains = (obj1, obj2) => {
|
|
2722
|
-
if (
|
|
2743
|
+
var deepContains = (obj1, obj2, ignoredKeys = ["node", "__ref"]) => {
|
|
2744
|
+
if (obj1 === obj2)
|
|
2745
|
+
return true;
|
|
2746
|
+
if (!(0, import_types.isObjectLike)(obj1) || !(0, import_types.isObjectLike)(obj2))
|
|
2723
2747
|
return false;
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2748
|
+
if ((0, import_node.isDOMNode)(obj1) || (0, import_node.isDOMNode)(obj2))
|
|
2749
|
+
return obj1 === obj2;
|
|
2750
|
+
const stack = [[obj1, obj2]];
|
|
2751
|
+
const visited = /* @__PURE__ */ new WeakSet();
|
|
2752
|
+
while (stack.length > 0) {
|
|
2753
|
+
const [current1, current2] = stack.pop();
|
|
2754
|
+
if (visited.has(current1))
|
|
2755
|
+
continue;
|
|
2756
|
+
visited.add(current1);
|
|
2757
|
+
const keys1 = Object.keys(current1).filter((key) => !ignoredKeys.includes(key));
|
|
2758
|
+
const keys2 = Object.keys(current2).filter((key) => !ignoredKeys.includes(key));
|
|
2759
|
+
if (keys1.length !== keys2.length)
|
|
2760
|
+
return false;
|
|
2761
|
+
for (const key of keys1) {
|
|
2762
|
+
if (!Object.prototype.hasOwnProperty.call(current2, key))
|
|
2728
2763
|
return false;
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
}
|
|
2734
|
-
}
|
|
2735
|
-
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
2736
|
-
for (const key in obj1) {
|
|
2737
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
2738
|
-
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
2764
|
+
const value1 = current1[key];
|
|
2765
|
+
const value2 = current2[key];
|
|
2766
|
+
if ((0, import_node.isDOMNode)(value1) || (0, import_node.isDOMNode)(value2)) {
|
|
2767
|
+
if (value1 !== value2)
|
|
2739
2768
|
return false;
|
|
2769
|
+
} else if ((0, import_types.isObjectLike)(value1) && (0, import_types.isObjectLike)(value2)) {
|
|
2770
|
+
if (value1 !== value2) {
|
|
2771
|
+
stack.push([value1, value2]);
|
|
2740
2772
|
}
|
|
2773
|
+
} else if (value1 !== value2) {
|
|
2774
|
+
return false;
|
|
2741
2775
|
}
|
|
2742
2776
|
}
|
|
2743
|
-
} else {
|
|
2744
|
-
return obj2 === obj1;
|
|
2745
2777
|
}
|
|
2746
2778
|
return true;
|
|
2747
2779
|
};
|
|
@@ -3410,9 +3442,11 @@ var BREAKPOINTS = {
|
|
|
3410
3442
|
mobileXS: 375
|
|
3411
3443
|
};
|
|
3412
3444
|
var DEVICES = {
|
|
3445
|
+
screenXXL: [2560, 1440],
|
|
3446
|
+
screenXL: [2240, 1260],
|
|
3413
3447
|
screenL: [1920, 1024],
|
|
3414
3448
|
screenM: [1680, 1024],
|
|
3415
|
-
screenS: [1440,
|
|
3449
|
+
screenS: [1440, 720],
|
|
3416
3450
|
tabletL: [1366, 926],
|
|
3417
3451
|
tabletM: [1280, 768],
|
|
3418
3452
|
tabletS: [1024, 768],
|
package/dist/cjs/system/svg.js
CHANGED
|
@@ -202,6 +202,7 @@ var require_node = __commonJS({
|
|
|
202
202
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
203
203
|
var node_exports = {};
|
|
204
204
|
__export2(node_exports, {
|
|
205
|
+
isDOMNode: () => isDOMNode,
|
|
205
206
|
isHtmlElement: () => isHtmlElement,
|
|
206
207
|
isNode: () => isNode
|
|
207
208
|
});
|
|
@@ -213,6 +214,9 @@ var require_node = __commonJS({
|
|
|
213
214
|
var isHtmlElement = (obj) => {
|
|
214
215
|
return (typeof HTMLElement === "object" ? obj instanceof import_globals3.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
215
216
|
};
|
|
217
|
+
var isDOMNode = (obj) => {
|
|
218
|
+
return typeof import_globals3.window !== "undefined" && (obj instanceof import_globals3.window.Node || obj instanceof import_globals3.window.Window || obj === import_globals3.window || obj === document);
|
|
219
|
+
};
|
|
216
220
|
}
|
|
217
221
|
});
|
|
218
222
|
|
|
@@ -675,6 +679,7 @@ var require_object = __commonJS({
|
|
|
675
679
|
var import_types = require_types();
|
|
676
680
|
var import_array = require_array();
|
|
677
681
|
var import_string = require_string();
|
|
682
|
+
var import_node = require_node();
|
|
678
683
|
var exec = (param, element, state, context) => {
|
|
679
684
|
if ((0, import_types.isFunction)(param)) {
|
|
680
685
|
return param(
|
|
@@ -753,27 +758,28 @@ var require_object = __commonJS({
|
|
|
753
758
|
var mergeArrayExclude = (arr, excl = []) => {
|
|
754
759
|
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
755
760
|
};
|
|
756
|
-
var deepClone2 = (obj,
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
761
|
+
var deepClone2 = (obj, exclude = [], cleanUndefined = false, visited = /* @__PURE__ */ new WeakMap()) => {
|
|
762
|
+
if (!(0, import_types.isObjectLike)(obj) || (0, import_node.isDOMNode)(obj))
|
|
763
|
+
return obj;
|
|
764
|
+
if (visited.has(obj))
|
|
765
|
+
return visited.get(obj);
|
|
766
|
+
const clone2 = (0, import_types.isArray)(obj) ? [] : {};
|
|
767
|
+
visited.set(obj, clone2);
|
|
768
|
+
for (const key in obj) {
|
|
769
|
+
if (Object.prototype.hasOwnProperty.call(obj, key) && !exclude.includes(key)) {
|
|
770
|
+
const value = obj[key];
|
|
771
|
+
if ((0, import_node.isDOMNode)(value)) {
|
|
772
|
+
clone2[key] = value;
|
|
773
|
+
} else if (key === "extend" && (0, import_types.isArray)(value)) {
|
|
774
|
+
clone2[key] = (0, import_array.mergeArray)(value, exclude);
|
|
775
|
+
} else if ((0, import_types.isObjectLike)(value)) {
|
|
776
|
+
clone2[key] = deepClone2(value, exclude, cleanUndefined, visited);
|
|
777
|
+
} else {
|
|
778
|
+
clone2[key] = value;
|
|
779
|
+
}
|
|
770
780
|
}
|
|
771
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
772
|
-
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
773
|
-
} else
|
|
774
|
-
o[prop] = objProp;
|
|
775
781
|
}
|
|
776
|
-
return
|
|
782
|
+
return clone2;
|
|
777
783
|
};
|
|
778
784
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
779
785
|
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
@@ -1084,30 +1090,40 @@ var require_object = __commonJS({
|
|
|
1084
1090
|
}
|
|
1085
1091
|
return true;
|
|
1086
1092
|
};
|
|
1087
|
-
var deepContains = (obj1, obj2) => {
|
|
1088
|
-
if (
|
|
1093
|
+
var deepContains = (obj1, obj2, ignoredKeys = ["node", "__ref"]) => {
|
|
1094
|
+
if (obj1 === obj2)
|
|
1095
|
+
return true;
|
|
1096
|
+
if (!(0, import_types.isObjectLike)(obj1) || !(0, import_types.isObjectLike)(obj2))
|
|
1089
1097
|
return false;
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1098
|
+
if ((0, import_node.isDOMNode)(obj1) || (0, import_node.isDOMNode)(obj2))
|
|
1099
|
+
return obj1 === obj2;
|
|
1100
|
+
const stack = [[obj1, obj2]];
|
|
1101
|
+
const visited = /* @__PURE__ */ new WeakSet();
|
|
1102
|
+
while (stack.length > 0) {
|
|
1103
|
+
const [current1, current2] = stack.pop();
|
|
1104
|
+
if (visited.has(current1))
|
|
1105
|
+
continue;
|
|
1106
|
+
visited.add(current1);
|
|
1107
|
+
const keys1 = Object.keys(current1).filter((key) => !ignoredKeys.includes(key));
|
|
1108
|
+
const keys2 = Object.keys(current2).filter((key) => !ignoredKeys.includes(key));
|
|
1109
|
+
if (keys1.length !== keys2.length)
|
|
1110
|
+
return false;
|
|
1111
|
+
for (const key of keys1) {
|
|
1112
|
+
if (!Object.prototype.hasOwnProperty.call(current2, key))
|
|
1094
1113
|
return false;
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
1102
|
-
for (const key in obj1) {
|
|
1103
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
1104
|
-
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
1114
|
+
const value1 = current1[key];
|
|
1115
|
+
const value2 = current2[key];
|
|
1116
|
+
if ((0, import_node.isDOMNode)(value1) || (0, import_node.isDOMNode)(value2)) {
|
|
1117
|
+
if (value1 !== value2)
|
|
1105
1118
|
return false;
|
|
1119
|
+
} else if ((0, import_types.isObjectLike)(value1) && (0, import_types.isObjectLike)(value2)) {
|
|
1120
|
+
if (value1 !== value2) {
|
|
1121
|
+
stack.push([value1, value2]);
|
|
1106
1122
|
}
|
|
1123
|
+
} else if (value1 !== value2) {
|
|
1124
|
+
return false;
|
|
1107
1125
|
}
|
|
1108
1126
|
}
|
|
1109
|
-
} else {
|
|
1110
|
-
return obj2 === obj1;
|
|
1111
1127
|
}
|
|
1112
1128
|
return true;
|
|
1113
1129
|
};
|
|
@@ -1897,10 +1913,10 @@ var require_cjs3 = __commonJS({
|
|
|
1897
1913
|
return [].concat(...arrays);
|
|
1898
1914
|
};
|
|
1899
1915
|
var mergeArray = (arr, excludeFrom = []) => {
|
|
1900
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.
|
|
1916
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
|
|
1901
1917
|
};
|
|
1902
1918
|
var mergeAndCloneIfArray = (obj) => {
|
|
1903
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.
|
|
1919
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
|
|
1904
1920
|
};
|
|
1905
1921
|
var cutArrayBeforeValue = (arr, value) => {
|
|
1906
1922
|
const index = arr.indexOf(value);
|
|
@@ -2004,6 +2020,8 @@ var require_cjs3 = __commonJS({
|
|
|
2004
2020
|
__export22(string_exports, {
|
|
2005
2021
|
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
2006
2022
|
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
2023
|
+
decodeNewlines: () => decodeNewlines,
|
|
2024
|
+
encodeNewlines: () => encodeNewlines,
|
|
2007
2025
|
findKeyPosition: () => findKeyPosition,
|
|
2008
2026
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
2009
2027
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
@@ -2107,6 +2125,12 @@ var require_cjs3 = __commonJS({
|
|
|
2107
2125
|
return char;
|
|
2108
2126
|
});
|
|
2109
2127
|
};
|
|
2128
|
+
var encodeNewlines = (str) => {
|
|
2129
|
+
return str.split("\n").join("/////n").split("`").join("/////tilde").split("$").join("/////dlrsgn");
|
|
2130
|
+
};
|
|
2131
|
+
var decodeNewlines = (encodedStr) => {
|
|
2132
|
+
return encodedStr.split("/////n").join("\n").split("/////tilde").join("`").split("/////dlrsgn").join("$");
|
|
2133
|
+
};
|
|
2110
2134
|
var customEncodeURIComponent = (str) => {
|
|
2111
2135
|
return str.split("").map((char) => {
|
|
2112
2136
|
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
@@ -2537,7 +2561,7 @@ var require_cjs3 = __commonJS({
|
|
|
2537
2561
|
};
|
|
2538
2562
|
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
2539
2563
|
for (const e in params) {
|
|
2540
|
-
if (e === "
|
|
2564
|
+
if (e === "__ref")
|
|
2541
2565
|
continue;
|
|
2542
2566
|
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
2543
2567
|
continue;
|
|
@@ -3061,6 +3085,7 @@ var require_cjs3 = __commonJS({
|
|
|
3061
3085
|
var src_exports = {};
|
|
3062
3086
|
__export2(src_exports, {
|
|
3063
3087
|
arrayzeValue: () => arrayzeValue,
|
|
3088
|
+
copyJavaScriptToClipboard: () => copyJavaScriptToClipboard,
|
|
3064
3089
|
copyStringToClipboard: () => copyStringToClipboard,
|
|
3065
3090
|
fibonacciNumberByIndex: () => fibonacciNumberByIndex,
|
|
3066
3091
|
findClosestNumber: () => findClosestNumber,
|
|
@@ -3188,15 +3213,22 @@ var require_cjs3 = __commonJS({
|
|
|
3188
3213
|
}
|
|
3189
3214
|
};
|
|
3190
3215
|
var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
|
|
3191
|
-
var copyStringToClipboard = (str) => {
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3216
|
+
var copyStringToClipboard = async (str) => {
|
|
3217
|
+
try {
|
|
3218
|
+
await navigator.clipboard.writeText(str);
|
|
3219
|
+
} catch (err) {
|
|
3220
|
+
console.warn("Failed to copy text: ", err);
|
|
3221
|
+
}
|
|
3222
|
+
};
|
|
3223
|
+
var copyJavaScriptToClipboard = async (jsCode) => {
|
|
3224
|
+
try {
|
|
3225
|
+
const blob = new Blob([jsCode], { type: "text/javascript" });
|
|
3226
|
+
const clipboardItem = new window.ClipboardItem({ "text/plain": blob });
|
|
3227
|
+
await navigator.clipboard.write([clipboardItem]);
|
|
3228
|
+
console.log("JavaScript code copied to clipboard as text/javascript");
|
|
3229
|
+
} catch (err) {
|
|
3230
|
+
console.error("Failed to copy JavaScript code: ", err);
|
|
3231
|
+
}
|
|
3200
3232
|
};
|
|
3201
3233
|
var removeChars = (str) => {
|
|
3202
3234
|
return str.replace(/[^a-zA-Z0-9_]/g, "");
|
|
@@ -3418,9 +3450,11 @@ var BREAKPOINTS = {
|
|
|
3418
3450
|
mobileXS: 375
|
|
3419
3451
|
};
|
|
3420
3452
|
var DEVICES = {
|
|
3453
|
+
screenXXL: [2560, 1440],
|
|
3454
|
+
screenXL: [2240, 1260],
|
|
3421
3455
|
screenL: [1920, 1024],
|
|
3422
3456
|
screenM: [1680, 1024],
|
|
3423
|
-
screenS: [1440,
|
|
3457
|
+
screenS: [1440, 720],
|
|
3424
3458
|
tabletL: [1366, 926],
|
|
3425
3459
|
tabletM: [1280, 768],
|
|
3426
3460
|
tabletS: [1024, 768],
|