@symbo.ls/scratch 2.11.389 → 2.11.394
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/factory.js +8 -7
- package/dist/cjs/index.js +25 -9
- package/dist/cjs/set.js +25 -9
- package/dist/cjs/system/color.js +25 -9
- package/dist/cjs/system/document.js +25 -9
- package/dist/cjs/system/font.js +25 -9
- package/dist/cjs/system/index.js +25 -9
- package/dist/cjs/system/reset.js +25 -9
- package/dist/cjs/system/shadow.js +25 -9
- package/dist/cjs/system/spacing.js +25 -9
- package/dist/cjs/system/svg.js +25 -9
- package/dist/cjs/system/theme.js +25 -9
- package/dist/cjs/system/timing.js +25 -9
- package/dist/cjs/system/typography.js +25 -9
- package/dist/cjs/transforms/index.js +25 -9
- package/dist/cjs/utils/color.js +9 -8
- package/dist/cjs/utils/index.js +25 -9
- package/dist/cjs/utils/sequence.js +25 -9
- package/dist/cjs/utils/sprite.js +8 -7
- package/dist/cjs/utils/var.js +25 -9
- package/package.json +2 -2
- package/src/factory.js +1 -1
package/dist/cjs/system/reset.js
CHANGED
|
@@ -1142,20 +1142,21 @@ var require_cookie = __commonJS({
|
|
|
1142
1142
|
});
|
|
1143
1143
|
module2.exports = __toCommonJS2(cookie_exports);
|
|
1144
1144
|
var import_types = require_types();
|
|
1145
|
+
var import_utils11 = require_cjs();
|
|
1145
1146
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1146
1147
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1147
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1148
|
+
if ((0, import_types.isUndefined)(import_utils11.document) || (0, import_types.isUndefined)(import_utils11.document.cookie))
|
|
1148
1149
|
return;
|
|
1149
1150
|
const d = /* @__PURE__ */ new Date();
|
|
1150
1151
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1151
1152
|
const expires = `expires=${d.toUTCString()}`;
|
|
1152
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
|
+
import_utils11.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
1154
|
};
|
|
1154
1155
|
var getCookie = (cname) => {
|
|
1155
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1156
|
+
if ((0, import_types.isUndefined)(import_utils11.document) || (0, import_types.isUndefined)(import_utils11.document.cookie))
|
|
1156
1157
|
return;
|
|
1157
1158
|
const name = `${cname}=`;
|
|
1158
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
1159
|
+
const decodedCookie = decodeURIComponent(import_utils11.document.cookie);
|
|
1159
1160
|
const ca = decodedCookie.split(";");
|
|
1160
1161
|
for (let i = 0; i < ca.length; i++) {
|
|
1161
1162
|
let c = ca[i];
|
|
@@ -2533,20 +2534,21 @@ var require_cjs3 = __commonJS({
|
|
|
2533
2534
|
});
|
|
2534
2535
|
module22.exports = __toCommonJS22(cookie_exports);
|
|
2535
2536
|
var import_types = require_types2();
|
|
2537
|
+
var import_utils32 = require_cjs4();
|
|
2536
2538
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2537
2539
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2538
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
2540
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2539
2541
|
return;
|
|
2540
2542
|
const d = /* @__PURE__ */ new Date();
|
|
2541
2543
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2542
2544
|
const expires = `expires=${d.toUTCString()}`;
|
|
2543
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2545
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2544
2546
|
};
|
|
2545
2547
|
var getCookie = (cname) => {
|
|
2546
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
2548
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2547
2549
|
return;
|
|
2548
2550
|
const name = `${cname}=`;
|
|
2549
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
2551
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2550
2552
|
const ca = decodedCookie.split(";");
|
|
2551
2553
|
for (let i = 0; i < ca.length; i++) {
|
|
2552
2554
|
let c = ca[i];
|
|
@@ -2766,6 +2768,7 @@ var require_cjs3 = __commonJS({
|
|
|
2766
2768
|
findClosestNumber: () => findClosestNumber,
|
|
2767
2769
|
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
2768
2770
|
formatDate: () => formatDate,
|
|
2771
|
+
loadJavascript: () => loadJavascript,
|
|
2769
2772
|
loadJavascriptFile: () => loadJavascriptFile,
|
|
2770
2773
|
removeChars: () => removeChars,
|
|
2771
2774
|
toCamelCase: () => toCamelCase,
|
|
@@ -2837,6 +2840,17 @@ var require_cjs3 = __commonJS({
|
|
|
2837
2840
|
}
|
|
2838
2841
|
});
|
|
2839
2842
|
};
|
|
2843
|
+
var loadJavascript = (body, async = true, doc = document, type = "text/javascript") => {
|
|
2844
|
+
try {
|
|
2845
|
+
const scriptEle = doc.createElement("script");
|
|
2846
|
+
scriptEle.type = type;
|
|
2847
|
+
scriptEle.async = async;
|
|
2848
|
+
scriptEle.innerHTML = body;
|
|
2849
|
+
doc.body.appendChild(scriptEle);
|
|
2850
|
+
} catch (error) {
|
|
2851
|
+
console.warn(error);
|
|
2852
|
+
}
|
|
2853
|
+
};
|
|
2840
2854
|
var copyStringToClipboard = (str) => {
|
|
2841
2855
|
const el = document.createElement("textarea");
|
|
2842
2856
|
el.value = str;
|
|
@@ -2863,6 +2877,8 @@ var require_cjs3 = __commonJS({
|
|
|
2863
2877
|
);
|
|
2864
2878
|
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
2865
2879
|
var toDescriptionCase = (str = "") => {
|
|
2880
|
+
if (typeof str !== "string")
|
|
2881
|
+
return;
|
|
2866
2882
|
const result = str.replace(/([A-Z])/g, " $1");
|
|
2867
2883
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
2868
2884
|
};
|
|
@@ -3101,7 +3117,7 @@ var FACTORY = {
|
|
|
3101
3117
|
0: CONFIG
|
|
3102
3118
|
};
|
|
3103
3119
|
var getActiveConfig = (def) => {
|
|
3104
|
-
return FACTORY[def || FACTORY.active];
|
|
3120
|
+
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
3105
3121
|
};
|
|
3106
3122
|
|
|
3107
3123
|
// src/system/color.js
|
|
@@ -1142,20 +1142,21 @@ var require_cookie = __commonJS({
|
|
|
1142
1142
|
});
|
|
1143
1143
|
module2.exports = __toCommonJS2(cookie_exports);
|
|
1144
1144
|
var import_types = require_types();
|
|
1145
|
+
var import_utils13 = require_cjs();
|
|
1145
1146
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1146
1147
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1147
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1148
|
+
if ((0, import_types.isUndefined)(import_utils13.document) || (0, import_types.isUndefined)(import_utils13.document.cookie))
|
|
1148
1149
|
return;
|
|
1149
1150
|
const d = /* @__PURE__ */ new Date();
|
|
1150
1151
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1151
1152
|
const expires = `expires=${d.toUTCString()}`;
|
|
1152
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
|
+
import_utils13.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
1154
|
};
|
|
1154
1155
|
var getCookie = (cname) => {
|
|
1155
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1156
|
+
if ((0, import_types.isUndefined)(import_utils13.document) || (0, import_types.isUndefined)(import_utils13.document.cookie))
|
|
1156
1157
|
return;
|
|
1157
1158
|
const name = `${cname}=`;
|
|
1158
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
1159
|
+
const decodedCookie = decodeURIComponent(import_utils13.document.cookie);
|
|
1159
1160
|
const ca = decodedCookie.split(";");
|
|
1160
1161
|
for (let i = 0; i < ca.length; i++) {
|
|
1161
1162
|
let c = ca[i];
|
|
@@ -2533,20 +2534,21 @@ var require_cjs3 = __commonJS({
|
|
|
2533
2534
|
});
|
|
2534
2535
|
module22.exports = __toCommonJS22(cookie_exports);
|
|
2535
2536
|
var import_types = require_types2();
|
|
2537
|
+
var import_utils32 = require_cjs4();
|
|
2536
2538
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2537
2539
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2538
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
2540
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2539
2541
|
return;
|
|
2540
2542
|
const d = /* @__PURE__ */ new Date();
|
|
2541
2543
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2542
2544
|
const expires = `expires=${d.toUTCString()}`;
|
|
2543
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2545
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2544
2546
|
};
|
|
2545
2547
|
var getCookie = (cname) => {
|
|
2546
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
2548
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2547
2549
|
return;
|
|
2548
2550
|
const name = `${cname}=`;
|
|
2549
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
2551
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2550
2552
|
const ca = decodedCookie.split(";");
|
|
2551
2553
|
for (let i = 0; i < ca.length; i++) {
|
|
2552
2554
|
let c = ca[i];
|
|
@@ -2766,6 +2768,7 @@ var require_cjs3 = __commonJS({
|
|
|
2766
2768
|
findClosestNumber: () => findClosestNumber,
|
|
2767
2769
|
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
2768
2770
|
formatDate: () => formatDate,
|
|
2771
|
+
loadJavascript: () => loadJavascript,
|
|
2769
2772
|
loadJavascriptFile: () => loadJavascriptFile,
|
|
2770
2773
|
removeChars: () => removeChars,
|
|
2771
2774
|
toCamelCase: () => toCamelCase,
|
|
@@ -2837,6 +2840,17 @@ var require_cjs3 = __commonJS({
|
|
|
2837
2840
|
}
|
|
2838
2841
|
});
|
|
2839
2842
|
};
|
|
2843
|
+
var loadJavascript = (body, async = true, doc = document, type = "text/javascript") => {
|
|
2844
|
+
try {
|
|
2845
|
+
const scriptEle = doc.createElement("script");
|
|
2846
|
+
scriptEle.type = type;
|
|
2847
|
+
scriptEle.async = async;
|
|
2848
|
+
scriptEle.innerHTML = body;
|
|
2849
|
+
doc.body.appendChild(scriptEle);
|
|
2850
|
+
} catch (error) {
|
|
2851
|
+
console.warn(error);
|
|
2852
|
+
}
|
|
2853
|
+
};
|
|
2840
2854
|
var copyStringToClipboard = (str) => {
|
|
2841
2855
|
const el = document.createElement("textarea");
|
|
2842
2856
|
el.value = str;
|
|
@@ -2863,6 +2877,8 @@ var require_cjs3 = __commonJS({
|
|
|
2863
2877
|
);
|
|
2864
2878
|
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
2865
2879
|
var toDescriptionCase = (str = "") => {
|
|
2880
|
+
if (typeof str !== "string")
|
|
2881
|
+
return;
|
|
2866
2882
|
const result = str.replace(/([A-Z])/g, " $1");
|
|
2867
2883
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
2868
2884
|
};
|
|
@@ -3101,7 +3117,7 @@ var FACTORY = {
|
|
|
3101
3117
|
0: CONFIG
|
|
3102
3118
|
};
|
|
3103
3119
|
var getActiveConfig = (def) => {
|
|
3104
|
-
return FACTORY[def || FACTORY.active];
|
|
3120
|
+
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
3105
3121
|
};
|
|
3106
3122
|
|
|
3107
3123
|
// src/system/color.js
|
|
@@ -1155,20 +1155,21 @@ var require_cjs = __commonJS({
|
|
|
1155
1155
|
});
|
|
1156
1156
|
module22.exports = __toCommonJS22(cookie_exports);
|
|
1157
1157
|
var import_types = require_types2();
|
|
1158
|
+
var import_utils32 = require_cjs4();
|
|
1158
1159
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1159
1160
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1160
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1161
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
1161
1162
|
return;
|
|
1162
1163
|
const d = /* @__PURE__ */ new Date();
|
|
1163
1164
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1164
1165
|
const expires = `expires=${d.toUTCString()}`;
|
|
1165
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1166
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1166
1167
|
};
|
|
1167
1168
|
var getCookie = (cname) => {
|
|
1168
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1169
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
1169
1170
|
return;
|
|
1170
1171
|
const name = `${cname}=`;
|
|
1171
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
1172
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
1172
1173
|
const ca = decodedCookie.split(";");
|
|
1173
1174
|
for (let i = 0; i < ca.length; i++) {
|
|
1174
1175
|
let c = ca[i];
|
|
@@ -1388,6 +1389,7 @@ var require_cjs = __commonJS({
|
|
|
1388
1389
|
findClosestNumber: () => findClosestNumber,
|
|
1389
1390
|
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
1390
1391
|
formatDate: () => formatDate,
|
|
1392
|
+
loadJavascript: () => loadJavascript,
|
|
1391
1393
|
loadJavascriptFile: () => loadJavascriptFile,
|
|
1392
1394
|
removeChars: () => removeChars,
|
|
1393
1395
|
toCamelCase: () => toCamelCase,
|
|
@@ -1459,6 +1461,17 @@ var require_cjs = __commonJS({
|
|
|
1459
1461
|
}
|
|
1460
1462
|
});
|
|
1461
1463
|
};
|
|
1464
|
+
var loadJavascript = (body, async = true, doc = document, type = "text/javascript") => {
|
|
1465
|
+
try {
|
|
1466
|
+
const scriptEle = doc.createElement("script");
|
|
1467
|
+
scriptEle.type = type;
|
|
1468
|
+
scriptEle.async = async;
|
|
1469
|
+
scriptEle.innerHTML = body;
|
|
1470
|
+
doc.body.appendChild(scriptEle);
|
|
1471
|
+
} catch (error) {
|
|
1472
|
+
console.warn(error);
|
|
1473
|
+
}
|
|
1474
|
+
};
|
|
1462
1475
|
var copyStringToClipboard = (str) => {
|
|
1463
1476
|
const el = document.createElement("textarea");
|
|
1464
1477
|
el.value = str;
|
|
@@ -1485,6 +1498,8 @@ var require_cjs = __commonJS({
|
|
|
1485
1498
|
);
|
|
1486
1499
|
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
1487
1500
|
var toDescriptionCase = (str = "") => {
|
|
1501
|
+
if (typeof str !== "string")
|
|
1502
|
+
return;
|
|
1488
1503
|
const result = str.replace(/([A-Z])/g, " $1");
|
|
1489
1504
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
1490
1505
|
};
|
|
@@ -2613,20 +2628,21 @@ var require_cookie = __commonJS({
|
|
|
2613
2628
|
});
|
|
2614
2629
|
module2.exports = __toCommonJS2(cookie_exports);
|
|
2615
2630
|
var import_types = require_types();
|
|
2631
|
+
var import_utils10 = require_cjs2();
|
|
2616
2632
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2617
2633
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2618
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
2634
|
+
if ((0, import_types.isUndefined)(import_utils10.document) || (0, import_types.isUndefined)(import_utils10.document.cookie))
|
|
2619
2635
|
return;
|
|
2620
2636
|
const d = /* @__PURE__ */ new Date();
|
|
2621
2637
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2622
2638
|
const expires = `expires=${d.toUTCString()}`;
|
|
2623
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2639
|
+
import_utils10.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2624
2640
|
};
|
|
2625
2641
|
var getCookie = (cname) => {
|
|
2626
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
2642
|
+
if ((0, import_types.isUndefined)(import_utils10.document) || (0, import_types.isUndefined)(import_utils10.document.cookie))
|
|
2627
2643
|
return;
|
|
2628
2644
|
const name = `${cname}=`;
|
|
2629
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
2645
|
+
const decodedCookie = decodeURIComponent(import_utils10.document.cookie);
|
|
2630
2646
|
const ca = decodedCookie.split(";");
|
|
2631
2647
|
for (let i = 0; i < ca.length; i++) {
|
|
2632
2648
|
let c = ca[i];
|
|
@@ -3104,7 +3120,7 @@ var FACTORY = {
|
|
|
3104
3120
|
0: CONFIG
|
|
3105
3121
|
};
|
|
3106
3122
|
var getActiveConfig = (def) => {
|
|
3107
|
-
return FACTORY[def || FACTORY.active];
|
|
3123
|
+
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
3108
3124
|
};
|
|
3109
3125
|
|
|
3110
3126
|
// src/utils/unit.js
|
package/dist/cjs/system/svg.js
CHANGED
|
@@ -1178,20 +1178,21 @@ var require_cookie = __commonJS({
|
|
|
1178
1178
|
});
|
|
1179
1179
|
module2.exports = __toCommonJS2(cookie_exports);
|
|
1180
1180
|
var import_types = require_types();
|
|
1181
|
+
var import_utils8 = require_cjs2();
|
|
1181
1182
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1182
1183
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1183
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1184
|
+
if ((0, import_types.isUndefined)(import_utils8.document) || (0, import_types.isUndefined)(import_utils8.document.cookie))
|
|
1184
1185
|
return;
|
|
1185
1186
|
const d = /* @__PURE__ */ new Date();
|
|
1186
1187
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1187
1188
|
const expires = `expires=${d.toUTCString()}`;
|
|
1188
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1189
|
+
import_utils8.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1189
1190
|
};
|
|
1190
1191
|
var getCookie = (cname) => {
|
|
1191
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1192
|
+
if ((0, import_types.isUndefined)(import_utils8.document) || (0, import_types.isUndefined)(import_utils8.document.cookie))
|
|
1192
1193
|
return;
|
|
1193
1194
|
const name = `${cname}=`;
|
|
1194
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
1195
|
+
const decodedCookie = decodeURIComponent(import_utils8.document.cookie);
|
|
1195
1196
|
const ca = decodedCookie.split(";");
|
|
1196
1197
|
for (let i = 0; i < ca.length; i++) {
|
|
1197
1198
|
let c = ca[i];
|
|
@@ -2533,20 +2534,21 @@ var require_cjs3 = __commonJS({
|
|
|
2533
2534
|
});
|
|
2534
2535
|
module22.exports = __toCommonJS22(cookie_exports);
|
|
2535
2536
|
var import_types = require_types2();
|
|
2537
|
+
var import_utils32 = require_cjs4();
|
|
2536
2538
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2537
2539
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2538
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
2540
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2539
2541
|
return;
|
|
2540
2542
|
const d = /* @__PURE__ */ new Date();
|
|
2541
2543
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2542
2544
|
const expires = `expires=${d.toUTCString()}`;
|
|
2543
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2545
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2544
2546
|
};
|
|
2545
2547
|
var getCookie = (cname) => {
|
|
2546
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
2548
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2547
2549
|
return;
|
|
2548
2550
|
const name = `${cname}=`;
|
|
2549
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
2551
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2550
2552
|
const ca = decodedCookie.split(";");
|
|
2551
2553
|
for (let i = 0; i < ca.length; i++) {
|
|
2552
2554
|
let c = ca[i];
|
|
@@ -2766,6 +2768,7 @@ var require_cjs3 = __commonJS({
|
|
|
2766
2768
|
findClosestNumber: () => findClosestNumber,
|
|
2767
2769
|
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
2768
2770
|
formatDate: () => formatDate,
|
|
2771
|
+
loadJavascript: () => loadJavascript,
|
|
2769
2772
|
loadJavascriptFile: () => loadJavascriptFile,
|
|
2770
2773
|
removeChars: () => removeChars,
|
|
2771
2774
|
toCamelCase: () => toCamelCase,
|
|
@@ -2837,6 +2840,17 @@ var require_cjs3 = __commonJS({
|
|
|
2837
2840
|
}
|
|
2838
2841
|
});
|
|
2839
2842
|
};
|
|
2843
|
+
var loadJavascript = (body, async = true, doc = document, type = "text/javascript") => {
|
|
2844
|
+
try {
|
|
2845
|
+
const scriptEle = doc.createElement("script");
|
|
2846
|
+
scriptEle.type = type;
|
|
2847
|
+
scriptEle.async = async;
|
|
2848
|
+
scriptEle.innerHTML = body;
|
|
2849
|
+
doc.body.appendChild(scriptEle);
|
|
2850
|
+
} catch (error) {
|
|
2851
|
+
console.warn(error);
|
|
2852
|
+
}
|
|
2853
|
+
};
|
|
2840
2854
|
var copyStringToClipboard = (str) => {
|
|
2841
2855
|
const el = document.createElement("textarea");
|
|
2842
2856
|
el.value = str;
|
|
@@ -2863,6 +2877,8 @@ var require_cjs3 = __commonJS({
|
|
|
2863
2877
|
);
|
|
2864
2878
|
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
2865
2879
|
var toDescriptionCase = (str = "") => {
|
|
2880
|
+
if (typeof str !== "string")
|
|
2881
|
+
return;
|
|
2866
2882
|
const result = str.replace(/([A-Z])/g, " $1");
|
|
2867
2883
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
2868
2884
|
};
|
|
@@ -3112,7 +3128,7 @@ var FACTORY = {
|
|
|
3112
3128
|
0: CONFIG
|
|
3113
3129
|
};
|
|
3114
3130
|
var getActiveConfig = (def) => {
|
|
3115
|
-
return FACTORY[def || FACTORY.active];
|
|
3131
|
+
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
3116
3132
|
};
|
|
3117
3133
|
|
|
3118
3134
|
// src/utils/var.js
|
package/dist/cjs/system/theme.js
CHANGED
|
@@ -1142,20 +1142,21 @@ var require_cookie = __commonJS({
|
|
|
1142
1142
|
});
|
|
1143
1143
|
module2.exports = __toCommonJS2(cookie_exports);
|
|
1144
1144
|
var import_types = require_types();
|
|
1145
|
+
var import_utils10 = require_cjs();
|
|
1145
1146
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1146
1147
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1147
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1148
|
+
if ((0, import_types.isUndefined)(import_utils10.document) || (0, import_types.isUndefined)(import_utils10.document.cookie))
|
|
1148
1149
|
return;
|
|
1149
1150
|
const d = /* @__PURE__ */ new Date();
|
|
1150
1151
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1151
1152
|
const expires = `expires=${d.toUTCString()}`;
|
|
1152
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
|
+
import_utils10.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1153
1154
|
};
|
|
1154
1155
|
var getCookie = (cname) => {
|
|
1155
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1156
|
+
if ((0, import_types.isUndefined)(import_utils10.document) || (0, import_types.isUndefined)(import_utils10.document.cookie))
|
|
1156
1157
|
return;
|
|
1157
1158
|
const name = `${cname}=`;
|
|
1158
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
1159
|
+
const decodedCookie = decodeURIComponent(import_utils10.document.cookie);
|
|
1159
1160
|
const ca = decodedCookie.split(";");
|
|
1160
1161
|
for (let i = 0; i < ca.length; i++) {
|
|
1161
1162
|
let c = ca[i];
|
|
@@ -2533,20 +2534,21 @@ var require_cjs3 = __commonJS({
|
|
|
2533
2534
|
});
|
|
2534
2535
|
module22.exports = __toCommonJS22(cookie_exports);
|
|
2535
2536
|
var import_types = require_types2();
|
|
2537
|
+
var import_utils32 = require_cjs4();
|
|
2536
2538
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2537
2539
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2538
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
2540
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2539
2541
|
return;
|
|
2540
2542
|
const d = /* @__PURE__ */ new Date();
|
|
2541
2543
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2542
2544
|
const expires = `expires=${d.toUTCString()}`;
|
|
2543
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2545
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2544
2546
|
};
|
|
2545
2547
|
var getCookie = (cname) => {
|
|
2546
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
2548
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
2547
2549
|
return;
|
|
2548
2550
|
const name = `${cname}=`;
|
|
2549
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
2551
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
2550
2552
|
const ca = decodedCookie.split(";");
|
|
2551
2553
|
for (let i = 0; i < ca.length; i++) {
|
|
2552
2554
|
let c = ca[i];
|
|
@@ -2766,6 +2768,7 @@ var require_cjs3 = __commonJS({
|
|
|
2766
2768
|
findClosestNumber: () => findClosestNumber,
|
|
2767
2769
|
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
2768
2770
|
formatDate: () => formatDate,
|
|
2771
|
+
loadJavascript: () => loadJavascript,
|
|
2769
2772
|
loadJavascriptFile: () => loadJavascriptFile,
|
|
2770
2773
|
removeChars: () => removeChars,
|
|
2771
2774
|
toCamelCase: () => toCamelCase,
|
|
@@ -2837,6 +2840,17 @@ var require_cjs3 = __commonJS({
|
|
|
2837
2840
|
}
|
|
2838
2841
|
});
|
|
2839
2842
|
};
|
|
2843
|
+
var loadJavascript = (body, async = true, doc = document, type = "text/javascript") => {
|
|
2844
|
+
try {
|
|
2845
|
+
const scriptEle = doc.createElement("script");
|
|
2846
|
+
scriptEle.type = type;
|
|
2847
|
+
scriptEle.async = async;
|
|
2848
|
+
scriptEle.innerHTML = body;
|
|
2849
|
+
doc.body.appendChild(scriptEle);
|
|
2850
|
+
} catch (error) {
|
|
2851
|
+
console.warn(error);
|
|
2852
|
+
}
|
|
2853
|
+
};
|
|
2840
2854
|
var copyStringToClipboard = (str) => {
|
|
2841
2855
|
const el = document.createElement("textarea");
|
|
2842
2856
|
el.value = str;
|
|
@@ -2863,6 +2877,8 @@ var require_cjs3 = __commonJS({
|
|
|
2863
2877
|
);
|
|
2864
2878
|
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
2865
2879
|
var toDescriptionCase = (str = "") => {
|
|
2880
|
+
if (typeof str !== "string")
|
|
2881
|
+
return;
|
|
2866
2882
|
const result = str.replace(/([A-Z])/g, " $1");
|
|
2867
2883
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
2868
2884
|
};
|
|
@@ -3106,7 +3122,7 @@ var FACTORY = {
|
|
|
3106
3122
|
0: CONFIG
|
|
3107
3123
|
};
|
|
3108
3124
|
var getActiveConfig = (def) => {
|
|
3109
|
-
return FACTORY[def || FACTORY.active];
|
|
3125
|
+
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
3110
3126
|
};
|
|
3111
3127
|
|
|
3112
3128
|
// src/utils/color.js
|
|
@@ -1155,20 +1155,21 @@ var require_cjs = __commonJS({
|
|
|
1155
1155
|
});
|
|
1156
1156
|
module22.exports = __toCommonJS22(cookie_exports);
|
|
1157
1157
|
var import_types = require_types2();
|
|
1158
|
+
var import_utils32 = require_cjs4();
|
|
1158
1159
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
1159
1160
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
1160
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1161
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
1161
1162
|
return;
|
|
1162
1163
|
const d = /* @__PURE__ */ new Date();
|
|
1163
1164
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
1164
1165
|
const expires = `expires=${d.toUTCString()}`;
|
|
1165
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1166
|
+
import_utils32.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
1166
1167
|
};
|
|
1167
1168
|
var getCookie = (cname) => {
|
|
1168
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
1169
|
+
if ((0, import_types.isUndefined)(import_utils32.document) || (0, import_types.isUndefined)(import_utils32.document.cookie))
|
|
1169
1170
|
return;
|
|
1170
1171
|
const name = `${cname}=`;
|
|
1171
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
1172
|
+
const decodedCookie = decodeURIComponent(import_utils32.document.cookie);
|
|
1172
1173
|
const ca = decodedCookie.split(";");
|
|
1173
1174
|
for (let i = 0; i < ca.length; i++) {
|
|
1174
1175
|
let c = ca[i];
|
|
@@ -1388,6 +1389,7 @@ var require_cjs = __commonJS({
|
|
|
1388
1389
|
findClosestNumber: () => findClosestNumber,
|
|
1389
1390
|
findClosestNumberInFactory: () => findClosestNumberInFactory,
|
|
1390
1391
|
formatDate: () => formatDate,
|
|
1392
|
+
loadJavascript: () => loadJavascript,
|
|
1391
1393
|
loadJavascriptFile: () => loadJavascriptFile,
|
|
1392
1394
|
removeChars: () => removeChars,
|
|
1393
1395
|
toCamelCase: () => toCamelCase2,
|
|
@@ -1459,6 +1461,17 @@ var require_cjs = __commonJS({
|
|
|
1459
1461
|
}
|
|
1460
1462
|
});
|
|
1461
1463
|
};
|
|
1464
|
+
var loadJavascript = (body, async = true, doc = document, type = "text/javascript") => {
|
|
1465
|
+
try {
|
|
1466
|
+
const scriptEle = doc.createElement("script");
|
|
1467
|
+
scriptEle.type = type;
|
|
1468
|
+
scriptEle.async = async;
|
|
1469
|
+
scriptEle.innerHTML = body;
|
|
1470
|
+
doc.body.appendChild(scriptEle);
|
|
1471
|
+
} catch (error) {
|
|
1472
|
+
console.warn(error);
|
|
1473
|
+
}
|
|
1474
|
+
};
|
|
1462
1475
|
var copyStringToClipboard = (str) => {
|
|
1463
1476
|
const el = document.createElement("textarea");
|
|
1464
1477
|
el.value = str;
|
|
@@ -1485,6 +1498,8 @@ var require_cjs = __commonJS({
|
|
|
1485
1498
|
);
|
|
1486
1499
|
var toDashCase2 = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
1487
1500
|
var toDescriptionCase = (str = "") => {
|
|
1501
|
+
if (typeof str !== "string")
|
|
1502
|
+
return;
|
|
1488
1503
|
const result = str.replace(/([A-Z])/g, " $1");
|
|
1489
1504
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
1490
1505
|
};
|
|
@@ -2613,20 +2628,21 @@ var require_cookie = __commonJS({
|
|
|
2613
2628
|
});
|
|
2614
2629
|
module2.exports = __toCommonJS2(cookie_exports);
|
|
2615
2630
|
var import_types = require_types();
|
|
2631
|
+
var import_utils9 = require_cjs2();
|
|
2616
2632
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
2617
2633
|
var setCookie = (cname, cvalue, exdays = 365) => {
|
|
2618
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
2634
|
+
if ((0, import_types.isUndefined)(import_utils9.document) || (0, import_types.isUndefined)(import_utils9.document.cookie))
|
|
2619
2635
|
return;
|
|
2620
2636
|
const d = /* @__PURE__ */ new Date();
|
|
2621
2637
|
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
|
|
2622
2638
|
const expires = `expires=${d.toUTCString()}`;
|
|
2623
|
-
document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2639
|
+
import_utils9.document.cookie = `${cname}=${cvalue};${expires};path=/`;
|
|
2624
2640
|
};
|
|
2625
2641
|
var getCookie = (cname) => {
|
|
2626
|
-
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
|
|
2642
|
+
if ((0, import_types.isUndefined)(import_utils9.document) || (0, import_types.isUndefined)(import_utils9.document.cookie))
|
|
2627
2643
|
return;
|
|
2628
2644
|
const name = `${cname}=`;
|
|
2629
|
-
const decodedCookie = decodeURIComponent(document.cookie);
|
|
2645
|
+
const decodedCookie = decodeURIComponent(import_utils9.document.cookie);
|
|
2630
2646
|
const ca = decodedCookie.split(";");
|
|
2631
2647
|
for (let i = 0; i < ca.length; i++) {
|
|
2632
2648
|
let c = ca[i];
|
|
@@ -3103,7 +3119,7 @@ var FACTORY = {
|
|
|
3103
3119
|
0: CONFIG
|
|
3104
3120
|
};
|
|
3105
3121
|
var getActiveConfig = (def) => {
|
|
3106
|
-
return FACTORY[def || FACTORY.active];
|
|
3122
|
+
return FACTORY[def || FACTORY.active] || CONFIG;
|
|
3107
3123
|
};
|
|
3108
3124
|
|
|
3109
3125
|
// src/utils/unit.js
|