diginext-utils 2.0.33 → 2.0.35
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/package.json +1 -1
- package/src/console/index.ts +2 -2
- package/src/string/url.ts +2 -2
- package/dist/Checker.d.ts +0 -9
- package/dist/Checker.js +0 -52
- package/dist/Checker.mjs +0 -29
- package/dist/EventDispatcher.d.ts +0 -13
- package/dist/EventDispatcher.js +0 -77
- package/dist/EventDispatcher.mjs +0 -54
- package/dist/FileUpload.d.ts +0 -12
- package/dist/FileUpload.js +0 -85
- package/dist/FileUpload.mjs +0 -62
- package/dist/Slug.d.ts +0 -10
- package/dist/Slug.js +0 -354
- package/dist/Slug.mjs +0 -331
- package/dist/Timer-7b0c4e7c.d.ts +0 -11
- package/dist/Timer.d.ts +0 -1
- package/dist/Timer.js +0 -33
- package/dist/Timer.mjs +0 -7
- package/dist/Validation.d.ts +0 -6
- package/dist/Validation.js +0 -56
- package/dist/Validation.mjs +0 -35
- package/dist/array-dc599632.d.ts +0 -158
- package/dist/array.d.ts +0 -1
- package/dist/array.js +0 -277
- package/dist/array.mjs +0 -49
- package/dist/browser-8d042ffe.d.ts +0 -22
- package/dist/camera-1a859d72.d.ts +0 -15
- package/dist/chunk-5NTK5JAI.mjs +0 -57
- package/dist/chunk-5UEMANWE.mjs +0 -91
- package/dist/chunk-5ZOWNKSD.mjs +0 -166
- package/dist/chunk-6GNGTFNC.mjs +0 -118
- package/dist/chunk-7MK72U4O.mjs +0 -19
- package/dist/chunk-7XKT3AQX.mjs +0 -17
- package/dist/chunk-7ZCEZM7K.mjs +0 -41
- package/dist/chunk-AMBWJGSW.mjs +0 -151
- package/dist/chunk-C7S43KGB.mjs +0 -15
- package/dist/chunk-CJM7T7ON.mjs +0 -24
- package/dist/chunk-CKILLYAP.mjs +0 -16
- package/dist/chunk-DX7MUT3M.mjs +0 -51
- package/dist/chunk-EGUJQ5VF.mjs +0 -32
- package/dist/chunk-ETEIHDWU.mjs +0 -25
- package/dist/chunk-FJXSVGL7.mjs +0 -22
- package/dist/chunk-GJCAEOND.mjs +0 -20
- package/dist/chunk-GNJDIUYM.mjs +0 -40
- package/dist/chunk-IA7GINWD.mjs +0 -39
- package/dist/chunk-JEI7BOXY.mjs +0 -21
- package/dist/chunk-K4KENOE6.mjs +0 -20
- package/dist/chunk-KMERW6KS.mjs +0 -34
- package/dist/chunk-KPO3RH5G.mjs +0 -27
- package/dist/chunk-KWG5LYNK.mjs +0 -100
- package/dist/chunk-NUTQDHLQ.mjs +0 -40
- package/dist/chunk-O64XUDAH.mjs +0 -35
- package/dist/chunk-OYRPWQUA.mjs +0 -257
- package/dist/chunk-PNZ4KGXL.mjs +0 -56
- package/dist/chunk-QZYX26HT.mjs +0 -24
- package/dist/chunk-RDGP2CKM.mjs +0 -195
- package/dist/chunk-VFG5VU6S.mjs +0 -12
- package/dist/chunk-X3IMFCZG.mjs +0 -23
- package/dist/chunk-ZHNGZMRD.mjs +0 -17
- package/dist/color.d.ts +0 -24
- package/dist/color.js +0 -106
- package/dist/color.mjs +0 -78
- package/dist/console/enableConsole.d.ts +0 -1
- package/dist/console/enableConsole.js +0 -42
- package/dist/console/enableConsole.mjs +0 -9
- package/dist/console/index.d.ts +0 -2
- package/dist/console/index.js +0 -61
- package/dist/console/index.mjs +0 -14
- package/dist/console/log.d.ts +0 -16
- package/dist/console/log.js +0 -75
- package/dist/console/log.mjs +0 -19
- package/dist/createDir-220e0081.d.ts +0 -13
- package/dist/device/browser.d.ts +0 -1
- package/dist/device/browser.js +0 -66
- package/dist/device/browser.mjs +0 -15
- package/dist/device/camera.d.ts +0 -1
- package/dist/device/camera.js +0 -190
- package/dist/device/camera.mjs +0 -8
- package/dist/device/index.d.ts +0 -1
- package/dist/device/index.js +0 -210
- package/dist/device/index.mjs +0 -15
- package/dist/device/os.d.ts +0 -12
- package/dist/device/os.js +0 -65
- package/dist/device/os.mjs +0 -33
- package/dist/enableConsole-ddc24282.d.ts +0 -11
- package/dist/file/createDir.d.ts +0 -1
- package/dist/file/createDir.js +0 -37
- package/dist/file/createDir.mjs +0 -7
- package/dist/file/fileMove.d.ts +0 -1
- package/dist/file/fileMove.js +0 -53
- package/dist/file/fileMove.mjs +0 -7
- package/dist/file/findFilesByExt.d.ts +0 -1
- package/dist/file/findFilesByExt.js +0 -69
- package/dist/file/findFilesByExt.mjs +0 -11
- package/dist/file/index.d.ts +0 -11
- package/dist/file/index.js +0 -106
- package/dist/file/index.mjs +0 -17
- package/dist/fileMove-3a09e429.d.ts +0 -13
- package/dist/findFilesByExt-753e91d7.d.ts +0 -24
- package/dist/images/index.d.ts +0 -2
- package/dist/images/index.js +0 -132
- package/dist/images/index.mjs +0 -15
- package/dist/images/loadImage.d.ts +0 -3
- package/dist/images/loadImage.js +0 -42
- package/dist/images/loadImage.mjs +0 -21
- package/dist/images/resize.d.ts +0 -3
- package/dist/images/resize.js +0 -64
- package/dist/images/resize.mjs +0 -9
- package/dist/images/upload.d.ts +0 -11
- package/dist/images/upload.js +0 -132
- package/dist/images/upload.mjs +0 -14
- package/dist/index-1f738e52.d.ts +0 -22
- package/dist/index-22309f0c.d.ts +0 -23
- package/dist/index-6ae3c86b.d.ts +0 -63
- package/dist/index-c8fffc86.d.ts +0 -90
- package/dist/index-d652ed2c.d.ts +0 -26
- package/dist/index.d.ts +0 -48
- package/dist/index.js +0 -1353
- package/dist/index.mjs +0 -87
- package/dist/json.d.ts +0 -9
- package/dist/json.js +0 -52
- package/dist/json.mjs +0 -29
- package/dist/math/diffDate.d.ts +0 -6
- package/dist/math/diffDate.js +0 -36
- package/dist/math/diffDate.mjs +0 -9
- package/dist/math/index.d.ts +0 -3
- package/dist/math/index.js +0 -160
- package/dist/math/index.mjs +0 -34
- package/dist/math/positiveNumber.d.ts +0 -3
- package/dist/math/positiveNumber.js +0 -56
- package/dist/math/positiveNumber.mjs +0 -10
- package/dist/name/en.d.ts +0 -6
- package/dist/name/en.js +0 -44
- package/dist/name/en.mjs +0 -9
- package/dist/name/index.d.ts +0 -3
- package/dist/name/index.js +0 -88
- package/dist/name/index.mjs +0 -20
- package/dist/name/vi.d.ts +0 -6
- package/dist/name/vi.js +0 -66
- package/dist/name/vi.mjs +0 -14
- package/dist/object-43aaaf92.d.ts +0 -80
- package/dist/object.d.ts +0 -1
- package/dist/object.js +0 -105
- package/dist/object.mjs +0 -21
- package/dist/permission/index.d.ts +0 -9
- package/dist/permission/index.js +0 -231
- package/dist/permission/index.mjs +0 -15
- package/dist/permission/requestCamera.d.ts +0 -1
- package/dist/permission/requestCamera.js +0 -54
- package/dist/permission/requestCamera.mjs +0 -9
- package/dist/permission/requestDeviceOrientationControl.d.ts +0 -1
- package/dist/permission/requestDeviceOrientationControl.js +0 -206
- package/dist/permission/requestDeviceOrientationControl.mjs +0 -10
- package/dist/requestCamera-32b7dfc7.d.ts +0 -14
- package/dist/requestDeviceOrientationControl-b6458660.d.ts +0 -11
- package/dist/response/index.d.ts +0 -50
- package/dist/response/index.js +0 -97
- package/dist/response/index.mjs +0 -16
- package/dist/string/formatNumber.d.ts +0 -7
- package/dist/string/formatNumber.js +0 -56
- package/dist/string/formatNumber.mjs +0 -10
- package/dist/string/generatePassword.d.ts +0 -10
- package/dist/string/generatePassword.js +0 -55
- package/dist/string/generatePassword.mjs +0 -10
- package/dist/string/generateUUID.d.ts +0 -3
- package/dist/string/generateUUID.js +0 -40
- package/dist/string/generateUUID.mjs +0 -9
- package/dist/string/index.d.ts +0 -6
- package/dist/string/index.js +0 -316
- package/dist/string/index.mjs +0 -31
- package/dist/string/makeDaySlug.d.ts +0 -32
- package/dist/string/makeDaySlug.js +0 -47
- package/dist/string/makeDaySlug.mjs +0 -9
- package/dist/string/random.d.ts +0 -15
- package/dist/string/random.js +0 -56
- package/dist/string/random.mjs +0 -19
- package/dist/string/trimNull.d.ts +0 -3
- package/dist/string/trimNull.js +0 -49
- package/dist/string/trimNull.mjs +0 -9
- package/dist/string/url.d.ts +0 -1
- package/dist/string/url.js +0 -126
- package/dist/string/url.mjs +0 -22
- package/dist/url-60657387.d.ts +0 -57
package/dist/chunk-RDGP2CKM.mjs
DELETED
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__export
|
|
3
|
-
} from "./chunk-ZHNGZMRD.mjs";
|
|
4
|
-
|
|
5
|
-
// src/device/index.ts
|
|
6
|
-
var device_exports = {};
|
|
7
|
-
__export(device_exports, {
|
|
8
|
-
checkOS: () => checkOS,
|
|
9
|
-
isAndroid: () => isAndroid,
|
|
10
|
-
isIos: () => isIos,
|
|
11
|
-
isMobile: () => isMobile,
|
|
12
|
-
isTablet: () => isTablet
|
|
13
|
-
});
|
|
14
|
-
var isIos = () => {
|
|
15
|
-
const deviceInfo2 = checkOS();
|
|
16
|
-
if (deviceInfo2)
|
|
17
|
-
return deviceInfo2.os.toLowerCase() == "ios";
|
|
18
|
-
console.log("Can't check OS");
|
|
19
|
-
return null;
|
|
20
|
-
};
|
|
21
|
-
var isAndroid = () => {
|
|
22
|
-
const deviceInfo2 = checkOS();
|
|
23
|
-
if (deviceInfo2)
|
|
24
|
-
return deviceInfo2.os.toLowerCase() == "android";
|
|
25
|
-
console.log("Can't check OS");
|
|
26
|
-
return null;
|
|
27
|
-
};
|
|
28
|
-
var isTablet = () => {
|
|
29
|
-
if (typeof navigator == "undefined")
|
|
30
|
-
return null;
|
|
31
|
-
if (typeof window == "undefined")
|
|
32
|
-
return null;
|
|
33
|
-
return isMobile() && window.innerWidth > 599 && window.innerHeight > 599;
|
|
34
|
-
};
|
|
35
|
-
var isMobile = () => {
|
|
36
|
-
if (typeof navigator == "undefined")
|
|
37
|
-
return null;
|
|
38
|
-
if (navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/Windows Phone/i)) {
|
|
39
|
-
return true;
|
|
40
|
-
} else {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
var deviceInfo;
|
|
45
|
-
var checkOS = () => {
|
|
46
|
-
var _a;
|
|
47
|
-
if (typeof window == "undefined")
|
|
48
|
-
return {};
|
|
49
|
-
if (typeof deviceInfo == "undefined") {
|
|
50
|
-
var unknown = "-";
|
|
51
|
-
var screenSize = "";
|
|
52
|
-
if (screen.width) {
|
|
53
|
-
var width = screen.width ? screen.width : "";
|
|
54
|
-
var height = screen.height ? screen.height : "";
|
|
55
|
-
screenSize += "" + width + " x " + height;
|
|
56
|
-
}
|
|
57
|
-
var nVer = navigator.appVersion;
|
|
58
|
-
var nAgt = navigator.userAgent;
|
|
59
|
-
var browser = navigator.appName;
|
|
60
|
-
var version = "" + parseFloat(navigator.appVersion);
|
|
61
|
-
var majorVersion = parseInt(navigator.appVersion, 10);
|
|
62
|
-
var nameOffset, verOffset, ix;
|
|
63
|
-
if ((verOffset = nAgt.indexOf("Opera")) != -1) {
|
|
64
|
-
browser = "Opera";
|
|
65
|
-
version = nAgt.substring(verOffset + 6);
|
|
66
|
-
if ((verOffset = nAgt.indexOf("Version")) != -1) {
|
|
67
|
-
version = nAgt.substring(verOffset + 8);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
if ((verOffset = nAgt.indexOf("OPR")) != -1) {
|
|
71
|
-
browser = "Opera";
|
|
72
|
-
version = nAgt.substring(verOffset + 4);
|
|
73
|
-
} else if ((verOffset = nAgt.indexOf("Edge")) != -1) {
|
|
74
|
-
browser = "Microsoft Edge";
|
|
75
|
-
version = nAgt.substring(verOffset + 5);
|
|
76
|
-
} else if ((verOffset = nAgt.indexOf("MSIE")) != -1) {
|
|
77
|
-
browser = "Microsoft Internet Explorer";
|
|
78
|
-
version = nAgt.substring(verOffset + 5);
|
|
79
|
-
} else if ((verOffset = nAgt.indexOf("Chrome")) != -1) {
|
|
80
|
-
browser = "Chrome";
|
|
81
|
-
version = nAgt.substring(verOffset + 7);
|
|
82
|
-
} else if ((verOffset = nAgt.indexOf("Safari")) != -1) {
|
|
83
|
-
browser = "Safari";
|
|
84
|
-
version = nAgt.substring(verOffset + 7);
|
|
85
|
-
if ((verOffset = nAgt.indexOf("Version")) != -1) {
|
|
86
|
-
version = nAgt.substring(verOffset + 8);
|
|
87
|
-
}
|
|
88
|
-
} else if ((verOffset = nAgt.indexOf("Firefox")) != -1) {
|
|
89
|
-
browser = "Firefox";
|
|
90
|
-
version = nAgt.substring(verOffset + 8);
|
|
91
|
-
} else if (nAgt.indexOf("Trident/") != -1) {
|
|
92
|
-
browser = "Microsoft Internet Explorer";
|
|
93
|
-
version = nAgt.substring(nAgt.indexOf("rv:") + 3);
|
|
94
|
-
} else if ((nameOffset = nAgt.lastIndexOf(" ") + 1) < (verOffset = nAgt.lastIndexOf("/"))) {
|
|
95
|
-
browser = nAgt.substring(nameOffset, verOffset);
|
|
96
|
-
version = nAgt.substring(verOffset + 1);
|
|
97
|
-
if (browser.toLowerCase() == browser.toUpperCase()) {
|
|
98
|
-
browser = navigator.appName;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
if ((ix = version.indexOf(";")) != -1)
|
|
102
|
-
version = version.substring(0, ix);
|
|
103
|
-
if ((ix = version.indexOf(" ")) != -1)
|
|
104
|
-
version = version.substring(0, ix);
|
|
105
|
-
if ((ix = version.indexOf(")")) != -1)
|
|
106
|
-
version = version.substring(0, ix);
|
|
107
|
-
majorVersion = parseInt("" + version, 10);
|
|
108
|
-
if (isNaN(majorVersion)) {
|
|
109
|
-
version = "" + parseFloat(navigator.appVersion);
|
|
110
|
-
majorVersion = parseInt(navigator.appVersion, 10);
|
|
111
|
-
}
|
|
112
|
-
var mobile = /Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(nVer);
|
|
113
|
-
var cookieEnabled = navigator.cookieEnabled ? true : false;
|
|
114
|
-
if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled) {
|
|
115
|
-
document.cookie = "testcookie";
|
|
116
|
-
cookieEnabled = document.cookie.indexOf("testcookie") != -1 ? true : false;
|
|
117
|
-
}
|
|
118
|
-
var os = unknown;
|
|
119
|
-
var clientStrings = [
|
|
120
|
-
{ s: "Windows 10", r: /(Windows 10.0|Windows NT 10.0)/ },
|
|
121
|
-
{ s: "Windows 8.1", r: /(Windows 8.1|Windows NT 6.3)/ },
|
|
122
|
-
{ s: "Windows 8", r: /(Windows 8|Windows NT 6.2)/ },
|
|
123
|
-
{ s: "Windows 7", r: /(Windows 7|Windows NT 6.1)/ },
|
|
124
|
-
{ s: "Windows Vista", r: /Windows NT 6.0/ },
|
|
125
|
-
{ s: "Windows Server 2003", r: /Windows NT 5.2/ },
|
|
126
|
-
{ s: "Windows XP", r: /(Windows NT 5.1|Windows XP)/ },
|
|
127
|
-
{ s: "Windows 2000", r: /(Windows NT 5.0|Windows 2000)/ },
|
|
128
|
-
{ s: "Windows ME", r: /(Win 9x 4.90|Windows ME)/ },
|
|
129
|
-
{ s: "Windows 98", r: /(Windows 98|Win98)/ },
|
|
130
|
-
{ s: "Windows 95", r: /(Windows 95|Win95|Windows_95)/ },
|
|
131
|
-
{ s: "Windows NT 4.0", r: /(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/ },
|
|
132
|
-
{ s: "Windows CE", r: /Windows CE/ },
|
|
133
|
-
{ s: "Windows 3.11", r: /Win16/ },
|
|
134
|
-
{ s: "Android", r: /Android/ },
|
|
135
|
-
{ s: "Open BSD", r: /OpenBSD/ },
|
|
136
|
-
{ s: "Sun OS", r: /SunOS/ },
|
|
137
|
-
{ s: "Linux", r: /(Linux|X11)/ },
|
|
138
|
-
{ s: "iOS", r: /(iPhone|iPad|iPod)/ },
|
|
139
|
-
{ s: "Mac OS X", r: /Mac OS X/ },
|
|
140
|
-
{ s: "Mac OS", r: /(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/ },
|
|
141
|
-
{ s: "QNX", r: /QNX/ },
|
|
142
|
-
{ s: "UNIX", r: /UNIX/ },
|
|
143
|
-
{ s: "BeOS", r: /BeOS/ },
|
|
144
|
-
{ s: "OS/2", r: /OS\/2/ },
|
|
145
|
-
{ s: "Search Bot", r: /(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/ }
|
|
146
|
-
];
|
|
147
|
-
for (var id in clientStrings) {
|
|
148
|
-
var cs = clientStrings[id];
|
|
149
|
-
if (cs.r.test(nAgt)) {
|
|
150
|
-
os = cs.s;
|
|
151
|
-
break;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
var osVersion = unknown;
|
|
155
|
-
if (/Windows/.test(os)) {
|
|
156
|
-
const _osv = /Windows (.*)/.exec(os) || [];
|
|
157
|
-
osVersion = _osv[1] || "unknown";
|
|
158
|
-
os = "Windows";
|
|
159
|
-
}
|
|
160
|
-
switch (os) {
|
|
161
|
-
case "Mac OS X":
|
|
162
|
-
const _osvx = /Mac OS X (10[\.\_\d]+)/.exec(nAgt);
|
|
163
|
-
osVersion = (_osvx == null ? void 0 : _osvx[1]) || "unknown";
|
|
164
|
-
break;
|
|
165
|
-
case "Android":
|
|
166
|
-
osVersion = ((_a = /Android ([\.\_\d]+)/.exec(nAgt)) == null ? void 0 : _a[1]) || "unknown";
|
|
167
|
-
break;
|
|
168
|
-
case "iOS":
|
|
169
|
-
const _osVersion = /OS (\d+)_(\d+)_?(\d+)?/.exec(nVer) || [0, 0, 0];
|
|
170
|
-
osVersion = (_osVersion[1] || 0) + "." + (_osVersion[2] || 0) + "." + (_osVersion[3] || 0);
|
|
171
|
-
break;
|
|
172
|
-
}
|
|
173
|
-
const _deviceInfo = {
|
|
174
|
-
screen: screenSize,
|
|
175
|
-
browser,
|
|
176
|
-
browserVersion: version,
|
|
177
|
-
browserMajorVersion: majorVersion,
|
|
178
|
-
mobile,
|
|
179
|
-
os,
|
|
180
|
-
osVersion,
|
|
181
|
-
cookies: cookieEnabled
|
|
182
|
-
};
|
|
183
|
-
deviceInfo = _deviceInfo;
|
|
184
|
-
}
|
|
185
|
-
return deviceInfo;
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
export {
|
|
189
|
-
isIos,
|
|
190
|
-
isAndroid,
|
|
191
|
-
isTablet,
|
|
192
|
-
isMobile,
|
|
193
|
-
checkOS,
|
|
194
|
-
device_exports
|
|
195
|
-
};
|
package/dist/chunk-VFG5VU6S.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// src/math/diffDate.ts
|
|
2
|
-
function diffDate(date1, date2) {
|
|
3
|
-
date1 = date1 || new Date().toString();
|
|
4
|
-
date2 = date2 || new Date().toString();
|
|
5
|
-
return (new Date(date2).getTime() - new Date(date1).getTime()) / (24 * 60 * 60 * 1e3);
|
|
6
|
-
}
|
|
7
|
-
var diffDate_default = diffDate;
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
diffDate,
|
|
11
|
-
diffDate_default
|
|
12
|
-
};
|
package/dist/chunk-X3IMFCZG.mjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__export,
|
|
3
|
-
__require
|
|
4
|
-
} from "./chunk-ZHNGZMRD.mjs";
|
|
5
|
-
|
|
6
|
-
// src/file/createDir.ts
|
|
7
|
-
var createDir_exports = {};
|
|
8
|
-
__export(createDir_exports, {
|
|
9
|
-
createDir: () => createDir
|
|
10
|
-
});
|
|
11
|
-
var fs = __require("fs");
|
|
12
|
-
function createDir(path) {
|
|
13
|
-
if (fs.existsSync(path)) {
|
|
14
|
-
console.log("directory already exited !");
|
|
15
|
-
return true;
|
|
16
|
-
}
|
|
17
|
-
fs.mkdirSync(path, { recursive: true });
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
createDir,
|
|
22
|
-
createDir_exports
|
|
23
|
-
};
|
package/dist/chunk-ZHNGZMRD.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
3
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
4
|
-
}) : x)(function(x) {
|
|
5
|
-
if (typeof require !== "undefined")
|
|
6
|
-
return require.apply(this, arguments);
|
|
7
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
8
|
-
});
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
__require,
|
|
16
|
-
__export
|
|
17
|
-
};
|
package/dist/color.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
declare const random: (hex?: boolean) => string;
|
|
2
|
-
declare const pSBC: (p: any, c0: any, c1?: any, l?: any) => string | null;
|
|
3
|
-
declare const hexToRgb: (hex: string) => {
|
|
4
|
-
r: number;
|
|
5
|
-
g: number;
|
|
6
|
-
b: number;
|
|
7
|
-
} | null;
|
|
8
|
-
declare const hexDarken: (hex: string, amount: number) => string | null;
|
|
9
|
-
declare const hexLighten: (hex: string, amount: number) => string | null;
|
|
10
|
-
declare const RGBToHex: (rgb: string | any) => string | null;
|
|
11
|
-
declare const color: {
|
|
12
|
-
random: (hex?: boolean) => string;
|
|
13
|
-
pSBC: (p: any, c0: any, c1?: any, l?: any) => string | null;
|
|
14
|
-
hexToRgb: (hex: string) => {
|
|
15
|
-
r: number;
|
|
16
|
-
g: number;
|
|
17
|
-
b: number;
|
|
18
|
-
} | null;
|
|
19
|
-
hexDarken: (hex: string, amount: number) => string | null;
|
|
20
|
-
hexLighten: (hex: string, amount: number) => string | null;
|
|
21
|
-
RGBToHex: (rgb: string | any) => string | null;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export { RGBToHex, color as default, hexDarken, hexLighten, hexToRgb, pSBC, random };
|
package/dist/color.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/color.ts
|
|
21
|
-
var color_exports = {};
|
|
22
|
-
__export(color_exports, {
|
|
23
|
-
RGBToHex: () => RGBToHex,
|
|
24
|
-
default: () => color_default,
|
|
25
|
-
hexDarken: () => hexDarken,
|
|
26
|
-
hexLighten: () => hexLighten,
|
|
27
|
-
hexToRgb: () => hexToRgb,
|
|
28
|
-
pSBC: () => pSBC,
|
|
29
|
-
random: () => random
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(color_exports);
|
|
32
|
-
var random = (hex = false) => {
|
|
33
|
-
return (hex ? "#" : "") + Math.floor(Math.random() * 16777215).toString(16);
|
|
34
|
-
};
|
|
35
|
-
var pSBC = (p, c0, c1, l) => {
|
|
36
|
-
let r, g, b, P, f, t, h, i = parseInt, m = Math.round, a = typeof c1 == "string";
|
|
37
|
-
if (typeof p != "number" || p < -1 || p > 1 || typeof c0 != "string" || c0[0] != "r" && c0[0] != "#" || c1 && !a)
|
|
38
|
-
return null;
|
|
39
|
-
const pSBCr = (d) => {
|
|
40
|
-
let n = d.length, x = { r: 0, g: 0, b: 0, a: 1 };
|
|
41
|
-
if (n > 9) {
|
|
42
|
-
[r, g, b, a] = d = d.split(","), n = d.length;
|
|
43
|
-
if (n < 3 || n > 4)
|
|
44
|
-
return null;
|
|
45
|
-
x.r = i(r[3] == "a" ? r.slice(5) : r.slice(4)), x.g = i(g), x.b = i(b), x.a = a ? parseFloat(a.toString()) : -1;
|
|
46
|
-
} else {
|
|
47
|
-
if (n == 8 || n == 6 || n < 4)
|
|
48
|
-
return null;
|
|
49
|
-
if (n < 6)
|
|
50
|
-
d = "#" + d[1] + d[1] + d[2] + d[2] + d[3] + d[3] + (n > 4 ? d[4] + d[4] : "");
|
|
51
|
-
d = i(d.slice(1), 16);
|
|
52
|
-
if (n == 9 || n == 5)
|
|
53
|
-
x.r = d >> 24 & 255, x.g = d >> 16 & 255, x.b = d >> 8 & 255, x.a = m((d & 255) / 0.255) / 1e3;
|
|
54
|
-
else
|
|
55
|
-
x.r = d >> 16, x.g = d >> 8 & 255, x.b = d & 255, x.a = -1;
|
|
56
|
-
}
|
|
57
|
-
return x;
|
|
58
|
-
};
|
|
59
|
-
h = c0.length > 9, h = a ? c1.length > 9 ? true : c1 == "c" ? !h : false : h, f = pSBCr(c0), P = p < 0, t = c1 && c1 != "c" ? pSBCr(c1) : P ? { r: 0, g: 0, b: 0, a: -1 } : { r: 255, g: 255, b: 255, a: -1 }, p = P ? p * -1 : p, P = 1 - p;
|
|
60
|
-
if (!f || !t || typeof f == "undefined")
|
|
61
|
-
return null;
|
|
62
|
-
else if (l)
|
|
63
|
-
r = m(P * f.r + p * t.r), g = m(P * f.g + p * t.g), b = m(P * f.b + p * t.b);
|
|
64
|
-
else
|
|
65
|
-
r = m((P * f.r ** 2 + p * t.r ** 2) ** 0.5), g = m((P * f.g ** 2 + p * t.g ** 2) ** 0.5), b = m((P * f.b ** 2 + p * t.b ** 2) ** 0.5);
|
|
66
|
-
a = f.a, t = t.a, f = a >= 0 || t >= 0, a = f ? a < 0 ? t : t < 0 ? a : a * P + t * p : 0;
|
|
67
|
-
if (h)
|
|
68
|
-
return "rgb" + (f ? "a(" : "(") + r + "," + g + "," + b + (f ? "," + m(a * 1e3) / 1e3 : "") + ")";
|
|
69
|
-
else
|
|
70
|
-
return "#" + (4294967296 + r * 16777216 + g * 65536 + b * 256 + (f ? m(a * 255) : 0)).toString(16).slice(1, f ? void 0 : -2);
|
|
71
|
-
};
|
|
72
|
-
var hexToRgb = (hex) => {
|
|
73
|
-
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
74
|
-
return result ? {
|
|
75
|
-
r: parseInt(result[1], 16),
|
|
76
|
-
g: parseInt(result[2], 16),
|
|
77
|
-
b: parseInt(result[3], 16)
|
|
78
|
-
} : null;
|
|
79
|
-
};
|
|
80
|
-
var hexDarken = (hex, amount) => {
|
|
81
|
-
return pSBC(-amount, hex);
|
|
82
|
-
};
|
|
83
|
-
var hexLighten = (hex, amount) => {
|
|
84
|
-
return pSBC(amount, hex);
|
|
85
|
-
};
|
|
86
|
-
var RGBToHex = (rgb) => {
|
|
87
|
-
return pSBC(0, rgb, "c", true);
|
|
88
|
-
};
|
|
89
|
-
var color = {
|
|
90
|
-
random,
|
|
91
|
-
pSBC,
|
|
92
|
-
hexToRgb,
|
|
93
|
-
hexDarken,
|
|
94
|
-
hexLighten,
|
|
95
|
-
RGBToHex
|
|
96
|
-
};
|
|
97
|
-
var color_default = color;
|
|
98
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
99
|
-
0 && (module.exports = {
|
|
100
|
-
RGBToHex,
|
|
101
|
-
hexDarken,
|
|
102
|
-
hexLighten,
|
|
103
|
-
hexToRgb,
|
|
104
|
-
pSBC,
|
|
105
|
-
random
|
|
106
|
-
});
|
package/dist/color.mjs
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import "./chunk-ZHNGZMRD.mjs";
|
|
2
|
-
|
|
3
|
-
// src/color.ts
|
|
4
|
-
var random = (hex = false) => {
|
|
5
|
-
return (hex ? "#" : "") + Math.floor(Math.random() * 16777215).toString(16);
|
|
6
|
-
};
|
|
7
|
-
var pSBC = (p, c0, c1, l) => {
|
|
8
|
-
let r, g, b, P, f, t, h, i = parseInt, m = Math.round, a = typeof c1 == "string";
|
|
9
|
-
if (typeof p != "number" || p < -1 || p > 1 || typeof c0 != "string" || c0[0] != "r" && c0[0] != "#" || c1 && !a)
|
|
10
|
-
return null;
|
|
11
|
-
const pSBCr = (d) => {
|
|
12
|
-
let n = d.length, x = { r: 0, g: 0, b: 0, a: 1 };
|
|
13
|
-
if (n > 9) {
|
|
14
|
-
[r, g, b, a] = d = d.split(","), n = d.length;
|
|
15
|
-
if (n < 3 || n > 4)
|
|
16
|
-
return null;
|
|
17
|
-
x.r = i(r[3] == "a" ? r.slice(5) : r.slice(4)), x.g = i(g), x.b = i(b), x.a = a ? parseFloat(a.toString()) : -1;
|
|
18
|
-
} else {
|
|
19
|
-
if (n == 8 || n == 6 || n < 4)
|
|
20
|
-
return null;
|
|
21
|
-
if (n < 6)
|
|
22
|
-
d = "#" + d[1] + d[1] + d[2] + d[2] + d[3] + d[3] + (n > 4 ? d[4] + d[4] : "");
|
|
23
|
-
d = i(d.slice(1), 16);
|
|
24
|
-
if (n == 9 || n == 5)
|
|
25
|
-
x.r = d >> 24 & 255, x.g = d >> 16 & 255, x.b = d >> 8 & 255, x.a = m((d & 255) / 0.255) / 1e3;
|
|
26
|
-
else
|
|
27
|
-
x.r = d >> 16, x.g = d >> 8 & 255, x.b = d & 255, x.a = -1;
|
|
28
|
-
}
|
|
29
|
-
return x;
|
|
30
|
-
};
|
|
31
|
-
h = c0.length > 9, h = a ? c1.length > 9 ? true : c1 == "c" ? !h : false : h, f = pSBCr(c0), P = p < 0, t = c1 && c1 != "c" ? pSBCr(c1) : P ? { r: 0, g: 0, b: 0, a: -1 } : { r: 255, g: 255, b: 255, a: -1 }, p = P ? p * -1 : p, P = 1 - p;
|
|
32
|
-
if (!f || !t || typeof f == "undefined")
|
|
33
|
-
return null;
|
|
34
|
-
else if (l)
|
|
35
|
-
r = m(P * f.r + p * t.r), g = m(P * f.g + p * t.g), b = m(P * f.b + p * t.b);
|
|
36
|
-
else
|
|
37
|
-
r = m((P * f.r ** 2 + p * t.r ** 2) ** 0.5), g = m((P * f.g ** 2 + p * t.g ** 2) ** 0.5), b = m((P * f.b ** 2 + p * t.b ** 2) ** 0.5);
|
|
38
|
-
a = f.a, t = t.a, f = a >= 0 || t >= 0, a = f ? a < 0 ? t : t < 0 ? a : a * P + t * p : 0;
|
|
39
|
-
if (h)
|
|
40
|
-
return "rgb" + (f ? "a(" : "(") + r + "," + g + "," + b + (f ? "," + m(a * 1e3) / 1e3 : "") + ")";
|
|
41
|
-
else
|
|
42
|
-
return "#" + (4294967296 + r * 16777216 + g * 65536 + b * 256 + (f ? m(a * 255) : 0)).toString(16).slice(1, f ? void 0 : -2);
|
|
43
|
-
};
|
|
44
|
-
var hexToRgb = (hex) => {
|
|
45
|
-
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
46
|
-
return result ? {
|
|
47
|
-
r: parseInt(result[1], 16),
|
|
48
|
-
g: parseInt(result[2], 16),
|
|
49
|
-
b: parseInt(result[3], 16)
|
|
50
|
-
} : null;
|
|
51
|
-
};
|
|
52
|
-
var hexDarken = (hex, amount) => {
|
|
53
|
-
return pSBC(-amount, hex);
|
|
54
|
-
};
|
|
55
|
-
var hexLighten = (hex, amount) => {
|
|
56
|
-
return pSBC(amount, hex);
|
|
57
|
-
};
|
|
58
|
-
var RGBToHex = (rgb) => {
|
|
59
|
-
return pSBC(0, rgb, "c", true);
|
|
60
|
-
};
|
|
61
|
-
var color = {
|
|
62
|
-
random,
|
|
63
|
-
pSBC,
|
|
64
|
-
hexToRgb,
|
|
65
|
-
hexDarken,
|
|
66
|
-
hexLighten,
|
|
67
|
-
RGBToHex
|
|
68
|
-
};
|
|
69
|
-
var color_default = color;
|
|
70
|
-
export {
|
|
71
|
-
RGBToHex,
|
|
72
|
-
color_default as default,
|
|
73
|
-
hexDarken,
|
|
74
|
-
hexLighten,
|
|
75
|
-
hexToRgb,
|
|
76
|
-
pSBC,
|
|
77
|
-
random
|
|
78
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { a as default, a as enableConsole } from '../enableConsole-ddc24282.js';
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
-
mod
|
|
23
|
-
));
|
|
24
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
-
|
|
26
|
-
// src/console/enableConsole.ts
|
|
27
|
-
var enableConsole_exports = {};
|
|
28
|
-
__export(enableConsole_exports, {
|
|
29
|
-
default: () => enableConsole_default,
|
|
30
|
-
enableConsole: () => enableConsole
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(enableConsole_exports);
|
|
33
|
-
var import_cloneDeep = __toESM(require("lodash/cloneDeep"));
|
|
34
|
-
var _console = (0, import_cloneDeep.default)(console);
|
|
35
|
-
function enableConsole() {
|
|
36
|
-
return _console;
|
|
37
|
-
}
|
|
38
|
-
var enableConsole_default = enableConsole;
|
|
39
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
-
0 && (module.exports = {
|
|
41
|
-
enableConsole
|
|
42
|
-
});
|
package/dist/console/index.d.ts
DELETED
package/dist/console/index.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
-
mod
|
|
23
|
-
));
|
|
24
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
-
|
|
26
|
-
// src/console/index.ts
|
|
27
|
-
var console_exports = {};
|
|
28
|
-
__export(console_exports, {
|
|
29
|
-
default: () => console_default,
|
|
30
|
-
disableConsole: () => disableConsole,
|
|
31
|
-
removeConsole: () => removeConsole,
|
|
32
|
-
showCredit: () => showCredit
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(console_exports);
|
|
35
|
-
|
|
36
|
-
// src/console/enableConsole.ts
|
|
37
|
-
var import_cloneDeep = __toESM(require("lodash/cloneDeep"));
|
|
38
|
-
var _console = (0, import_cloneDeep.default)(console);
|
|
39
|
-
function enableConsole() {
|
|
40
|
-
return _console;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// src/console/index.ts
|
|
44
|
-
var disableConsole = (params) => {
|
|
45
|
-
for (var key in console) {
|
|
46
|
-
console[key] = function() {
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
var removeConsole = disableConsole;
|
|
51
|
-
var showCredit = (params) => {
|
|
52
|
-
console.log("Developed by Digitop | https://www.wearetopgroup.com/?utm_src=console");
|
|
53
|
-
};
|
|
54
|
-
var xconsole = { enableConsole, disableConsole, removeConsole, showCredit };
|
|
55
|
-
var console_default = xconsole;
|
|
56
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
-
0 && (module.exports = {
|
|
58
|
-
disableConsole,
|
|
59
|
-
removeConsole,
|
|
60
|
-
showCredit
|
|
61
|
-
});
|
package/dist/console/index.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
console_default,
|
|
3
|
-
disableConsole,
|
|
4
|
-
removeConsole,
|
|
5
|
-
showCredit
|
|
6
|
-
} from "../chunk-O64XUDAH.mjs";
|
|
7
|
-
import "../chunk-FJXSVGL7.mjs";
|
|
8
|
-
import "../chunk-ZHNGZMRD.mjs";
|
|
9
|
-
export {
|
|
10
|
-
console_default as default,
|
|
11
|
-
disableConsole,
|
|
12
|
-
removeConsole,
|
|
13
|
-
showCredit
|
|
14
|
-
};
|
package/dist/console/log.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare const log: (...msg: any) => any;
|
|
2
|
-
declare const logFull: (data?: {}) => {};
|
|
3
|
-
declare const logRes: (res: any, ...msg: any[]) => any[];
|
|
4
|
-
declare const logError: (...msg: any[]) => any[];
|
|
5
|
-
declare const logWarn: (...msg: any[]) => any[];
|
|
6
|
-
declare const logSuccess: (...msg: any[]) => any[];
|
|
7
|
-
declare const xlog: {
|
|
8
|
-
log: (...msg: any) => any;
|
|
9
|
-
logFull: (data?: {}) => {};
|
|
10
|
-
logRes: (res: any, ...msg: any[]) => any[];
|
|
11
|
-
logError: (...msg: any[]) => any[];
|
|
12
|
-
logWarn: (...msg: any[]) => any[];
|
|
13
|
-
logSuccess: (...msg: any[]) => any[];
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export { xlog as default, log, logError, logFull, logRes, logSuccess, logWarn };
|