orion-design 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_commonjsHelpers-BFTU3MAI.js +7 -0
- package/dist/bignumber-upqAL281.js +2907 -0
- package/dist/dayjs.min-CYqA_arp.js +12 -0
- package/dist/error/OrionError.d.ts +3 -0
- package/dist/error/OrionError.js +12 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/print/LodopFuncs.d.ts +1 -0
- package/dist/print/LodopFuncs.js +159 -0
- package/dist/print/index.d.ts +25 -0
- package/dist/print/index.js +230 -0
- package/dist/request/ErrorHandlerChain.d.ts +9 -0
- package/dist/request/ErrorHandlerChain.js +18 -0
- package/dist/request/RequestFilterChain.d.ts +10 -0
- package/dist/request/RequestFilterChain.js +18 -0
- package/dist/request/ResponseParserChain.d.ts +10 -0
- package/dist/request/ResponseParserChain.js +18 -0
- package/dist/request/disivion/DateSerializer.d.ts +5 -0
- package/dist/request/disivion/DateSerializer.js +61 -0
- package/dist/request/disivion/DivisionErrorHandler.d.ts +6 -0
- package/dist/request/disivion/DivisionErrorHandler.js +59 -0
- package/dist/request/disivion/DivisionResponseParser.d.ts +5 -0
- package/dist/request/disivion/DivisionResponseParser.js +23 -0
- package/dist/request/disivion/index.d.ts +1 -0
- package/dist/request/disivion/index.js +28 -0
- package/dist/request/disivion/request.d.ts +21 -0
- package/dist/request/disivion/request.js +19345 -0
- package/dist/request/error/BizExceptionResponseError.d.ts +7 -0
- package/dist/request/error/BizExceptionResponseError.js +17 -0
- package/dist/request/error/ExceptionResponseError.d.ts +7 -0
- package/dist/request/error/ExceptionResponseError.js +17 -0
- package/dist/request/error/ResponseError.d.ts +5 -0
- package/dist/request/error/ResponseError.js +14 -0
- package/dist/request/error/SessionExceptionResponseError.d.ts +7 -0
- package/dist/request/error/SessionExceptionResponseError.js +17 -0
- package/dist/request/index.d.ts +1 -0
- package/dist/request/index.js +28 -0
- package/dist/request/postByOpenNewWindow.d.ts +1 -0
- package/dist/request/postByOpenNewWindow.js +41 -0
- package/dist/utils/DateUtil.d.ts +10 -0
- package/dist/utils/DateUtil.js +58 -0
- package/dist/utils/NumberUtil.d.ts +4 -0
- package/dist/utils/NumberUtil.js +10 -0
- package/dist/utils/cloneDeep.d.ts +1 -0
- package/dist/utils/cloneDeep.js +2255 -0
- package/dist/utils/delay.d.ts +1 -0
- package/dist/utils/delay.js +5 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.js +10 -0
- package/dist/utils/md5.d.ts +1 -0
- package/dist/utils/md5.js +326 -0
- package/dist/utils/uuid.d.ts +1 -0
- package/dist/utils/uuid.js +63 -0
- package/package.json +45 -0
@@ -0,0 +1 @@
|
|
1
|
+
export default function delay(ms: number): Promise<void>;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export { default as cloneDeep } from './cloneDeep';
|
2
|
+
export { default as DateUtil } from './DateUtil';
|
3
|
+
export { default as delay } from './delay';
|
4
|
+
export { default as md5 } from './md5';
|
5
|
+
export { default as NumberUtil } from './NumberUtil';
|
6
|
+
export { default as uuid } from './uuid';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export { default as DateUtil } from './DateUtil.js';
|
2
|
+
export { default as delay } from './delay.js';
|
3
|
+
export { default as md5 } from './md5.js';
|
4
|
+
export { default as NumberUtil } from './NumberUtil.js';
|
5
|
+
export { default as cloneDeep } from './cloneDeep.js';
|
6
|
+
export { default as uuid } from './uuid.js';
|
7
|
+
import '../dayjs.min-CYqA_arp.js';
|
8
|
+
import '../_commonjsHelpers-BFTU3MAI.js';
|
9
|
+
import '../error/OrionError.js';
|
10
|
+
import '../bignumber-upqAL281.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from 'md5';
|
@@ -0,0 +1,326 @@
|
|
1
|
+
import { g as getDefaultExportFromCjs } from '../_commonjsHelpers-BFTU3MAI.js';
|
2
|
+
|
3
|
+
var md5$1 = {exports: {}};
|
4
|
+
|
5
|
+
var crypt = {exports: {}};
|
6
|
+
|
7
|
+
(function() {
|
8
|
+
var base64map
|
9
|
+
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
|
10
|
+
|
11
|
+
crypt$1 = {
|
12
|
+
// Bit-wise rotation left
|
13
|
+
rotl: function(n, b) {
|
14
|
+
return (n << b) | (n >>> (32 - b));
|
15
|
+
},
|
16
|
+
|
17
|
+
// Bit-wise rotation right
|
18
|
+
rotr: function(n, b) {
|
19
|
+
return (n << (32 - b)) | (n >>> b);
|
20
|
+
},
|
21
|
+
|
22
|
+
// Swap big-endian to little-endian and vice versa
|
23
|
+
endian: function(n) {
|
24
|
+
// If number given, swap endian
|
25
|
+
if (n.constructor == Number) {
|
26
|
+
return crypt$1.rotl(n, 8) & 0x00FF00FF | crypt$1.rotl(n, 24) & 0xFF00FF00;
|
27
|
+
}
|
28
|
+
|
29
|
+
// Else, assume array and swap all items
|
30
|
+
for (var i = 0; i < n.length; i++)
|
31
|
+
n[i] = crypt$1.endian(n[i]);
|
32
|
+
return n;
|
33
|
+
},
|
34
|
+
|
35
|
+
// Generate an array of any length of random bytes
|
36
|
+
randomBytes: function(n) {
|
37
|
+
for (var bytes = []; n > 0; n--)
|
38
|
+
bytes.push(Math.floor(Math.random() * 256));
|
39
|
+
return bytes;
|
40
|
+
},
|
41
|
+
|
42
|
+
// Convert a byte array to big-endian 32-bit words
|
43
|
+
bytesToWords: function(bytes) {
|
44
|
+
for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
|
45
|
+
words[b >>> 5] |= bytes[i] << (24 - b % 32);
|
46
|
+
return words;
|
47
|
+
},
|
48
|
+
|
49
|
+
// Convert big-endian 32-bit words to a byte array
|
50
|
+
wordsToBytes: function(words) {
|
51
|
+
for (var bytes = [], b = 0; b < words.length * 32; b += 8)
|
52
|
+
bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
|
53
|
+
return bytes;
|
54
|
+
},
|
55
|
+
|
56
|
+
// Convert a byte array to a hex string
|
57
|
+
bytesToHex: function(bytes) {
|
58
|
+
for (var hex = [], i = 0; i < bytes.length; i++) {
|
59
|
+
hex.push((bytes[i] >>> 4).toString(16));
|
60
|
+
hex.push((bytes[i] & 0xF).toString(16));
|
61
|
+
}
|
62
|
+
return hex.join('');
|
63
|
+
},
|
64
|
+
|
65
|
+
// Convert a hex string to a byte array
|
66
|
+
hexToBytes: function(hex) {
|
67
|
+
for (var bytes = [], c = 0; c < hex.length; c += 2)
|
68
|
+
bytes.push(parseInt(hex.substr(c, 2), 16));
|
69
|
+
return bytes;
|
70
|
+
},
|
71
|
+
|
72
|
+
// Convert a byte array to a base-64 string
|
73
|
+
bytesToBase64: function(bytes) {
|
74
|
+
for (var base64 = [], i = 0; i < bytes.length; i += 3) {
|
75
|
+
var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
|
76
|
+
for (var j = 0; j < 4; j++)
|
77
|
+
if (i * 8 + j * 6 <= bytes.length * 8)
|
78
|
+
base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
|
79
|
+
else
|
80
|
+
base64.push('=');
|
81
|
+
}
|
82
|
+
return base64.join('');
|
83
|
+
},
|
84
|
+
|
85
|
+
// Convert a base-64 string to a byte array
|
86
|
+
base64ToBytes: function(base64) {
|
87
|
+
// Remove non-base-64 characters
|
88
|
+
base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
|
89
|
+
|
90
|
+
for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
|
91
|
+
imod4 = ++i % 4) {
|
92
|
+
if (imod4 == 0) continue;
|
93
|
+
bytes.push(((base64map.indexOf(base64.charAt(i - 1))
|
94
|
+
& (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
|
95
|
+
| (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
|
96
|
+
}
|
97
|
+
return bytes;
|
98
|
+
}
|
99
|
+
};
|
100
|
+
|
101
|
+
crypt.exports = crypt$1;
|
102
|
+
})();
|
103
|
+
|
104
|
+
var cryptExports = crypt.exports;
|
105
|
+
|
106
|
+
var charenc = {
|
107
|
+
// UTF-8 encoding
|
108
|
+
utf8: {
|
109
|
+
// Convert a string to a byte array
|
110
|
+
stringToBytes: function(str) {
|
111
|
+
return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
|
112
|
+
},
|
113
|
+
|
114
|
+
// Convert a byte array to a string
|
115
|
+
bytesToString: function(bytes) {
|
116
|
+
return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
|
117
|
+
}
|
118
|
+
},
|
119
|
+
|
120
|
+
// Binary encoding
|
121
|
+
bin: {
|
122
|
+
// Convert a string to a byte array
|
123
|
+
stringToBytes: function(str) {
|
124
|
+
for (var bytes = [], i = 0; i < str.length; i++)
|
125
|
+
bytes.push(str.charCodeAt(i) & 0xFF);
|
126
|
+
return bytes;
|
127
|
+
},
|
128
|
+
|
129
|
+
// Convert a byte array to a string
|
130
|
+
bytesToString: function(bytes) {
|
131
|
+
for (var str = [], i = 0; i < bytes.length; i++)
|
132
|
+
str.push(String.fromCharCode(bytes[i]));
|
133
|
+
return str.join('');
|
134
|
+
}
|
135
|
+
}
|
136
|
+
};
|
137
|
+
|
138
|
+
var charenc_1 = charenc;
|
139
|
+
|
140
|
+
/*!
|
141
|
+
* Determine if an object is a Buffer
|
142
|
+
*
|
143
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
144
|
+
* @license MIT
|
145
|
+
*/
|
146
|
+
|
147
|
+
// The _isBuffer check is for Safari 5-7 support, because it's missing
|
148
|
+
// Object.prototype.constructor. Remove this eventually
|
149
|
+
var isBuffer_1 = function (obj) {
|
150
|
+
return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
|
151
|
+
};
|
152
|
+
|
153
|
+
function isBuffer (obj) {
|
154
|
+
return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
|
155
|
+
}
|
156
|
+
|
157
|
+
// For Node v0.10 support. Remove this eventually.
|
158
|
+
function isSlowBuffer (obj) {
|
159
|
+
return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
|
160
|
+
}
|
161
|
+
|
162
|
+
(function(){
|
163
|
+
var crypt = cryptExports,
|
164
|
+
utf8 = charenc_1.utf8,
|
165
|
+
isBuffer = isBuffer_1,
|
166
|
+
bin = charenc_1.bin,
|
167
|
+
|
168
|
+
// The core
|
169
|
+
md5 = function (message, options) {
|
170
|
+
// Convert to byte array
|
171
|
+
if (message.constructor == String)
|
172
|
+
if (options && options.encoding === 'binary')
|
173
|
+
message = bin.stringToBytes(message);
|
174
|
+
else
|
175
|
+
message = utf8.stringToBytes(message);
|
176
|
+
else if (isBuffer(message))
|
177
|
+
message = Array.prototype.slice.call(message, 0);
|
178
|
+
else if (!Array.isArray(message) && message.constructor !== Uint8Array)
|
179
|
+
message = message.toString();
|
180
|
+
// else, assume byte array already
|
181
|
+
|
182
|
+
var m = crypt.bytesToWords(message),
|
183
|
+
l = message.length * 8,
|
184
|
+
a = 1732584193,
|
185
|
+
b = -271733879,
|
186
|
+
c = -1732584194,
|
187
|
+
d = 271733878;
|
188
|
+
|
189
|
+
// Swap endian
|
190
|
+
for (var i = 0; i < m.length; i++) {
|
191
|
+
m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |
|
192
|
+
((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;
|
193
|
+
}
|
194
|
+
|
195
|
+
// Padding
|
196
|
+
m[l >>> 5] |= 0x80 << (l % 32);
|
197
|
+
m[(((l + 64) >>> 9) << 4) + 14] = l;
|
198
|
+
|
199
|
+
// Method shortcuts
|
200
|
+
var FF = md5._ff,
|
201
|
+
GG = md5._gg,
|
202
|
+
HH = md5._hh,
|
203
|
+
II = md5._ii;
|
204
|
+
|
205
|
+
for (var i = 0; i < m.length; i += 16) {
|
206
|
+
|
207
|
+
var aa = a,
|
208
|
+
bb = b,
|
209
|
+
cc = c,
|
210
|
+
dd = d;
|
211
|
+
|
212
|
+
a = FF(a, b, c, d, m[i+ 0], 7, -680876936);
|
213
|
+
d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
|
214
|
+
c = FF(c, d, a, b, m[i+ 2], 17, 606105819);
|
215
|
+
b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
|
216
|
+
a = FF(a, b, c, d, m[i+ 4], 7, -176418897);
|
217
|
+
d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);
|
218
|
+
c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
|
219
|
+
b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
|
220
|
+
a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);
|
221
|
+
d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
|
222
|
+
c = FF(c, d, a, b, m[i+10], 17, -42063);
|
223
|
+
b = FF(b, c, d, a, m[i+11], 22, -1990404162);
|
224
|
+
a = FF(a, b, c, d, m[i+12], 7, 1804603682);
|
225
|
+
d = FF(d, a, b, c, m[i+13], 12, -40341101);
|
226
|
+
c = FF(c, d, a, b, m[i+14], 17, -1502002290);
|
227
|
+
b = FF(b, c, d, a, m[i+15], 22, 1236535329);
|
228
|
+
|
229
|
+
a = GG(a, b, c, d, m[i+ 1], 5, -165796510);
|
230
|
+
d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);
|
231
|
+
c = GG(c, d, a, b, m[i+11], 14, 643717713);
|
232
|
+
b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
|
233
|
+
a = GG(a, b, c, d, m[i+ 5], 5, -701558691);
|
234
|
+
d = GG(d, a, b, c, m[i+10], 9, 38016083);
|
235
|
+
c = GG(c, d, a, b, m[i+15], 14, -660478335);
|
236
|
+
b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
|
237
|
+
a = GG(a, b, c, d, m[i+ 9], 5, 568446438);
|
238
|
+
d = GG(d, a, b, c, m[i+14], 9, -1019803690);
|
239
|
+
c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
|
240
|
+
b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);
|
241
|
+
a = GG(a, b, c, d, m[i+13], 5, -1444681467);
|
242
|
+
d = GG(d, a, b, c, m[i+ 2], 9, -51403784);
|
243
|
+
c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);
|
244
|
+
b = GG(b, c, d, a, m[i+12], 20, -1926607734);
|
245
|
+
|
246
|
+
a = HH(a, b, c, d, m[i+ 5], 4, -378558);
|
247
|
+
d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
|
248
|
+
c = HH(c, d, a, b, m[i+11], 16, 1839030562);
|
249
|
+
b = HH(b, c, d, a, m[i+14], 23, -35309556);
|
250
|
+
a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);
|
251
|
+
d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);
|
252
|
+
c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
|
253
|
+
b = HH(b, c, d, a, m[i+10], 23, -1094730640);
|
254
|
+
a = HH(a, b, c, d, m[i+13], 4, 681279174);
|
255
|
+
d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
|
256
|
+
c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
|
257
|
+
b = HH(b, c, d, a, m[i+ 6], 23, 76029189);
|
258
|
+
a = HH(a, b, c, d, m[i+ 9], 4, -640364487);
|
259
|
+
d = HH(d, a, b, c, m[i+12], 11, -421815835);
|
260
|
+
c = HH(c, d, a, b, m[i+15], 16, 530742520);
|
261
|
+
b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
|
262
|
+
|
263
|
+
a = II(a, b, c, d, m[i+ 0], 6, -198630844);
|
264
|
+
d = II(d, a, b, c, m[i+ 7], 10, 1126891415);
|
265
|
+
c = II(c, d, a, b, m[i+14], 15, -1416354905);
|
266
|
+
b = II(b, c, d, a, m[i+ 5], 21, -57434055);
|
267
|
+
a = II(a, b, c, d, m[i+12], 6, 1700485571);
|
268
|
+
d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
|
269
|
+
c = II(c, d, a, b, m[i+10], 15, -1051523);
|
270
|
+
b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
|
271
|
+
a = II(a, b, c, d, m[i+ 8], 6, 1873313359);
|
272
|
+
d = II(d, a, b, c, m[i+15], 10, -30611744);
|
273
|
+
c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
|
274
|
+
b = II(b, c, d, a, m[i+13], 21, 1309151649);
|
275
|
+
a = II(a, b, c, d, m[i+ 4], 6, -145523070);
|
276
|
+
d = II(d, a, b, c, m[i+11], 10, -1120210379);
|
277
|
+
c = II(c, d, a, b, m[i+ 2], 15, 718787259);
|
278
|
+
b = II(b, c, d, a, m[i+ 9], 21, -343485551);
|
279
|
+
|
280
|
+
a = (a + aa) >>> 0;
|
281
|
+
b = (b + bb) >>> 0;
|
282
|
+
c = (c + cc) >>> 0;
|
283
|
+
d = (d + dd) >>> 0;
|
284
|
+
}
|
285
|
+
|
286
|
+
return crypt.endian([a, b, c, d]);
|
287
|
+
};
|
288
|
+
|
289
|
+
// Auxiliary functions
|
290
|
+
md5._ff = function (a, b, c, d, x, s, t) {
|
291
|
+
var n = a + (b & c | ~b & d) + (x >>> 0) + t;
|
292
|
+
return ((n << s) | (n >>> (32 - s))) + b;
|
293
|
+
};
|
294
|
+
md5._gg = function (a, b, c, d, x, s, t) {
|
295
|
+
var n = a + (b & d | c & ~d) + (x >>> 0) + t;
|
296
|
+
return ((n << s) | (n >>> (32 - s))) + b;
|
297
|
+
};
|
298
|
+
md5._hh = function (a, b, c, d, x, s, t) {
|
299
|
+
var n = a + (b ^ c ^ d) + (x >>> 0) + t;
|
300
|
+
return ((n << s) | (n >>> (32 - s))) + b;
|
301
|
+
};
|
302
|
+
md5._ii = function (a, b, c, d, x, s, t) {
|
303
|
+
var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
|
304
|
+
return ((n << s) | (n >>> (32 - s))) + b;
|
305
|
+
};
|
306
|
+
|
307
|
+
// Package private blocksize
|
308
|
+
md5._blocksize = 16;
|
309
|
+
md5._digestsize = 16;
|
310
|
+
|
311
|
+
md5$1.exports = function (message, options) {
|
312
|
+
if (message === undefined || message === null)
|
313
|
+
throw new Error('Illegal argument ' + message);
|
314
|
+
|
315
|
+
var digestbytes = crypt.wordsToBytes(md5(message, options));
|
316
|
+
return options && options.asBytes ? digestbytes :
|
317
|
+
options && options.asString ? bin.bytesToString(digestbytes) :
|
318
|
+
crypt.bytesToHex(digestbytes);
|
319
|
+
};
|
320
|
+
|
321
|
+
})();
|
322
|
+
|
323
|
+
var md5Exports = md5$1.exports;
|
324
|
+
var md5 = /*@__PURE__*/getDefaultExportFromCjs(md5Exports);
|
325
|
+
|
326
|
+
export { md5 as default };
|
@@ -0,0 +1 @@
|
|
1
|
+
export { v4 as default } from 'uuid';
|
@@ -0,0 +1,63 @@
|
|
1
|
+
/**
|
2
|
+
* Convert array of 16 byte values to UUID string format of the form:
|
3
|
+
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
4
|
+
*/
|
5
|
+
var byteToHex = [];
|
6
|
+
for (var i = 0; i < 256; ++i) {
|
7
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
8
|
+
}
|
9
|
+
function unsafeStringify(arr, offset = 0) {
|
10
|
+
// Note: Be careful editing this code! It's been tuned for performance
|
11
|
+
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
12
|
+
//
|
13
|
+
// Note to future-self: No, you can't remove the `toLowerCase()` call.
|
14
|
+
// REF: https://github.com/uuidjs/uuid/pull/677#issuecomment-1757351351
|
15
|
+
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
16
|
+
}
|
17
|
+
|
18
|
+
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
19
|
+
// require the crypto API and do not support built-in fallback to lower quality random number
|
20
|
+
// generators (like Math.random()).
|
21
|
+
|
22
|
+
var getRandomValues;
|
23
|
+
var rnds8 = new Uint8Array(16);
|
24
|
+
function rng() {
|
25
|
+
// lazy load so that environments that need to polyfill have a chance to do so
|
26
|
+
if (!getRandomValues) {
|
27
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
28
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
29
|
+
if (!getRandomValues) {
|
30
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
31
|
+
}
|
32
|
+
}
|
33
|
+
return getRandomValues(rnds8);
|
34
|
+
}
|
35
|
+
|
36
|
+
var randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
37
|
+
var native = {
|
38
|
+
randomUUID
|
39
|
+
};
|
40
|
+
|
41
|
+
function v4(options, buf, offset) {
|
42
|
+
if (native.randomUUID && !buf && !options) {
|
43
|
+
return native.randomUUID();
|
44
|
+
}
|
45
|
+
options = options || {};
|
46
|
+
var rnds = options.random || (options.rng || rng)();
|
47
|
+
|
48
|
+
// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
49
|
+
rnds[6] = rnds[6] & 0x0f | 0x40;
|
50
|
+
rnds[8] = rnds[8] & 0x3f | 0x80;
|
51
|
+
|
52
|
+
// Copy bytes to buffer, if provided
|
53
|
+
if (buf) {
|
54
|
+
offset = offset || 0;
|
55
|
+
for (var i = 0; i < 16; ++i) {
|
56
|
+
buf[offset + i] = rnds[i];
|
57
|
+
}
|
58
|
+
return buf;
|
59
|
+
}
|
60
|
+
return unsafeStringify(rnds);
|
61
|
+
}
|
62
|
+
|
63
|
+
export { v4 as default };
|
package/package.json
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
{
|
2
|
+
"name": "orion-design",
|
3
|
+
"version": "0.1.0",
|
4
|
+
"description": "",
|
5
|
+
"main": "dist/index.js",
|
6
|
+
"type": "module",
|
7
|
+
"types": "dist/index.d.ts",
|
8
|
+
"files": [
|
9
|
+
"dist"
|
10
|
+
],
|
11
|
+
"scripts": {
|
12
|
+
"dev": "npm run clean:dist && rollup -c -w",
|
13
|
+
"build": "npm run clean:dist && rollup -c --environment BUILD:production && npm run build:types",
|
14
|
+
"build:types": "tsc -b ./tsconfig.types.json",
|
15
|
+
"clean:dist": "rimraf dist"
|
16
|
+
},
|
17
|
+
"author": "",
|
18
|
+
"license": "ISC",
|
19
|
+
"devDependencies": {
|
20
|
+
"@rollup/plugin-babel": "^6.0.4",
|
21
|
+
"@rollup/plugin-commonjs": "^26.0.1",
|
22
|
+
"@rollup/plugin-json": "^6.1.0",
|
23
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
24
|
+
"@types/lodash-es": "^4.17.12",
|
25
|
+
"@types/md5": "^2.3.5",
|
26
|
+
"@types/node": "^22.5.5",
|
27
|
+
"@types/uuid": "^10.0.0",
|
28
|
+
"glob": "^11.0.0",
|
29
|
+
"rimraf": "^6.0.1",
|
30
|
+
"rollup": "^4.21.3",
|
31
|
+
"rollup-plugin-dts": "^6.1.1",
|
32
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
33
|
+
"tslib": "^2.7.0",
|
34
|
+
"typescript": "^5.6.2"
|
35
|
+
},
|
36
|
+
"dependencies": {
|
37
|
+
"axios": "^1.7.7",
|
38
|
+
"bignumber.js": "^9.1.2",
|
39
|
+
"dayjs": "^1.11.13",
|
40
|
+
"js-base64": "^3.7.7",
|
41
|
+
"lodash-es": "^4.17.21",
|
42
|
+
"md5": "^2.3.0",
|
43
|
+
"uuid": "^10.0.0"
|
44
|
+
}
|
45
|
+
}
|