@fangzhongya/utils 0.0.65 → 0.0.67
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/basic/index.cjs +21 -21
- package/dist/basic/index.js +20 -20
- package/dist/basic/object/deepCopy.cjs +2 -2
- package/dist/basic/object/deepCopy.d.cts +1 -3
- package/dist/basic/object/deepCopy.d.ts +1 -3
- package/dist/basic/object/deepCopy.js +1 -1
- package/dist/basic/object/index.cjs +13 -13
- package/dist/basic/object/index.js +18 -18
- package/dist/basic/string/index.cjs +10 -10
- package/dist/basic/string/index.js +12 -12
- package/dist/basic/string/toJsons.cjs +3 -3
- package/dist/basic/string/toJsons.js +2 -2
- package/dist/chunk-2HQDHQFP.cjs +299 -0
- package/dist/{chunk-F4E66MPZ.js → chunk-5S7QXY2L.js} +4 -4
- package/dist/{chunk-X44UO4CZ.js → chunk-7VGVDOZH.js} +12 -12
- package/dist/{chunk-MZLWYQQH.js → chunk-BBL7TBP6.js} +22 -6
- package/dist/{chunk-TV763MO4.cjs → chunk-BKOSCF7N.cjs} +4 -4
- package/dist/chunk-BRIQCC74.js +28 -0
- package/dist/{chunk-FL2HPQ66.cjs → chunk-J2WRN55J.cjs} +6 -6
- package/dist/chunk-LJVOVGGV.js +299 -0
- package/dist/{chunk-72GMBSE6.cjs → chunk-SD6NUAET.cjs} +18 -2
- package/dist/{chunk-CGDNKEYI.js → chunk-SMAXQU2I.js} +10 -10
- package/dist/{chunk-XLYPGPDB.cjs → chunk-UUMPCJJ2.cjs} +11 -11
- package/dist/{chunk-7M7ORCKS.js → chunk-XM4WSZJV.js} +17 -17
- package/dist/chunk-YTSFTRYZ.cjs +28 -0
- package/dist/{chunk-KZCLX66D.cjs → chunk-Z2QP5DBD.cjs} +12 -12
- package/dist/css/index.cjs +4 -4
- package/dist/css/index.js +4 -4
- package/dist/date/index.cjs +4 -4
- package/dist/date/index.js +4 -4
- package/dist/dom/index.cjs +3 -3
- package/dist/dom/index.js +4 -4
- package/dist/html/index.cjs +6 -6
- package/dist/html/index.js +6 -6
- package/dist/index-B8ZJILol.d.cts +30 -0
- package/dist/index-DGgeqhym.d.ts +30 -0
- package/dist/index.cjs +62 -61
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +64 -63
- package/dist/judge/index.cjs +7 -7
- package/dist/judge/index.js +13 -13
- package/dist/judge/matchs.cjs +3 -3
- package/dist/judge/matchs.js +2 -2
- package/dist/window/index.cjs +19 -3
- package/dist/window/index.d.cts +1 -0
- package/dist/window/index.d.ts +1 -0
- package/dist/window/index.js +23 -7
- package/dist/window/storage.cjs +19 -0
- package/dist/window/storage.d.cts +37 -0
- package/dist/window/storage.d.ts +37 -0
- package/dist/window/storage.js +19 -0
- package/package.json +6 -1
- package/dist/chunk-PBQPPZ4V.cjs +0 -23
- package/dist/chunk-SD2RWG3L.js +0 -23
- package/dist/index-9-f0oXM3.d.ts +0 -22
- package/dist/index-_GH04n6g.d.cts +0 -22
- package/dist/{chunk-TKE7IK2M.cjs → chunk-3QB3GKVL.cjs} +2 -2
- package/dist/{chunk-H22VVRP6.js → chunk-5VGZQLUQ.js} +3 -3
- package/dist/{chunk-4JXZQBCA.js → chunk-EJZIISBA.js} +3 -3
- package/dist/{chunk-Z3BZ5W5W.js → chunk-GPFPHJRZ.js} +3 -3
- package/dist/{chunk-5SOPYS7L.cjs → chunk-JI6PHVDX.cjs} +3 -3
- package/dist/{chunk-ZUIHJQD6.cjs → chunk-PKFURLQT.cjs} +2 -2
- package/dist/{chunk-FLGYKRQ6.cjs → chunk-QN6KZWKM.cjs} +3 -3
- package/dist/{chunk-M7CA6X7T.js → chunk-RGBFHCCJ.js} +3 -3
- package/dist/{chunk-3YUI42XN.cjs → chunk-T22I7TJQ.cjs} +3 -3
- package/dist/{chunk-33X65PQS.js → chunk-T2QKEABG.js} +3 -3
- package/dist/{chunk-ZADO6V3Z.js → chunk-VJKUTNCV.js} +3 -3
- package/dist/{chunk-XDTLZL44.cjs → chunk-YHM42KJI.cjs} +3 -3
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
// packages/window/storage.ts
|
|
2
|
+
var STORAGE = "fang-storage";
|
|
3
|
+
function getKey(key, config = {}) {
|
|
4
|
+
const { prefix, isCom = false } = config;
|
|
5
|
+
if (prefix) {
|
|
6
|
+
return `${prefix}.${key}`;
|
|
7
|
+
}
|
|
8
|
+
return isCom ? key : `${STORAGE}.${key}`;
|
|
9
|
+
}
|
|
10
|
+
function simpleEncrypt(data) {
|
|
11
|
+
return btoa(encodeURIComponent(data));
|
|
12
|
+
}
|
|
13
|
+
function simpleDecrypt(encrypted) {
|
|
14
|
+
try {
|
|
15
|
+
return decodeURIComponent(atob(encrypted));
|
|
16
|
+
} catch {
|
|
17
|
+
return "";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function isExpired(expires) {
|
|
21
|
+
if (!expires) return false;
|
|
22
|
+
return Date.now() > expires;
|
|
23
|
+
}
|
|
24
|
+
function normalizeConfig(config) {
|
|
25
|
+
return {
|
|
26
|
+
isCom: false,
|
|
27
|
+
...config
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function setLocal(key, value = "", config = {}) {
|
|
31
|
+
try {
|
|
32
|
+
if (value === void 0 || value === null) value = "";
|
|
33
|
+
const normalizedConfig = normalizeConfig(config);
|
|
34
|
+
const storedData = {
|
|
35
|
+
value,
|
|
36
|
+
config: void 0
|
|
37
|
+
};
|
|
38
|
+
if (Object.keys(normalizedConfig).length > 0) {
|
|
39
|
+
storedData.config = {};
|
|
40
|
+
if (normalizedConfig.expires) {
|
|
41
|
+
let expires;
|
|
42
|
+
if (typeof normalizedConfig.expires === "string") {
|
|
43
|
+
expires = new Date(normalizedConfig.expires).getTime();
|
|
44
|
+
} else {
|
|
45
|
+
expires = Date.now() + normalizedConfig.expires;
|
|
46
|
+
}
|
|
47
|
+
storedData.config.expires = expires;
|
|
48
|
+
}
|
|
49
|
+
if (normalizedConfig.once !== void 0) {
|
|
50
|
+
storedData.config.once = normalizedConfig.once;
|
|
51
|
+
}
|
|
52
|
+
if (normalizedConfig.encrypt !== void 0) {
|
|
53
|
+
storedData.config.encrypt = normalizedConfig.encrypt;
|
|
54
|
+
}
|
|
55
|
+
if (normalizedConfig.isCom !== void 0) {
|
|
56
|
+
storedData.config.isCom = normalizedConfig.isCom;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
let dataToStore = JSON.stringify(storedData);
|
|
60
|
+
if (storedData.config?.encrypt) {
|
|
61
|
+
dataToStore = simpleEncrypt(dataToStore);
|
|
62
|
+
}
|
|
63
|
+
localStorage.setItem(getKey(key, normalizedConfig), dataToStore);
|
|
64
|
+
return true;
|
|
65
|
+
} catch (error) {
|
|
66
|
+
console.error("\u5B58\u50A8\u6570\u636E\u5931\u8D25:", error);
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function getLocal(key, config = {}) {
|
|
71
|
+
try {
|
|
72
|
+
const normalizedConfig = normalizeConfig(config);
|
|
73
|
+
const storageKey = getKey(key, normalizedConfig);
|
|
74
|
+
let storedItem = localStorage.getItem(storageKey);
|
|
75
|
+
if (!storedItem || storedItem === "null" || storedItem === "undefined") {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
let parsedData;
|
|
79
|
+
try {
|
|
80
|
+
parsedData = JSON.parse(storedItem);
|
|
81
|
+
} catch {
|
|
82
|
+
const decrypted = simpleDecrypt(storedItem);
|
|
83
|
+
if (!decrypted) return null;
|
|
84
|
+
parsedData = JSON.parse(decrypted);
|
|
85
|
+
}
|
|
86
|
+
if (parsedData.config?.expires && isExpired(parsedData.config.expires)) {
|
|
87
|
+
localStorage.removeItem(storageKey);
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
if (parsedData.config?.once) {
|
|
91
|
+
localStorage.removeItem(storageKey);
|
|
92
|
+
}
|
|
93
|
+
return parsedData.value;
|
|
94
|
+
} catch (error) {
|
|
95
|
+
console.error("\u83B7\u53D6\u6570\u636E\u5931\u8D25:", error);
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function clearLocal(key, config = {}) {
|
|
100
|
+
try {
|
|
101
|
+
const normalizedConfig = normalizeConfig(config);
|
|
102
|
+
if (key) {
|
|
103
|
+
localStorage.removeItem(getKey(key, normalizedConfig));
|
|
104
|
+
} else {
|
|
105
|
+
if (normalizedConfig.prefix) {
|
|
106
|
+
const prefixKey = getKey("", normalizedConfig).replace(
|
|
107
|
+
/\.$/,
|
|
108
|
+
""
|
|
109
|
+
);
|
|
110
|
+
const keysToRemove = [];
|
|
111
|
+
for (let i = 0; i < localStorage.length; i++) {
|
|
112
|
+
const storageKey = localStorage.key(i);
|
|
113
|
+
if (storageKey && storageKey.startsWith(prefixKey + ".")) {
|
|
114
|
+
keysToRemove.push(storageKey);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
keysToRemove.forEach((k) => localStorage.removeItem(k));
|
|
118
|
+
} else if (normalizedConfig.isCom) {
|
|
119
|
+
localStorage.clear();
|
|
120
|
+
} else {
|
|
121
|
+
const keysToRemove = [];
|
|
122
|
+
const privatePrefix = `${STORAGE}.`;
|
|
123
|
+
for (let i = 0; i < localStorage.length; i++) {
|
|
124
|
+
const storageKey = localStorage.key(i);
|
|
125
|
+
if (storageKey && storageKey.startsWith(privatePrefix)) {
|
|
126
|
+
keysToRemove.push(storageKey);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
keysToRemove.forEach((k) => localStorage.removeItem(k));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return true;
|
|
133
|
+
} catch (error) {
|
|
134
|
+
console.error("\u6E05\u9664\u6570\u636E\u5931\u8D25:", error);
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function setSession(key, value = "", config = {}) {
|
|
139
|
+
try {
|
|
140
|
+
if (value === void 0 || value === null) value = "";
|
|
141
|
+
const normalizedConfig = normalizeConfig(config);
|
|
142
|
+
const storedData = {
|
|
143
|
+
value,
|
|
144
|
+
config: void 0
|
|
145
|
+
};
|
|
146
|
+
if (Object.keys(normalizedConfig).length > 0) {
|
|
147
|
+
storedData.config = {};
|
|
148
|
+
if (normalizedConfig.expires) {
|
|
149
|
+
let expires;
|
|
150
|
+
if (typeof normalizedConfig.expires === "string") {
|
|
151
|
+
expires = new Date(normalizedConfig.expires).getTime();
|
|
152
|
+
} else {
|
|
153
|
+
expires = Date.now() + normalizedConfig.expires;
|
|
154
|
+
}
|
|
155
|
+
storedData.config.expires = expires;
|
|
156
|
+
}
|
|
157
|
+
if (normalizedConfig.once !== void 0) {
|
|
158
|
+
storedData.config.once = normalizedConfig.once;
|
|
159
|
+
}
|
|
160
|
+
if (normalizedConfig.encrypt !== void 0) {
|
|
161
|
+
storedData.config.encrypt = normalizedConfig.encrypt;
|
|
162
|
+
}
|
|
163
|
+
if (normalizedConfig.isCom !== void 0) {
|
|
164
|
+
storedData.config.isCom = normalizedConfig.isCom;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
let dataToStore = JSON.stringify(storedData);
|
|
168
|
+
if (storedData.config?.encrypt) {
|
|
169
|
+
dataToStore = simpleEncrypt(dataToStore);
|
|
170
|
+
}
|
|
171
|
+
sessionStorage.setItem(getKey(key, normalizedConfig), dataToStore);
|
|
172
|
+
return true;
|
|
173
|
+
} catch (error) {
|
|
174
|
+
console.error("\u4F1A\u8BDD\u5B58\u50A8\u6570\u636E\u5931\u8D25:", error);
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
function getSession(key, config = {}) {
|
|
179
|
+
try {
|
|
180
|
+
const normalizedConfig = normalizeConfig(config);
|
|
181
|
+
const storageKey = getKey(key, normalizedConfig);
|
|
182
|
+
let storedItem = sessionStorage.getItem(storageKey);
|
|
183
|
+
if (!storedItem || storedItem === "null" || storedItem === "undefined") {
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
let parsedData;
|
|
187
|
+
try {
|
|
188
|
+
parsedData = JSON.parse(storedItem);
|
|
189
|
+
} catch {
|
|
190
|
+
const decrypted = simpleDecrypt(storedItem);
|
|
191
|
+
if (!decrypted) return null;
|
|
192
|
+
parsedData = JSON.parse(decrypted);
|
|
193
|
+
}
|
|
194
|
+
if (parsedData.config?.expires && isExpired(parsedData.config.expires)) {
|
|
195
|
+
sessionStorage.removeItem(storageKey);
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
if (parsedData.config?.once) {
|
|
199
|
+
sessionStorage.removeItem(storageKey);
|
|
200
|
+
}
|
|
201
|
+
return parsedData.value;
|
|
202
|
+
} catch (error) {
|
|
203
|
+
console.error("\u83B7\u53D6\u4F1A\u8BDD\u6570\u636E\u5931\u8D25:", error);
|
|
204
|
+
return null;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function clearSession(key, config = {}) {
|
|
208
|
+
try {
|
|
209
|
+
const normalizedConfig = normalizeConfig(config);
|
|
210
|
+
if (key) {
|
|
211
|
+
sessionStorage.removeItem(getKey(key, normalizedConfig));
|
|
212
|
+
} else {
|
|
213
|
+
if (normalizedConfig.prefix) {
|
|
214
|
+
const prefixKey = getKey("", normalizedConfig).replace(
|
|
215
|
+
/\.$/,
|
|
216
|
+
""
|
|
217
|
+
);
|
|
218
|
+
const keysToRemove = [];
|
|
219
|
+
for (let i = 0; i < sessionStorage.length; i++) {
|
|
220
|
+
const storageKey = sessionStorage.key(i);
|
|
221
|
+
if (storageKey && storageKey.startsWith(prefixKey + ".")) {
|
|
222
|
+
keysToRemove.push(storageKey);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
keysToRemove.forEach((k) => sessionStorage.removeItem(k));
|
|
226
|
+
} else if (normalizedConfig.isCom) {
|
|
227
|
+
sessionStorage.clear();
|
|
228
|
+
} else {
|
|
229
|
+
const keysToRemove = [];
|
|
230
|
+
const privatePrefix = `${STORAGE}.`;
|
|
231
|
+
for (let i = 0; i < sessionStorage.length; i++) {
|
|
232
|
+
const storageKey = sessionStorage.key(i);
|
|
233
|
+
if (storageKey && storageKey.startsWith(privatePrefix)) {
|
|
234
|
+
keysToRemove.push(storageKey);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
keysToRemove.forEach((k) => sessionStorage.removeItem(k));
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return true;
|
|
241
|
+
} catch (error) {
|
|
242
|
+
console.error("\u6E05\u9664\u4F1A\u8BDD\u6570\u636E\u5931\u8D25:", error);
|
|
243
|
+
return false;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
function cleanupExpired() {
|
|
247
|
+
for (let i = 0; i < localStorage.length; i++) {
|
|
248
|
+
const key = localStorage.key(i);
|
|
249
|
+
if (key) {
|
|
250
|
+
try {
|
|
251
|
+
const item = localStorage.getItem(key);
|
|
252
|
+
if (item) {
|
|
253
|
+
let parsedData;
|
|
254
|
+
try {
|
|
255
|
+
parsedData = JSON.parse(item);
|
|
256
|
+
} catch {
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
if (parsedData.config?.expires && isExpired(parsedData.config.expires)) {
|
|
260
|
+
localStorage.removeItem(key);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
} catch (error) {
|
|
264
|
+
console.error(`\u6E05\u7406\u8FC7\u671F\u6570\u636E\u5931\u8D25 (key: ${key}):`, error);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
for (let i = 0; i < sessionStorage.length; i++) {
|
|
269
|
+
const key = sessionStorage.key(i);
|
|
270
|
+
if (key) {
|
|
271
|
+
try {
|
|
272
|
+
const item = sessionStorage.getItem(key);
|
|
273
|
+
if (item) {
|
|
274
|
+
let parsedData;
|
|
275
|
+
try {
|
|
276
|
+
parsedData = JSON.parse(item);
|
|
277
|
+
} catch {
|
|
278
|
+
continue;
|
|
279
|
+
}
|
|
280
|
+
if (parsedData.config?.expires && isExpired(parsedData.config.expires)) {
|
|
281
|
+
sessionStorage.removeItem(key);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
} catch (error) {
|
|
285
|
+
console.error(`\u6E05\u7406\u4F1A\u8BDD\u8FC7\u671F\u6570\u636E\u5931\u8D25 (key: ${key}):`, error);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export {
|
|
292
|
+
setLocal,
|
|
293
|
+
getLocal,
|
|
294
|
+
clearLocal,
|
|
295
|
+
setSession,
|
|
296
|
+
getSession,
|
|
297
|
+
clearSession,
|
|
298
|
+
cleanupExpired
|
|
299
|
+
};
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunk2HQDHQFPcjs = require('./chunk-2HQDHQFP.cjs');
|
|
7
10
|
|
|
8
11
|
|
|
9
12
|
var _chunkVYOTXPMMcjs = require('./chunk-VYOTXPMM.cjs');
|
|
@@ -19,11 +22,20 @@ var _chunkVYOTXPMMcjs = require('./chunk-VYOTXPMM.cjs');
|
|
|
19
22
|
var _chunkPW76Z25Dcjs = require('./chunk-PW76Z25D.cjs');
|
|
20
23
|
|
|
21
24
|
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
var _chunkZRO5GHYVcjs = require('./chunk-ZRO5GHYV.cjs');
|
|
29
|
+
|
|
30
|
+
|
|
22
31
|
var _chunk75ZPJI57cjs = require('./chunk-75ZPJI57.cjs');
|
|
23
32
|
|
|
24
33
|
// packages/window/index.ts
|
|
25
34
|
var window_exports = {};
|
|
26
35
|
_chunk75ZPJI57cjs.__export.call(void 0, window_exports, {
|
|
36
|
+
cleanupExpired: () => _chunk2HQDHQFPcjs.cleanupExpired,
|
|
37
|
+
clearLocal: () => _chunk2HQDHQFPcjs.clearLocal,
|
|
38
|
+
clearSession: () => _chunk2HQDHQFPcjs.clearSession,
|
|
27
39
|
copy: () => _chunkVYOTXPMMcjs.copy,
|
|
28
40
|
downloadCSV: () => _chunkPW76Z25Dcjs.downloadCSV,
|
|
29
41
|
downloadFile: () => _chunkPW76Z25Dcjs.downloadFile,
|
|
@@ -34,9 +46,13 @@ _chunk75ZPJI57cjs.__export.call(void 0, window_exports, {
|
|
|
34
46
|
downloadText: () => _chunkPW76Z25Dcjs.downloadText,
|
|
35
47
|
downloadViaAJAX: () => _chunkPW76Z25Dcjs.downloadViaAJAX,
|
|
36
48
|
getAllParams: () => _chunkZRO5GHYVcjs.getAllParams,
|
|
49
|
+
getLocal: () => _chunk2HQDHQFPcjs.getLocal,
|
|
37
50
|
getParam: () => _chunkZRO5GHYVcjs.getParam,
|
|
51
|
+
getSession: () => _chunk2HQDHQFPcjs.getSession,
|
|
38
52
|
getUrlParam: () => _chunkZRO5GHYVcjs.getUrlParam,
|
|
39
|
-
getUrlParams: () => _chunkZRO5GHYVcjs.getUrlParams
|
|
53
|
+
getUrlParams: () => _chunkZRO5GHYVcjs.getUrlParams,
|
|
54
|
+
setLocal: () => _chunk2HQDHQFPcjs.setLocal,
|
|
55
|
+
setSession: () => _chunk2HQDHQFPcjs.setSession
|
|
40
56
|
});
|
|
41
57
|
|
|
42
58
|
|
|
@@ -11,10 +11,19 @@ import {
|
|
|
11
11
|
serializeFunctionRef,
|
|
12
12
|
toJSONSParse,
|
|
13
13
|
toJSONSStringify
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VJKUTNCV.js";
|
|
15
15
|
import {
|
|
16
16
|
toStringParse
|
|
17
17
|
} from "./chunk-ADPTUJSF.js";
|
|
18
|
+
import {
|
|
19
|
+
extractParams,
|
|
20
|
+
getFunctionFormat,
|
|
21
|
+
toFunction
|
|
22
|
+
} from "./chunk-Q6BNW3MO.js";
|
|
23
|
+
import {
|
|
24
|
+
getContent,
|
|
25
|
+
getContents
|
|
26
|
+
} from "./chunk-YKSVLAAK.js";
|
|
18
27
|
import {
|
|
19
28
|
getImports,
|
|
20
29
|
getImportss
|
|
@@ -25,18 +34,9 @@ import {
|
|
|
25
34
|
import {
|
|
26
35
|
splitUpper
|
|
27
36
|
} from "./chunk-VKE5JARB.js";
|
|
28
|
-
import {
|
|
29
|
-
extractParams,
|
|
30
|
-
getFunctionFormat,
|
|
31
|
-
toFunction
|
|
32
|
-
} from "./chunk-Q6BNW3MO.js";
|
|
33
37
|
import {
|
|
34
38
|
deComment
|
|
35
39
|
} from "./chunk-FS4JPT23.js";
|
|
36
|
-
import {
|
|
37
|
-
getContent,
|
|
38
|
-
getContents
|
|
39
|
-
} from "./chunk-YKSVLAAK.js";
|
|
40
40
|
import {
|
|
41
41
|
getStrNunPosit
|
|
42
42
|
} from "./chunk-USIMBBLW.js";
|
|
@@ -11,32 +11,32 @@ var _chunkK2XKKEE7cjs = require('./chunk-K2XKKEE7.cjs');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk3QB3GKVLcjs = require('./chunk-3QB3GKVL.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunkHLKHFBMFcjs = require('./chunk-HLKHFBMF.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var _chunkHWHYHL6Jcjs = require('./chunk-HWHYHL6J.cjs');
|
|
22
21
|
|
|
22
|
+
var _chunkJJ37YIPJcjs = require('./chunk-JJ37YIPJ.cjs');
|
|
23
23
|
|
|
24
|
-
var _chunkJ7S3KBHLcjs = require('./chunk-J7S3KBHL.cjs');
|
|
25
24
|
|
|
26
25
|
|
|
27
|
-
var
|
|
26
|
+
var _chunk4PUYFFPOcjs = require('./chunk-4PUYFFPO.cjs');
|
|
28
27
|
|
|
29
28
|
|
|
30
29
|
|
|
30
|
+
var _chunkHWHYHL6Jcjs = require('./chunk-HWHYHL6J.cjs');
|
|
31
31
|
|
|
32
|
-
var _chunkJJ37YIPJcjs = require('./chunk-JJ37YIPJ.cjs');
|
|
33
32
|
|
|
33
|
+
var _chunkJ7S3KBHLcjs = require('./chunk-J7S3KBHL.cjs');
|
|
34
34
|
|
|
35
|
-
var _chunkXWCRGY54cjs = require('./chunk-XWCRGY54.cjs');
|
|
36
35
|
|
|
36
|
+
var _chunkL7FSHU27cjs = require('./chunk-L7FSHU27.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _chunkXWCRGY54cjs = require('./chunk-XWCRGY54.cjs');
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
var _chunk2H3KVSFAcjs = require('./chunk-2H3KVSFA.cjs');
|
|
@@ -79,16 +79,16 @@ _chunk75ZPJI57cjs.__export.call(void 0, string_exports, {
|
|
|
79
79
|
getStartSame: () => _chunkJ7S3KBHLcjs.getStartSame,
|
|
80
80
|
getStartSames: () => _chunkPW7RP73Jcjs.getStartSames,
|
|
81
81
|
getStrNunPosit: () => _chunk2H3KVSFAcjs.getStrNunPosit,
|
|
82
|
-
serializeCodeBlock: () =>
|
|
83
|
-
serializeFunctionRef: () =>
|
|
82
|
+
serializeCodeBlock: () => _chunk3QB3GKVLcjs.serializeCodeBlock,
|
|
83
|
+
serializeFunctionRef: () => _chunk3QB3GKVLcjs.serializeFunctionRef,
|
|
84
84
|
splitUpper: () => _chunkL7FSHU27cjs.splitUpper,
|
|
85
85
|
startsNum: () => _chunkILJLXJ5Ocjs.startsNum,
|
|
86
86
|
toFunction: () => _chunkJJ37YIPJcjs.toFunction,
|
|
87
87
|
toFunctionParam: () => _chunkZZKR5C3Ycjs.toFunctionParam,
|
|
88
88
|
toFunctionParamOptions: () => _chunkZZKR5C3Ycjs.toFunctionParamOptions,
|
|
89
89
|
toJSONParse: () => _chunkK2XKKEE7cjs.toJSONParse,
|
|
90
|
-
toJSONSParse: () =>
|
|
91
|
-
toJSONSStringify: () =>
|
|
90
|
+
toJSONSParse: () => _chunk3QB3GKVLcjs.toJSONSParse,
|
|
91
|
+
toJSONSStringify: () => _chunk3QB3GKVLcjs.toJSONSStringify,
|
|
92
92
|
toJSONStringify: () => _chunkK2XKKEE7cjs.toJSONStringify,
|
|
93
93
|
toStringParse: () => _chunkHLKHFBMFcjs.toStringParse
|
|
94
94
|
});
|
|
@@ -1,28 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
setSort
|
|
3
|
-
} from "./chunk-3LWFUVER.js";
|
|
4
|
-
import {
|
|
5
|
-
unmergeObject
|
|
6
|
-
} from "./chunk-A6J46LQK.js";
|
|
7
|
-
import {
|
|
8
|
-
hasOwn
|
|
9
|
-
} from "./chunk-3IR2ABRO.js";
|
|
10
1
|
import {
|
|
11
2
|
mergeObject
|
|
12
3
|
} from "./chunk-RD4EP3M5.js";
|
|
13
|
-
import {
|
|
14
|
-
getObjValue,
|
|
15
|
-
setObjValue
|
|
16
|
-
} from "./chunk-SHNH5OEU.js";
|
|
17
4
|
import {
|
|
18
5
|
reverseObj
|
|
19
6
|
} from "./chunk-B3IGSYZT.js";
|
|
20
7
|
import {
|
|
21
|
-
|
|
22
|
-
} from "./chunk-
|
|
8
|
+
setSort
|
|
9
|
+
} from "./chunk-3LWFUVER.js";
|
|
23
10
|
import {
|
|
24
|
-
|
|
25
|
-
} from "./chunk-
|
|
11
|
+
unmergeObject
|
|
12
|
+
} from "./chunk-A6J46LQK.js";
|
|
26
13
|
import {
|
|
27
14
|
deepCopys,
|
|
28
15
|
fastDeepCopy,
|
|
@@ -37,6 +24,19 @@ import {
|
|
|
37
24
|
import {
|
|
38
25
|
getSort
|
|
39
26
|
} from "./chunk-ZEAT23CI.js";
|
|
27
|
+
import {
|
|
28
|
+
hasOwn
|
|
29
|
+
} from "./chunk-3IR2ABRO.js";
|
|
30
|
+
import {
|
|
31
|
+
attrValueSort
|
|
32
|
+
} from "./chunk-T4BAVDTH.js";
|
|
33
|
+
import {
|
|
34
|
+
deepCopy
|
|
35
|
+
} from "./chunk-BRIQCC74.js";
|
|
36
|
+
import {
|
|
37
|
+
getObjValue,
|
|
38
|
+
setObjValue
|
|
39
|
+
} from "./chunk-SHNH5OEU.js";
|
|
40
40
|
import {
|
|
41
41
|
isEqual,
|
|
42
42
|
isEqualEnhanced
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/object/deepCopy.ts
|
|
2
|
+
function deepCopy(obj, filter = () => true) {
|
|
3
|
+
if (obj === null || obj === void 0 || typeof obj !== "object") {
|
|
4
|
+
return obj;
|
|
5
|
+
}
|
|
6
|
+
if (obj instanceof Date) {
|
|
7
|
+
return new Date(obj.getTime());
|
|
8
|
+
}
|
|
9
|
+
if (obj instanceof RegExp) {
|
|
10
|
+
return new RegExp(obj.source, obj.flags);
|
|
11
|
+
}
|
|
12
|
+
if (Array.isArray(obj)) {
|
|
13
|
+
return obj.map((item) => deepCopy(item, filter));
|
|
14
|
+
}
|
|
15
|
+
const copy = {};
|
|
16
|
+
for (const key in obj) {
|
|
17
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
18
|
+
if (filter(key)) {
|
|
19
|
+
copy[key] = deepCopy(obj[key], filter);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return copy;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
exports.deepCopy = deepCopy;
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkNRJPCN4Jcjs = require('./chunk-NRJPCN4J.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkSLXKYTEUcjs = require('./chunk-SLXKYTEU.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkIIKQHLKTcjs = require('./chunk-IIKQHLKT.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk3VYRYSWKcjs = require('./chunk-3VYRYSWK.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var _chunkA5UJF6LPcjs = require('./chunk-A5UJF6LP.cjs');
|
|
17
16
|
|
|
18
17
|
|
|
19
|
-
var _chunkSLXKYTEUcjs = require('./chunk-SLXKYTEU.cjs');
|
|
20
18
|
|
|
21
19
|
|
|
22
|
-
var
|
|
20
|
+
var _chunkSJ74DU4Bcjs = require('./chunk-SJ74DU4B.cjs');
|
|
23
21
|
|
|
24
22
|
|
|
25
|
-
var
|
|
23
|
+
var _chunkD3SX7OUVcjs = require('./chunk-D3SX7OUV.cjs');
|
|
26
24
|
|
|
27
25
|
|
|
26
|
+
var _chunk7AIT4XSDcjs = require('./chunk-7AIT4XSD.cjs');
|
|
28
27
|
|
|
29
28
|
|
|
29
|
+
var _chunkGOUC2DFAcjs = require('./chunk-GOUC2DFA.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
var _chunkUFYLVZNUcjs = require('./chunk-UFYLVZNU.cjs');
|
|
32
33
|
|
|
33
|
-
var _chunkSJ74DU4Bcjs = require('./chunk-SJ74DU4B.cjs');
|
|
34
34
|
|
|
35
|
+
var _chunkYTSFTRYZcjs = require('./chunk-YTSFTRYZ.cjs');
|
|
35
36
|
|
|
36
|
-
var _chunkD3SX7OUVcjs = require('./chunk-D3SX7OUV.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _chunkA5UJF6LPcjs = require('./chunk-A5UJF6LP.cjs');
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
@@ -55,7 +55,7 @@ var _chunk75ZPJI57cjs = require('./chunk-75ZPJI57.cjs');
|
|
|
55
55
|
var object_exports = {};
|
|
56
56
|
_chunk75ZPJI57cjs.__export.call(void 0, object_exports, {
|
|
57
57
|
attrValueSort: () => _chunkUFYLVZNUcjs.attrValueSort,
|
|
58
|
-
deepCopy: () =>
|
|
58
|
+
deepCopy: () => _chunkYTSFTRYZcjs.deepCopy,
|
|
59
59
|
deepCopys: () => _chunkSJ74DU4Bcjs.deepCopys,
|
|
60
60
|
fastDeepCopy: () => _chunkSJ74DU4Bcjs.fastDeepCopy,
|
|
61
61
|
filterObject: () => _chunkD3SX7OUVcjs.filterObject,
|
package/dist/css/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-YHM42KJI.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
var _chunkSJPWB2OHcjs = require('../chunk-SJPWB2OH.cjs');
|
|
@@ -21,9 +21,6 @@ var _chunkHJTIJGIFcjs = require('../chunk-HJTIJGIF.cjs');
|
|
|
21
21
|
var _chunkUGFSIZ5Pcjs = require('../chunk-UGFSIZ5P.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var _chunkTE3XNGF4cjs = require('../chunk-TE3XNGF4.cjs');
|
|
25
|
-
|
|
26
|
-
|
|
27
24
|
var _chunkVY5VQ7WEcjs = require('../chunk-VY5VQ7WE.cjs');
|
|
28
25
|
|
|
29
26
|
|
|
@@ -34,6 +31,9 @@ var _chunkIFVVMDAWcjs = require('../chunk-IFVVMDAW.cjs');
|
|
|
34
31
|
|
|
35
32
|
|
|
36
33
|
var _chunk6TH2K7LEcjs = require('../chunk-6TH2K7LE.cjs');
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
var _chunkTE3XNGF4cjs = require('../chunk-TE3XNGF4.cjs');
|
|
37
37
|
require('../chunk-75ZPJI57.cjs');
|
|
38
38
|
|
|
39
39
|
|
package/dist/css/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-RGBFHCCJ.js";
|
|
2
2
|
import {
|
|
3
3
|
getScssImports
|
|
4
4
|
} from "../chunk-NW2ZNMSV.js";
|
|
@@ -19,9 +19,6 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
fetchUnitValue
|
|
21
21
|
} from "../chunk-WX3JYE47.js";
|
|
22
|
-
import {
|
|
23
|
-
getAttrObj
|
|
24
|
-
} from "../chunk-N3FZ4WUI.js";
|
|
25
22
|
import {
|
|
26
23
|
getPositionRelative
|
|
27
24
|
} from "../chunk-MQHLAQQA.js";
|
|
@@ -34,6 +31,9 @@ import {
|
|
|
34
31
|
import {
|
|
35
32
|
getPrentCorres
|
|
36
33
|
} from "../chunk-VNY5UA2Q.js";
|
|
34
|
+
import {
|
|
35
|
+
getAttrObj
|
|
36
|
+
} from "../chunk-N3FZ4WUI.js";
|
|
37
37
|
import "../chunk-MLKGABMK.js";
|
|
38
38
|
export {
|
|
39
39
|
fetchUnitValue,
|
package/dist/date/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-JI6PHVDX.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk75UYCE4Xcjs = require('../chunk-75UYCE4X.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
var _chunkZ2EAQZ47cjs = require('../chunk-Z2EAQZ47.cjs');
|
|
7
8
|
|
|
8
|
-
var _chunk7TGGIID4cjs = require('../chunk-7TGGIID4.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk7TGGIID4cjs = require('../chunk-7TGGIID4.cjs');
|
|
12
12
|
require('../chunk-75ZPJI57.cjs');
|
|
13
13
|
|
|
14
14
|
|
package/dist/date/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-5VGZQLUQ.js";
|
|
2
|
+
import {
|
|
3
|
+
getEndOfDay
|
|
4
|
+
} from "../chunk-Q2EFMBMD.js";
|
|
2
5
|
import {
|
|
3
6
|
hourFormat
|
|
4
7
|
} from "../chunk-UCF3YRN2.js";
|
|
@@ -6,9 +9,6 @@ import {
|
|
|
6
9
|
format,
|
|
7
10
|
parseDateString
|
|
8
11
|
} from "../chunk-EKY7GXCD.js";
|
|
9
|
-
import {
|
|
10
|
-
getEndOfDay
|
|
11
|
-
} from "../chunk-Q2EFMBMD.js";
|
|
12
12
|
import "../chunk-MLKGABMK.js";
|
|
13
13
|
export {
|
|
14
14
|
format,
|