@allahjs/utils 1.11.0 → 1.12.0
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/.tsbuildinfo +1 -1
- package/dist/core/diffUtils/index.cjs +219 -0
- package/dist/core/diffUtils/index.cjs.map +1 -0
- package/dist/core/diffUtils/index.d.ts +32 -0
- package/dist/core/fileUtils/index.cjs +21 -0
- package/dist/core/fileUtils/index.cjs.map +1 -0
- package/dist/core/fileUtils/index.d.ts +10 -0
- package/dist/core/index.cjs +20 -10
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +43 -0
- package/dist/esm/core/diffUtils/index.d.ts +32 -0
- package/dist/esm/core/diffUtils/index.js +215 -0
- package/dist/esm/core/diffUtils/index.js.map +1 -0
- package/dist/esm/core/fileUtils/index.d.ts +10 -0
- package/dist/esm/core/fileUtils/index.js +16 -0
- package/dist/esm/core/fileUtils/index.js.map +1 -0
- package/dist/esm/core/index.d.ts +43 -0
- package/dist/esm/core/index.js +10 -0
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/array.js +20 -0
- package/dist/esm/node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/array.js.map +1 -0
- package/dist/esm/node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/base.js +256 -0
- package/dist/esm/node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/base.js.map +1 -0
- package/dist/esm/node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/character.js +11 -0
- package/dist/esm/node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/character.js.map +1 -0
- package/dist/esm/request/ReqQueue/index.d.ts +25 -0
- package/dist/esm/request/httpCode/index.d.ts +9 -0
- package/dist/esm/request/index.d.ts +3 -0
- package/dist/esm/request/index.js +4 -2
- package/dist/esm/request/index.js.map +1 -1
- package/dist/esm/request/uniRequest/index.d.ts +5 -0
- package/dist/index.cjs +61 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/array.cjs +23 -0
- package/dist/node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/array.cjs.map +1 -0
- package/dist/node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/base.cjs +260 -0
- package/dist/node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/base.cjs.map +1 -0
- package/dist/node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/character.cjs +14 -0
- package/dist/node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/character.cjs.map +1 -0
- package/dist/request/ReqQueue/index.d.ts +25 -0
- package/dist/request/httpCode/index.d.ts +9 -0
- package/dist/request/index.cjs +25 -20
- package/dist/request/index.cjs.map +1 -1
- package/dist/request/index.d.ts +3 -0
- package/dist/request/uniRequest/index.d.ts +5 -0
- package/package.json +16 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const fileUtils = {
|
|
2
|
+
/**
|
|
3
|
+
* 判断是否为图片文件
|
|
4
|
+
* @param filename 文件名
|
|
5
|
+
* @returns 是否为图片文件
|
|
6
|
+
*/
|
|
7
|
+
isImageFile(filename) {
|
|
8
|
+
const rgx = '(JPEG|jpeg|JPG|jpg|gif|GIF|HEIC|heic|BMP|bmp|PNG|png)$';
|
|
9
|
+
const re = new RegExp(rgx, 'i');
|
|
10
|
+
const fileExt = filename.replace(/.+\./, '');
|
|
11
|
+
return re.test(fileExt);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { fileUtils as default, fileUtils };
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/core/fileUtils/index.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAO,MAAM,SAAS,GAAG;AACvB;;;;AAIG;AACH,IAAA,WAAW,CAAC,QAAgB,EAAA;QAC1B,MAAM,GAAG,GAAG,wDAAwD;QACpE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;QAC/B,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;AAC5C,QAAA,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;IACzB;;;;;"}
|
package/dist/esm/core/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ITablePage } from './pageUtils/index.js';
|
|
1
2
|
import * as dayjs from 'dayjs';
|
|
2
3
|
import { IListChangeVo } from './arrayUtils/index.js';
|
|
3
4
|
import { IEnumObj } from '../form/types.js';
|
|
4
5
|
import { IOptions2, ITreeNode, IOptions } from '../types/data/index.js';
|
|
6
|
+
import DiffUtils from './diffUtils/index.js';
|
|
5
7
|
import { AsyncQueue } from './asyncUtils/index.js';
|
|
6
8
|
import * as index from './constants/index.js';
|
|
7
9
|
|
|
@@ -114,6 +116,47 @@ declare const _default: {
|
|
|
114
116
|
endDay: number | undefined;
|
|
115
117
|
};
|
|
116
118
|
};
|
|
119
|
+
diffUtils: typeof DiffUtils;
|
|
120
|
+
fileUtils: {
|
|
121
|
+
isImageFile(filename: string): boolean;
|
|
122
|
+
};
|
|
123
|
+
cryptoUtils: {
|
|
124
|
+
uuid(): Promise<string>;
|
|
125
|
+
md5(input: string, salt?: string): string;
|
|
126
|
+
miniUuid(): string;
|
|
127
|
+
isValidUUID(uuid: string): Promise<boolean>;
|
|
128
|
+
rsaEncrypt(text: string, publicKey: string): Promise<string | false>;
|
|
129
|
+
rsaDecrypt(encryptedText: string, privateKey: string): Promise<string | false>;
|
|
130
|
+
generateRSAKeyPair(keySize?: number): Promise<{
|
|
131
|
+
publicKey: string;
|
|
132
|
+
privateKey: string;
|
|
133
|
+
} | null>;
|
|
134
|
+
aesEncrypt(text: string, key: string): string;
|
|
135
|
+
aesDecrypt(encryptedText: string, key: string): string;
|
|
136
|
+
};
|
|
137
|
+
pageUtils: {
|
|
138
|
+
isLastPageData: (data: ITablePage<any>) => boolean;
|
|
139
|
+
buildPageConfig: (data?: ITablePage<any>) => {
|
|
140
|
+
current: number;
|
|
141
|
+
pageSize: number;
|
|
142
|
+
total: number;
|
|
143
|
+
showQuickJumper: boolean;
|
|
144
|
+
showSizeChanger: boolean;
|
|
145
|
+
showTotal: (total: number, range: number[]) => string;
|
|
146
|
+
};
|
|
147
|
+
defaultTableData: ITablePage<any>;
|
|
148
|
+
handleReqListParams: (v: any, sort: any) => any;
|
|
149
|
+
};
|
|
150
|
+
storageUtils: {
|
|
151
|
+
getItem: <T = any>(key: string, cacheType?: "local" | "session") => T;
|
|
152
|
+
getSItem: <T = any>(key: string) => T;
|
|
153
|
+
setItem: (key: string, value: any, cacheType?: "local" | "session") => void;
|
|
154
|
+
setSItem: (key: string, value: any) => void;
|
|
155
|
+
removeItem: (key: string, cacheType?: "local" | "session") => void;
|
|
156
|
+
removeSItem: (key: string) => void;
|
|
157
|
+
existsItem: (key: string, cacheType?: "local" | "session") => boolean;
|
|
158
|
+
existsSItem: (key: string) => boolean;
|
|
159
|
+
};
|
|
117
160
|
asyncUtils: {
|
|
118
161
|
delay(ms: number): Promise<void>;
|
|
119
162
|
withTimeout<T>(promise: Promise<T>, timeout: number, timeoutMessage?: string): Promise<T>;
|
package/dist/esm/core/index.js
CHANGED
|
@@ -4,6 +4,11 @@ import objectUtils from './objectUtils/index.js';
|
|
|
4
4
|
import numberUtils from './numberUtils/index.js';
|
|
5
5
|
import colorUtils from './colorUtils/index.js';
|
|
6
6
|
import dateUtils from './dateUtils/index.js';
|
|
7
|
+
import DiffUtils from './diffUtils/index.js';
|
|
8
|
+
import fileUtils from './fileUtils/index.js';
|
|
9
|
+
import cryptoUtils from './cryptoUtils/index.js';
|
|
10
|
+
import pageUtils from './pageUtils/index.js';
|
|
11
|
+
import storageUtils from './storageUtils/index.js';
|
|
7
12
|
import asyncUtils, { AsyncQueue } from './asyncUtils/index.js';
|
|
8
13
|
import * as index$1 from './constants/index.js';
|
|
9
14
|
import validationUtils from './validationUtils/index.js';
|
|
@@ -21,6 +26,11 @@ var index = {
|
|
|
21
26
|
objectUtils,
|
|
22
27
|
numberUtils,
|
|
23
28
|
dateUtils,
|
|
29
|
+
diffUtils: DiffUtils,
|
|
30
|
+
fileUtils,
|
|
31
|
+
cryptoUtils,
|
|
32
|
+
pageUtils,
|
|
33
|
+
storageUtils,
|
|
24
34
|
asyncUtils,
|
|
25
35
|
colorUtils,
|
|
26
36
|
validationUtils,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/core/index.ts"],"sourcesContent":[null],"names":["constants"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/core/index.ts"],"sourcesContent":[null],"names":["diffUtils","constants"],"mappings":";;;;;;;;;;;;;;;AAAA;;;AAGG;AAiBH;;AAEG;AACH,YAAe;IACb,UAAU;IACV,WAAW;IACX,WAAW;IACX,WAAW;IACX,SAAS;eACTA,SAAS;IACT,SAAS;IACT,WAAW;IACX,SAAS;IACT,YAAY;IACZ,UAAU;IACV,UAAU;IACV,eAAe;IACf,UAAU;eACVC;CACD;;;;"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export { default as asyncUtils } from './core/asyncUtils/index.js';
|
|
|
8
8
|
export { default as colorUtils } from './core/colorUtils/index.js';
|
|
9
9
|
export { default as cryptoUtils } from './core/cryptoUtils/index.js';
|
|
10
10
|
export { ITablePage, defTableData, default as pageUtils } from './core/pageUtils/index.js';
|
|
11
|
+
export { default as diffUtils } from './core/diffUtils/index.js';
|
|
12
|
+
export { default as fileUtils } from './core/fileUtils/index.js';
|
|
11
13
|
export { default as storageUtils } from './core/storageUtils/index.js';
|
|
12
14
|
import * as index from './core/constants/index.js';
|
|
13
15
|
export { index as constants };
|
|
@@ -25,7 +27,10 @@ export { FormItemLabelProps, FormItemProps, IUploadProps, RequiredMark, TooltipP
|
|
|
25
27
|
export { BaseRule, RuleType } from './form/rule.js';
|
|
26
28
|
export { IBaseFilter, IOptions, IOptions2, IOptions61, ITreeNode, IValidityNum, IWaterInfo, IWaterLives, defBaseFilter } from './types/data/index.js';
|
|
27
29
|
export { ISysDisFilter, ISysDistrict } from './types/dbData/index.js';
|
|
30
|
+
export { default as ReqQueue } from './request/ReqQueue/index.js';
|
|
31
|
+
export { default as uniRequest } from './request/uniRequest/index.js';
|
|
28
32
|
export { ICacheData, ICallBack, IRequestOption } from './request/typings/index.js';
|
|
33
|
+
export { codeMessage, defOption } from './request/httpCode/index.js';
|
|
29
34
|
|
|
30
35
|
declare const version = "1.0.0";
|
|
31
36
|
|
package/dist/esm/index.js
CHANGED
|
@@ -8,6 +8,8 @@ export { default as asyncUtils } from './core/asyncUtils/index.js';
|
|
|
8
8
|
export { default as colorUtils } from './core/colorUtils/index.js';
|
|
9
9
|
export { default as cryptoUtils } from './core/cryptoUtils/index.js';
|
|
10
10
|
export { defTableData, default as pageUtils } from './core/pageUtils/index.js';
|
|
11
|
+
export { default as diffUtils } from './core/diffUtils/index.js';
|
|
12
|
+
export { default as fileUtils } from './core/fileUtils/index.js';
|
|
11
13
|
export { default as storageUtils } from './core/storageUtils/index.js';
|
|
12
14
|
import * as index from './core/constants/index.js';
|
|
13
15
|
export { index as constants };
|
|
@@ -20,6 +22,9 @@ export { BatchOperationTips, Tips, ToastPosition, ToastType, hideLoading, hideTo
|
|
|
20
22
|
export { cloudUtils } from './uniapp/cloudUtils/index.js';
|
|
21
23
|
export { buildLoginPath, getJwtToken, initialUmiState, isLogin, loginOk, toLogin } from './umijs/initialUmiState.js';
|
|
22
24
|
export { defBaseFilter } from './types/data/index.js';
|
|
25
|
+
export { default as ReqQueue } from './request/ReqQueue/index.js';
|
|
26
|
+
export { default as uniRequest } from './request/uniRequest/index.js';
|
|
27
|
+
export { codeMessage, defOption } from './request/httpCode/index.js';
|
|
23
28
|
|
|
24
29
|
// 主入口文件 - 导出所有工具函数
|
|
25
30
|
// 核心工具函数(适用于 Node.js、UniApp、React Native 等)
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAEA;AAsCA;AACO,MAAM,OAAO,GAAG;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import Diff from './base.js';
|
|
2
|
+
|
|
3
|
+
class ArrayDiff extends Diff {
|
|
4
|
+
tokenize(value) {
|
|
5
|
+
return value.slice();
|
|
6
|
+
}
|
|
7
|
+
join(value) {
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
removeEmpty(value) {
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const arrayDiff = new ArrayDiff();
|
|
15
|
+
function diffArrays(oldArr, newArr, options) {
|
|
16
|
+
return arrayDiff.diff(oldArr, newArr, options);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { arrayDiff, diffArrays };
|
|
20
|
+
//# sourceMappingURL=array.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array.js","sources":["../../../../../../../../../node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/array.js"],"sourcesContent":["import Diff from './base.js';\nclass ArrayDiff extends Diff {\n tokenize(value) {\n return value.slice();\n }\n join(value) {\n return value;\n }\n removeEmpty(value) {\n return value;\n }\n}\nexport const arrayDiff = new ArrayDiff();\nexport function diffArrays(oldArr, newArr, options) {\n return arrayDiff.diff(oldArr, newArr, options);\n}\n"],"names":[],"mappings":";;AACA,MAAM,SAAS,SAAS,IAAI,CAAC;AAC7B,IAAI,QAAQ,CAAC,KAAK,EAAE;AACpB,QAAQ,OAAO,KAAK,CAAC,KAAK,EAAE;AAC5B,IAAI;AACJ,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,OAAO,KAAK;AACpB,IAAI;AACJ,IAAI,WAAW,CAAC,KAAK,EAAE;AACvB,QAAQ,OAAO,KAAK;AACpB,IAAI;AACJ;AACY,MAAC,SAAS,GAAG,IAAI,SAAS;AAC/B,SAAS,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE;AACpD,IAAI,OAAO,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AAClD;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
class Diff {
|
|
2
|
+
diff(oldStr, newStr,
|
|
3
|
+
// Type below is not accurate/complete - see above for full possibilities - but it compiles
|
|
4
|
+
options = {}) {
|
|
5
|
+
let callback;
|
|
6
|
+
if (typeof options === 'function') {
|
|
7
|
+
callback = options;
|
|
8
|
+
options = {};
|
|
9
|
+
}
|
|
10
|
+
else if ('callback' in options) {
|
|
11
|
+
callback = options.callback;
|
|
12
|
+
}
|
|
13
|
+
// Allow subclasses to massage the input prior to running
|
|
14
|
+
const oldString = this.castInput(oldStr, options);
|
|
15
|
+
const newString = this.castInput(newStr, options);
|
|
16
|
+
const oldTokens = this.removeEmpty(this.tokenize(oldString, options));
|
|
17
|
+
const newTokens = this.removeEmpty(this.tokenize(newString, options));
|
|
18
|
+
return this.diffWithOptionsObj(oldTokens, newTokens, options, callback);
|
|
19
|
+
}
|
|
20
|
+
diffWithOptionsObj(oldTokens, newTokens, options, callback) {
|
|
21
|
+
var _a;
|
|
22
|
+
const done = (value) => {
|
|
23
|
+
value = this.postProcess(value, options);
|
|
24
|
+
if (callback) {
|
|
25
|
+
setTimeout(function () { callback(value); }, 0);
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const newLen = newTokens.length, oldLen = oldTokens.length;
|
|
33
|
+
let editLength = 1;
|
|
34
|
+
let maxEditLength = newLen + oldLen;
|
|
35
|
+
if (options.maxEditLength != null) {
|
|
36
|
+
maxEditLength = Math.min(maxEditLength, options.maxEditLength);
|
|
37
|
+
}
|
|
38
|
+
const maxExecutionTime = (_a = options.timeout) !== null && _a !== void 0 ? _a : Infinity;
|
|
39
|
+
const abortAfterTimestamp = Date.now() + maxExecutionTime;
|
|
40
|
+
const bestPath = [{ oldPos: -1, lastComponent: undefined }];
|
|
41
|
+
// Seed editLength = 0, i.e. the content starts with the same values
|
|
42
|
+
let newPos = this.extractCommon(bestPath[0], newTokens, oldTokens, 0, options);
|
|
43
|
+
if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
|
|
44
|
+
// Identity per the equality and tokenizer
|
|
45
|
+
return done(this.buildValues(bestPath[0].lastComponent, newTokens, oldTokens));
|
|
46
|
+
}
|
|
47
|
+
// Once we hit the right edge of the edit graph on some diagonal k, we can
|
|
48
|
+
// definitely reach the end of the edit graph in no more than k edits, so
|
|
49
|
+
// there's no point in considering any moves to diagonal k+1 any more (from
|
|
50
|
+
// which we're guaranteed to need at least k+1 more edits).
|
|
51
|
+
// Similarly, once we've reached the bottom of the edit graph, there's no
|
|
52
|
+
// point considering moves to lower diagonals.
|
|
53
|
+
// We record this fact by setting minDiagonalToConsider and
|
|
54
|
+
// maxDiagonalToConsider to some finite value once we've hit the edge of
|
|
55
|
+
// the edit graph.
|
|
56
|
+
// This optimization is not faithful to the original algorithm presented in
|
|
57
|
+
// Myers's paper, which instead pointlessly extends D-paths off the end of
|
|
58
|
+
// the edit graph - see page 7 of Myers's paper which notes this point
|
|
59
|
+
// explicitly and illustrates it with a diagram. This has major performance
|
|
60
|
+
// implications for some common scenarios. For instance, to compute a diff
|
|
61
|
+
// where the new text simply appends d characters on the end of the
|
|
62
|
+
// original text of length n, the true Myers algorithm will take O(n+d^2)
|
|
63
|
+
// time while this optimization needs only O(n+d) time.
|
|
64
|
+
let minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity;
|
|
65
|
+
// Main worker method. checks all permutations of a given edit length for acceptance.
|
|
66
|
+
const execEditLength = () => {
|
|
67
|
+
for (let diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) {
|
|
68
|
+
let basePath;
|
|
69
|
+
const removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1];
|
|
70
|
+
if (removePath) {
|
|
71
|
+
// No one else is going to attempt to use this value, clear it
|
|
72
|
+
// @ts-expect-error - perf optimisation. This type-violating value will never be read.
|
|
73
|
+
bestPath[diagonalPath - 1] = undefined;
|
|
74
|
+
}
|
|
75
|
+
let canAdd = false;
|
|
76
|
+
if (addPath) {
|
|
77
|
+
// what newPos will be after we do an insertion:
|
|
78
|
+
const addPathNewPos = addPath.oldPos - diagonalPath;
|
|
79
|
+
canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen;
|
|
80
|
+
}
|
|
81
|
+
const canRemove = removePath && removePath.oldPos + 1 < oldLen;
|
|
82
|
+
if (!canAdd && !canRemove) {
|
|
83
|
+
// If this path is a terminal then prune
|
|
84
|
+
// @ts-expect-error - perf optimisation. This type-violating value will never be read.
|
|
85
|
+
bestPath[diagonalPath] = undefined;
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
// Select the diagonal that we want to branch from. We select the prior
|
|
89
|
+
// path whose position in the old string is the farthest from the origin
|
|
90
|
+
// and does not pass the bounds of the diff graph
|
|
91
|
+
if (!canRemove || (canAdd && removePath.oldPos < addPath.oldPos)) {
|
|
92
|
+
basePath = this.addToPath(addPath, true, false, 0, options);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
basePath = this.addToPath(removePath, false, true, 1, options);
|
|
96
|
+
}
|
|
97
|
+
newPos = this.extractCommon(basePath, newTokens, oldTokens, diagonalPath, options);
|
|
98
|
+
if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
|
|
99
|
+
// If we have hit the end of both strings, then we are done
|
|
100
|
+
return done(this.buildValues(basePath.lastComponent, newTokens, oldTokens)) || true;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
bestPath[diagonalPath] = basePath;
|
|
104
|
+
if (basePath.oldPos + 1 >= oldLen) {
|
|
105
|
+
maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1);
|
|
106
|
+
}
|
|
107
|
+
if (newPos + 1 >= newLen) {
|
|
108
|
+
minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
editLength++;
|
|
113
|
+
};
|
|
114
|
+
// Performs the length of edit iteration. Is a bit fugly as this has to support the
|
|
115
|
+
// sync and async mode which is never fun. Loops over execEditLength until a value
|
|
116
|
+
// is produced, or until the edit length exceeds options.maxEditLength (if given),
|
|
117
|
+
// in which case it will return undefined.
|
|
118
|
+
if (callback) {
|
|
119
|
+
(function exec() {
|
|
120
|
+
setTimeout(function () {
|
|
121
|
+
if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) {
|
|
122
|
+
return callback(undefined);
|
|
123
|
+
}
|
|
124
|
+
if (!execEditLength()) {
|
|
125
|
+
exec();
|
|
126
|
+
}
|
|
127
|
+
}, 0);
|
|
128
|
+
}());
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) {
|
|
132
|
+
const ret = execEditLength();
|
|
133
|
+
if (ret) {
|
|
134
|
+
return ret;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
addToPath(path, added, removed, oldPosInc, options) {
|
|
140
|
+
const last = path.lastComponent;
|
|
141
|
+
if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) {
|
|
142
|
+
return {
|
|
143
|
+
oldPos: path.oldPos + oldPosInc,
|
|
144
|
+
lastComponent: { count: last.count + 1, added: added, removed: removed, previousComponent: last.previousComponent }
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
return {
|
|
149
|
+
oldPos: path.oldPos + oldPosInc,
|
|
150
|
+
lastComponent: { count: 1, added: added, removed: removed, previousComponent: last }
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
extractCommon(basePath, newTokens, oldTokens, diagonalPath, options) {
|
|
155
|
+
const newLen = newTokens.length, oldLen = oldTokens.length;
|
|
156
|
+
let oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0;
|
|
157
|
+
while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldTokens[oldPos + 1], newTokens[newPos + 1], options)) {
|
|
158
|
+
newPos++;
|
|
159
|
+
oldPos++;
|
|
160
|
+
commonCount++;
|
|
161
|
+
if (options.oneChangePerToken) {
|
|
162
|
+
basePath.lastComponent = { count: 1, previousComponent: basePath.lastComponent, added: false, removed: false };
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
if (commonCount && !options.oneChangePerToken) {
|
|
166
|
+
basePath.lastComponent = { count: commonCount, previousComponent: basePath.lastComponent, added: false, removed: false };
|
|
167
|
+
}
|
|
168
|
+
basePath.oldPos = oldPos;
|
|
169
|
+
return newPos;
|
|
170
|
+
}
|
|
171
|
+
equals(left, right, options) {
|
|
172
|
+
if (options.comparator) {
|
|
173
|
+
return options.comparator(left, right);
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
return left === right
|
|
177
|
+
|| (!!options.ignoreCase && left.toLowerCase() === right.toLowerCase());
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
removeEmpty(array) {
|
|
181
|
+
const ret = [];
|
|
182
|
+
for (let i = 0; i < array.length; i++) {
|
|
183
|
+
if (array[i]) {
|
|
184
|
+
ret.push(array[i]);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return ret;
|
|
188
|
+
}
|
|
189
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
190
|
+
castInput(value, options) {
|
|
191
|
+
return value;
|
|
192
|
+
}
|
|
193
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
194
|
+
tokenize(value, options) {
|
|
195
|
+
return Array.from(value);
|
|
196
|
+
}
|
|
197
|
+
join(chars) {
|
|
198
|
+
// Assumes ValueT is string, which is the case for most subclasses.
|
|
199
|
+
// When it's false, e.g. in diffArrays, this method needs to be overridden (e.g. with a no-op)
|
|
200
|
+
// Yes, the casts are verbose and ugly, because this pattern - of having the base class SORT OF
|
|
201
|
+
// assume tokens and values are strings, but not completely - is weird and janky.
|
|
202
|
+
return chars.join('');
|
|
203
|
+
}
|
|
204
|
+
postProcess(changeObjects,
|
|
205
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
206
|
+
options) {
|
|
207
|
+
return changeObjects;
|
|
208
|
+
}
|
|
209
|
+
get useLongestToken() {
|
|
210
|
+
return false;
|
|
211
|
+
}
|
|
212
|
+
buildValues(lastComponent, newTokens, oldTokens) {
|
|
213
|
+
// First we convert our linked list of components in reverse order to an
|
|
214
|
+
// array in the right order:
|
|
215
|
+
const components = [];
|
|
216
|
+
let nextComponent;
|
|
217
|
+
while (lastComponent) {
|
|
218
|
+
components.push(lastComponent);
|
|
219
|
+
nextComponent = lastComponent.previousComponent;
|
|
220
|
+
delete lastComponent.previousComponent;
|
|
221
|
+
lastComponent = nextComponent;
|
|
222
|
+
}
|
|
223
|
+
components.reverse();
|
|
224
|
+
const componentLen = components.length;
|
|
225
|
+
let componentPos = 0, newPos = 0, oldPos = 0;
|
|
226
|
+
for (; componentPos < componentLen; componentPos++) {
|
|
227
|
+
const component = components[componentPos];
|
|
228
|
+
if (!component.removed) {
|
|
229
|
+
if (!component.added && this.useLongestToken) {
|
|
230
|
+
let value = newTokens.slice(newPos, newPos + component.count);
|
|
231
|
+
value = value.map(function (value, i) {
|
|
232
|
+
const oldValue = oldTokens[oldPos + i];
|
|
233
|
+
return oldValue.length > value.length ? oldValue : value;
|
|
234
|
+
});
|
|
235
|
+
component.value = this.join(value);
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
component.value = this.join(newTokens.slice(newPos, newPos + component.count));
|
|
239
|
+
}
|
|
240
|
+
newPos += component.count;
|
|
241
|
+
// Common case
|
|
242
|
+
if (!component.added) {
|
|
243
|
+
oldPos += component.count;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
component.value = this.join(oldTokens.slice(oldPos, oldPos + component.count));
|
|
248
|
+
oldPos += component.count;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return components;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export { Diff as default };
|
|
256
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../../../../../node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/base.js"],"sourcesContent":["export default class Diff {\n diff(oldStr, newStr, \n // Type below is not accurate/complete - see above for full possibilities - but it compiles\n options = {}) {\n let callback;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n else if ('callback' in options) {\n callback = options.callback;\n }\n // Allow subclasses to massage the input prior to running\n const oldString = this.castInput(oldStr, options);\n const newString = this.castInput(newStr, options);\n const oldTokens = this.removeEmpty(this.tokenize(oldString, options));\n const newTokens = this.removeEmpty(this.tokenize(newString, options));\n return this.diffWithOptionsObj(oldTokens, newTokens, options, callback);\n }\n diffWithOptionsObj(oldTokens, newTokens, options, callback) {\n var _a;\n const done = (value) => {\n value = this.postProcess(value, options);\n if (callback) {\n setTimeout(function () { callback(value); }, 0);\n return undefined;\n }\n else {\n return value;\n }\n };\n const newLen = newTokens.length, oldLen = oldTokens.length;\n let editLength = 1;\n let maxEditLength = newLen + oldLen;\n if (options.maxEditLength != null) {\n maxEditLength = Math.min(maxEditLength, options.maxEditLength);\n }\n const maxExecutionTime = (_a = options.timeout) !== null && _a !== void 0 ? _a : Infinity;\n const abortAfterTimestamp = Date.now() + maxExecutionTime;\n const bestPath = [{ oldPos: -1, lastComponent: undefined }];\n // Seed editLength = 0, i.e. the content starts with the same values\n let newPos = this.extractCommon(bestPath[0], newTokens, oldTokens, 0, options);\n if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) {\n // Identity per the equality and tokenizer\n return done(this.buildValues(bestPath[0].lastComponent, newTokens, oldTokens));\n }\n // Once we hit the right edge of the edit graph on some diagonal k, we can\n // definitely reach the end of the edit graph in no more than k edits, so\n // there's no point in considering any moves to diagonal k+1 any more (from\n // which we're guaranteed to need at least k+1 more edits).\n // Similarly, once we've reached the bottom of the edit graph, there's no\n // point considering moves to lower diagonals.\n // We record this fact by setting minDiagonalToConsider and\n // maxDiagonalToConsider to some finite value once we've hit the edge of\n // the edit graph.\n // This optimization is not faithful to the original algorithm presented in\n // Myers's paper, which instead pointlessly extends D-paths off the end of\n // the edit graph - see page 7 of Myers's paper which notes this point\n // explicitly and illustrates it with a diagram. This has major performance\n // implications for some common scenarios. For instance, to compute a diff\n // where the new text simply appends d characters on the end of the\n // original text of length n, the true Myers algorithm will take O(n+d^2)\n // time while this optimization needs only O(n+d) time.\n let minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity;\n // Main worker method. checks all permutations of a given edit length for acceptance.\n const execEditLength = () => {\n for (let diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) {\n let basePath;\n const removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1];\n if (removePath) {\n // No one else is going to attempt to use this value, clear it\n // @ts-expect-error - perf optimisation. This type-violating value will never be read.\n bestPath[diagonalPath - 1] = undefined;\n }\n let canAdd = false;\n if (addPath) {\n // what newPos will be after we do an insertion:\n const addPathNewPos = addPath.oldPos - diagonalPath;\n canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen;\n }\n const canRemove = removePath && removePath.oldPos + 1 < oldLen;\n if (!canAdd && !canRemove) {\n // If this path is a terminal then prune\n // @ts-expect-error - perf optimisation. This type-violating value will never be read.\n bestPath[diagonalPath] = undefined;\n continue;\n }\n // Select the diagonal that we want to branch from. We select the prior\n // path whose position in the old string is the farthest from the origin\n // and does not pass the bounds of the diff graph\n if (!canRemove || (canAdd && removePath.oldPos < addPath.oldPos)) {\n basePath = this.addToPath(addPath, true, false, 0, options);\n }\n else {\n basePath = this.addToPath(removePath, false, true, 1, options);\n }\n newPos = this.extractCommon(basePath, newTokens, oldTokens, diagonalPath, options);\n if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) {\n // If we have hit the end of both strings, then we are done\n return done(this.buildValues(basePath.lastComponent, newTokens, oldTokens)) || true;\n }\n else {\n bestPath[diagonalPath] = basePath;\n if (basePath.oldPos + 1 >= oldLen) {\n maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1);\n }\n if (newPos + 1 >= newLen) {\n minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1);\n }\n }\n }\n editLength++;\n };\n // Performs the length of edit iteration. Is a bit fugly as this has to support the\n // sync and async mode which is never fun. Loops over execEditLength until a value\n // is produced, or until the edit length exceeds options.maxEditLength (if given),\n // in which case it will return undefined.\n if (callback) {\n (function exec() {\n setTimeout(function () {\n if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) {\n return callback(undefined);\n }\n if (!execEditLength()) {\n exec();\n }\n }, 0);\n }());\n }\n else {\n while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) {\n const ret = execEditLength();\n if (ret) {\n return ret;\n }\n }\n }\n }\n addToPath(path, added, removed, oldPosInc, options) {\n const last = path.lastComponent;\n if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) {\n return {\n oldPos: path.oldPos + oldPosInc,\n lastComponent: { count: last.count + 1, added: added, removed: removed, previousComponent: last.previousComponent }\n };\n }\n else {\n return {\n oldPos: path.oldPos + oldPosInc,\n lastComponent: { count: 1, added: added, removed: removed, previousComponent: last }\n };\n }\n }\n extractCommon(basePath, newTokens, oldTokens, diagonalPath, options) {\n const newLen = newTokens.length, oldLen = oldTokens.length;\n let oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0;\n while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldTokens[oldPos + 1], newTokens[newPos + 1], options)) {\n newPos++;\n oldPos++;\n commonCount++;\n if (options.oneChangePerToken) {\n basePath.lastComponent = { count: 1, previousComponent: basePath.lastComponent, added: false, removed: false };\n }\n }\n if (commonCount && !options.oneChangePerToken) {\n basePath.lastComponent = { count: commonCount, previousComponent: basePath.lastComponent, added: false, removed: false };\n }\n basePath.oldPos = oldPos;\n return newPos;\n }\n equals(left, right, options) {\n if (options.comparator) {\n return options.comparator(left, right);\n }\n else {\n return left === right\n || (!!options.ignoreCase && left.toLowerCase() === right.toLowerCase());\n }\n }\n removeEmpty(array) {\n const ret = [];\n for (let i = 0; i < array.length; i++) {\n if (array[i]) {\n ret.push(array[i]);\n }\n }\n return ret;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n castInput(value, options) {\n return value;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n tokenize(value, options) {\n return Array.from(value);\n }\n join(chars) {\n // Assumes ValueT is string, which is the case for most subclasses.\n // When it's false, e.g. in diffArrays, this method needs to be overridden (e.g. with a no-op)\n // Yes, the casts are verbose and ugly, because this pattern - of having the base class SORT OF\n // assume tokens and values are strings, but not completely - is weird and janky.\n return chars.join('');\n }\n postProcess(changeObjects, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n options) {\n return changeObjects;\n }\n get useLongestToken() {\n return false;\n }\n buildValues(lastComponent, newTokens, oldTokens) {\n // First we convert our linked list of components in reverse order to an\n // array in the right order:\n const components = [];\n let nextComponent;\n while (lastComponent) {\n components.push(lastComponent);\n nextComponent = lastComponent.previousComponent;\n delete lastComponent.previousComponent;\n lastComponent = nextComponent;\n }\n components.reverse();\n const componentLen = components.length;\n let componentPos = 0, newPos = 0, oldPos = 0;\n for (; componentPos < componentLen; componentPos++) {\n const component = components[componentPos];\n if (!component.removed) {\n if (!component.added && this.useLongestToken) {\n let value = newTokens.slice(newPos, newPos + component.count);\n value = value.map(function (value, i) {\n const oldValue = oldTokens[oldPos + i];\n return oldValue.length > value.length ? oldValue : value;\n });\n component.value = this.join(value);\n }\n else {\n component.value = this.join(newTokens.slice(newPos, newPos + component.count));\n }\n newPos += component.count;\n // Common case\n if (!component.added) {\n oldPos += component.count;\n }\n }\n else {\n component.value = this.join(oldTokens.slice(oldPos, oldPos + component.count));\n oldPos += component.count;\n }\n }\n return components;\n }\n}\n"],"names":[],"mappings":"AAAe,MAAM,IAAI,CAAC;AAC1B,IAAI,IAAI,CAAC,MAAM,EAAE,MAAM;AACvB;AACA,IAAI,OAAO,GAAG,EAAE,EAAE;AAClB,QAAQ,IAAI,QAAQ;AACpB,QAAQ,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;AAC3C,YAAY,QAAQ,GAAG,OAAO;AAC9B,YAAY,OAAO,GAAG,EAAE;AACxB,QAAQ;AACR,aAAa,IAAI,UAAU,IAAI,OAAO,EAAE;AACxC,YAAY,QAAQ,GAAG,OAAO,CAAC,QAAQ;AACvC,QAAQ;AACR;AACA,QAAQ,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;AACzD,QAAQ,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;AACzD,QAAQ,MAAM,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|
1
|
+
import Diff from './base.js';
|
|
2
|
+
|
|
3
|
+
class CharacterDiff extends Diff {
|
|
4
|
+
}
|
|
5
|
+
const characterDiff = new CharacterDiff();
|
|
6
|
+
function diffChars(oldStr, newStr, options) {
|
|
7
|
+
return characterDiff.diff(oldStr, newStr, options);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { characterDiff, diffChars };
|
|
11
|
+
//# sourceMappingURL=character.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character.js","sources":["../../../../../../../../../node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/character.js"],"sourcesContent":["import Diff from './base.js';\nclass CharacterDiff extends Diff {\n}\nexport const characterDiff = new CharacterDiff();\nexport function diffChars(oldStr, newStr, options) {\n return characterDiff.diff(oldStr, newStr, options);\n}\n"],"names":[],"mappings":";;AACA,MAAM,aAAa,SAAS,IAAI,CAAC;AACjC;AACY,MAAC,aAAa,GAAG,IAAI,aAAa;AACvC,SAAS,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE;AACnD,IAAI,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACtD;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type IReqQueueInit = {
|
|
2
|
+
maxQueueLength?: number;
|
|
3
|
+
cacheMethod?: (v: Record<string, any>) => void;
|
|
4
|
+
};
|
|
5
|
+
declare class ReqQueue {
|
|
6
|
+
private static instance;
|
|
7
|
+
private static reqQueue;
|
|
8
|
+
private static maxQueueLength;
|
|
9
|
+
private static cacheMethod;
|
|
10
|
+
constructor(p: IReqQueueInit);
|
|
11
|
+
static init(p: IReqQueueInit): ReqQueue;
|
|
12
|
+
static getInstance(p: IReqQueueInit): ReqQueue;
|
|
13
|
+
/**
|
|
14
|
+
* 获取下日志队列
|
|
15
|
+
*/
|
|
16
|
+
static getReqQueue(): Record<string, any>;
|
|
17
|
+
/**
|
|
18
|
+
* 添加或者更新一条记录
|
|
19
|
+
* @param data
|
|
20
|
+
* @param key
|
|
21
|
+
*/
|
|
22
|
+
static addReqQueue(data: any, key?: string): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { ReqQueue as default };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
export { codeMessage, defOption } from './httpCode/index.js';
|
|
1
2
|
import { IRequestOption, ICallBack } from './typings/index.js';
|
|
2
3
|
export { ICacheData } from './typings/index.js';
|
|
4
|
+
export { default as uniRequest } from './uniRequest/index.js';
|
|
5
|
+
export { default as ReqQueue } from './ReqQueue/index.js';
|
|
3
6
|
|
|
4
7
|
type IResponse = {
|
|
5
8
|
code: number;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { codeMessage } from './httpCode/index.js';
|
|
2
|
-
|
|
2
|
+
export { defOption } from './httpCode/index.js';
|
|
3
|
+
export { default as uniRequest } from './uniRequest/index.js';
|
|
3
4
|
import ReqQueue from './ReqQueue/index.js';
|
|
5
|
+
import { getRequestUtils, requestErrorIntercept, generateFetchRequest, responseErrorIntercept } from './httpUtils/index.js';
|
|
4
6
|
import cryptoUtils from '../core/cryptoUtils/index.js';
|
|
5
7
|
|
|
6
8
|
/**
|
|
@@ -162,5 +164,5 @@ const binRequest = async (url, option = {}, errorHandler, callback) => {
|
|
|
162
164
|
}));
|
|
163
165
|
};
|
|
164
166
|
|
|
165
|
-
export { binRequest as default };
|
|
167
|
+
export { ReqQueue, codeMessage, binRequest as default };
|
|
166
168
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/request/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/request/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAUA;;;;;AAKG;AACH,MAAM,WAAW,GAAG,OAAO,QAAa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