tty-table 5.0.0 → 6.0.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/README.md +38 -228
- package/adapters/automattic-cli-table.js +1 -1
- package/adapters/default-adapter.js +1 -1
- package/adapters/terminal-adapter.js +3 -2
- package/dist/browser/tty-table.global.js +4411 -0
- package/dist/browser/tty-table.global.js.map +1 -0
- package/dist/browser-BC4npgub.d.mts +128 -0
- package/dist/browser-BC4npgub.d.ts +128 -0
- package/dist/browser.d.mts +1 -0
- package/dist/browser.d.ts +1 -0
- package/dist/browser.js +1020 -0
- package/dist/browser.js.map +1 -0
- package/dist/browser.mjs +1016 -0
- package/dist/browser.mjs.map +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +1113 -0
- package/dist/cli.js.map +1 -0
- package/dist/cli.mjs +1118 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1020 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1016 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +38 -59
- package/src/defaults.js +0 -70
- package/src/factory.d.ts +0 -67
- package/src/factory.js +0 -137
- package/src/format.js +0 -282
- package/src/main.js +0 -8
- package/src/render.js +0 -411
- package/src/style.js +0 -62
|
@@ -0,0 +1,4411 @@
|
|
|
1
|
+
var process = typeof process !== 'undefined' ? process : { env: {} };
|
|
2
|
+
"use strict";
|
|
3
|
+
var TtyTable = (() => {
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
11
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
+
};
|
|
13
|
+
var __export = (target, all) => {
|
|
14
|
+
for (var name in all)
|
|
15
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
+
for (let key of __getOwnPropNames(from))
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
26
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
27
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
28
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31
|
+
mod
|
|
32
|
+
));
|
|
33
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
|
+
|
|
35
|
+
// stub:stub
|
|
36
|
+
var require_stub = __commonJS({
|
|
37
|
+
"stub:stub"(exports, module) {
|
|
38
|
+
"use strict";
|
|
39
|
+
module.exports = {};
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// node_modules/ansi-regex/index.js
|
|
44
|
+
var require_ansi_regex = __commonJS({
|
|
45
|
+
"node_modules/ansi-regex/index.js"(exports, module) {
|
|
46
|
+
"use strict";
|
|
47
|
+
module.exports = ({ onlyFirst = false } = {}) => {
|
|
48
|
+
const pattern = [
|
|
49
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
50
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
51
|
+
].join("|");
|
|
52
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// node_modules/strip-ansi/index.js
|
|
58
|
+
var require_strip_ansi = __commonJS({
|
|
59
|
+
"node_modules/strip-ansi/index.js"(exports, module) {
|
|
60
|
+
"use strict";
|
|
61
|
+
var ansiRegex = require_ansi_regex();
|
|
62
|
+
module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// node_modules/clone/clone.js
|
|
67
|
+
var require_clone = __commonJS({
|
|
68
|
+
"node_modules/clone/clone.js"(exports, module) {
|
|
69
|
+
"use strict";
|
|
70
|
+
var clone = (function() {
|
|
71
|
+
"use strict";
|
|
72
|
+
function clone2(parent, circular, depth, prototype) {
|
|
73
|
+
var filter;
|
|
74
|
+
if (typeof circular === "object") {
|
|
75
|
+
depth = circular.depth;
|
|
76
|
+
prototype = circular.prototype;
|
|
77
|
+
filter = circular.filter;
|
|
78
|
+
circular = circular.circular;
|
|
79
|
+
}
|
|
80
|
+
var allParents = [];
|
|
81
|
+
var allChildren = [];
|
|
82
|
+
var useBuffer = typeof Buffer != "undefined";
|
|
83
|
+
if (typeof circular == "undefined")
|
|
84
|
+
circular = true;
|
|
85
|
+
if (typeof depth == "undefined")
|
|
86
|
+
depth = Infinity;
|
|
87
|
+
function _clone(parent2, depth2) {
|
|
88
|
+
if (parent2 === null)
|
|
89
|
+
return null;
|
|
90
|
+
if (depth2 == 0)
|
|
91
|
+
return parent2;
|
|
92
|
+
var child;
|
|
93
|
+
var proto;
|
|
94
|
+
if (typeof parent2 != "object") {
|
|
95
|
+
return parent2;
|
|
96
|
+
}
|
|
97
|
+
if (clone2.__isArray(parent2)) {
|
|
98
|
+
child = [];
|
|
99
|
+
} else if (clone2.__isRegExp(parent2)) {
|
|
100
|
+
child = new RegExp(parent2.source, __getRegExpFlags(parent2));
|
|
101
|
+
if (parent2.lastIndex) child.lastIndex = parent2.lastIndex;
|
|
102
|
+
} else if (clone2.__isDate(parent2)) {
|
|
103
|
+
child = new Date(parent2.getTime());
|
|
104
|
+
} else if (useBuffer && Buffer.isBuffer(parent2)) {
|
|
105
|
+
if (Buffer.allocUnsafe) {
|
|
106
|
+
child = Buffer.allocUnsafe(parent2.length);
|
|
107
|
+
} else {
|
|
108
|
+
child = new Buffer(parent2.length);
|
|
109
|
+
}
|
|
110
|
+
parent2.copy(child);
|
|
111
|
+
return child;
|
|
112
|
+
} else {
|
|
113
|
+
if (typeof prototype == "undefined") {
|
|
114
|
+
proto = Object.getPrototypeOf(parent2);
|
|
115
|
+
child = Object.create(proto);
|
|
116
|
+
} else {
|
|
117
|
+
child = Object.create(prototype);
|
|
118
|
+
proto = prototype;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (circular) {
|
|
122
|
+
var index = allParents.indexOf(parent2);
|
|
123
|
+
if (index != -1) {
|
|
124
|
+
return allChildren[index];
|
|
125
|
+
}
|
|
126
|
+
allParents.push(parent2);
|
|
127
|
+
allChildren.push(child);
|
|
128
|
+
}
|
|
129
|
+
for (var i in parent2) {
|
|
130
|
+
var attrs;
|
|
131
|
+
if (proto) {
|
|
132
|
+
attrs = Object.getOwnPropertyDescriptor(proto, i);
|
|
133
|
+
}
|
|
134
|
+
if (attrs && attrs.set == null) {
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
child[i] = _clone(parent2[i], depth2 - 1);
|
|
138
|
+
}
|
|
139
|
+
return child;
|
|
140
|
+
}
|
|
141
|
+
return _clone(parent, depth);
|
|
142
|
+
}
|
|
143
|
+
clone2.clonePrototype = function clonePrototype(parent) {
|
|
144
|
+
if (parent === null)
|
|
145
|
+
return null;
|
|
146
|
+
var c = function() {
|
|
147
|
+
};
|
|
148
|
+
c.prototype = parent;
|
|
149
|
+
return new c();
|
|
150
|
+
};
|
|
151
|
+
function __objToStr(o) {
|
|
152
|
+
return Object.prototype.toString.call(o);
|
|
153
|
+
}
|
|
154
|
+
;
|
|
155
|
+
clone2.__objToStr = __objToStr;
|
|
156
|
+
function __isDate(o) {
|
|
157
|
+
return typeof o === "object" && __objToStr(o) === "[object Date]";
|
|
158
|
+
}
|
|
159
|
+
;
|
|
160
|
+
clone2.__isDate = __isDate;
|
|
161
|
+
function __isArray(o) {
|
|
162
|
+
return typeof o === "object" && __objToStr(o) === "[object Array]";
|
|
163
|
+
}
|
|
164
|
+
;
|
|
165
|
+
clone2.__isArray = __isArray;
|
|
166
|
+
function __isRegExp(o) {
|
|
167
|
+
return typeof o === "object" && __objToStr(o) === "[object RegExp]";
|
|
168
|
+
}
|
|
169
|
+
;
|
|
170
|
+
clone2.__isRegExp = __isRegExp;
|
|
171
|
+
function __getRegExpFlags(re) {
|
|
172
|
+
var flags = "";
|
|
173
|
+
if (re.global) flags += "g";
|
|
174
|
+
if (re.ignoreCase) flags += "i";
|
|
175
|
+
if (re.multiline) flags += "m";
|
|
176
|
+
return flags;
|
|
177
|
+
}
|
|
178
|
+
;
|
|
179
|
+
clone2.__getRegExpFlags = __getRegExpFlags;
|
|
180
|
+
return clone2;
|
|
181
|
+
})();
|
|
182
|
+
if (typeof module === "object" && module.exports) {
|
|
183
|
+
module.exports = clone;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// node_modules/defaults/index.js
|
|
189
|
+
var require_defaults = __commonJS({
|
|
190
|
+
"node_modules/defaults/index.js"(exports, module) {
|
|
191
|
+
"use strict";
|
|
192
|
+
var clone = require_clone();
|
|
193
|
+
module.exports = function(options, defaults2) {
|
|
194
|
+
options = options || {};
|
|
195
|
+
Object.keys(defaults2).forEach(function(key) {
|
|
196
|
+
if (typeof options[key] === "undefined") {
|
|
197
|
+
options[key] = clone(defaults2[key]);
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
return options;
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
// node_modules/wcwidth/combining.js
|
|
206
|
+
var require_combining = __commonJS({
|
|
207
|
+
"node_modules/wcwidth/combining.js"(exports, module) {
|
|
208
|
+
"use strict";
|
|
209
|
+
module.exports = [
|
|
210
|
+
[768, 879],
|
|
211
|
+
[1155, 1158],
|
|
212
|
+
[1160, 1161],
|
|
213
|
+
[1425, 1469],
|
|
214
|
+
[1471, 1471],
|
|
215
|
+
[1473, 1474],
|
|
216
|
+
[1476, 1477],
|
|
217
|
+
[1479, 1479],
|
|
218
|
+
[1536, 1539],
|
|
219
|
+
[1552, 1557],
|
|
220
|
+
[1611, 1630],
|
|
221
|
+
[1648, 1648],
|
|
222
|
+
[1750, 1764],
|
|
223
|
+
[1767, 1768],
|
|
224
|
+
[1770, 1773],
|
|
225
|
+
[1807, 1807],
|
|
226
|
+
[1809, 1809],
|
|
227
|
+
[1840, 1866],
|
|
228
|
+
[1958, 1968],
|
|
229
|
+
[2027, 2035],
|
|
230
|
+
[2305, 2306],
|
|
231
|
+
[2364, 2364],
|
|
232
|
+
[2369, 2376],
|
|
233
|
+
[2381, 2381],
|
|
234
|
+
[2385, 2388],
|
|
235
|
+
[2402, 2403],
|
|
236
|
+
[2433, 2433],
|
|
237
|
+
[2492, 2492],
|
|
238
|
+
[2497, 2500],
|
|
239
|
+
[2509, 2509],
|
|
240
|
+
[2530, 2531],
|
|
241
|
+
[2561, 2562],
|
|
242
|
+
[2620, 2620],
|
|
243
|
+
[2625, 2626],
|
|
244
|
+
[2631, 2632],
|
|
245
|
+
[2635, 2637],
|
|
246
|
+
[2672, 2673],
|
|
247
|
+
[2689, 2690],
|
|
248
|
+
[2748, 2748],
|
|
249
|
+
[2753, 2757],
|
|
250
|
+
[2759, 2760],
|
|
251
|
+
[2765, 2765],
|
|
252
|
+
[2786, 2787],
|
|
253
|
+
[2817, 2817],
|
|
254
|
+
[2876, 2876],
|
|
255
|
+
[2879, 2879],
|
|
256
|
+
[2881, 2883],
|
|
257
|
+
[2893, 2893],
|
|
258
|
+
[2902, 2902],
|
|
259
|
+
[2946, 2946],
|
|
260
|
+
[3008, 3008],
|
|
261
|
+
[3021, 3021],
|
|
262
|
+
[3134, 3136],
|
|
263
|
+
[3142, 3144],
|
|
264
|
+
[3146, 3149],
|
|
265
|
+
[3157, 3158],
|
|
266
|
+
[3260, 3260],
|
|
267
|
+
[3263, 3263],
|
|
268
|
+
[3270, 3270],
|
|
269
|
+
[3276, 3277],
|
|
270
|
+
[3298, 3299],
|
|
271
|
+
[3393, 3395],
|
|
272
|
+
[3405, 3405],
|
|
273
|
+
[3530, 3530],
|
|
274
|
+
[3538, 3540],
|
|
275
|
+
[3542, 3542],
|
|
276
|
+
[3633, 3633],
|
|
277
|
+
[3636, 3642],
|
|
278
|
+
[3655, 3662],
|
|
279
|
+
[3761, 3761],
|
|
280
|
+
[3764, 3769],
|
|
281
|
+
[3771, 3772],
|
|
282
|
+
[3784, 3789],
|
|
283
|
+
[3864, 3865],
|
|
284
|
+
[3893, 3893],
|
|
285
|
+
[3895, 3895],
|
|
286
|
+
[3897, 3897],
|
|
287
|
+
[3953, 3966],
|
|
288
|
+
[3968, 3972],
|
|
289
|
+
[3974, 3975],
|
|
290
|
+
[3984, 3991],
|
|
291
|
+
[3993, 4028],
|
|
292
|
+
[4038, 4038],
|
|
293
|
+
[4141, 4144],
|
|
294
|
+
[4146, 4146],
|
|
295
|
+
[4150, 4151],
|
|
296
|
+
[4153, 4153],
|
|
297
|
+
[4184, 4185],
|
|
298
|
+
[4448, 4607],
|
|
299
|
+
[4959, 4959],
|
|
300
|
+
[5906, 5908],
|
|
301
|
+
[5938, 5940],
|
|
302
|
+
[5970, 5971],
|
|
303
|
+
[6002, 6003],
|
|
304
|
+
[6068, 6069],
|
|
305
|
+
[6071, 6077],
|
|
306
|
+
[6086, 6086],
|
|
307
|
+
[6089, 6099],
|
|
308
|
+
[6109, 6109],
|
|
309
|
+
[6155, 6157],
|
|
310
|
+
[6313, 6313],
|
|
311
|
+
[6432, 6434],
|
|
312
|
+
[6439, 6440],
|
|
313
|
+
[6450, 6450],
|
|
314
|
+
[6457, 6459],
|
|
315
|
+
[6679, 6680],
|
|
316
|
+
[6912, 6915],
|
|
317
|
+
[6964, 6964],
|
|
318
|
+
[6966, 6970],
|
|
319
|
+
[6972, 6972],
|
|
320
|
+
[6978, 6978],
|
|
321
|
+
[7019, 7027],
|
|
322
|
+
[7616, 7626],
|
|
323
|
+
[7678, 7679],
|
|
324
|
+
[8203, 8207],
|
|
325
|
+
[8234, 8238],
|
|
326
|
+
[8288, 8291],
|
|
327
|
+
[8298, 8303],
|
|
328
|
+
[8400, 8431],
|
|
329
|
+
[12330, 12335],
|
|
330
|
+
[12441, 12442],
|
|
331
|
+
[43014, 43014],
|
|
332
|
+
[43019, 43019],
|
|
333
|
+
[43045, 43046],
|
|
334
|
+
[64286, 64286],
|
|
335
|
+
[65024, 65039],
|
|
336
|
+
[65056, 65059],
|
|
337
|
+
[65279, 65279],
|
|
338
|
+
[65529, 65531],
|
|
339
|
+
[68097, 68099],
|
|
340
|
+
[68101, 68102],
|
|
341
|
+
[68108, 68111],
|
|
342
|
+
[68152, 68154],
|
|
343
|
+
[68159, 68159],
|
|
344
|
+
[119143, 119145],
|
|
345
|
+
[119155, 119170],
|
|
346
|
+
[119173, 119179],
|
|
347
|
+
[119210, 119213],
|
|
348
|
+
[119362, 119364],
|
|
349
|
+
[917505, 917505],
|
|
350
|
+
[917536, 917631],
|
|
351
|
+
[917760, 917999]
|
|
352
|
+
];
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
// node_modules/wcwidth/index.js
|
|
357
|
+
var require_wcwidth = __commonJS({
|
|
358
|
+
"node_modules/wcwidth/index.js"(exports, module) {
|
|
359
|
+
"use strict";
|
|
360
|
+
var defaults2 = require_defaults();
|
|
361
|
+
var combining = require_combining();
|
|
362
|
+
var DEFAULTS = {
|
|
363
|
+
nul: 0,
|
|
364
|
+
control: 0
|
|
365
|
+
};
|
|
366
|
+
module.exports = function wcwidth3(str) {
|
|
367
|
+
return wcswidth(str, DEFAULTS);
|
|
368
|
+
};
|
|
369
|
+
module.exports.config = function(opts) {
|
|
370
|
+
opts = defaults2(opts || {}, DEFAULTS);
|
|
371
|
+
return function wcwidth3(str) {
|
|
372
|
+
return wcswidth(str, opts);
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
function wcswidth(str, opts) {
|
|
376
|
+
if (typeof str !== "string") return wcwidth2(str, opts);
|
|
377
|
+
var s = 0;
|
|
378
|
+
for (var i = 0; i < str.length; i++) {
|
|
379
|
+
var n = wcwidth2(str.charCodeAt(i), opts);
|
|
380
|
+
if (n < 0) return -1;
|
|
381
|
+
s += n;
|
|
382
|
+
}
|
|
383
|
+
return s;
|
|
384
|
+
}
|
|
385
|
+
function wcwidth2(ucs, opts) {
|
|
386
|
+
if (ucs === 0) return opts.nul;
|
|
387
|
+
if (ucs < 32 || ucs >= 127 && ucs < 160) return opts.control;
|
|
388
|
+
if (bisearch(ucs)) return 0;
|
|
389
|
+
return 1 + (ucs >= 4352 && (ucs <= 4447 || // Hangul Jamo init. consonants
|
|
390
|
+
ucs == 9001 || ucs == 9002 || ucs >= 11904 && ucs <= 42191 && ucs != 12351 || // CJK ... Yi
|
|
391
|
+
ucs >= 44032 && ucs <= 55203 || // Hangul Syllables
|
|
392
|
+
ucs >= 63744 && ucs <= 64255 || // CJK Compatibility Ideographs
|
|
393
|
+
ucs >= 65040 && ucs <= 65049 || // Vertical forms
|
|
394
|
+
ucs >= 65072 && ucs <= 65135 || // CJK Compatibility Forms
|
|
395
|
+
ucs >= 65280 && ucs <= 65376 || // Fullwidth Forms
|
|
396
|
+
ucs >= 65504 && ucs <= 65510 || ucs >= 131072 && ucs <= 196605 || ucs >= 196608 && ucs <= 262141));
|
|
397
|
+
}
|
|
398
|
+
function bisearch(ucs) {
|
|
399
|
+
var min = 0;
|
|
400
|
+
var max = combining.length - 1;
|
|
401
|
+
var mid;
|
|
402
|
+
if (ucs < combining[0][0] || ucs > combining[max][1]) return false;
|
|
403
|
+
while (max >= min) {
|
|
404
|
+
mid = Math.floor((min + max) / 2);
|
|
405
|
+
if (ucs > combining[mid][1]) min = mid + 1;
|
|
406
|
+
else if (ucs < combining[mid][0]) max = mid - 1;
|
|
407
|
+
else return true;
|
|
408
|
+
}
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
// node_modules/breakword/dist/main.js
|
|
415
|
+
var require_main = __commonJS({
|
|
416
|
+
"node_modules/breakword/dist/main.js"(exports, module) {
|
|
417
|
+
"use strict";
|
|
418
|
+
function _toConsumableArray(arr) {
|
|
419
|
+
if (Array.isArray(arr)) {
|
|
420
|
+
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
|
|
421
|
+
arr2[i] = arr[i];
|
|
422
|
+
}
|
|
423
|
+
return arr2;
|
|
424
|
+
} else {
|
|
425
|
+
return Array.from(arr);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
var wcwidth2 = require_wcwidth();
|
|
429
|
+
module.exports = function(input, breakAtLength) {
|
|
430
|
+
var str = input.toString();
|
|
431
|
+
var charArr = [].concat(_toConsumableArray(str));
|
|
432
|
+
var index = 0;
|
|
433
|
+
var indexOfLastFitChar = 0;
|
|
434
|
+
var fittableLength = 0;
|
|
435
|
+
while (charArr.length > 0) {
|
|
436
|
+
var char = charArr.shift();
|
|
437
|
+
var currentLength = fittableLength + wcwidth2(char);
|
|
438
|
+
if (currentLength <= breakAtLength) {
|
|
439
|
+
indexOfLastFitChar = index;
|
|
440
|
+
fittableLength = currentLength;
|
|
441
|
+
index++;
|
|
442
|
+
} else {
|
|
443
|
+
break;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
return indexOfLastFitChar;
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
// node_modules/object-keys/isArguments.js
|
|
452
|
+
var require_isArguments = __commonJS({
|
|
453
|
+
"node_modules/object-keys/isArguments.js"(exports, module) {
|
|
454
|
+
"use strict";
|
|
455
|
+
var toStr = Object.prototype.toString;
|
|
456
|
+
module.exports = function isArguments(value) {
|
|
457
|
+
var str = toStr.call(value);
|
|
458
|
+
var isArgs = str === "[object Arguments]";
|
|
459
|
+
if (!isArgs) {
|
|
460
|
+
isArgs = str !== "[object Array]" && value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && toStr.call(value.callee) === "[object Function]";
|
|
461
|
+
}
|
|
462
|
+
return isArgs;
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
// node_modules/object-keys/implementation.js
|
|
468
|
+
var require_implementation = __commonJS({
|
|
469
|
+
"node_modules/object-keys/implementation.js"(exports, module) {
|
|
470
|
+
"use strict";
|
|
471
|
+
var keysShim;
|
|
472
|
+
if (!Object.keys) {
|
|
473
|
+
has = Object.prototype.hasOwnProperty;
|
|
474
|
+
toStr = Object.prototype.toString;
|
|
475
|
+
isArgs = require_isArguments();
|
|
476
|
+
isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
477
|
+
hasDontEnumBug = !isEnumerable.call({ toString: null }, "toString");
|
|
478
|
+
hasProtoEnumBug = isEnumerable.call(function() {
|
|
479
|
+
}, "prototype");
|
|
480
|
+
dontEnums = [
|
|
481
|
+
"toString",
|
|
482
|
+
"toLocaleString",
|
|
483
|
+
"valueOf",
|
|
484
|
+
"hasOwnProperty",
|
|
485
|
+
"isPrototypeOf",
|
|
486
|
+
"propertyIsEnumerable",
|
|
487
|
+
"constructor"
|
|
488
|
+
];
|
|
489
|
+
equalsConstructorPrototype = function(o) {
|
|
490
|
+
var ctor = o.constructor;
|
|
491
|
+
return ctor && ctor.prototype === o;
|
|
492
|
+
};
|
|
493
|
+
excludedKeys = {
|
|
494
|
+
$applicationCache: true,
|
|
495
|
+
$console: true,
|
|
496
|
+
$external: true,
|
|
497
|
+
$frame: true,
|
|
498
|
+
$frameElement: true,
|
|
499
|
+
$frames: true,
|
|
500
|
+
$innerHeight: true,
|
|
501
|
+
$innerWidth: true,
|
|
502
|
+
$onmozfullscreenchange: true,
|
|
503
|
+
$onmozfullscreenerror: true,
|
|
504
|
+
$outerHeight: true,
|
|
505
|
+
$outerWidth: true,
|
|
506
|
+
$pageXOffset: true,
|
|
507
|
+
$pageYOffset: true,
|
|
508
|
+
$parent: true,
|
|
509
|
+
$scrollLeft: true,
|
|
510
|
+
$scrollTop: true,
|
|
511
|
+
$scrollX: true,
|
|
512
|
+
$scrollY: true,
|
|
513
|
+
$self: true,
|
|
514
|
+
$webkitIndexedDB: true,
|
|
515
|
+
$webkitStorageInfo: true,
|
|
516
|
+
$window: true
|
|
517
|
+
};
|
|
518
|
+
hasAutomationEqualityBug = (function() {
|
|
519
|
+
if (typeof window === "undefined") {
|
|
520
|
+
return false;
|
|
521
|
+
}
|
|
522
|
+
for (var k in window) {
|
|
523
|
+
try {
|
|
524
|
+
if (!excludedKeys["$" + k] && has.call(window, k) && window[k] !== null && typeof window[k] === "object") {
|
|
525
|
+
try {
|
|
526
|
+
equalsConstructorPrototype(window[k]);
|
|
527
|
+
} catch (e) {
|
|
528
|
+
return true;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
} catch (e) {
|
|
532
|
+
return true;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
return false;
|
|
536
|
+
})();
|
|
537
|
+
equalsConstructorPrototypeIfNotBuggy = function(o) {
|
|
538
|
+
if (typeof window === "undefined" || !hasAutomationEqualityBug) {
|
|
539
|
+
return equalsConstructorPrototype(o);
|
|
540
|
+
}
|
|
541
|
+
try {
|
|
542
|
+
return equalsConstructorPrototype(o);
|
|
543
|
+
} catch (e) {
|
|
544
|
+
return false;
|
|
545
|
+
}
|
|
546
|
+
};
|
|
547
|
+
keysShim = function keys(object) {
|
|
548
|
+
var isObject = object !== null && typeof object === "object";
|
|
549
|
+
var isFunction = toStr.call(object) === "[object Function]";
|
|
550
|
+
var isArguments = isArgs(object);
|
|
551
|
+
var isString = isObject && toStr.call(object) === "[object String]";
|
|
552
|
+
var theKeys = [];
|
|
553
|
+
if (!isObject && !isFunction && !isArguments) {
|
|
554
|
+
throw new TypeError("Object.keys called on a non-object");
|
|
555
|
+
}
|
|
556
|
+
var skipProto = hasProtoEnumBug && isFunction;
|
|
557
|
+
if (isString && object.length > 0 && !has.call(object, 0)) {
|
|
558
|
+
for (var i = 0; i < object.length; ++i) {
|
|
559
|
+
theKeys.push(String(i));
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
if (isArguments && object.length > 0) {
|
|
563
|
+
for (var j = 0; j < object.length; ++j) {
|
|
564
|
+
theKeys.push(String(j));
|
|
565
|
+
}
|
|
566
|
+
} else {
|
|
567
|
+
for (var name in object) {
|
|
568
|
+
if (!(skipProto && name === "prototype") && has.call(object, name)) {
|
|
569
|
+
theKeys.push(String(name));
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
if (hasDontEnumBug) {
|
|
574
|
+
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
|
|
575
|
+
for (var k = 0; k < dontEnums.length; ++k) {
|
|
576
|
+
if (!(skipConstructor && dontEnums[k] === "constructor") && has.call(object, dontEnums[k])) {
|
|
577
|
+
theKeys.push(dontEnums[k]);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
return theKeys;
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
var has;
|
|
585
|
+
var toStr;
|
|
586
|
+
var isArgs;
|
|
587
|
+
var isEnumerable;
|
|
588
|
+
var hasDontEnumBug;
|
|
589
|
+
var hasProtoEnumBug;
|
|
590
|
+
var dontEnums;
|
|
591
|
+
var equalsConstructorPrototype;
|
|
592
|
+
var excludedKeys;
|
|
593
|
+
var hasAutomationEqualityBug;
|
|
594
|
+
var equalsConstructorPrototypeIfNotBuggy;
|
|
595
|
+
module.exports = keysShim;
|
|
596
|
+
}
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
// node_modules/object-keys/index.js
|
|
600
|
+
var require_object_keys = __commonJS({
|
|
601
|
+
"node_modules/object-keys/index.js"(exports, module) {
|
|
602
|
+
"use strict";
|
|
603
|
+
var slice = Array.prototype.slice;
|
|
604
|
+
var isArgs = require_isArguments();
|
|
605
|
+
var origKeys = Object.keys;
|
|
606
|
+
var keysShim = origKeys ? function keys(o) {
|
|
607
|
+
return origKeys(o);
|
|
608
|
+
} : require_implementation();
|
|
609
|
+
var originalKeys = Object.keys;
|
|
610
|
+
keysShim.shim = function shimObjectKeys() {
|
|
611
|
+
if (Object.keys) {
|
|
612
|
+
var keysWorksWithArguments = (function() {
|
|
613
|
+
var args = Object.keys(arguments);
|
|
614
|
+
return args && args.length === arguments.length;
|
|
615
|
+
})(1, 2);
|
|
616
|
+
if (!keysWorksWithArguments) {
|
|
617
|
+
Object.keys = function keys(object) {
|
|
618
|
+
if (isArgs(object)) {
|
|
619
|
+
return originalKeys(slice.call(object));
|
|
620
|
+
}
|
|
621
|
+
return originalKeys(object);
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
} else {
|
|
625
|
+
Object.keys = keysShim;
|
|
626
|
+
}
|
|
627
|
+
return Object.keys || keysShim;
|
|
628
|
+
};
|
|
629
|
+
module.exports = keysShim;
|
|
630
|
+
}
|
|
631
|
+
});
|
|
632
|
+
|
|
633
|
+
// node_modules/es-define-property/index.js
|
|
634
|
+
var require_es_define_property = __commonJS({
|
|
635
|
+
"node_modules/es-define-property/index.js"(exports, module) {
|
|
636
|
+
"use strict";
|
|
637
|
+
var $defineProperty = Object.defineProperty || false;
|
|
638
|
+
if ($defineProperty) {
|
|
639
|
+
try {
|
|
640
|
+
$defineProperty({}, "a", { value: 1 });
|
|
641
|
+
} catch (e) {
|
|
642
|
+
$defineProperty = false;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
module.exports = $defineProperty;
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
|
|
649
|
+
// node_modules/es-errors/syntax.js
|
|
650
|
+
var require_syntax = __commonJS({
|
|
651
|
+
"node_modules/es-errors/syntax.js"(exports, module) {
|
|
652
|
+
"use strict";
|
|
653
|
+
module.exports = SyntaxError;
|
|
654
|
+
}
|
|
655
|
+
});
|
|
656
|
+
|
|
657
|
+
// node_modules/es-errors/type.js
|
|
658
|
+
var require_type = __commonJS({
|
|
659
|
+
"node_modules/es-errors/type.js"(exports, module) {
|
|
660
|
+
"use strict";
|
|
661
|
+
module.exports = TypeError;
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
|
|
665
|
+
// node_modules/gopd/gOPD.js
|
|
666
|
+
var require_gOPD = __commonJS({
|
|
667
|
+
"node_modules/gopd/gOPD.js"(exports, module) {
|
|
668
|
+
"use strict";
|
|
669
|
+
module.exports = Object.getOwnPropertyDescriptor;
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
|
|
673
|
+
// node_modules/gopd/index.js
|
|
674
|
+
var require_gopd = __commonJS({
|
|
675
|
+
"node_modules/gopd/index.js"(exports, module) {
|
|
676
|
+
"use strict";
|
|
677
|
+
var $gOPD = require_gOPD();
|
|
678
|
+
if ($gOPD) {
|
|
679
|
+
try {
|
|
680
|
+
$gOPD([], "length");
|
|
681
|
+
} catch (e) {
|
|
682
|
+
$gOPD = null;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
module.exports = $gOPD;
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
|
|
689
|
+
// node_modules/define-data-property/index.js
|
|
690
|
+
var require_define_data_property = __commonJS({
|
|
691
|
+
"node_modules/define-data-property/index.js"(exports, module) {
|
|
692
|
+
"use strict";
|
|
693
|
+
var $defineProperty = require_es_define_property();
|
|
694
|
+
var $SyntaxError = require_syntax();
|
|
695
|
+
var $TypeError = require_type();
|
|
696
|
+
var gopd = require_gopd();
|
|
697
|
+
module.exports = function defineDataProperty(obj, property, value) {
|
|
698
|
+
if (!obj || typeof obj !== "object" && typeof obj !== "function") {
|
|
699
|
+
throw new $TypeError("`obj` must be an object or a function`");
|
|
700
|
+
}
|
|
701
|
+
if (typeof property !== "string" && typeof property !== "symbol") {
|
|
702
|
+
throw new $TypeError("`property` must be a string or a symbol`");
|
|
703
|
+
}
|
|
704
|
+
if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
|
|
705
|
+
throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");
|
|
706
|
+
}
|
|
707
|
+
if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
|
|
708
|
+
throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");
|
|
709
|
+
}
|
|
710
|
+
if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
|
|
711
|
+
throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");
|
|
712
|
+
}
|
|
713
|
+
if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
|
|
714
|
+
throw new $TypeError("`loose`, if provided, must be a boolean");
|
|
715
|
+
}
|
|
716
|
+
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
717
|
+
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
718
|
+
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
719
|
+
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
720
|
+
var desc = !!gopd && gopd(obj, property);
|
|
721
|
+
if ($defineProperty) {
|
|
722
|
+
$defineProperty(obj, property, {
|
|
723
|
+
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
724
|
+
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
725
|
+
value,
|
|
726
|
+
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
727
|
+
});
|
|
728
|
+
} else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
|
|
729
|
+
obj[property] = value;
|
|
730
|
+
} else {
|
|
731
|
+
throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
|
|
737
|
+
// node_modules/has-property-descriptors/index.js
|
|
738
|
+
var require_has_property_descriptors = __commonJS({
|
|
739
|
+
"node_modules/has-property-descriptors/index.js"(exports, module) {
|
|
740
|
+
"use strict";
|
|
741
|
+
var $defineProperty = require_es_define_property();
|
|
742
|
+
var hasPropertyDescriptors = function hasPropertyDescriptors2() {
|
|
743
|
+
return !!$defineProperty;
|
|
744
|
+
};
|
|
745
|
+
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
746
|
+
if (!$defineProperty) {
|
|
747
|
+
return null;
|
|
748
|
+
}
|
|
749
|
+
try {
|
|
750
|
+
return $defineProperty([], "length", { value: 1 }).length !== 1;
|
|
751
|
+
} catch (e) {
|
|
752
|
+
return true;
|
|
753
|
+
}
|
|
754
|
+
};
|
|
755
|
+
module.exports = hasPropertyDescriptors;
|
|
756
|
+
}
|
|
757
|
+
});
|
|
758
|
+
|
|
759
|
+
// node_modules/define-properties/index.js
|
|
760
|
+
var require_define_properties = __commonJS({
|
|
761
|
+
"node_modules/define-properties/index.js"(exports, module) {
|
|
762
|
+
"use strict";
|
|
763
|
+
var keys = require_object_keys();
|
|
764
|
+
var hasSymbols = typeof Symbol === "function" && typeof /* @__PURE__ */ Symbol("foo") === "symbol";
|
|
765
|
+
var toStr = Object.prototype.toString;
|
|
766
|
+
var concat = Array.prototype.concat;
|
|
767
|
+
var defineDataProperty = require_define_data_property();
|
|
768
|
+
var isFunction = function(fn) {
|
|
769
|
+
return typeof fn === "function" && toStr.call(fn) === "[object Function]";
|
|
770
|
+
};
|
|
771
|
+
var supportsDescriptors = require_has_property_descriptors()();
|
|
772
|
+
var defineProperty = function(object, name, value, predicate) {
|
|
773
|
+
if (name in object) {
|
|
774
|
+
if (predicate === true) {
|
|
775
|
+
if (object[name] === value) {
|
|
776
|
+
return;
|
|
777
|
+
}
|
|
778
|
+
} else if (!isFunction(predicate) || !predicate()) {
|
|
779
|
+
return;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
if (supportsDescriptors) {
|
|
783
|
+
defineDataProperty(object, name, value, true);
|
|
784
|
+
} else {
|
|
785
|
+
defineDataProperty(object, name, value);
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
var defineProperties = function(object, map) {
|
|
789
|
+
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
790
|
+
var props = keys(map);
|
|
791
|
+
if (hasSymbols) {
|
|
792
|
+
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
793
|
+
}
|
|
794
|
+
for (var i = 0; i < props.length; i += 1) {
|
|
795
|
+
defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
defineProperties.supportsDescriptors = !!supportsDescriptors;
|
|
799
|
+
module.exports = defineProperties;
|
|
800
|
+
}
|
|
801
|
+
});
|
|
802
|
+
|
|
803
|
+
// node_modules/es-object-atoms/index.js
|
|
804
|
+
var require_es_object_atoms = __commonJS({
|
|
805
|
+
"node_modules/es-object-atoms/index.js"(exports, module) {
|
|
806
|
+
"use strict";
|
|
807
|
+
module.exports = Object;
|
|
808
|
+
}
|
|
809
|
+
});
|
|
810
|
+
|
|
811
|
+
// node_modules/es-errors/index.js
|
|
812
|
+
var require_es_errors = __commonJS({
|
|
813
|
+
"node_modules/es-errors/index.js"(exports, module) {
|
|
814
|
+
"use strict";
|
|
815
|
+
module.exports = Error;
|
|
816
|
+
}
|
|
817
|
+
});
|
|
818
|
+
|
|
819
|
+
// node_modules/es-errors/eval.js
|
|
820
|
+
var require_eval = __commonJS({
|
|
821
|
+
"node_modules/es-errors/eval.js"(exports, module) {
|
|
822
|
+
"use strict";
|
|
823
|
+
module.exports = EvalError;
|
|
824
|
+
}
|
|
825
|
+
});
|
|
826
|
+
|
|
827
|
+
// node_modules/es-errors/range.js
|
|
828
|
+
var require_range = __commonJS({
|
|
829
|
+
"node_modules/es-errors/range.js"(exports, module) {
|
|
830
|
+
"use strict";
|
|
831
|
+
module.exports = RangeError;
|
|
832
|
+
}
|
|
833
|
+
});
|
|
834
|
+
|
|
835
|
+
// node_modules/es-errors/ref.js
|
|
836
|
+
var require_ref = __commonJS({
|
|
837
|
+
"node_modules/es-errors/ref.js"(exports, module) {
|
|
838
|
+
"use strict";
|
|
839
|
+
module.exports = ReferenceError;
|
|
840
|
+
}
|
|
841
|
+
});
|
|
842
|
+
|
|
843
|
+
// node_modules/es-errors/uri.js
|
|
844
|
+
var require_uri = __commonJS({
|
|
845
|
+
"node_modules/es-errors/uri.js"(exports, module) {
|
|
846
|
+
"use strict";
|
|
847
|
+
module.exports = URIError;
|
|
848
|
+
}
|
|
849
|
+
});
|
|
850
|
+
|
|
851
|
+
// node_modules/math-intrinsics/abs.js
|
|
852
|
+
var require_abs = __commonJS({
|
|
853
|
+
"node_modules/math-intrinsics/abs.js"(exports, module) {
|
|
854
|
+
"use strict";
|
|
855
|
+
module.exports = Math.abs;
|
|
856
|
+
}
|
|
857
|
+
});
|
|
858
|
+
|
|
859
|
+
// node_modules/math-intrinsics/floor.js
|
|
860
|
+
var require_floor = __commonJS({
|
|
861
|
+
"node_modules/math-intrinsics/floor.js"(exports, module) {
|
|
862
|
+
"use strict";
|
|
863
|
+
module.exports = Math.floor;
|
|
864
|
+
}
|
|
865
|
+
});
|
|
866
|
+
|
|
867
|
+
// node_modules/math-intrinsics/max.js
|
|
868
|
+
var require_max = __commonJS({
|
|
869
|
+
"node_modules/math-intrinsics/max.js"(exports, module) {
|
|
870
|
+
"use strict";
|
|
871
|
+
module.exports = Math.max;
|
|
872
|
+
}
|
|
873
|
+
});
|
|
874
|
+
|
|
875
|
+
// node_modules/math-intrinsics/min.js
|
|
876
|
+
var require_min = __commonJS({
|
|
877
|
+
"node_modules/math-intrinsics/min.js"(exports, module) {
|
|
878
|
+
"use strict";
|
|
879
|
+
module.exports = Math.min;
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
|
|
883
|
+
// node_modules/math-intrinsics/pow.js
|
|
884
|
+
var require_pow = __commonJS({
|
|
885
|
+
"node_modules/math-intrinsics/pow.js"(exports, module) {
|
|
886
|
+
"use strict";
|
|
887
|
+
module.exports = Math.pow;
|
|
888
|
+
}
|
|
889
|
+
});
|
|
890
|
+
|
|
891
|
+
// node_modules/math-intrinsics/round.js
|
|
892
|
+
var require_round = __commonJS({
|
|
893
|
+
"node_modules/math-intrinsics/round.js"(exports, module) {
|
|
894
|
+
"use strict";
|
|
895
|
+
module.exports = Math.round;
|
|
896
|
+
}
|
|
897
|
+
});
|
|
898
|
+
|
|
899
|
+
// node_modules/math-intrinsics/isNaN.js
|
|
900
|
+
var require_isNaN = __commonJS({
|
|
901
|
+
"node_modules/math-intrinsics/isNaN.js"(exports, module) {
|
|
902
|
+
"use strict";
|
|
903
|
+
module.exports = Number.isNaN || function isNaN2(a) {
|
|
904
|
+
return a !== a;
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
});
|
|
908
|
+
|
|
909
|
+
// node_modules/math-intrinsics/sign.js
|
|
910
|
+
var require_sign = __commonJS({
|
|
911
|
+
"node_modules/math-intrinsics/sign.js"(exports, module) {
|
|
912
|
+
"use strict";
|
|
913
|
+
var $isNaN = require_isNaN();
|
|
914
|
+
module.exports = function sign(number) {
|
|
915
|
+
if ($isNaN(number) || number === 0) {
|
|
916
|
+
return number;
|
|
917
|
+
}
|
|
918
|
+
return number < 0 ? -1 : 1;
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
});
|
|
922
|
+
|
|
923
|
+
// node_modules/has-symbols/shams.js
|
|
924
|
+
var require_shams = __commonJS({
|
|
925
|
+
"node_modules/has-symbols/shams.js"(exports, module) {
|
|
926
|
+
"use strict";
|
|
927
|
+
module.exports = function hasSymbols() {
|
|
928
|
+
if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
|
|
929
|
+
return false;
|
|
930
|
+
}
|
|
931
|
+
if (typeof Symbol.iterator === "symbol") {
|
|
932
|
+
return true;
|
|
933
|
+
}
|
|
934
|
+
var obj = {};
|
|
935
|
+
var sym = /* @__PURE__ */ Symbol("test");
|
|
936
|
+
var symObj = Object(sym);
|
|
937
|
+
if (typeof sym === "string") {
|
|
938
|
+
return false;
|
|
939
|
+
}
|
|
940
|
+
if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
|
|
941
|
+
return false;
|
|
942
|
+
}
|
|
943
|
+
if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
|
|
944
|
+
return false;
|
|
945
|
+
}
|
|
946
|
+
var symVal = 42;
|
|
947
|
+
obj[sym] = symVal;
|
|
948
|
+
for (var _ in obj) {
|
|
949
|
+
return false;
|
|
950
|
+
}
|
|
951
|
+
if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
|
|
952
|
+
return false;
|
|
953
|
+
}
|
|
954
|
+
if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
|
|
955
|
+
return false;
|
|
956
|
+
}
|
|
957
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
958
|
+
if (syms.length !== 1 || syms[0] !== sym) {
|
|
959
|
+
return false;
|
|
960
|
+
}
|
|
961
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
|
|
962
|
+
return false;
|
|
963
|
+
}
|
|
964
|
+
if (typeof Object.getOwnPropertyDescriptor === "function") {
|
|
965
|
+
var descriptor = (
|
|
966
|
+
/** @type {PropertyDescriptor} */
|
|
967
|
+
Object.getOwnPropertyDescriptor(obj, sym)
|
|
968
|
+
);
|
|
969
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) {
|
|
970
|
+
return false;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
return true;
|
|
974
|
+
};
|
|
975
|
+
}
|
|
976
|
+
});
|
|
977
|
+
|
|
978
|
+
// node_modules/has-symbols/index.js
|
|
979
|
+
var require_has_symbols = __commonJS({
|
|
980
|
+
"node_modules/has-symbols/index.js"(exports, module) {
|
|
981
|
+
"use strict";
|
|
982
|
+
var origSymbol = typeof Symbol !== "undefined" && Symbol;
|
|
983
|
+
var hasSymbolSham = require_shams();
|
|
984
|
+
module.exports = function hasNativeSymbols() {
|
|
985
|
+
if (typeof origSymbol !== "function") {
|
|
986
|
+
return false;
|
|
987
|
+
}
|
|
988
|
+
if (typeof Symbol !== "function") {
|
|
989
|
+
return false;
|
|
990
|
+
}
|
|
991
|
+
if (typeof origSymbol("foo") !== "symbol") {
|
|
992
|
+
return false;
|
|
993
|
+
}
|
|
994
|
+
if (typeof /* @__PURE__ */ Symbol("bar") !== "symbol") {
|
|
995
|
+
return false;
|
|
996
|
+
}
|
|
997
|
+
return hasSymbolSham();
|
|
998
|
+
};
|
|
999
|
+
}
|
|
1000
|
+
});
|
|
1001
|
+
|
|
1002
|
+
// node_modules/get-proto/Reflect.getPrototypeOf.js
|
|
1003
|
+
var require_Reflect_getPrototypeOf = __commonJS({
|
|
1004
|
+
"node_modules/get-proto/Reflect.getPrototypeOf.js"(exports, module) {
|
|
1005
|
+
"use strict";
|
|
1006
|
+
module.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
|
|
1007
|
+
}
|
|
1008
|
+
});
|
|
1009
|
+
|
|
1010
|
+
// node_modules/get-proto/Object.getPrototypeOf.js
|
|
1011
|
+
var require_Object_getPrototypeOf = __commonJS({
|
|
1012
|
+
"node_modules/get-proto/Object.getPrototypeOf.js"(exports, module) {
|
|
1013
|
+
"use strict";
|
|
1014
|
+
var $Object = require_es_object_atoms();
|
|
1015
|
+
module.exports = $Object.getPrototypeOf || null;
|
|
1016
|
+
}
|
|
1017
|
+
});
|
|
1018
|
+
|
|
1019
|
+
// node_modules/function-bind/implementation.js
|
|
1020
|
+
var require_implementation2 = __commonJS({
|
|
1021
|
+
"node_modules/function-bind/implementation.js"(exports, module) {
|
|
1022
|
+
"use strict";
|
|
1023
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
1024
|
+
var toStr = Object.prototype.toString;
|
|
1025
|
+
var max = Math.max;
|
|
1026
|
+
var funcType = "[object Function]";
|
|
1027
|
+
var concatty = function concatty2(a, b) {
|
|
1028
|
+
var arr = [];
|
|
1029
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
1030
|
+
arr[i] = a[i];
|
|
1031
|
+
}
|
|
1032
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
1033
|
+
arr[j + a.length] = b[j];
|
|
1034
|
+
}
|
|
1035
|
+
return arr;
|
|
1036
|
+
};
|
|
1037
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
1038
|
+
var arr = [];
|
|
1039
|
+
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
1040
|
+
arr[j] = arrLike[i];
|
|
1041
|
+
}
|
|
1042
|
+
return arr;
|
|
1043
|
+
};
|
|
1044
|
+
var joiny = function(arr, joiner) {
|
|
1045
|
+
var str = "";
|
|
1046
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
1047
|
+
str += arr[i];
|
|
1048
|
+
if (i + 1 < arr.length) {
|
|
1049
|
+
str += joiner;
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
return str;
|
|
1053
|
+
};
|
|
1054
|
+
module.exports = function bind(that) {
|
|
1055
|
+
var target = this;
|
|
1056
|
+
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
1057
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
1058
|
+
}
|
|
1059
|
+
var args = slicy(arguments, 1);
|
|
1060
|
+
var bound;
|
|
1061
|
+
var binder = function() {
|
|
1062
|
+
if (this instanceof bound) {
|
|
1063
|
+
var result = target.apply(
|
|
1064
|
+
this,
|
|
1065
|
+
concatty(args, arguments)
|
|
1066
|
+
);
|
|
1067
|
+
if (Object(result) === result) {
|
|
1068
|
+
return result;
|
|
1069
|
+
}
|
|
1070
|
+
return this;
|
|
1071
|
+
}
|
|
1072
|
+
return target.apply(
|
|
1073
|
+
that,
|
|
1074
|
+
concatty(args, arguments)
|
|
1075
|
+
);
|
|
1076
|
+
};
|
|
1077
|
+
var boundLength = max(0, target.length - args.length);
|
|
1078
|
+
var boundArgs = [];
|
|
1079
|
+
for (var i = 0; i < boundLength; i++) {
|
|
1080
|
+
boundArgs[i] = "$" + i;
|
|
1081
|
+
}
|
|
1082
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
1083
|
+
if (target.prototype) {
|
|
1084
|
+
var Empty = function Empty2() {
|
|
1085
|
+
};
|
|
1086
|
+
Empty.prototype = target.prototype;
|
|
1087
|
+
bound.prototype = new Empty();
|
|
1088
|
+
Empty.prototype = null;
|
|
1089
|
+
}
|
|
1090
|
+
return bound;
|
|
1091
|
+
};
|
|
1092
|
+
}
|
|
1093
|
+
});
|
|
1094
|
+
|
|
1095
|
+
// node_modules/function-bind/index.js
|
|
1096
|
+
var require_function_bind = __commonJS({
|
|
1097
|
+
"node_modules/function-bind/index.js"(exports, module) {
|
|
1098
|
+
"use strict";
|
|
1099
|
+
var implementation = require_implementation2();
|
|
1100
|
+
module.exports = Function.prototype.bind || implementation;
|
|
1101
|
+
}
|
|
1102
|
+
});
|
|
1103
|
+
|
|
1104
|
+
// node_modules/call-bind-apply-helpers/functionCall.js
|
|
1105
|
+
var require_functionCall = __commonJS({
|
|
1106
|
+
"node_modules/call-bind-apply-helpers/functionCall.js"(exports, module) {
|
|
1107
|
+
"use strict";
|
|
1108
|
+
module.exports = Function.prototype.call;
|
|
1109
|
+
}
|
|
1110
|
+
});
|
|
1111
|
+
|
|
1112
|
+
// node_modules/call-bind-apply-helpers/functionApply.js
|
|
1113
|
+
var require_functionApply = __commonJS({
|
|
1114
|
+
"node_modules/call-bind-apply-helpers/functionApply.js"(exports, module) {
|
|
1115
|
+
"use strict";
|
|
1116
|
+
module.exports = Function.prototype.apply;
|
|
1117
|
+
}
|
|
1118
|
+
});
|
|
1119
|
+
|
|
1120
|
+
// node_modules/call-bind-apply-helpers/reflectApply.js
|
|
1121
|
+
var require_reflectApply = __commonJS({
|
|
1122
|
+
"node_modules/call-bind-apply-helpers/reflectApply.js"(exports, module) {
|
|
1123
|
+
"use strict";
|
|
1124
|
+
module.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
1125
|
+
}
|
|
1126
|
+
});
|
|
1127
|
+
|
|
1128
|
+
// node_modules/call-bind-apply-helpers/actualApply.js
|
|
1129
|
+
var require_actualApply = __commonJS({
|
|
1130
|
+
"node_modules/call-bind-apply-helpers/actualApply.js"(exports, module) {
|
|
1131
|
+
"use strict";
|
|
1132
|
+
var bind = require_function_bind();
|
|
1133
|
+
var $apply = require_functionApply();
|
|
1134
|
+
var $call = require_functionCall();
|
|
1135
|
+
var $reflectApply = require_reflectApply();
|
|
1136
|
+
module.exports = $reflectApply || bind.call($call, $apply);
|
|
1137
|
+
}
|
|
1138
|
+
});
|
|
1139
|
+
|
|
1140
|
+
// node_modules/call-bind-apply-helpers/index.js
|
|
1141
|
+
var require_call_bind_apply_helpers = __commonJS({
|
|
1142
|
+
"node_modules/call-bind-apply-helpers/index.js"(exports, module) {
|
|
1143
|
+
"use strict";
|
|
1144
|
+
var bind = require_function_bind();
|
|
1145
|
+
var $TypeError = require_type();
|
|
1146
|
+
var $call = require_functionCall();
|
|
1147
|
+
var $actualApply = require_actualApply();
|
|
1148
|
+
module.exports = function callBindBasic(args) {
|
|
1149
|
+
if (args.length < 1 || typeof args[0] !== "function") {
|
|
1150
|
+
throw new $TypeError("a function is required");
|
|
1151
|
+
}
|
|
1152
|
+
return $actualApply(bind, $call, args);
|
|
1153
|
+
};
|
|
1154
|
+
}
|
|
1155
|
+
});
|
|
1156
|
+
|
|
1157
|
+
// node_modules/dunder-proto/get.js
|
|
1158
|
+
var require_get = __commonJS({
|
|
1159
|
+
"node_modules/dunder-proto/get.js"(exports, module) {
|
|
1160
|
+
"use strict";
|
|
1161
|
+
var callBind = require_call_bind_apply_helpers();
|
|
1162
|
+
var gOPD = require_gopd();
|
|
1163
|
+
var hasProtoAccessor;
|
|
1164
|
+
try {
|
|
1165
|
+
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
1166
|
+
[].__proto__ === Array.prototype;
|
|
1167
|
+
} catch (e) {
|
|
1168
|
+
if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
|
|
1169
|
+
throw e;
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
var desc = !!hasProtoAccessor && gOPD && gOPD(
|
|
1173
|
+
Object.prototype,
|
|
1174
|
+
/** @type {keyof typeof Object.prototype} */
|
|
1175
|
+
"__proto__"
|
|
1176
|
+
);
|
|
1177
|
+
var $Object = Object;
|
|
1178
|
+
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
1179
|
+
module.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
|
|
1180
|
+
/** @type {import('./get')} */
|
|
1181
|
+
function getDunder(value) {
|
|
1182
|
+
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
1183
|
+
}
|
|
1184
|
+
) : false;
|
|
1185
|
+
}
|
|
1186
|
+
});
|
|
1187
|
+
|
|
1188
|
+
// node_modules/get-proto/index.js
|
|
1189
|
+
var require_get_proto = __commonJS({
|
|
1190
|
+
"node_modules/get-proto/index.js"(exports, module) {
|
|
1191
|
+
"use strict";
|
|
1192
|
+
var reflectGetProto = require_Reflect_getPrototypeOf();
|
|
1193
|
+
var originalGetProto = require_Object_getPrototypeOf();
|
|
1194
|
+
var getDunderProto = require_get();
|
|
1195
|
+
module.exports = reflectGetProto ? function getProto(O) {
|
|
1196
|
+
return reflectGetProto(O);
|
|
1197
|
+
} : originalGetProto ? function getProto(O) {
|
|
1198
|
+
if (!O || typeof O !== "object" && typeof O !== "function") {
|
|
1199
|
+
throw new TypeError("getProto: not an object");
|
|
1200
|
+
}
|
|
1201
|
+
return originalGetProto(O);
|
|
1202
|
+
} : getDunderProto ? function getProto(O) {
|
|
1203
|
+
return getDunderProto(O);
|
|
1204
|
+
} : null;
|
|
1205
|
+
}
|
|
1206
|
+
});
|
|
1207
|
+
|
|
1208
|
+
// node_modules/hasown/index.js
|
|
1209
|
+
var require_hasown = __commonJS({
|
|
1210
|
+
"node_modules/hasown/index.js"(exports, module) {
|
|
1211
|
+
"use strict";
|
|
1212
|
+
var call = Function.prototype.call;
|
|
1213
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
1214
|
+
var bind = require_function_bind();
|
|
1215
|
+
module.exports = bind.call(call, $hasOwn);
|
|
1216
|
+
}
|
|
1217
|
+
});
|
|
1218
|
+
|
|
1219
|
+
// node_modules/get-intrinsic/index.js
|
|
1220
|
+
var require_get_intrinsic = __commonJS({
|
|
1221
|
+
"node_modules/get-intrinsic/index.js"(exports, module) {
|
|
1222
|
+
"use strict";
|
|
1223
|
+
var undefined2;
|
|
1224
|
+
var $Object = require_es_object_atoms();
|
|
1225
|
+
var $Error = require_es_errors();
|
|
1226
|
+
var $EvalError = require_eval();
|
|
1227
|
+
var $RangeError = require_range();
|
|
1228
|
+
var $ReferenceError = require_ref();
|
|
1229
|
+
var $SyntaxError = require_syntax();
|
|
1230
|
+
var $TypeError = require_type();
|
|
1231
|
+
var $URIError = require_uri();
|
|
1232
|
+
var abs = require_abs();
|
|
1233
|
+
var floor = require_floor();
|
|
1234
|
+
var max = require_max();
|
|
1235
|
+
var min = require_min();
|
|
1236
|
+
var pow = require_pow();
|
|
1237
|
+
var round = require_round();
|
|
1238
|
+
var sign = require_sign();
|
|
1239
|
+
var $Function = Function;
|
|
1240
|
+
var getEvalledConstructor = function(expressionSyntax) {
|
|
1241
|
+
try {
|
|
1242
|
+
return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
|
|
1243
|
+
} catch (e) {
|
|
1244
|
+
}
|
|
1245
|
+
};
|
|
1246
|
+
var $gOPD = require_gopd();
|
|
1247
|
+
var $defineProperty = require_es_define_property();
|
|
1248
|
+
var throwTypeError = function() {
|
|
1249
|
+
throw new $TypeError();
|
|
1250
|
+
};
|
|
1251
|
+
var ThrowTypeError = $gOPD ? (function() {
|
|
1252
|
+
try {
|
|
1253
|
+
arguments.callee;
|
|
1254
|
+
return throwTypeError;
|
|
1255
|
+
} catch (calleeThrows) {
|
|
1256
|
+
try {
|
|
1257
|
+
return $gOPD(arguments, "callee").get;
|
|
1258
|
+
} catch (gOPDthrows) {
|
|
1259
|
+
return throwTypeError;
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
})() : throwTypeError;
|
|
1263
|
+
var hasSymbols = require_has_symbols()();
|
|
1264
|
+
var getProto = require_get_proto();
|
|
1265
|
+
var $ObjectGPO = require_Object_getPrototypeOf();
|
|
1266
|
+
var $ReflectGPO = require_Reflect_getPrototypeOf();
|
|
1267
|
+
var $apply = require_functionApply();
|
|
1268
|
+
var $call = require_functionCall();
|
|
1269
|
+
var needsEval = {};
|
|
1270
|
+
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
|
|
1271
|
+
var INTRINSICS = {
|
|
1272
|
+
__proto__: null,
|
|
1273
|
+
"%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
|
|
1274
|
+
"%Array%": Array,
|
|
1275
|
+
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
|
|
1276
|
+
"%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
|
|
1277
|
+
"%AsyncFromSyncIteratorPrototype%": undefined2,
|
|
1278
|
+
"%AsyncFunction%": needsEval,
|
|
1279
|
+
"%AsyncGenerator%": needsEval,
|
|
1280
|
+
"%AsyncGeneratorFunction%": needsEval,
|
|
1281
|
+
"%AsyncIteratorPrototype%": needsEval,
|
|
1282
|
+
"%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
|
|
1283
|
+
"%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
|
|
1284
|
+
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
|
|
1285
|
+
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
|
|
1286
|
+
"%Boolean%": Boolean,
|
|
1287
|
+
"%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
|
|
1288
|
+
"%Date%": Date,
|
|
1289
|
+
"%decodeURI%": decodeURI,
|
|
1290
|
+
"%decodeURIComponent%": decodeURIComponent,
|
|
1291
|
+
"%encodeURI%": encodeURI,
|
|
1292
|
+
"%encodeURIComponent%": encodeURIComponent,
|
|
1293
|
+
"%Error%": $Error,
|
|
1294
|
+
"%eval%": eval,
|
|
1295
|
+
// eslint-disable-line no-eval
|
|
1296
|
+
"%EvalError%": $EvalError,
|
|
1297
|
+
"%Float16Array%": typeof Float16Array === "undefined" ? undefined2 : Float16Array,
|
|
1298
|
+
"%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
|
|
1299
|
+
"%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
|
|
1300
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
|
|
1301
|
+
"%Function%": $Function,
|
|
1302
|
+
"%GeneratorFunction%": needsEval,
|
|
1303
|
+
"%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
|
|
1304
|
+
"%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
|
|
1305
|
+
"%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
|
|
1306
|
+
"%isFinite%": isFinite,
|
|
1307
|
+
"%isNaN%": isNaN,
|
|
1308
|
+
"%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
|
|
1309
|
+
"%JSON%": typeof JSON === "object" ? JSON : undefined2,
|
|
1310
|
+
"%Map%": typeof Map === "undefined" ? undefined2 : Map,
|
|
1311
|
+
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
1312
|
+
"%Math%": Math,
|
|
1313
|
+
"%Number%": Number,
|
|
1314
|
+
"%Object%": $Object,
|
|
1315
|
+
"%Object.getOwnPropertyDescriptor%": $gOPD,
|
|
1316
|
+
"%parseFloat%": parseFloat,
|
|
1317
|
+
"%parseInt%": parseInt,
|
|
1318
|
+
"%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
|
|
1319
|
+
"%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
|
|
1320
|
+
"%RangeError%": $RangeError,
|
|
1321
|
+
"%ReferenceError%": $ReferenceError,
|
|
1322
|
+
"%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
|
|
1323
|
+
"%RegExp%": RegExp,
|
|
1324
|
+
"%Set%": typeof Set === "undefined" ? undefined2 : Set,
|
|
1325
|
+
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
1326
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
|
|
1327
|
+
"%String%": String,
|
|
1328
|
+
"%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
|
|
1329
|
+
"%Symbol%": hasSymbols ? Symbol : undefined2,
|
|
1330
|
+
"%SyntaxError%": $SyntaxError,
|
|
1331
|
+
"%ThrowTypeError%": ThrowTypeError,
|
|
1332
|
+
"%TypedArray%": TypedArray,
|
|
1333
|
+
"%TypeError%": $TypeError,
|
|
1334
|
+
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
|
|
1335
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
|
|
1336
|
+
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
|
|
1337
|
+
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
|
|
1338
|
+
"%URIError%": $URIError,
|
|
1339
|
+
"%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
|
|
1340
|
+
"%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
|
|
1341
|
+
"%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet,
|
|
1342
|
+
"%Function.prototype.call%": $call,
|
|
1343
|
+
"%Function.prototype.apply%": $apply,
|
|
1344
|
+
"%Object.defineProperty%": $defineProperty,
|
|
1345
|
+
"%Object.getPrototypeOf%": $ObjectGPO,
|
|
1346
|
+
"%Math.abs%": abs,
|
|
1347
|
+
"%Math.floor%": floor,
|
|
1348
|
+
"%Math.max%": max,
|
|
1349
|
+
"%Math.min%": min,
|
|
1350
|
+
"%Math.pow%": pow,
|
|
1351
|
+
"%Math.round%": round,
|
|
1352
|
+
"%Math.sign%": sign,
|
|
1353
|
+
"%Reflect.getPrototypeOf%": $ReflectGPO
|
|
1354
|
+
};
|
|
1355
|
+
if (getProto) {
|
|
1356
|
+
try {
|
|
1357
|
+
null.error;
|
|
1358
|
+
} catch (e) {
|
|
1359
|
+
errorProto = getProto(getProto(e));
|
|
1360
|
+
INTRINSICS["%Error.prototype%"] = errorProto;
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
var errorProto;
|
|
1364
|
+
var doEval = function doEval2(name) {
|
|
1365
|
+
var value;
|
|
1366
|
+
if (name === "%AsyncFunction%") {
|
|
1367
|
+
value = getEvalledConstructor("async function () {}");
|
|
1368
|
+
} else if (name === "%GeneratorFunction%") {
|
|
1369
|
+
value = getEvalledConstructor("function* () {}");
|
|
1370
|
+
} else if (name === "%AsyncGeneratorFunction%") {
|
|
1371
|
+
value = getEvalledConstructor("async function* () {}");
|
|
1372
|
+
} else if (name === "%AsyncGenerator%") {
|
|
1373
|
+
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
1374
|
+
if (fn) {
|
|
1375
|
+
value = fn.prototype;
|
|
1376
|
+
}
|
|
1377
|
+
} else if (name === "%AsyncIteratorPrototype%") {
|
|
1378
|
+
var gen = doEval2("%AsyncGenerator%");
|
|
1379
|
+
if (gen && getProto) {
|
|
1380
|
+
value = getProto(gen.prototype);
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
INTRINSICS[name] = value;
|
|
1384
|
+
return value;
|
|
1385
|
+
};
|
|
1386
|
+
var LEGACY_ALIASES = {
|
|
1387
|
+
__proto__: null,
|
|
1388
|
+
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
1389
|
+
"%ArrayPrototype%": ["Array", "prototype"],
|
|
1390
|
+
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
1391
|
+
"%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
|
|
1392
|
+
"%ArrayProto_keys%": ["Array", "prototype", "keys"],
|
|
1393
|
+
"%ArrayProto_values%": ["Array", "prototype", "values"],
|
|
1394
|
+
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
|
|
1395
|
+
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
|
|
1396
|
+
"%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
|
|
1397
|
+
"%BooleanPrototype%": ["Boolean", "prototype"],
|
|
1398
|
+
"%DataViewPrototype%": ["DataView", "prototype"],
|
|
1399
|
+
"%DatePrototype%": ["Date", "prototype"],
|
|
1400
|
+
"%ErrorPrototype%": ["Error", "prototype"],
|
|
1401
|
+
"%EvalErrorPrototype%": ["EvalError", "prototype"],
|
|
1402
|
+
"%Float32ArrayPrototype%": ["Float32Array", "prototype"],
|
|
1403
|
+
"%Float64ArrayPrototype%": ["Float64Array", "prototype"],
|
|
1404
|
+
"%FunctionPrototype%": ["Function", "prototype"],
|
|
1405
|
+
"%Generator%": ["GeneratorFunction", "prototype"],
|
|
1406
|
+
"%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
|
|
1407
|
+
"%Int8ArrayPrototype%": ["Int8Array", "prototype"],
|
|
1408
|
+
"%Int16ArrayPrototype%": ["Int16Array", "prototype"],
|
|
1409
|
+
"%Int32ArrayPrototype%": ["Int32Array", "prototype"],
|
|
1410
|
+
"%JSONParse%": ["JSON", "parse"],
|
|
1411
|
+
"%JSONStringify%": ["JSON", "stringify"],
|
|
1412
|
+
"%MapPrototype%": ["Map", "prototype"],
|
|
1413
|
+
"%NumberPrototype%": ["Number", "prototype"],
|
|
1414
|
+
"%ObjectPrototype%": ["Object", "prototype"],
|
|
1415
|
+
"%ObjProto_toString%": ["Object", "prototype", "toString"],
|
|
1416
|
+
"%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
|
|
1417
|
+
"%PromisePrototype%": ["Promise", "prototype"],
|
|
1418
|
+
"%PromiseProto_then%": ["Promise", "prototype", "then"],
|
|
1419
|
+
"%Promise_all%": ["Promise", "all"],
|
|
1420
|
+
"%Promise_reject%": ["Promise", "reject"],
|
|
1421
|
+
"%Promise_resolve%": ["Promise", "resolve"],
|
|
1422
|
+
"%RangeErrorPrototype%": ["RangeError", "prototype"],
|
|
1423
|
+
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
|
|
1424
|
+
"%RegExpPrototype%": ["RegExp", "prototype"],
|
|
1425
|
+
"%SetPrototype%": ["Set", "prototype"],
|
|
1426
|
+
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
|
|
1427
|
+
"%StringPrototype%": ["String", "prototype"],
|
|
1428
|
+
"%SymbolPrototype%": ["Symbol", "prototype"],
|
|
1429
|
+
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
|
|
1430
|
+
"%TypedArrayPrototype%": ["TypedArray", "prototype"],
|
|
1431
|
+
"%TypeErrorPrototype%": ["TypeError", "prototype"],
|
|
1432
|
+
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
|
|
1433
|
+
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
|
|
1434
|
+
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
|
|
1435
|
+
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
|
|
1436
|
+
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
1437
|
+
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
1438
|
+
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
1439
|
+
};
|
|
1440
|
+
var bind = require_function_bind();
|
|
1441
|
+
var hasOwn = require_hasown();
|
|
1442
|
+
var $concat = bind.call($call, Array.prototype.concat);
|
|
1443
|
+
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
1444
|
+
var $replace = bind.call($call, String.prototype.replace);
|
|
1445
|
+
var $strSlice = bind.call($call, String.prototype.slice);
|
|
1446
|
+
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
1447
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
1448
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
1449
|
+
var stringToPath = function stringToPath2(string) {
|
|
1450
|
+
var first = $strSlice(string, 0, 1);
|
|
1451
|
+
var last = $strSlice(string, -1);
|
|
1452
|
+
if (first === "%" && last !== "%") {
|
|
1453
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
|
|
1454
|
+
} else if (last === "%" && first !== "%") {
|
|
1455
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
|
|
1456
|
+
}
|
|
1457
|
+
var result = [];
|
|
1458
|
+
$replace(string, rePropName, function(match, number, quote, subString) {
|
|
1459
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
|
|
1460
|
+
});
|
|
1461
|
+
return result;
|
|
1462
|
+
};
|
|
1463
|
+
var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
|
|
1464
|
+
var intrinsicName = name;
|
|
1465
|
+
var alias;
|
|
1466
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
1467
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
1468
|
+
intrinsicName = "%" + alias[0] + "%";
|
|
1469
|
+
}
|
|
1470
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
1471
|
+
var value = INTRINSICS[intrinsicName];
|
|
1472
|
+
if (value === needsEval) {
|
|
1473
|
+
value = doEval(intrinsicName);
|
|
1474
|
+
}
|
|
1475
|
+
if (typeof value === "undefined" && !allowMissing) {
|
|
1476
|
+
throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
|
|
1477
|
+
}
|
|
1478
|
+
return {
|
|
1479
|
+
alias,
|
|
1480
|
+
name: intrinsicName,
|
|
1481
|
+
value
|
|
1482
|
+
};
|
|
1483
|
+
}
|
|
1484
|
+
throw new $SyntaxError("intrinsic " + name + " does not exist!");
|
|
1485
|
+
};
|
|
1486
|
+
module.exports = function GetIntrinsic(name, allowMissing) {
|
|
1487
|
+
if (typeof name !== "string" || name.length === 0) {
|
|
1488
|
+
throw new $TypeError("intrinsic name must be a non-empty string");
|
|
1489
|
+
}
|
|
1490
|
+
if (arguments.length > 1 && typeof allowMissing !== "boolean") {
|
|
1491
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
1492
|
+
}
|
|
1493
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
1494
|
+
throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
1495
|
+
}
|
|
1496
|
+
var parts = stringToPath(name);
|
|
1497
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
|
|
1498
|
+
var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
|
|
1499
|
+
var intrinsicRealName = intrinsic.name;
|
|
1500
|
+
var value = intrinsic.value;
|
|
1501
|
+
var skipFurtherCaching = false;
|
|
1502
|
+
var alias = intrinsic.alias;
|
|
1503
|
+
if (alias) {
|
|
1504
|
+
intrinsicBaseName = alias[0];
|
|
1505
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
1506
|
+
}
|
|
1507
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
1508
|
+
var part = parts[i];
|
|
1509
|
+
var first = $strSlice(part, 0, 1);
|
|
1510
|
+
var last = $strSlice(part, -1);
|
|
1511
|
+
if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
|
|
1512
|
+
throw new $SyntaxError("property names with quotes must have matching quotes");
|
|
1513
|
+
}
|
|
1514
|
+
if (part === "constructor" || !isOwn) {
|
|
1515
|
+
skipFurtherCaching = true;
|
|
1516
|
+
}
|
|
1517
|
+
intrinsicBaseName += "." + part;
|
|
1518
|
+
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
1519
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
1520
|
+
value = INTRINSICS[intrinsicRealName];
|
|
1521
|
+
} else if (value != null) {
|
|
1522
|
+
if (!(part in value)) {
|
|
1523
|
+
if (!allowMissing) {
|
|
1524
|
+
throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
|
|
1525
|
+
}
|
|
1526
|
+
return void undefined2;
|
|
1527
|
+
}
|
|
1528
|
+
if ($gOPD && i + 1 >= parts.length) {
|
|
1529
|
+
var desc = $gOPD(value, part);
|
|
1530
|
+
isOwn = !!desc;
|
|
1531
|
+
if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
|
|
1532
|
+
value = desc.get;
|
|
1533
|
+
} else {
|
|
1534
|
+
value = value[part];
|
|
1535
|
+
}
|
|
1536
|
+
} else {
|
|
1537
|
+
isOwn = hasOwn(value, part);
|
|
1538
|
+
value = value[part];
|
|
1539
|
+
}
|
|
1540
|
+
if (isOwn && !skipFurtherCaching) {
|
|
1541
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
return value;
|
|
1546
|
+
};
|
|
1547
|
+
}
|
|
1548
|
+
});
|
|
1549
|
+
|
|
1550
|
+
// node_modules/set-function-length/index.js
|
|
1551
|
+
var require_set_function_length = __commonJS({
|
|
1552
|
+
"node_modules/set-function-length/index.js"(exports, module) {
|
|
1553
|
+
"use strict";
|
|
1554
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
1555
|
+
var define = require_define_data_property();
|
|
1556
|
+
var hasDescriptors = require_has_property_descriptors()();
|
|
1557
|
+
var gOPD = require_gopd();
|
|
1558
|
+
var $TypeError = require_type();
|
|
1559
|
+
var $floor = GetIntrinsic("%Math.floor%");
|
|
1560
|
+
module.exports = function setFunctionLength(fn, length) {
|
|
1561
|
+
if (typeof fn !== "function") {
|
|
1562
|
+
throw new $TypeError("`fn` is not a function");
|
|
1563
|
+
}
|
|
1564
|
+
if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) {
|
|
1565
|
+
throw new $TypeError("`length` must be a positive 32-bit integer");
|
|
1566
|
+
}
|
|
1567
|
+
var loose = arguments.length > 2 && !!arguments[2];
|
|
1568
|
+
var functionLengthIsConfigurable = true;
|
|
1569
|
+
var functionLengthIsWritable = true;
|
|
1570
|
+
if ("length" in fn && gOPD) {
|
|
1571
|
+
var desc = gOPD(fn, "length");
|
|
1572
|
+
if (desc && !desc.configurable) {
|
|
1573
|
+
functionLengthIsConfigurable = false;
|
|
1574
|
+
}
|
|
1575
|
+
if (desc && !desc.writable) {
|
|
1576
|
+
functionLengthIsWritable = false;
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
|
1580
|
+
if (hasDescriptors) {
|
|
1581
|
+
define(
|
|
1582
|
+
/** @type {Parameters<define>[0]} */
|
|
1583
|
+
fn,
|
|
1584
|
+
"length",
|
|
1585
|
+
length,
|
|
1586
|
+
true,
|
|
1587
|
+
true
|
|
1588
|
+
);
|
|
1589
|
+
} else {
|
|
1590
|
+
define(
|
|
1591
|
+
/** @type {Parameters<define>[0]} */
|
|
1592
|
+
fn,
|
|
1593
|
+
"length",
|
|
1594
|
+
length
|
|
1595
|
+
);
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
return fn;
|
|
1599
|
+
};
|
|
1600
|
+
}
|
|
1601
|
+
});
|
|
1602
|
+
|
|
1603
|
+
// node_modules/call-bind-apply-helpers/applyBind.js
|
|
1604
|
+
var require_applyBind = __commonJS({
|
|
1605
|
+
"node_modules/call-bind-apply-helpers/applyBind.js"(exports, module) {
|
|
1606
|
+
"use strict";
|
|
1607
|
+
var bind = require_function_bind();
|
|
1608
|
+
var $apply = require_functionApply();
|
|
1609
|
+
var actualApply = require_actualApply();
|
|
1610
|
+
module.exports = function applyBind() {
|
|
1611
|
+
return actualApply(bind, $apply, arguments);
|
|
1612
|
+
};
|
|
1613
|
+
}
|
|
1614
|
+
});
|
|
1615
|
+
|
|
1616
|
+
// node_modules/call-bind/index.js
|
|
1617
|
+
var require_call_bind = __commonJS({
|
|
1618
|
+
"node_modules/call-bind/index.js"(exports, module) {
|
|
1619
|
+
"use strict";
|
|
1620
|
+
var setFunctionLength = require_set_function_length();
|
|
1621
|
+
var $defineProperty = require_es_define_property();
|
|
1622
|
+
var callBindBasic = require_call_bind_apply_helpers();
|
|
1623
|
+
var applyBind = require_applyBind();
|
|
1624
|
+
module.exports = function callBind(originalFunction) {
|
|
1625
|
+
var func = callBindBasic(arguments);
|
|
1626
|
+
var adjustedLength = 1 + originalFunction.length - (arguments.length - 1);
|
|
1627
|
+
return setFunctionLength(
|
|
1628
|
+
func,
|
|
1629
|
+
adjustedLength > 0 ? adjustedLength : 0,
|
|
1630
|
+
true
|
|
1631
|
+
);
|
|
1632
|
+
};
|
|
1633
|
+
if ($defineProperty) {
|
|
1634
|
+
$defineProperty(module.exports, "apply", { value: applyBind });
|
|
1635
|
+
} else {
|
|
1636
|
+
module.exports.apply = applyBind;
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
});
|
|
1640
|
+
|
|
1641
|
+
// node_modules/math-intrinsics/isFinite.js
|
|
1642
|
+
var require_isFinite = __commonJS({
|
|
1643
|
+
"node_modules/math-intrinsics/isFinite.js"(exports, module) {
|
|
1644
|
+
"use strict";
|
|
1645
|
+
var $isNaN = require_isNaN();
|
|
1646
|
+
module.exports = function isFinite2(x) {
|
|
1647
|
+
return (typeof x === "number" || typeof x === "bigint") && !$isNaN(x) && x !== Infinity && x !== -Infinity;
|
|
1648
|
+
};
|
|
1649
|
+
}
|
|
1650
|
+
});
|
|
1651
|
+
|
|
1652
|
+
// node_modules/math-intrinsics/isInteger.js
|
|
1653
|
+
var require_isInteger = __commonJS({
|
|
1654
|
+
"node_modules/math-intrinsics/isInteger.js"(exports, module) {
|
|
1655
|
+
"use strict";
|
|
1656
|
+
var $abs = require_abs();
|
|
1657
|
+
var $floor = require_floor();
|
|
1658
|
+
var $isNaN = require_isNaN();
|
|
1659
|
+
var $isFinite = require_isFinite();
|
|
1660
|
+
module.exports = function isInteger(argument) {
|
|
1661
|
+
if (typeof argument !== "number" || $isNaN(argument) || !$isFinite(argument)) {
|
|
1662
|
+
return false;
|
|
1663
|
+
}
|
|
1664
|
+
var absValue = $abs(argument);
|
|
1665
|
+
return $floor(absValue) === absValue;
|
|
1666
|
+
};
|
|
1667
|
+
}
|
|
1668
|
+
});
|
|
1669
|
+
|
|
1670
|
+
// node_modules/es-object-atoms/isObject.js
|
|
1671
|
+
var require_isObject = __commonJS({
|
|
1672
|
+
"node_modules/es-object-atoms/isObject.js"(exports, module) {
|
|
1673
|
+
"use strict";
|
|
1674
|
+
module.exports = function isObject(x) {
|
|
1675
|
+
return !!x && (typeof x === "function" || typeof x === "object");
|
|
1676
|
+
};
|
|
1677
|
+
}
|
|
1678
|
+
});
|
|
1679
|
+
|
|
1680
|
+
// node_modules/math-intrinsics/constants/maxArrayLength.js
|
|
1681
|
+
var require_maxArrayLength = __commonJS({
|
|
1682
|
+
"node_modules/math-intrinsics/constants/maxArrayLength.js"(exports, module) {
|
|
1683
|
+
"use strict";
|
|
1684
|
+
module.exports = 4294967295;
|
|
1685
|
+
}
|
|
1686
|
+
});
|
|
1687
|
+
|
|
1688
|
+
// node_modules/set-proto/Reflect.setPrototypeOf.js
|
|
1689
|
+
var require_Reflect_setPrototypeOf = __commonJS({
|
|
1690
|
+
"node_modules/set-proto/Reflect.setPrototypeOf.js"(exports, module) {
|
|
1691
|
+
"use strict";
|
|
1692
|
+
module.exports = typeof Reflect !== "undefined" && Reflect.setPrototypeOf || null;
|
|
1693
|
+
}
|
|
1694
|
+
});
|
|
1695
|
+
|
|
1696
|
+
// node_modules/set-proto/Object.setPrototypeOf.js
|
|
1697
|
+
var require_Object_setPrototypeOf = __commonJS({
|
|
1698
|
+
"node_modules/set-proto/Object.setPrototypeOf.js"(exports, module) {
|
|
1699
|
+
"use strict";
|
|
1700
|
+
var $Object = require_es_object_atoms();
|
|
1701
|
+
module.exports = $Object.setPrototypeOf || null;
|
|
1702
|
+
}
|
|
1703
|
+
});
|
|
1704
|
+
|
|
1705
|
+
// node_modules/dunder-proto/set.js
|
|
1706
|
+
var require_set = __commonJS({
|
|
1707
|
+
"node_modules/dunder-proto/set.js"(exports, module) {
|
|
1708
|
+
"use strict";
|
|
1709
|
+
var callBind = require_call_bind_apply_helpers();
|
|
1710
|
+
var gOPD = require_gopd();
|
|
1711
|
+
var $TypeError = require_type();
|
|
1712
|
+
var obj = {};
|
|
1713
|
+
try {
|
|
1714
|
+
obj.__proto__ = null;
|
|
1715
|
+
} catch (e) {
|
|
1716
|
+
if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
|
|
1717
|
+
throw e;
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
var hasProtoMutator = !("toString" in obj);
|
|
1721
|
+
var desc = gOPD && gOPD(
|
|
1722
|
+
Object.prototype,
|
|
1723
|
+
/** @type {keyof typeof Object.prototype} */
|
|
1724
|
+
"__proto__"
|
|
1725
|
+
);
|
|
1726
|
+
module.exports = hasProtoMutator && // eslint-disable-next-line no-extra-parens
|
|
1727
|
+
(!!desc && typeof desc.set === "function" && /** @type {import('./set')} */
|
|
1728
|
+
callBind([desc.set]) || /** @type {import('./set')} */
|
|
1729
|
+
function setDunder(object, proto) {
|
|
1730
|
+
if (object == null) {
|
|
1731
|
+
throw new $TypeError("set Object.prototype.__proto__ called on null or undefined");
|
|
1732
|
+
}
|
|
1733
|
+
object.__proto__ = proto;
|
|
1734
|
+
return proto;
|
|
1735
|
+
});
|
|
1736
|
+
}
|
|
1737
|
+
});
|
|
1738
|
+
|
|
1739
|
+
// node_modules/set-proto/index.js
|
|
1740
|
+
var require_set_proto = __commonJS({
|
|
1741
|
+
"node_modules/set-proto/index.js"(exports, module) {
|
|
1742
|
+
"use strict";
|
|
1743
|
+
var reflectSetProto = require_Reflect_setPrototypeOf();
|
|
1744
|
+
var originalSetProto = require_Object_setPrototypeOf();
|
|
1745
|
+
var setDunderProto = require_set();
|
|
1746
|
+
var $TypeError = require_type();
|
|
1747
|
+
module.exports = reflectSetProto ? function setProto(O, proto) {
|
|
1748
|
+
if (reflectSetProto(O, proto)) {
|
|
1749
|
+
return O;
|
|
1750
|
+
}
|
|
1751
|
+
throw new $TypeError("Reflect.setPrototypeOf: failed to set [[Prototype]]");
|
|
1752
|
+
} : originalSetProto || (setDunderProto ? function setProto(O, proto) {
|
|
1753
|
+
setDunderProto(O, proto);
|
|
1754
|
+
return O;
|
|
1755
|
+
} : null);
|
|
1756
|
+
}
|
|
1757
|
+
});
|
|
1758
|
+
|
|
1759
|
+
// node_modules/es-abstract/2024/ArrayCreate.js
|
|
1760
|
+
var require_ArrayCreate = __commonJS({
|
|
1761
|
+
"node_modules/es-abstract/2024/ArrayCreate.js"(exports, module) {
|
|
1762
|
+
"use strict";
|
|
1763
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
1764
|
+
var $ArrayPrototype = GetIntrinsic("%Array.prototype%");
|
|
1765
|
+
var $RangeError = require_range();
|
|
1766
|
+
var $SyntaxError = require_syntax();
|
|
1767
|
+
var $TypeError = require_type();
|
|
1768
|
+
var isInteger = require_isInteger();
|
|
1769
|
+
var MAX_ARRAY_LENGTH = require_maxArrayLength();
|
|
1770
|
+
var $setProto = require_set_proto();
|
|
1771
|
+
module.exports = function ArrayCreate(length) {
|
|
1772
|
+
if (!isInteger(length) || length < 0) {
|
|
1773
|
+
throw new $TypeError("Assertion failed: `length` must be an integer Number >= 0");
|
|
1774
|
+
}
|
|
1775
|
+
if (length > MAX_ARRAY_LENGTH) {
|
|
1776
|
+
throw new $RangeError("length is greater than (2**32 - 1)");
|
|
1777
|
+
}
|
|
1778
|
+
var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype;
|
|
1779
|
+
var A = [];
|
|
1780
|
+
if (proto !== $ArrayPrototype) {
|
|
1781
|
+
if (!$setProto) {
|
|
1782
|
+
throw new $SyntaxError("ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]");
|
|
1783
|
+
}
|
|
1784
|
+
$setProto(A, proto);
|
|
1785
|
+
}
|
|
1786
|
+
if (length !== 0) {
|
|
1787
|
+
A.length = length;
|
|
1788
|
+
}
|
|
1789
|
+
return A;
|
|
1790
|
+
};
|
|
1791
|
+
}
|
|
1792
|
+
});
|
|
1793
|
+
|
|
1794
|
+
// node_modules/es-abstract/helpers/isPropertyKey.js
|
|
1795
|
+
var require_isPropertyKey = __commonJS({
|
|
1796
|
+
"node_modules/es-abstract/helpers/isPropertyKey.js"(exports, module) {
|
|
1797
|
+
"use strict";
|
|
1798
|
+
module.exports = function isPropertyKey(argument) {
|
|
1799
|
+
return typeof argument === "string" || typeof argument === "symbol";
|
|
1800
|
+
};
|
|
1801
|
+
}
|
|
1802
|
+
});
|
|
1803
|
+
|
|
1804
|
+
// node_modules/es-abstract/2024/Get.js
|
|
1805
|
+
var require_Get = __commonJS({
|
|
1806
|
+
"node_modules/es-abstract/2024/Get.js"(exports, module) {
|
|
1807
|
+
"use strict";
|
|
1808
|
+
var $TypeError = require_type();
|
|
1809
|
+
var inspect = require_stub();
|
|
1810
|
+
var isPropertyKey = require_isPropertyKey();
|
|
1811
|
+
var isObject = require_isObject();
|
|
1812
|
+
module.exports = function Get(O, P) {
|
|
1813
|
+
if (!isObject(O)) {
|
|
1814
|
+
throw new $TypeError("Assertion failed: Type(O) is not Object");
|
|
1815
|
+
}
|
|
1816
|
+
if (!isPropertyKey(P)) {
|
|
1817
|
+
throw new $TypeError("Assertion failed: P is not a Property Key, got " + inspect(P));
|
|
1818
|
+
}
|
|
1819
|
+
return O[P];
|
|
1820
|
+
};
|
|
1821
|
+
}
|
|
1822
|
+
});
|
|
1823
|
+
|
|
1824
|
+
// node_modules/call-bound/index.js
|
|
1825
|
+
var require_call_bound = __commonJS({
|
|
1826
|
+
"node_modules/call-bound/index.js"(exports, module) {
|
|
1827
|
+
"use strict";
|
|
1828
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
1829
|
+
var callBindBasic = require_call_bind_apply_helpers();
|
|
1830
|
+
var $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);
|
|
1831
|
+
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
1832
|
+
var intrinsic = (
|
|
1833
|
+
/** @type {(this: unknown, ...args: unknown[]) => unknown} */
|
|
1834
|
+
GetIntrinsic(name, !!allowMissing)
|
|
1835
|
+
);
|
|
1836
|
+
if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
|
|
1837
|
+
return callBindBasic(
|
|
1838
|
+
/** @type {const} */
|
|
1839
|
+
[intrinsic]
|
|
1840
|
+
);
|
|
1841
|
+
}
|
|
1842
|
+
return intrinsic;
|
|
1843
|
+
};
|
|
1844
|
+
}
|
|
1845
|
+
});
|
|
1846
|
+
|
|
1847
|
+
// node_modules/es-abstract/helpers/IsArray.js
|
|
1848
|
+
var require_IsArray = __commonJS({
|
|
1849
|
+
"node_modules/es-abstract/helpers/IsArray.js"(exports, module) {
|
|
1850
|
+
"use strict";
|
|
1851
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
1852
|
+
var $Array = GetIntrinsic("%Array%");
|
|
1853
|
+
var toStr = !$Array.isArray && require_call_bound()("Object.prototype.toString");
|
|
1854
|
+
module.exports = $Array.isArray || function IsArray(argument) {
|
|
1855
|
+
return toStr(argument) === "[object Array]";
|
|
1856
|
+
};
|
|
1857
|
+
}
|
|
1858
|
+
});
|
|
1859
|
+
|
|
1860
|
+
// node_modules/es-abstract/2024/IsArray.js
|
|
1861
|
+
var require_IsArray2 = __commonJS({
|
|
1862
|
+
"node_modules/es-abstract/2024/IsArray.js"(exports, module) {
|
|
1863
|
+
"use strict";
|
|
1864
|
+
module.exports = require_IsArray();
|
|
1865
|
+
}
|
|
1866
|
+
});
|
|
1867
|
+
|
|
1868
|
+
// node_modules/es-abstract/GetIntrinsic.js
|
|
1869
|
+
var require_GetIntrinsic = __commonJS({
|
|
1870
|
+
"node_modules/es-abstract/GetIntrinsic.js"(exports, module) {
|
|
1871
|
+
"use strict";
|
|
1872
|
+
module.exports = require_get_intrinsic();
|
|
1873
|
+
}
|
|
1874
|
+
});
|
|
1875
|
+
|
|
1876
|
+
// node_modules/es-abstract/helpers/records/property-descriptor.js
|
|
1877
|
+
var require_property_descriptor = __commonJS({
|
|
1878
|
+
"node_modules/es-abstract/helpers/records/property-descriptor.js"(exports, module) {
|
|
1879
|
+
"use strict";
|
|
1880
|
+
var $TypeError = require_type();
|
|
1881
|
+
var hasOwn = require_hasown();
|
|
1882
|
+
var allowed = {
|
|
1883
|
+
__proto__: null,
|
|
1884
|
+
"[[Configurable]]": true,
|
|
1885
|
+
"[[Enumerable]]": true,
|
|
1886
|
+
"[[Get]]": true,
|
|
1887
|
+
"[[Set]]": true,
|
|
1888
|
+
"[[Value]]": true,
|
|
1889
|
+
"[[Writable]]": true
|
|
1890
|
+
};
|
|
1891
|
+
module.exports = function isPropertyDescriptor(Desc) {
|
|
1892
|
+
if (!Desc || typeof Desc !== "object") {
|
|
1893
|
+
return false;
|
|
1894
|
+
}
|
|
1895
|
+
for (var key in Desc) {
|
|
1896
|
+
if (hasOwn(Desc, key) && !allowed[key]) {
|
|
1897
|
+
return false;
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
var isData = hasOwn(Desc, "[[Value]]") || hasOwn(Desc, "[[Writable]]");
|
|
1901
|
+
var IsAccessor = hasOwn(Desc, "[[Get]]") || hasOwn(Desc, "[[Set]]");
|
|
1902
|
+
if (isData && IsAccessor) {
|
|
1903
|
+
throw new $TypeError("Property Descriptors may not be both accessor and data descriptors");
|
|
1904
|
+
}
|
|
1905
|
+
return true;
|
|
1906
|
+
};
|
|
1907
|
+
}
|
|
1908
|
+
});
|
|
1909
|
+
|
|
1910
|
+
// node_modules/es-abstract/helpers/DefineOwnProperty.js
|
|
1911
|
+
var require_DefineOwnProperty = __commonJS({
|
|
1912
|
+
"node_modules/es-abstract/helpers/DefineOwnProperty.js"(exports, module) {
|
|
1913
|
+
"use strict";
|
|
1914
|
+
var hasPropertyDescriptors = require_has_property_descriptors();
|
|
1915
|
+
var $defineProperty = require_es_define_property();
|
|
1916
|
+
var hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();
|
|
1917
|
+
var isArray = hasArrayLengthDefineBug && require_IsArray();
|
|
1918
|
+
var callBound = require_call_bound();
|
|
1919
|
+
var $isEnumerable = callBound("Object.prototype.propertyIsEnumerable");
|
|
1920
|
+
module.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {
|
|
1921
|
+
if (!$defineProperty) {
|
|
1922
|
+
if (!IsDataDescriptor(desc)) {
|
|
1923
|
+
return false;
|
|
1924
|
+
}
|
|
1925
|
+
if (!desc["[[Configurable]]"] || !desc["[[Writable]]"]) {
|
|
1926
|
+
return false;
|
|
1927
|
+
}
|
|
1928
|
+
if (P in O && $isEnumerable(O, P) !== !!desc["[[Enumerable]]"]) {
|
|
1929
|
+
return false;
|
|
1930
|
+
}
|
|
1931
|
+
var V = desc["[[Value]]"];
|
|
1932
|
+
O[P] = V;
|
|
1933
|
+
return SameValue(O[P], V);
|
|
1934
|
+
}
|
|
1935
|
+
if (hasArrayLengthDefineBug && P === "length" && "[[Value]]" in desc && isArray(O) && O.length !== desc["[[Value]]"]) {
|
|
1936
|
+
O.length = desc["[[Value]]"];
|
|
1937
|
+
return O.length === desc["[[Value]]"];
|
|
1938
|
+
}
|
|
1939
|
+
$defineProperty(O, P, FromPropertyDescriptor(desc));
|
|
1940
|
+
return true;
|
|
1941
|
+
};
|
|
1942
|
+
}
|
|
1943
|
+
});
|
|
1944
|
+
|
|
1945
|
+
// node_modules/es-abstract/helpers/fromPropertyDescriptor.js
|
|
1946
|
+
var require_fromPropertyDescriptor = __commonJS({
|
|
1947
|
+
"node_modules/es-abstract/helpers/fromPropertyDescriptor.js"(exports, module) {
|
|
1948
|
+
"use strict";
|
|
1949
|
+
module.exports = function fromPropertyDescriptor(Desc) {
|
|
1950
|
+
if (typeof Desc === "undefined") {
|
|
1951
|
+
return Desc;
|
|
1952
|
+
}
|
|
1953
|
+
var obj = {};
|
|
1954
|
+
if ("[[Value]]" in Desc) {
|
|
1955
|
+
obj.value = Desc["[[Value]]"];
|
|
1956
|
+
}
|
|
1957
|
+
if ("[[Writable]]" in Desc) {
|
|
1958
|
+
obj.writable = !!Desc["[[Writable]]"];
|
|
1959
|
+
}
|
|
1960
|
+
if ("[[Get]]" in Desc) {
|
|
1961
|
+
obj.get = Desc["[[Get]]"];
|
|
1962
|
+
}
|
|
1963
|
+
if ("[[Set]]" in Desc) {
|
|
1964
|
+
obj.set = Desc["[[Set]]"];
|
|
1965
|
+
}
|
|
1966
|
+
if ("[[Enumerable]]" in Desc) {
|
|
1967
|
+
obj.enumerable = !!Desc["[[Enumerable]]"];
|
|
1968
|
+
}
|
|
1969
|
+
if ("[[Configurable]]" in Desc) {
|
|
1970
|
+
obj.configurable = !!Desc["[[Configurable]]"];
|
|
1971
|
+
}
|
|
1972
|
+
return obj;
|
|
1973
|
+
};
|
|
1974
|
+
}
|
|
1975
|
+
});
|
|
1976
|
+
|
|
1977
|
+
// node_modules/es-abstract/2024/FromPropertyDescriptor.js
|
|
1978
|
+
var require_FromPropertyDescriptor = __commonJS({
|
|
1979
|
+
"node_modules/es-abstract/2024/FromPropertyDescriptor.js"(exports, module) {
|
|
1980
|
+
"use strict";
|
|
1981
|
+
var $TypeError = require_type();
|
|
1982
|
+
var isPropertyDescriptor = require_property_descriptor();
|
|
1983
|
+
var fromPropertyDescriptor = require_fromPropertyDescriptor();
|
|
1984
|
+
module.exports = function FromPropertyDescriptor(Desc) {
|
|
1985
|
+
if (typeof Desc !== "undefined" && !isPropertyDescriptor(Desc)) {
|
|
1986
|
+
throw new $TypeError("Assertion failed: `Desc` must be a Property Descriptor");
|
|
1987
|
+
}
|
|
1988
|
+
return fromPropertyDescriptor(Desc);
|
|
1989
|
+
};
|
|
1990
|
+
}
|
|
1991
|
+
});
|
|
1992
|
+
|
|
1993
|
+
// node_modules/es-abstract/2024/IsDataDescriptor.js
|
|
1994
|
+
var require_IsDataDescriptor = __commonJS({
|
|
1995
|
+
"node_modules/es-abstract/2024/IsDataDescriptor.js"(exports, module) {
|
|
1996
|
+
"use strict";
|
|
1997
|
+
var $TypeError = require_type();
|
|
1998
|
+
var hasOwn = require_hasown();
|
|
1999
|
+
var isPropertyDescriptor = require_property_descriptor();
|
|
2000
|
+
module.exports = function IsDataDescriptor(Desc) {
|
|
2001
|
+
if (typeof Desc === "undefined") {
|
|
2002
|
+
return false;
|
|
2003
|
+
}
|
|
2004
|
+
if (!isPropertyDescriptor(Desc)) {
|
|
2005
|
+
throw new $TypeError("Assertion failed: `Desc` must be a Property Descriptor");
|
|
2006
|
+
}
|
|
2007
|
+
if (!hasOwn(Desc, "[[Value]]") && !hasOwn(Desc, "[[Writable]]")) {
|
|
2008
|
+
return false;
|
|
2009
|
+
}
|
|
2010
|
+
return true;
|
|
2011
|
+
};
|
|
2012
|
+
}
|
|
2013
|
+
});
|
|
2014
|
+
|
|
2015
|
+
// node_modules/es-abstract/2024/SameValue.js
|
|
2016
|
+
var require_SameValue = __commonJS({
|
|
2017
|
+
"node_modules/es-abstract/2024/SameValue.js"(exports, module) {
|
|
2018
|
+
"use strict";
|
|
2019
|
+
var $isNaN = require_isNaN();
|
|
2020
|
+
module.exports = function SameValue(x, y) {
|
|
2021
|
+
if (x === y) {
|
|
2022
|
+
if (x === 0) {
|
|
2023
|
+
return 1 / x === 1 / y;
|
|
2024
|
+
}
|
|
2025
|
+
return true;
|
|
2026
|
+
}
|
|
2027
|
+
return $isNaN(x) && $isNaN(y);
|
|
2028
|
+
};
|
|
2029
|
+
}
|
|
2030
|
+
});
|
|
2031
|
+
|
|
2032
|
+
// node_modules/is-callable/index.js
|
|
2033
|
+
var require_is_callable = __commonJS({
|
|
2034
|
+
"node_modules/is-callable/index.js"(exports, module) {
|
|
2035
|
+
"use strict";
|
|
2036
|
+
var fnToStr = Function.prototype.toString;
|
|
2037
|
+
var reflectApply = typeof Reflect === "object" && Reflect !== null && Reflect.apply;
|
|
2038
|
+
var badArrayLike;
|
|
2039
|
+
var isCallableMarker;
|
|
2040
|
+
if (typeof reflectApply === "function" && typeof Object.defineProperty === "function") {
|
|
2041
|
+
try {
|
|
2042
|
+
badArrayLike = Object.defineProperty({}, "length", {
|
|
2043
|
+
get: function() {
|
|
2044
|
+
throw isCallableMarker;
|
|
2045
|
+
}
|
|
2046
|
+
});
|
|
2047
|
+
isCallableMarker = {};
|
|
2048
|
+
reflectApply(function() {
|
|
2049
|
+
throw 42;
|
|
2050
|
+
}, null, badArrayLike);
|
|
2051
|
+
} catch (_) {
|
|
2052
|
+
if (_ !== isCallableMarker) {
|
|
2053
|
+
reflectApply = null;
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
} else {
|
|
2057
|
+
reflectApply = null;
|
|
2058
|
+
}
|
|
2059
|
+
var constructorRegex = /^\s*class\b/;
|
|
2060
|
+
var isES6ClassFn = function isES6ClassFunction(value) {
|
|
2061
|
+
try {
|
|
2062
|
+
var fnStr = fnToStr.call(value);
|
|
2063
|
+
return constructorRegex.test(fnStr);
|
|
2064
|
+
} catch (e) {
|
|
2065
|
+
return false;
|
|
2066
|
+
}
|
|
2067
|
+
};
|
|
2068
|
+
var tryFunctionObject = function tryFunctionToStr(value) {
|
|
2069
|
+
try {
|
|
2070
|
+
if (isES6ClassFn(value)) {
|
|
2071
|
+
return false;
|
|
2072
|
+
}
|
|
2073
|
+
fnToStr.call(value);
|
|
2074
|
+
return true;
|
|
2075
|
+
} catch (e) {
|
|
2076
|
+
return false;
|
|
2077
|
+
}
|
|
2078
|
+
};
|
|
2079
|
+
var toStr = Object.prototype.toString;
|
|
2080
|
+
var objectClass = "[object Object]";
|
|
2081
|
+
var fnClass = "[object Function]";
|
|
2082
|
+
var genClass = "[object GeneratorFunction]";
|
|
2083
|
+
var ddaClass = "[object HTMLAllCollection]";
|
|
2084
|
+
var ddaClass2 = "[object HTML document.all class]";
|
|
2085
|
+
var ddaClass3 = "[object HTMLCollection]";
|
|
2086
|
+
var hasToStringTag = typeof Symbol === "function" && !!Symbol.toStringTag;
|
|
2087
|
+
var isIE68 = !(0 in [,]);
|
|
2088
|
+
var isDDA = function isDocumentDotAll() {
|
|
2089
|
+
return false;
|
|
2090
|
+
};
|
|
2091
|
+
if (typeof document === "object") {
|
|
2092
|
+
all = document.all;
|
|
2093
|
+
if (toStr.call(all) === toStr.call(document.all)) {
|
|
2094
|
+
isDDA = function isDocumentDotAll(value) {
|
|
2095
|
+
if ((isIE68 || !value) && (typeof value === "undefined" || typeof value === "object")) {
|
|
2096
|
+
try {
|
|
2097
|
+
var str = toStr.call(value);
|
|
2098
|
+
return (str === ddaClass || str === ddaClass2 || str === ddaClass3 || str === objectClass) && value("") == null;
|
|
2099
|
+
} catch (e) {
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
return false;
|
|
2103
|
+
};
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
var all;
|
|
2107
|
+
module.exports = reflectApply ? function isCallable(value) {
|
|
2108
|
+
if (isDDA(value)) {
|
|
2109
|
+
return true;
|
|
2110
|
+
}
|
|
2111
|
+
if (!value) {
|
|
2112
|
+
return false;
|
|
2113
|
+
}
|
|
2114
|
+
if (typeof value !== "function" && typeof value !== "object") {
|
|
2115
|
+
return false;
|
|
2116
|
+
}
|
|
2117
|
+
try {
|
|
2118
|
+
reflectApply(value, null, badArrayLike);
|
|
2119
|
+
} catch (e) {
|
|
2120
|
+
if (e !== isCallableMarker) {
|
|
2121
|
+
return false;
|
|
2122
|
+
}
|
|
2123
|
+
}
|
|
2124
|
+
return !isES6ClassFn(value) && tryFunctionObject(value);
|
|
2125
|
+
} : function isCallable(value) {
|
|
2126
|
+
if (isDDA(value)) {
|
|
2127
|
+
return true;
|
|
2128
|
+
}
|
|
2129
|
+
if (!value) {
|
|
2130
|
+
return false;
|
|
2131
|
+
}
|
|
2132
|
+
if (typeof value !== "function" && typeof value !== "object") {
|
|
2133
|
+
return false;
|
|
2134
|
+
}
|
|
2135
|
+
if (hasToStringTag) {
|
|
2136
|
+
return tryFunctionObject(value);
|
|
2137
|
+
}
|
|
2138
|
+
if (isES6ClassFn(value)) {
|
|
2139
|
+
return false;
|
|
2140
|
+
}
|
|
2141
|
+
var strClass = toStr.call(value);
|
|
2142
|
+
if (strClass !== fnClass && strClass !== genClass && !/^\[object HTML/.test(strClass)) {
|
|
2143
|
+
return false;
|
|
2144
|
+
}
|
|
2145
|
+
return tryFunctionObject(value);
|
|
2146
|
+
};
|
|
2147
|
+
}
|
|
2148
|
+
});
|
|
2149
|
+
|
|
2150
|
+
// node_modules/es-abstract/2024/IsCallable.js
|
|
2151
|
+
var require_IsCallable = __commonJS({
|
|
2152
|
+
"node_modules/es-abstract/2024/IsCallable.js"(exports, module) {
|
|
2153
|
+
"use strict";
|
|
2154
|
+
module.exports = require_is_callable();
|
|
2155
|
+
}
|
|
2156
|
+
});
|
|
2157
|
+
|
|
2158
|
+
// node_modules/es-abstract/2024/ToBoolean.js
|
|
2159
|
+
var require_ToBoolean = __commonJS({
|
|
2160
|
+
"node_modules/es-abstract/2024/ToBoolean.js"(exports, module) {
|
|
2161
|
+
"use strict";
|
|
2162
|
+
module.exports = function ToBoolean(value) {
|
|
2163
|
+
return !!value;
|
|
2164
|
+
};
|
|
2165
|
+
}
|
|
2166
|
+
});
|
|
2167
|
+
|
|
2168
|
+
// node_modules/es-abstract/2024/ToPropertyDescriptor.js
|
|
2169
|
+
var require_ToPropertyDescriptor = __commonJS({
|
|
2170
|
+
"node_modules/es-abstract/2024/ToPropertyDescriptor.js"(exports, module) {
|
|
2171
|
+
"use strict";
|
|
2172
|
+
var hasOwn = require_hasown();
|
|
2173
|
+
var $TypeError = require_type();
|
|
2174
|
+
var isObject = require_isObject();
|
|
2175
|
+
var IsCallable = require_IsCallable();
|
|
2176
|
+
var ToBoolean = require_ToBoolean();
|
|
2177
|
+
module.exports = function ToPropertyDescriptor(Obj) {
|
|
2178
|
+
if (!isObject(Obj)) {
|
|
2179
|
+
throw new $TypeError("ToPropertyDescriptor requires an object");
|
|
2180
|
+
}
|
|
2181
|
+
var desc = {};
|
|
2182
|
+
if (hasOwn(Obj, "enumerable")) {
|
|
2183
|
+
desc["[[Enumerable]]"] = ToBoolean(Obj.enumerable);
|
|
2184
|
+
}
|
|
2185
|
+
if (hasOwn(Obj, "configurable")) {
|
|
2186
|
+
desc["[[Configurable]]"] = ToBoolean(Obj.configurable);
|
|
2187
|
+
}
|
|
2188
|
+
if (hasOwn(Obj, "value")) {
|
|
2189
|
+
desc["[[Value]]"] = Obj.value;
|
|
2190
|
+
}
|
|
2191
|
+
if (hasOwn(Obj, "writable")) {
|
|
2192
|
+
desc["[[Writable]]"] = ToBoolean(Obj.writable);
|
|
2193
|
+
}
|
|
2194
|
+
if (hasOwn(Obj, "get")) {
|
|
2195
|
+
var getter = Obj.get;
|
|
2196
|
+
if (typeof getter !== "undefined" && !IsCallable(getter)) {
|
|
2197
|
+
throw new $TypeError("getter must be a function");
|
|
2198
|
+
}
|
|
2199
|
+
desc["[[Get]]"] = getter;
|
|
2200
|
+
}
|
|
2201
|
+
if (hasOwn(Obj, "set")) {
|
|
2202
|
+
var setter = Obj.set;
|
|
2203
|
+
if (typeof setter !== "undefined" && !IsCallable(setter)) {
|
|
2204
|
+
throw new $TypeError("setter must be a function");
|
|
2205
|
+
}
|
|
2206
|
+
desc["[[Set]]"] = setter;
|
|
2207
|
+
}
|
|
2208
|
+
if ((hasOwn(desc, "[[Get]]") || hasOwn(desc, "[[Set]]")) && (hasOwn(desc, "[[Value]]") || hasOwn(desc, "[[Writable]]"))) {
|
|
2209
|
+
throw new $TypeError("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");
|
|
2210
|
+
}
|
|
2211
|
+
return desc;
|
|
2212
|
+
};
|
|
2213
|
+
}
|
|
2214
|
+
});
|
|
2215
|
+
|
|
2216
|
+
// node_modules/es-abstract/2024/DefinePropertyOrThrow.js
|
|
2217
|
+
var require_DefinePropertyOrThrow = __commonJS({
|
|
2218
|
+
"node_modules/es-abstract/2024/DefinePropertyOrThrow.js"(exports, module) {
|
|
2219
|
+
"use strict";
|
|
2220
|
+
var $TypeError = require_type();
|
|
2221
|
+
var isObject = require_isObject();
|
|
2222
|
+
var isPropertyDescriptor = require_property_descriptor();
|
|
2223
|
+
var DefineOwnProperty = require_DefineOwnProperty();
|
|
2224
|
+
var FromPropertyDescriptor = require_FromPropertyDescriptor();
|
|
2225
|
+
var IsDataDescriptor = require_IsDataDescriptor();
|
|
2226
|
+
var isPropertyKey = require_isPropertyKey();
|
|
2227
|
+
var SameValue = require_SameValue();
|
|
2228
|
+
var ToPropertyDescriptor = require_ToPropertyDescriptor();
|
|
2229
|
+
module.exports = function DefinePropertyOrThrow(O, P, desc) {
|
|
2230
|
+
if (!isObject(O)) {
|
|
2231
|
+
throw new $TypeError("Assertion failed: Type(O) is not Object");
|
|
2232
|
+
}
|
|
2233
|
+
if (!isPropertyKey(P)) {
|
|
2234
|
+
throw new $TypeError("Assertion failed: P is not a Property Key");
|
|
2235
|
+
}
|
|
2236
|
+
var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc);
|
|
2237
|
+
if (!isPropertyDescriptor(Desc)) {
|
|
2238
|
+
throw new $TypeError("Assertion failed: Desc is not a valid Property Descriptor");
|
|
2239
|
+
}
|
|
2240
|
+
return DefineOwnProperty(
|
|
2241
|
+
IsDataDescriptor,
|
|
2242
|
+
SameValue,
|
|
2243
|
+
FromPropertyDescriptor,
|
|
2244
|
+
O,
|
|
2245
|
+
P,
|
|
2246
|
+
Desc
|
|
2247
|
+
);
|
|
2248
|
+
};
|
|
2249
|
+
}
|
|
2250
|
+
});
|
|
2251
|
+
|
|
2252
|
+
// node_modules/es-abstract/2024/IsConstructor.js
|
|
2253
|
+
var require_IsConstructor = __commonJS({
|
|
2254
|
+
"node_modules/es-abstract/2024/IsConstructor.js"(exports, module) {
|
|
2255
|
+
"use strict";
|
|
2256
|
+
var GetIntrinsic = require_GetIntrinsic();
|
|
2257
|
+
var $construct = GetIntrinsic("%Reflect.construct%", true);
|
|
2258
|
+
var DefinePropertyOrThrow = require_DefinePropertyOrThrow();
|
|
2259
|
+
try {
|
|
2260
|
+
DefinePropertyOrThrow({}, "", { "[[Get]]": function() {
|
|
2261
|
+
} });
|
|
2262
|
+
} catch (e) {
|
|
2263
|
+
DefinePropertyOrThrow = null;
|
|
2264
|
+
}
|
|
2265
|
+
if (DefinePropertyOrThrow && $construct) {
|
|
2266
|
+
isConstructorMarker = {};
|
|
2267
|
+
badArrayLike = {};
|
|
2268
|
+
DefinePropertyOrThrow(badArrayLike, "length", {
|
|
2269
|
+
"[[Get]]": function() {
|
|
2270
|
+
throw isConstructorMarker;
|
|
2271
|
+
},
|
|
2272
|
+
"[[Enumerable]]": true
|
|
2273
|
+
});
|
|
2274
|
+
module.exports = function IsConstructor(argument) {
|
|
2275
|
+
try {
|
|
2276
|
+
$construct(argument, badArrayLike);
|
|
2277
|
+
} catch (err) {
|
|
2278
|
+
return err === isConstructorMarker;
|
|
2279
|
+
}
|
|
2280
|
+
};
|
|
2281
|
+
} else {
|
|
2282
|
+
module.exports = function IsConstructor(argument) {
|
|
2283
|
+
return typeof argument === "function" && !!argument.prototype;
|
|
2284
|
+
};
|
|
2285
|
+
}
|
|
2286
|
+
var isConstructorMarker;
|
|
2287
|
+
var badArrayLike;
|
|
2288
|
+
}
|
|
2289
|
+
});
|
|
2290
|
+
|
|
2291
|
+
// node_modules/es-abstract/2024/ArraySpeciesCreate.js
|
|
2292
|
+
var require_ArraySpeciesCreate = __commonJS({
|
|
2293
|
+
"node_modules/es-abstract/2024/ArraySpeciesCreate.js"(exports, module) {
|
|
2294
|
+
"use strict";
|
|
2295
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
2296
|
+
var $species = GetIntrinsic("%Symbol.species%", true);
|
|
2297
|
+
var $TypeError = require_type();
|
|
2298
|
+
var isInteger = require_isInteger();
|
|
2299
|
+
var isObject = require_isObject();
|
|
2300
|
+
var ArrayCreate = require_ArrayCreate();
|
|
2301
|
+
var Get = require_Get();
|
|
2302
|
+
var IsArray = require_IsArray2();
|
|
2303
|
+
var IsConstructor = require_IsConstructor();
|
|
2304
|
+
module.exports = function ArraySpeciesCreate(originalArray, length) {
|
|
2305
|
+
if (!isInteger(length) || length < 0) {
|
|
2306
|
+
throw new $TypeError("Assertion failed: length must be an integer >= 0");
|
|
2307
|
+
}
|
|
2308
|
+
var isArray = IsArray(originalArray);
|
|
2309
|
+
if (!isArray) {
|
|
2310
|
+
return ArrayCreate(length);
|
|
2311
|
+
}
|
|
2312
|
+
var C = Get(originalArray, "constructor");
|
|
2313
|
+
if ($species && isObject(C)) {
|
|
2314
|
+
C = Get(C, $species);
|
|
2315
|
+
if (C === null) {
|
|
2316
|
+
C = void 0;
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
if (typeof C === "undefined") {
|
|
2320
|
+
return ArrayCreate(length);
|
|
2321
|
+
}
|
|
2322
|
+
if (!IsConstructor(C)) {
|
|
2323
|
+
throw new $TypeError("C must be a constructor");
|
|
2324
|
+
}
|
|
2325
|
+
return new C(length);
|
|
2326
|
+
};
|
|
2327
|
+
}
|
|
2328
|
+
});
|
|
2329
|
+
|
|
2330
|
+
// node_modules/math-intrinsics/constants/maxSafeInteger.js
|
|
2331
|
+
var require_maxSafeInteger = __commonJS({
|
|
2332
|
+
"node_modules/math-intrinsics/constants/maxSafeInteger.js"(exports, module) {
|
|
2333
|
+
"use strict";
|
|
2334
|
+
module.exports = /** @type {import('./maxSafeInteger')} */
|
|
2335
|
+
Number.MAX_SAFE_INTEGER || 9007199254740991;
|
|
2336
|
+
}
|
|
2337
|
+
});
|
|
2338
|
+
|
|
2339
|
+
// node_modules/es-abstract/2024/Call.js
|
|
2340
|
+
var require_Call = __commonJS({
|
|
2341
|
+
"node_modules/es-abstract/2024/Call.js"(exports, module) {
|
|
2342
|
+
"use strict";
|
|
2343
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
2344
|
+
var callBound = require_call_bound();
|
|
2345
|
+
var $TypeError = require_type();
|
|
2346
|
+
var IsArray = require_IsArray2();
|
|
2347
|
+
var $apply = GetIntrinsic("%Reflect.apply%", true) || callBound("Function.prototype.apply");
|
|
2348
|
+
module.exports = function Call(F, V) {
|
|
2349
|
+
var argumentsList = arguments.length > 2 ? arguments[2] : [];
|
|
2350
|
+
if (!IsArray(argumentsList)) {
|
|
2351
|
+
throw new $TypeError("Assertion failed: optional `argumentsList`, if provided, must be a List");
|
|
2352
|
+
}
|
|
2353
|
+
return $apply(F, V, argumentsList);
|
|
2354
|
+
};
|
|
2355
|
+
}
|
|
2356
|
+
});
|
|
2357
|
+
|
|
2358
|
+
// node_modules/es-abstract/2024/IsAccessorDescriptor.js
|
|
2359
|
+
var require_IsAccessorDescriptor = __commonJS({
|
|
2360
|
+
"node_modules/es-abstract/2024/IsAccessorDescriptor.js"(exports, module) {
|
|
2361
|
+
"use strict";
|
|
2362
|
+
var $TypeError = require_type();
|
|
2363
|
+
var hasOwn = require_hasown();
|
|
2364
|
+
var isPropertyDescriptor = require_property_descriptor();
|
|
2365
|
+
module.exports = function IsAccessorDescriptor(Desc) {
|
|
2366
|
+
if (typeof Desc === "undefined") {
|
|
2367
|
+
return false;
|
|
2368
|
+
}
|
|
2369
|
+
if (!isPropertyDescriptor(Desc)) {
|
|
2370
|
+
throw new $TypeError("Assertion failed: `Desc` must be a Property Descriptor");
|
|
2371
|
+
}
|
|
2372
|
+
if (!hasOwn(Desc, "[[Get]]") && !hasOwn(Desc, "[[Set]]")) {
|
|
2373
|
+
return false;
|
|
2374
|
+
}
|
|
2375
|
+
return true;
|
|
2376
|
+
};
|
|
2377
|
+
}
|
|
2378
|
+
});
|
|
2379
|
+
|
|
2380
|
+
// node_modules/es-abstract/helpers/isPrimitive.js
|
|
2381
|
+
var require_isPrimitive = __commonJS({
|
|
2382
|
+
"node_modules/es-abstract/helpers/isPrimitive.js"(exports, module) {
|
|
2383
|
+
"use strict";
|
|
2384
|
+
module.exports = function isPrimitive(value) {
|
|
2385
|
+
return value === null || typeof value !== "function" && typeof value !== "object";
|
|
2386
|
+
};
|
|
2387
|
+
}
|
|
2388
|
+
});
|
|
2389
|
+
|
|
2390
|
+
// node_modules/es-abstract/2024/IsExtensible.js
|
|
2391
|
+
var require_IsExtensible = __commonJS({
|
|
2392
|
+
"node_modules/es-abstract/2024/IsExtensible.js"(exports, module) {
|
|
2393
|
+
"use strict";
|
|
2394
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
2395
|
+
var $preventExtensions = GetIntrinsic("%Object.preventExtensions%", true);
|
|
2396
|
+
var $isExtensible = GetIntrinsic("%Object.isExtensible%", true);
|
|
2397
|
+
var isPrimitive = require_isPrimitive();
|
|
2398
|
+
module.exports = $preventExtensions ? function IsExtensible(obj) {
|
|
2399
|
+
return !isPrimitive(obj) && $isExtensible(obj);
|
|
2400
|
+
} : function IsExtensible(obj) {
|
|
2401
|
+
return !isPrimitive(obj);
|
|
2402
|
+
};
|
|
2403
|
+
}
|
|
2404
|
+
});
|
|
2405
|
+
|
|
2406
|
+
// node_modules/es-abstract/helpers/isFullyPopulatedPropertyDescriptor.js
|
|
2407
|
+
var require_isFullyPopulatedPropertyDescriptor = __commonJS({
|
|
2408
|
+
"node_modules/es-abstract/helpers/isFullyPopulatedPropertyDescriptor.js"(exports, module) {
|
|
2409
|
+
"use strict";
|
|
2410
|
+
var isPropertyDescriptor = require_property_descriptor();
|
|
2411
|
+
module.exports = function isFullyPopulatedPropertyDescriptor(ES, Desc) {
|
|
2412
|
+
return isPropertyDescriptor(Desc) && "[[Enumerable]]" in Desc && "[[Configurable]]" in Desc && (ES.IsAccessorDescriptor(Desc) || ES.IsDataDescriptor(Desc));
|
|
2413
|
+
};
|
|
2414
|
+
}
|
|
2415
|
+
});
|
|
2416
|
+
|
|
2417
|
+
// node_modules/es-abstract/2024/IsGenericDescriptor.js
|
|
2418
|
+
var require_IsGenericDescriptor = __commonJS({
|
|
2419
|
+
"node_modules/es-abstract/2024/IsGenericDescriptor.js"(exports, module) {
|
|
2420
|
+
"use strict";
|
|
2421
|
+
var $TypeError = require_type();
|
|
2422
|
+
var IsAccessorDescriptor = require_IsAccessorDescriptor();
|
|
2423
|
+
var IsDataDescriptor = require_IsDataDescriptor();
|
|
2424
|
+
var isPropertyDescriptor = require_property_descriptor();
|
|
2425
|
+
module.exports = function IsGenericDescriptor(Desc) {
|
|
2426
|
+
if (typeof Desc === "undefined") {
|
|
2427
|
+
return false;
|
|
2428
|
+
}
|
|
2429
|
+
if (!isPropertyDescriptor(Desc)) {
|
|
2430
|
+
throw new $TypeError("Assertion failed: `Desc` must be a Property Descriptor");
|
|
2431
|
+
}
|
|
2432
|
+
if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) {
|
|
2433
|
+
return true;
|
|
2434
|
+
}
|
|
2435
|
+
return false;
|
|
2436
|
+
};
|
|
2437
|
+
}
|
|
2438
|
+
});
|
|
2439
|
+
|
|
2440
|
+
// node_modules/es-abstract/2024/ValidateAndApplyPropertyDescriptor.js
|
|
2441
|
+
var require_ValidateAndApplyPropertyDescriptor = __commonJS({
|
|
2442
|
+
"node_modules/es-abstract/2024/ValidateAndApplyPropertyDescriptor.js"(exports, module) {
|
|
2443
|
+
"use strict";
|
|
2444
|
+
var $TypeError = require_type();
|
|
2445
|
+
var isObject = require_isObject();
|
|
2446
|
+
var DefineOwnProperty = require_DefineOwnProperty();
|
|
2447
|
+
var isFullyPopulatedPropertyDescriptor = require_isFullyPopulatedPropertyDescriptor();
|
|
2448
|
+
var isPropertyDescriptor = require_property_descriptor();
|
|
2449
|
+
var FromPropertyDescriptor = require_FromPropertyDescriptor();
|
|
2450
|
+
var IsAccessorDescriptor = require_IsAccessorDescriptor();
|
|
2451
|
+
var IsDataDescriptor = require_IsDataDescriptor();
|
|
2452
|
+
var IsGenericDescriptor = require_IsGenericDescriptor();
|
|
2453
|
+
var isPropertyKey = require_isPropertyKey();
|
|
2454
|
+
var SameValue = require_SameValue();
|
|
2455
|
+
module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) {
|
|
2456
|
+
if (typeof O !== "undefined" && !isObject(O)) {
|
|
2457
|
+
throw new $TypeError("Assertion failed: O must be undefined or an Object");
|
|
2458
|
+
}
|
|
2459
|
+
if (!isPropertyKey(P)) {
|
|
2460
|
+
throw new $TypeError("Assertion failed: P must be a Property Key");
|
|
2461
|
+
}
|
|
2462
|
+
if (typeof extensible !== "boolean") {
|
|
2463
|
+
throw new $TypeError("Assertion failed: extensible must be a Boolean");
|
|
2464
|
+
}
|
|
2465
|
+
if (!isPropertyDescriptor(Desc)) {
|
|
2466
|
+
throw new $TypeError("Assertion failed: Desc must be a Property Descriptor");
|
|
2467
|
+
}
|
|
2468
|
+
if (typeof current !== "undefined" && !isPropertyDescriptor(current)) {
|
|
2469
|
+
throw new $TypeError("Assertion failed: current must be a Property Descriptor, or undefined");
|
|
2470
|
+
}
|
|
2471
|
+
if (typeof current === "undefined") {
|
|
2472
|
+
if (!extensible) {
|
|
2473
|
+
return false;
|
|
2474
|
+
}
|
|
2475
|
+
if (typeof O === "undefined") {
|
|
2476
|
+
return true;
|
|
2477
|
+
}
|
|
2478
|
+
if (IsAccessorDescriptor(Desc)) {
|
|
2479
|
+
return DefineOwnProperty(
|
|
2480
|
+
IsDataDescriptor,
|
|
2481
|
+
SameValue,
|
|
2482
|
+
FromPropertyDescriptor,
|
|
2483
|
+
O,
|
|
2484
|
+
P,
|
|
2485
|
+
Desc
|
|
2486
|
+
);
|
|
2487
|
+
}
|
|
2488
|
+
return DefineOwnProperty(
|
|
2489
|
+
IsDataDescriptor,
|
|
2490
|
+
SameValue,
|
|
2491
|
+
FromPropertyDescriptor,
|
|
2492
|
+
O,
|
|
2493
|
+
P,
|
|
2494
|
+
{
|
|
2495
|
+
"[[Configurable]]": !!Desc["[[Configurable]]"],
|
|
2496
|
+
"[[Enumerable]]": !!Desc["[[Enumerable]]"],
|
|
2497
|
+
"[[Value]]": Desc["[[Value]]"],
|
|
2498
|
+
"[[Writable]]": !!Desc["[[Writable]]"]
|
|
2499
|
+
}
|
|
2500
|
+
);
|
|
2501
|
+
}
|
|
2502
|
+
if (!isFullyPopulatedPropertyDescriptor(
|
|
2503
|
+
{
|
|
2504
|
+
IsAccessorDescriptor,
|
|
2505
|
+
IsDataDescriptor
|
|
2506
|
+
},
|
|
2507
|
+
current
|
|
2508
|
+
)) {
|
|
2509
|
+
throw new $TypeError("`current`, when present, must be a fully populated and valid Property Descriptor");
|
|
2510
|
+
}
|
|
2511
|
+
if (!current["[[Configurable]]"]) {
|
|
2512
|
+
if ("[[Configurable]]" in Desc && Desc["[[Configurable]]"]) {
|
|
2513
|
+
return false;
|
|
2514
|
+
}
|
|
2515
|
+
if ("[[Enumerable]]" in Desc && !SameValue(Desc["[[Enumerable]]"], current["[[Enumerable]]"])) {
|
|
2516
|
+
return false;
|
|
2517
|
+
}
|
|
2518
|
+
if (!IsGenericDescriptor(Desc) && !SameValue(IsAccessorDescriptor(Desc), IsAccessorDescriptor(current))) {
|
|
2519
|
+
return false;
|
|
2520
|
+
}
|
|
2521
|
+
if (IsAccessorDescriptor(current)) {
|
|
2522
|
+
if ("[[Get]]" in Desc && !SameValue(Desc["[[Get]]"], current["[[Get]]"])) {
|
|
2523
|
+
return false;
|
|
2524
|
+
}
|
|
2525
|
+
if ("[[Set]]" in Desc && !SameValue(Desc["[[Set]]"], current["[[Set]]"])) {
|
|
2526
|
+
return false;
|
|
2527
|
+
}
|
|
2528
|
+
} else if (!current["[[Writable]]"]) {
|
|
2529
|
+
if ("[[Writable]]" in Desc && Desc["[[Writable]]"]) {
|
|
2530
|
+
return false;
|
|
2531
|
+
}
|
|
2532
|
+
if ("[[Value]]" in Desc && !SameValue(Desc["[[Value]]"], current["[[Value]]"])) {
|
|
2533
|
+
return false;
|
|
2534
|
+
}
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
if (typeof O !== "undefined") {
|
|
2538
|
+
var configurable;
|
|
2539
|
+
var enumerable;
|
|
2540
|
+
if (IsDataDescriptor(current) && IsAccessorDescriptor(Desc)) {
|
|
2541
|
+
configurable = ("[[Configurable]]" in Desc ? Desc : current)["[[Configurable]]"];
|
|
2542
|
+
enumerable = ("[[Enumerable]]" in Desc ? Desc : current)["[[Enumerable]]"];
|
|
2543
|
+
return DefineOwnProperty(
|
|
2544
|
+
IsDataDescriptor,
|
|
2545
|
+
SameValue,
|
|
2546
|
+
FromPropertyDescriptor,
|
|
2547
|
+
O,
|
|
2548
|
+
P,
|
|
2549
|
+
{
|
|
2550
|
+
"[[Configurable]]": !!configurable,
|
|
2551
|
+
"[[Enumerable]]": !!enumerable,
|
|
2552
|
+
"[[Get]]": ("[[Get]]" in Desc ? Desc : current)["[[Get]]"],
|
|
2553
|
+
"[[Set]]": ("[[Set]]" in Desc ? Desc : current)["[[Set]]"]
|
|
2554
|
+
}
|
|
2555
|
+
);
|
|
2556
|
+
} else if (IsAccessorDescriptor(current) && IsDataDescriptor(Desc)) {
|
|
2557
|
+
configurable = ("[[Configurable]]" in Desc ? Desc : current)["[[Configurable]]"];
|
|
2558
|
+
enumerable = ("[[Enumerable]]" in Desc ? Desc : current)["[[Enumerable]]"];
|
|
2559
|
+
return DefineOwnProperty(
|
|
2560
|
+
IsDataDescriptor,
|
|
2561
|
+
SameValue,
|
|
2562
|
+
FromPropertyDescriptor,
|
|
2563
|
+
O,
|
|
2564
|
+
P,
|
|
2565
|
+
{
|
|
2566
|
+
"[[Configurable]]": !!configurable,
|
|
2567
|
+
"[[Enumerable]]": !!enumerable,
|
|
2568
|
+
"[[Value]]": ("[[Value]]" in Desc ? Desc : current)["[[Value]]"],
|
|
2569
|
+
"[[Writable]]": !!("[[Writable]]" in Desc ? Desc : current)["[[Writable]]"]
|
|
2570
|
+
}
|
|
2571
|
+
);
|
|
2572
|
+
}
|
|
2573
|
+
return DefineOwnProperty(
|
|
2574
|
+
IsDataDescriptor,
|
|
2575
|
+
SameValue,
|
|
2576
|
+
FromPropertyDescriptor,
|
|
2577
|
+
O,
|
|
2578
|
+
P,
|
|
2579
|
+
Desc
|
|
2580
|
+
);
|
|
2581
|
+
}
|
|
2582
|
+
return true;
|
|
2583
|
+
};
|
|
2584
|
+
}
|
|
2585
|
+
});
|
|
2586
|
+
|
|
2587
|
+
// node_modules/es-abstract/2024/OrdinaryDefineOwnProperty.js
|
|
2588
|
+
var require_OrdinaryDefineOwnProperty = __commonJS({
|
|
2589
|
+
"node_modules/es-abstract/2024/OrdinaryDefineOwnProperty.js"(exports, module) {
|
|
2590
|
+
"use strict";
|
|
2591
|
+
var $gOPD = require_gopd();
|
|
2592
|
+
var $SyntaxError = require_syntax();
|
|
2593
|
+
var $TypeError = require_type();
|
|
2594
|
+
var isObject = require_isObject();
|
|
2595
|
+
var isPropertyDescriptor = require_property_descriptor();
|
|
2596
|
+
var IsAccessorDescriptor = require_IsAccessorDescriptor();
|
|
2597
|
+
var IsExtensible = require_IsExtensible();
|
|
2598
|
+
var isPropertyKey = require_isPropertyKey();
|
|
2599
|
+
var ToPropertyDescriptor = require_ToPropertyDescriptor();
|
|
2600
|
+
var SameValue = require_SameValue();
|
|
2601
|
+
var ValidateAndApplyPropertyDescriptor = require_ValidateAndApplyPropertyDescriptor();
|
|
2602
|
+
module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) {
|
|
2603
|
+
if (!isObject(O)) {
|
|
2604
|
+
throw new $TypeError("Assertion failed: O must be an Object");
|
|
2605
|
+
}
|
|
2606
|
+
if (!isPropertyKey(P)) {
|
|
2607
|
+
throw new $TypeError("Assertion failed: P must be a Property Key");
|
|
2608
|
+
}
|
|
2609
|
+
if (!isPropertyDescriptor(Desc)) {
|
|
2610
|
+
throw new $TypeError("Assertion failed: Desc must be a Property Descriptor");
|
|
2611
|
+
}
|
|
2612
|
+
if (!$gOPD) {
|
|
2613
|
+
if (IsAccessorDescriptor(Desc)) {
|
|
2614
|
+
throw new $SyntaxError("This environment does not support accessor property descriptors.");
|
|
2615
|
+
}
|
|
2616
|
+
var creatingNormalDataProperty = !(P in O) && Desc["[[Writable]]"] && Desc["[[Enumerable]]"] && Desc["[[Configurable]]"] && "[[Value]]" in Desc;
|
|
2617
|
+
var settingExistingDataProperty = P in O && (!("[[Configurable]]" in Desc) || Desc["[[Configurable]]"]) && (!("[[Enumerable]]" in Desc) || Desc["[[Enumerable]]"]) && (!("[[Writable]]" in Desc) || Desc["[[Writable]]"]) && "[[Value]]" in Desc;
|
|
2618
|
+
if (creatingNormalDataProperty || settingExistingDataProperty) {
|
|
2619
|
+
O[P] = Desc["[[Value]]"];
|
|
2620
|
+
return SameValue(O[P], Desc["[[Value]]"]);
|
|
2621
|
+
}
|
|
2622
|
+
throw new $SyntaxError("This environment does not support defining non-writable, non-enumerable, or non-configurable properties");
|
|
2623
|
+
}
|
|
2624
|
+
var desc = $gOPD(O, P);
|
|
2625
|
+
var current = desc && ToPropertyDescriptor(desc);
|
|
2626
|
+
var extensible = IsExtensible(O);
|
|
2627
|
+
return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current);
|
|
2628
|
+
};
|
|
2629
|
+
}
|
|
2630
|
+
});
|
|
2631
|
+
|
|
2632
|
+
// node_modules/es-abstract/2024/CreateDataProperty.js
|
|
2633
|
+
var require_CreateDataProperty = __commonJS({
|
|
2634
|
+
"node_modules/es-abstract/2024/CreateDataProperty.js"(exports, module) {
|
|
2635
|
+
"use strict";
|
|
2636
|
+
var $TypeError = require_type();
|
|
2637
|
+
var isObject = require_isObject();
|
|
2638
|
+
var isPropertyKey = require_isPropertyKey();
|
|
2639
|
+
var OrdinaryDefineOwnProperty = require_OrdinaryDefineOwnProperty();
|
|
2640
|
+
module.exports = function CreateDataProperty(O, P, V) {
|
|
2641
|
+
if (!isObject(O)) {
|
|
2642
|
+
throw new $TypeError("Assertion failed: Type(O) is not Object");
|
|
2643
|
+
}
|
|
2644
|
+
if (!isPropertyKey(P)) {
|
|
2645
|
+
throw new $TypeError("Assertion failed: P is not a Property Key");
|
|
2646
|
+
}
|
|
2647
|
+
var newDesc = {
|
|
2648
|
+
"[[Configurable]]": true,
|
|
2649
|
+
"[[Enumerable]]": true,
|
|
2650
|
+
"[[Value]]": V,
|
|
2651
|
+
"[[Writable]]": true
|
|
2652
|
+
};
|
|
2653
|
+
return OrdinaryDefineOwnProperty(O, P, newDesc);
|
|
2654
|
+
};
|
|
2655
|
+
}
|
|
2656
|
+
});
|
|
2657
|
+
|
|
2658
|
+
// node_modules/es-abstract/2024/CreateDataPropertyOrThrow.js
|
|
2659
|
+
var require_CreateDataPropertyOrThrow = __commonJS({
|
|
2660
|
+
"node_modules/es-abstract/2024/CreateDataPropertyOrThrow.js"(exports, module) {
|
|
2661
|
+
"use strict";
|
|
2662
|
+
var $TypeError = require_type();
|
|
2663
|
+
var isObject = require_isObject();
|
|
2664
|
+
var CreateDataProperty = require_CreateDataProperty();
|
|
2665
|
+
var isPropertyKey = require_isPropertyKey();
|
|
2666
|
+
module.exports = function CreateDataPropertyOrThrow(O, P, V) {
|
|
2667
|
+
if (!isObject(O)) {
|
|
2668
|
+
throw new $TypeError("Assertion failed: Type(O) is not Object");
|
|
2669
|
+
}
|
|
2670
|
+
if (!isPropertyKey(P)) {
|
|
2671
|
+
throw new $TypeError("Assertion failed: P is not a Property Key");
|
|
2672
|
+
}
|
|
2673
|
+
var success = CreateDataProperty(O, P, V);
|
|
2674
|
+
if (!success) {
|
|
2675
|
+
throw new $TypeError("unable to create data property");
|
|
2676
|
+
}
|
|
2677
|
+
};
|
|
2678
|
+
}
|
|
2679
|
+
});
|
|
2680
|
+
|
|
2681
|
+
// node_modules/es-abstract/2024/HasProperty.js
|
|
2682
|
+
var require_HasProperty = __commonJS({
|
|
2683
|
+
"node_modules/es-abstract/2024/HasProperty.js"(exports, module) {
|
|
2684
|
+
"use strict";
|
|
2685
|
+
var $TypeError = require_type();
|
|
2686
|
+
var isObject = require_isObject();
|
|
2687
|
+
var isPropertyKey = require_isPropertyKey();
|
|
2688
|
+
module.exports = function HasProperty(O, P) {
|
|
2689
|
+
if (!isObject(O)) {
|
|
2690
|
+
throw new $TypeError("Assertion failed: `O` must be an Object");
|
|
2691
|
+
}
|
|
2692
|
+
if (!isPropertyKey(P)) {
|
|
2693
|
+
throw new $TypeError("Assertion failed: `P` must be a Property Key");
|
|
2694
|
+
}
|
|
2695
|
+
return P in O;
|
|
2696
|
+
};
|
|
2697
|
+
}
|
|
2698
|
+
});
|
|
2699
|
+
|
|
2700
|
+
// node_modules/has-tostringtag/shams.js
|
|
2701
|
+
var require_shams2 = __commonJS({
|
|
2702
|
+
"node_modules/has-tostringtag/shams.js"(exports, module) {
|
|
2703
|
+
"use strict";
|
|
2704
|
+
var hasSymbols = require_shams();
|
|
2705
|
+
module.exports = function hasToStringTagShams() {
|
|
2706
|
+
return hasSymbols() && !!Symbol.toStringTag;
|
|
2707
|
+
};
|
|
2708
|
+
}
|
|
2709
|
+
});
|
|
2710
|
+
|
|
2711
|
+
// node_modules/is-date-object/index.js
|
|
2712
|
+
var require_is_date_object = __commonJS({
|
|
2713
|
+
"node_modules/is-date-object/index.js"(exports, module) {
|
|
2714
|
+
"use strict";
|
|
2715
|
+
var callBound = require_call_bound();
|
|
2716
|
+
var getDay = callBound("Date.prototype.getDay");
|
|
2717
|
+
var tryDateObject = function tryDateGetDayCall(value) {
|
|
2718
|
+
try {
|
|
2719
|
+
getDay(value);
|
|
2720
|
+
return true;
|
|
2721
|
+
} catch (e) {
|
|
2722
|
+
return false;
|
|
2723
|
+
}
|
|
2724
|
+
};
|
|
2725
|
+
var toStr = callBound("Object.prototype.toString");
|
|
2726
|
+
var dateClass = "[object Date]";
|
|
2727
|
+
var hasToStringTag = require_shams2()();
|
|
2728
|
+
module.exports = function isDateObject(value) {
|
|
2729
|
+
if (typeof value !== "object" || value === null) {
|
|
2730
|
+
return false;
|
|
2731
|
+
}
|
|
2732
|
+
return hasToStringTag ? tryDateObject(value) : toStr(value) === dateClass;
|
|
2733
|
+
};
|
|
2734
|
+
}
|
|
2735
|
+
});
|
|
2736
|
+
|
|
2737
|
+
// node_modules/is-regex/index.js
|
|
2738
|
+
var require_is_regex = __commonJS({
|
|
2739
|
+
"node_modules/is-regex/index.js"(exports, module) {
|
|
2740
|
+
"use strict";
|
|
2741
|
+
var callBound = require_call_bound();
|
|
2742
|
+
var hasToStringTag = require_shams2()();
|
|
2743
|
+
var hasOwn = require_hasown();
|
|
2744
|
+
var gOPD = require_gopd();
|
|
2745
|
+
var fn;
|
|
2746
|
+
if (hasToStringTag) {
|
|
2747
|
+
$exec = callBound("RegExp.prototype.exec");
|
|
2748
|
+
isRegexMarker = {};
|
|
2749
|
+
throwRegexMarker = function() {
|
|
2750
|
+
throw isRegexMarker;
|
|
2751
|
+
};
|
|
2752
|
+
badStringifier = {
|
|
2753
|
+
toString: throwRegexMarker,
|
|
2754
|
+
valueOf: throwRegexMarker
|
|
2755
|
+
};
|
|
2756
|
+
if (typeof Symbol.toPrimitive === "symbol") {
|
|
2757
|
+
badStringifier[Symbol.toPrimitive] = throwRegexMarker;
|
|
2758
|
+
}
|
|
2759
|
+
fn = function isRegex(value) {
|
|
2760
|
+
if (!value || typeof value !== "object") {
|
|
2761
|
+
return false;
|
|
2762
|
+
}
|
|
2763
|
+
var descriptor = (
|
|
2764
|
+
/** @type {NonNullable<typeof gOPD>} */
|
|
2765
|
+
gOPD(
|
|
2766
|
+
/** @type {{ lastIndex?: unknown }} */
|
|
2767
|
+
value,
|
|
2768
|
+
"lastIndex"
|
|
2769
|
+
)
|
|
2770
|
+
);
|
|
2771
|
+
var hasLastIndexDataProperty = descriptor && hasOwn(descriptor, "value");
|
|
2772
|
+
if (!hasLastIndexDataProperty) {
|
|
2773
|
+
return false;
|
|
2774
|
+
}
|
|
2775
|
+
try {
|
|
2776
|
+
$exec(
|
|
2777
|
+
value,
|
|
2778
|
+
/** @type {string} */
|
|
2779
|
+
/** @type {unknown} */
|
|
2780
|
+
badStringifier
|
|
2781
|
+
);
|
|
2782
|
+
} catch (e) {
|
|
2783
|
+
return e === isRegexMarker;
|
|
2784
|
+
}
|
|
2785
|
+
};
|
|
2786
|
+
} else {
|
|
2787
|
+
$toString = callBound("Object.prototype.toString");
|
|
2788
|
+
regexClass = "[object RegExp]";
|
|
2789
|
+
fn = function isRegex(value) {
|
|
2790
|
+
if (!value || typeof value !== "object" && typeof value !== "function") {
|
|
2791
|
+
return false;
|
|
2792
|
+
}
|
|
2793
|
+
return $toString(value) === regexClass;
|
|
2794
|
+
};
|
|
2795
|
+
}
|
|
2796
|
+
var $exec;
|
|
2797
|
+
var isRegexMarker;
|
|
2798
|
+
var throwRegexMarker;
|
|
2799
|
+
var badStringifier;
|
|
2800
|
+
var $toString;
|
|
2801
|
+
var regexClass;
|
|
2802
|
+
module.exports = fn;
|
|
2803
|
+
}
|
|
2804
|
+
});
|
|
2805
|
+
|
|
2806
|
+
// node_modules/safe-regex-test/index.js
|
|
2807
|
+
var require_safe_regex_test = __commonJS({
|
|
2808
|
+
"node_modules/safe-regex-test/index.js"(exports, module) {
|
|
2809
|
+
"use strict";
|
|
2810
|
+
var callBound = require_call_bound();
|
|
2811
|
+
var isRegex = require_is_regex();
|
|
2812
|
+
var $exec = callBound("RegExp.prototype.exec");
|
|
2813
|
+
var $TypeError = require_type();
|
|
2814
|
+
module.exports = function regexTester(regex) {
|
|
2815
|
+
if (!isRegex(regex)) {
|
|
2816
|
+
throw new $TypeError("`regex` must be a RegExp");
|
|
2817
|
+
}
|
|
2818
|
+
return function test(s) {
|
|
2819
|
+
return $exec(regex, s) !== null;
|
|
2820
|
+
};
|
|
2821
|
+
};
|
|
2822
|
+
}
|
|
2823
|
+
});
|
|
2824
|
+
|
|
2825
|
+
// node_modules/is-symbol/index.js
|
|
2826
|
+
var require_is_symbol = __commonJS({
|
|
2827
|
+
"node_modules/is-symbol/index.js"(exports, module) {
|
|
2828
|
+
"use strict";
|
|
2829
|
+
var callBound = require_call_bound();
|
|
2830
|
+
var $toString = callBound("Object.prototype.toString");
|
|
2831
|
+
var hasSymbols = require_has_symbols()();
|
|
2832
|
+
var safeRegexTest = require_safe_regex_test();
|
|
2833
|
+
if (hasSymbols) {
|
|
2834
|
+
$symToStr = callBound("Symbol.prototype.toString");
|
|
2835
|
+
isSymString = safeRegexTest(/^Symbol\(.*\)$/);
|
|
2836
|
+
isSymbolObject = function isRealSymbolObject(value) {
|
|
2837
|
+
if (typeof value.valueOf() !== "symbol") {
|
|
2838
|
+
return false;
|
|
2839
|
+
}
|
|
2840
|
+
return isSymString($symToStr(value));
|
|
2841
|
+
};
|
|
2842
|
+
module.exports = function isSymbol(value) {
|
|
2843
|
+
if (typeof value === "symbol") {
|
|
2844
|
+
return true;
|
|
2845
|
+
}
|
|
2846
|
+
if (!value || typeof value !== "object" || $toString(value) !== "[object Symbol]") {
|
|
2847
|
+
return false;
|
|
2848
|
+
}
|
|
2849
|
+
try {
|
|
2850
|
+
return isSymbolObject(value);
|
|
2851
|
+
} catch (e) {
|
|
2852
|
+
return false;
|
|
2853
|
+
}
|
|
2854
|
+
};
|
|
2855
|
+
} else {
|
|
2856
|
+
module.exports = function isSymbol(value) {
|
|
2857
|
+
return false;
|
|
2858
|
+
};
|
|
2859
|
+
}
|
|
2860
|
+
var $symToStr;
|
|
2861
|
+
var isSymString;
|
|
2862
|
+
var isSymbolObject;
|
|
2863
|
+
}
|
|
2864
|
+
});
|
|
2865
|
+
|
|
2866
|
+
// node_modules/es-to-primitive/helpers/isPrimitive.js
|
|
2867
|
+
var require_isPrimitive2 = __commonJS({
|
|
2868
|
+
"node_modules/es-to-primitive/helpers/isPrimitive.js"(exports, module) {
|
|
2869
|
+
"use strict";
|
|
2870
|
+
module.exports = function isPrimitive(value) {
|
|
2871
|
+
return value === null || typeof value !== "function" && typeof value !== "object";
|
|
2872
|
+
};
|
|
2873
|
+
}
|
|
2874
|
+
});
|
|
2875
|
+
|
|
2876
|
+
// node_modules/es-abstract-get/isPropertyKey.js
|
|
2877
|
+
var require_isPropertyKey2 = __commonJS({
|
|
2878
|
+
"node_modules/es-abstract-get/isPropertyKey.js"(exports, module) {
|
|
2879
|
+
"use strict";
|
|
2880
|
+
module.exports = function isPropertyKey(argument) {
|
|
2881
|
+
return typeof argument === "string" || typeof argument === "symbol";
|
|
2882
|
+
};
|
|
2883
|
+
}
|
|
2884
|
+
});
|
|
2885
|
+
|
|
2886
|
+
// node_modules/es-abstract-get/GetV.js
|
|
2887
|
+
var require_GetV = __commonJS({
|
|
2888
|
+
"node_modules/es-abstract-get/GetV.js"(exports, module) {
|
|
2889
|
+
"use strict";
|
|
2890
|
+
var $TypeError = require_type();
|
|
2891
|
+
var inspect = require_stub();
|
|
2892
|
+
var isPropertyKey = require_isPropertyKey2();
|
|
2893
|
+
module.exports = function GetV(V, P) {
|
|
2894
|
+
if (!isPropertyKey(P)) {
|
|
2895
|
+
throw new $TypeError("Assertion failed: P is not a Property Key, got " + inspect(P));
|
|
2896
|
+
}
|
|
2897
|
+
return (
|
|
2898
|
+
/** @type {Record<typeof P, unknown>} */
|
|
2899
|
+
V[P]
|
|
2900
|
+
);
|
|
2901
|
+
};
|
|
2902
|
+
}
|
|
2903
|
+
});
|
|
2904
|
+
|
|
2905
|
+
// node_modules/es-abstract-get/GetMethod.js
|
|
2906
|
+
var require_GetMethod = __commonJS({
|
|
2907
|
+
"node_modules/es-abstract-get/GetMethod.js"(exports, module) {
|
|
2908
|
+
"use strict";
|
|
2909
|
+
var $TypeError = require_type();
|
|
2910
|
+
var isCallable = require_is_callable();
|
|
2911
|
+
var inspect = require_stub();
|
|
2912
|
+
var GetV = require_GetV();
|
|
2913
|
+
var isPropertyKey = require_isPropertyKey2();
|
|
2914
|
+
module.exports = function GetMethod(O, P) {
|
|
2915
|
+
if (!isPropertyKey(P)) {
|
|
2916
|
+
throw new $TypeError("Assertion failed: P is not a Property Key");
|
|
2917
|
+
}
|
|
2918
|
+
var func = GetV(O, P);
|
|
2919
|
+
if (func == null) {
|
|
2920
|
+
return void 0;
|
|
2921
|
+
}
|
|
2922
|
+
if (!isCallable(func)) {
|
|
2923
|
+
throw new $TypeError(inspect(P) + " is not a function: " + inspect(func));
|
|
2924
|
+
}
|
|
2925
|
+
return func;
|
|
2926
|
+
};
|
|
2927
|
+
}
|
|
2928
|
+
});
|
|
2929
|
+
|
|
2930
|
+
// node_modules/es-to-primitive/es2015.js
|
|
2931
|
+
var require_es2015 = __commonJS({
|
|
2932
|
+
"node_modules/es-to-primitive/es2015.js"(exports, module) {
|
|
2933
|
+
"use strict";
|
|
2934
|
+
var hasSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "symbol";
|
|
2935
|
+
var isCallable = require_is_callable();
|
|
2936
|
+
var isDate = require_is_date_object();
|
|
2937
|
+
var isSymbol = require_is_symbol();
|
|
2938
|
+
var $TypeError = require_type();
|
|
2939
|
+
var isPrimitive = require_isPrimitive2();
|
|
2940
|
+
function OrdinaryToPrimitive(O, hint) {
|
|
2941
|
+
if (typeof O === "undefined" || O === null) {
|
|
2942
|
+
throw new $TypeError("Cannot call method on " + O);
|
|
2943
|
+
}
|
|
2944
|
+
if (typeof hint !== "string" || hint !== "number" && hint !== "string") {
|
|
2945
|
+
throw new $TypeError('hint must be "string" or "number"');
|
|
2946
|
+
}
|
|
2947
|
+
var methodNames = hint === "string" ? ["toString", "valueOf"] : ["valueOf", "toString"];
|
|
2948
|
+
var method, result, i;
|
|
2949
|
+
for (i = 0; i < methodNames.length; ++i) {
|
|
2950
|
+
method = O[methodNames[i]];
|
|
2951
|
+
if (isCallable(method)) {
|
|
2952
|
+
result = method.call(O);
|
|
2953
|
+
if (isPrimitive(result)) {
|
|
2954
|
+
return (
|
|
2955
|
+
/** @type {primitiveES6} */
|
|
2956
|
+
result
|
|
2957
|
+
);
|
|
2958
|
+
}
|
|
2959
|
+
}
|
|
2960
|
+
}
|
|
2961
|
+
throw new $TypeError("No default value");
|
|
2962
|
+
}
|
|
2963
|
+
var GetMethod = require_GetMethod();
|
|
2964
|
+
module.exports = function ToPrimitive(input) {
|
|
2965
|
+
if (isPrimitive(input)) {
|
|
2966
|
+
return (
|
|
2967
|
+
/** @type {primitiveES6} */
|
|
2968
|
+
input
|
|
2969
|
+
);
|
|
2970
|
+
}
|
|
2971
|
+
var hint = "default";
|
|
2972
|
+
if (arguments.length > 1) {
|
|
2973
|
+
if (arguments[1] === String) {
|
|
2974
|
+
hint = "string";
|
|
2975
|
+
} else if (arguments[1] === Number) {
|
|
2976
|
+
hint = "number";
|
|
2977
|
+
}
|
|
2978
|
+
}
|
|
2979
|
+
var exoticToPrim;
|
|
2980
|
+
if (hasSymbols) {
|
|
2981
|
+
if (Symbol.toPrimitive) {
|
|
2982
|
+
exoticToPrim = GetMethod(
|
|
2983
|
+
/** @type {{ [k in SymbolConstructor['toPrimitive']]?: Function }} */
|
|
2984
|
+
input,
|
|
2985
|
+
Symbol.toPrimitive
|
|
2986
|
+
);
|
|
2987
|
+
} else if (isSymbol(input)) {
|
|
2988
|
+
exoticToPrim = Symbol.prototype.valueOf;
|
|
2989
|
+
}
|
|
2990
|
+
}
|
|
2991
|
+
if (typeof exoticToPrim !== "undefined") {
|
|
2992
|
+
var result = exoticToPrim.call(input, hint);
|
|
2993
|
+
if (isPrimitive(result)) {
|
|
2994
|
+
return (
|
|
2995
|
+
/** @type {primitiveES6} */
|
|
2996
|
+
result
|
|
2997
|
+
);
|
|
2998
|
+
}
|
|
2999
|
+
throw new $TypeError("unable to convert exotic object to primitive");
|
|
3000
|
+
}
|
|
3001
|
+
if (hint === "default" && (isDate(input) || isSymbol(input))) {
|
|
3002
|
+
hint = /** @type {const} */
|
|
3003
|
+
"string";
|
|
3004
|
+
}
|
|
3005
|
+
return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint);
|
|
3006
|
+
};
|
|
3007
|
+
}
|
|
3008
|
+
});
|
|
3009
|
+
|
|
3010
|
+
// node_modules/es-abstract/2024/ToPrimitive.js
|
|
3011
|
+
var require_ToPrimitive = __commonJS({
|
|
3012
|
+
"node_modules/es-abstract/2024/ToPrimitive.js"(exports, module) {
|
|
3013
|
+
"use strict";
|
|
3014
|
+
var toPrimitive = require_es2015();
|
|
3015
|
+
module.exports = function ToPrimitive(input) {
|
|
3016
|
+
if (arguments.length > 1) {
|
|
3017
|
+
return toPrimitive(input, arguments[1]);
|
|
3018
|
+
}
|
|
3019
|
+
return toPrimitive(input);
|
|
3020
|
+
};
|
|
3021
|
+
}
|
|
3022
|
+
});
|
|
3023
|
+
|
|
3024
|
+
// node_modules/es-object-atoms/RequireObjectCoercible.js
|
|
3025
|
+
var require_RequireObjectCoercible = __commonJS({
|
|
3026
|
+
"node_modules/es-object-atoms/RequireObjectCoercible.js"(exports, module) {
|
|
3027
|
+
"use strict";
|
|
3028
|
+
var $TypeError = require_type();
|
|
3029
|
+
module.exports = function RequireObjectCoercible(value) {
|
|
3030
|
+
if (value == null) {
|
|
3031
|
+
throw new $TypeError(arguments.length > 0 && arguments[1] || "Cannot call method on " + value);
|
|
3032
|
+
}
|
|
3033
|
+
return value;
|
|
3034
|
+
};
|
|
3035
|
+
}
|
|
3036
|
+
});
|
|
3037
|
+
|
|
3038
|
+
// node_modules/es-abstract/2025/ToString.js
|
|
3039
|
+
var require_ToString = __commonJS({
|
|
3040
|
+
"node_modules/es-abstract/2025/ToString.js"(exports, module) {
|
|
3041
|
+
"use strict";
|
|
3042
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
3043
|
+
var $String = GetIntrinsic("%String%");
|
|
3044
|
+
var $TypeError = require_type();
|
|
3045
|
+
module.exports = function ToString(argument) {
|
|
3046
|
+
if (typeof argument === "symbol") {
|
|
3047
|
+
throw new $TypeError("Cannot convert a Symbol value to a string");
|
|
3048
|
+
}
|
|
3049
|
+
return $String(argument);
|
|
3050
|
+
};
|
|
3051
|
+
}
|
|
3052
|
+
});
|
|
3053
|
+
|
|
3054
|
+
// node_modules/string.prototype.trim/implementation.js
|
|
3055
|
+
var require_implementation3 = __commonJS({
|
|
3056
|
+
"node_modules/string.prototype.trim/implementation.js"(exports, module) {
|
|
3057
|
+
"use strict";
|
|
3058
|
+
var RequireObjectCoercible = require_RequireObjectCoercible();
|
|
3059
|
+
var ToString = require_ToString();
|
|
3060
|
+
var callBound = require_call_bound();
|
|
3061
|
+
var safeRegexTester = require_safe_regex_test();
|
|
3062
|
+
var $replace = callBound("String.prototype.replace");
|
|
3063
|
+
var $charAt = callBound("String.prototype.charAt");
|
|
3064
|
+
var $slice = callBound("String.prototype.slice");
|
|
3065
|
+
var mvsIsWS = /^\s$/.test("\u180E");
|
|
3066
|
+
var leftWhitespace = mvsIsWS ? /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/ : /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/;
|
|
3067
|
+
var isWhitespace = safeRegexTester(mvsIsWS ? /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]$/ : /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]$/);
|
|
3068
|
+
module.exports = function trim() {
|
|
3069
|
+
var S = $replace(ToString(RequireObjectCoercible(this)), leftWhitespace, "");
|
|
3070
|
+
var end = S.length;
|
|
3071
|
+
while (end > 0 && isWhitespace($charAt(S, end - 1))) {
|
|
3072
|
+
end -= 1;
|
|
3073
|
+
}
|
|
3074
|
+
return $slice(S, 0, end);
|
|
3075
|
+
};
|
|
3076
|
+
}
|
|
3077
|
+
});
|
|
3078
|
+
|
|
3079
|
+
// node_modules/string.prototype.trim/polyfill.js
|
|
3080
|
+
var require_polyfill = __commonJS({
|
|
3081
|
+
"node_modules/string.prototype.trim/polyfill.js"(exports, module) {
|
|
3082
|
+
"use strict";
|
|
3083
|
+
var implementation = require_implementation3();
|
|
3084
|
+
var zeroWidthSpace = "\u200B";
|
|
3085
|
+
var mongolianVowelSeparator = "\u180E";
|
|
3086
|
+
module.exports = function getPolyfill() {
|
|
3087
|
+
if (String.prototype.trim && zeroWidthSpace.trim() === zeroWidthSpace && mongolianVowelSeparator.trim() === mongolianVowelSeparator && ("_" + mongolianVowelSeparator).trim() === "_" + mongolianVowelSeparator && (mongolianVowelSeparator + "_").trim() === mongolianVowelSeparator + "_") {
|
|
3088
|
+
return String.prototype.trim;
|
|
3089
|
+
}
|
|
3090
|
+
return implementation;
|
|
3091
|
+
};
|
|
3092
|
+
}
|
|
3093
|
+
});
|
|
3094
|
+
|
|
3095
|
+
// node_modules/string.prototype.trim/shim.js
|
|
3096
|
+
var require_shim = __commonJS({
|
|
3097
|
+
"node_modules/string.prototype.trim/shim.js"(exports, module) {
|
|
3098
|
+
"use strict";
|
|
3099
|
+
var supportsDescriptors = require_has_property_descriptors()();
|
|
3100
|
+
var defineDataProperty = require_define_data_property();
|
|
3101
|
+
var getPolyfill = require_polyfill();
|
|
3102
|
+
module.exports = function shimStringTrim() {
|
|
3103
|
+
var polyfill = getPolyfill();
|
|
3104
|
+
if (String.prototype.trim !== polyfill) {
|
|
3105
|
+
if (supportsDescriptors) {
|
|
3106
|
+
defineDataProperty(String.prototype, "trim", polyfill, true);
|
|
3107
|
+
} else {
|
|
3108
|
+
defineDataProperty(String.prototype, "trim", polyfill);
|
|
3109
|
+
}
|
|
3110
|
+
}
|
|
3111
|
+
return polyfill;
|
|
3112
|
+
};
|
|
3113
|
+
}
|
|
3114
|
+
});
|
|
3115
|
+
|
|
3116
|
+
// node_modules/string.prototype.trim/index.js
|
|
3117
|
+
var require_string_prototype = __commonJS({
|
|
3118
|
+
"node_modules/string.prototype.trim/index.js"(exports, module) {
|
|
3119
|
+
"use strict";
|
|
3120
|
+
var callBind = require_call_bind();
|
|
3121
|
+
var define = require_define_properties();
|
|
3122
|
+
var RequireObjectCoercible = require_RequireObjectCoercible();
|
|
3123
|
+
var implementation = require_implementation3();
|
|
3124
|
+
var getPolyfill = require_polyfill();
|
|
3125
|
+
var shim = require_shim();
|
|
3126
|
+
var bound = callBind(getPolyfill());
|
|
3127
|
+
var boundMethod = function trim(receiver) {
|
|
3128
|
+
RequireObjectCoercible(receiver);
|
|
3129
|
+
return bound(receiver);
|
|
3130
|
+
};
|
|
3131
|
+
define(boundMethod, {
|
|
3132
|
+
getPolyfill,
|
|
3133
|
+
implementation,
|
|
3134
|
+
shim
|
|
3135
|
+
});
|
|
3136
|
+
module.exports = boundMethod;
|
|
3137
|
+
}
|
|
3138
|
+
});
|
|
3139
|
+
|
|
3140
|
+
// node_modules/es-abstract/2024/StringToNumber.js
|
|
3141
|
+
var require_StringToNumber = __commonJS({
|
|
3142
|
+
"node_modules/es-abstract/2024/StringToNumber.js"(exports, module) {
|
|
3143
|
+
"use strict";
|
|
3144
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
3145
|
+
var $RegExp = GetIntrinsic("%RegExp%");
|
|
3146
|
+
var $TypeError = require_type();
|
|
3147
|
+
var $parseInteger = GetIntrinsic("%parseInt%");
|
|
3148
|
+
var callBound = require_call_bound();
|
|
3149
|
+
var regexTester = require_safe_regex_test();
|
|
3150
|
+
var $strSlice = callBound("String.prototype.slice");
|
|
3151
|
+
var isBinary = regexTester(/^0b[01]+$/i);
|
|
3152
|
+
var isOctal = regexTester(/^0o[0-7]+$/i);
|
|
3153
|
+
var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
|
|
3154
|
+
var nonWS = ["\x85", "\u200B", "\uFFFE"].join("");
|
|
3155
|
+
var nonWSregex = new $RegExp("[" + nonWS + "]", "g");
|
|
3156
|
+
var hasNonWS = regexTester(nonWSregex);
|
|
3157
|
+
var $trim = require_string_prototype();
|
|
3158
|
+
module.exports = function StringToNumber(argument) {
|
|
3159
|
+
if (typeof argument !== "string") {
|
|
3160
|
+
throw new $TypeError("Assertion failed: `argument` is not a String");
|
|
3161
|
+
}
|
|
3162
|
+
if (isBinary(argument)) {
|
|
3163
|
+
return +$parseInteger($strSlice(argument, 2), 2);
|
|
3164
|
+
}
|
|
3165
|
+
if (isOctal(argument)) {
|
|
3166
|
+
return +$parseInteger($strSlice(argument, 2), 8);
|
|
3167
|
+
}
|
|
3168
|
+
if (hasNonWS(argument) || isInvalidHexLiteral(argument)) {
|
|
3169
|
+
return NaN;
|
|
3170
|
+
}
|
|
3171
|
+
var trimmed = $trim(argument);
|
|
3172
|
+
if (trimmed !== argument) {
|
|
3173
|
+
return StringToNumber(trimmed);
|
|
3174
|
+
}
|
|
3175
|
+
return +argument;
|
|
3176
|
+
};
|
|
3177
|
+
}
|
|
3178
|
+
});
|
|
3179
|
+
|
|
3180
|
+
// node_modules/es-abstract/2024/ToNumber.js
|
|
3181
|
+
var require_ToNumber = __commonJS({
|
|
3182
|
+
"node_modules/es-abstract/2024/ToNumber.js"(exports, module) {
|
|
3183
|
+
"use strict";
|
|
3184
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
3185
|
+
var $TypeError = require_type();
|
|
3186
|
+
var $Number = GetIntrinsic("%Number%");
|
|
3187
|
+
var isPrimitive = require_isPrimitive();
|
|
3188
|
+
var ToPrimitive = require_ToPrimitive();
|
|
3189
|
+
var StringToNumber = require_StringToNumber();
|
|
3190
|
+
module.exports = function ToNumber(argument) {
|
|
3191
|
+
var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
|
|
3192
|
+
if (typeof value === "symbol") {
|
|
3193
|
+
throw new $TypeError("Cannot convert a Symbol value to a number");
|
|
3194
|
+
}
|
|
3195
|
+
if (typeof value === "bigint") {
|
|
3196
|
+
throw new $TypeError("Conversion from 'BigInt' to 'number' is not allowed.");
|
|
3197
|
+
}
|
|
3198
|
+
if (typeof value === "string") {
|
|
3199
|
+
return StringToNumber(value);
|
|
3200
|
+
}
|
|
3201
|
+
return +value;
|
|
3202
|
+
};
|
|
3203
|
+
}
|
|
3204
|
+
});
|
|
3205
|
+
|
|
3206
|
+
// node_modules/es-abstract/2024/floor.js
|
|
3207
|
+
var require_floor2 = __commonJS({
|
|
3208
|
+
"node_modules/es-abstract/2024/floor.js"(exports, module) {
|
|
3209
|
+
"use strict";
|
|
3210
|
+
var $floor = require_floor();
|
|
3211
|
+
module.exports = function floor(x) {
|
|
3212
|
+
if (typeof x === "bigint") {
|
|
3213
|
+
return x;
|
|
3214
|
+
}
|
|
3215
|
+
return $floor(x);
|
|
3216
|
+
};
|
|
3217
|
+
}
|
|
3218
|
+
});
|
|
3219
|
+
|
|
3220
|
+
// node_modules/es-abstract/2024/truncate.js
|
|
3221
|
+
var require_truncate = __commonJS({
|
|
3222
|
+
"node_modules/es-abstract/2024/truncate.js"(exports, module) {
|
|
3223
|
+
"use strict";
|
|
3224
|
+
var floor = require_floor2();
|
|
3225
|
+
var $TypeError = require_type();
|
|
3226
|
+
module.exports = function truncate2(x) {
|
|
3227
|
+
if (typeof x !== "number" && typeof x !== "bigint") {
|
|
3228
|
+
throw new $TypeError("argument must be a Number or a BigInt");
|
|
3229
|
+
}
|
|
3230
|
+
var result = x < 0 ? -floor(-x) : floor(x);
|
|
3231
|
+
return result === 0 ? 0 : result;
|
|
3232
|
+
};
|
|
3233
|
+
}
|
|
3234
|
+
});
|
|
3235
|
+
|
|
3236
|
+
// node_modules/es-abstract/2024/ToIntegerOrInfinity.js
|
|
3237
|
+
var require_ToIntegerOrInfinity = __commonJS({
|
|
3238
|
+
"node_modules/es-abstract/2024/ToIntegerOrInfinity.js"(exports, module) {
|
|
3239
|
+
"use strict";
|
|
3240
|
+
var ToNumber = require_ToNumber();
|
|
3241
|
+
var truncate2 = require_truncate();
|
|
3242
|
+
var $isNaN = require_isNaN();
|
|
3243
|
+
var $isFinite = require_isFinite();
|
|
3244
|
+
module.exports = function ToIntegerOrInfinity(value) {
|
|
3245
|
+
var number = ToNumber(value);
|
|
3246
|
+
if ($isNaN(number) || number === 0) {
|
|
3247
|
+
return 0;
|
|
3248
|
+
}
|
|
3249
|
+
if (!$isFinite(number)) {
|
|
3250
|
+
return number;
|
|
3251
|
+
}
|
|
3252
|
+
return truncate2(number);
|
|
3253
|
+
};
|
|
3254
|
+
}
|
|
3255
|
+
});
|
|
3256
|
+
|
|
3257
|
+
// node_modules/es-abstract/2024/ToLength.js
|
|
3258
|
+
var require_ToLength = __commonJS({
|
|
3259
|
+
"node_modules/es-abstract/2024/ToLength.js"(exports, module) {
|
|
3260
|
+
"use strict";
|
|
3261
|
+
var MAX_SAFE_INTEGER = require_maxSafeInteger();
|
|
3262
|
+
var ToIntegerOrInfinity = require_ToIntegerOrInfinity();
|
|
3263
|
+
module.exports = function ToLength(argument) {
|
|
3264
|
+
var len = ToIntegerOrInfinity(argument);
|
|
3265
|
+
if (len <= 0) {
|
|
3266
|
+
return 0;
|
|
3267
|
+
}
|
|
3268
|
+
if (len > MAX_SAFE_INTEGER) {
|
|
3269
|
+
return MAX_SAFE_INTEGER;
|
|
3270
|
+
}
|
|
3271
|
+
return len;
|
|
3272
|
+
};
|
|
3273
|
+
}
|
|
3274
|
+
});
|
|
3275
|
+
|
|
3276
|
+
// node_modules/es-abstract/2024/LengthOfArrayLike.js
|
|
3277
|
+
var require_LengthOfArrayLike = __commonJS({
|
|
3278
|
+
"node_modules/es-abstract/2024/LengthOfArrayLike.js"(exports, module) {
|
|
3279
|
+
"use strict";
|
|
3280
|
+
var $TypeError = require_type();
|
|
3281
|
+
var isObject = require_isObject();
|
|
3282
|
+
var Get = require_Get();
|
|
3283
|
+
var ToLength = require_ToLength();
|
|
3284
|
+
module.exports = function LengthOfArrayLike(obj) {
|
|
3285
|
+
if (!isObject(obj)) {
|
|
3286
|
+
throw new $TypeError("Assertion failed: `obj` must be an Object");
|
|
3287
|
+
}
|
|
3288
|
+
return ToLength(Get(obj, "length"));
|
|
3289
|
+
};
|
|
3290
|
+
}
|
|
3291
|
+
});
|
|
3292
|
+
|
|
3293
|
+
// node_modules/es-abstract/2024/ToString.js
|
|
3294
|
+
var require_ToString2 = __commonJS({
|
|
3295
|
+
"node_modules/es-abstract/2024/ToString.js"(exports, module) {
|
|
3296
|
+
"use strict";
|
|
3297
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
3298
|
+
var $String = GetIntrinsic("%String%");
|
|
3299
|
+
var $TypeError = require_type();
|
|
3300
|
+
module.exports = function ToString(argument) {
|
|
3301
|
+
if (typeof argument === "symbol") {
|
|
3302
|
+
throw new $TypeError("Cannot convert a Symbol value to a string");
|
|
3303
|
+
}
|
|
3304
|
+
return $String(argument);
|
|
3305
|
+
};
|
|
3306
|
+
}
|
|
3307
|
+
});
|
|
3308
|
+
|
|
3309
|
+
// node_modules/es-abstract/2024/FlattenIntoArray.js
|
|
3310
|
+
var require_FlattenIntoArray = __commonJS({
|
|
3311
|
+
"node_modules/es-abstract/2024/FlattenIntoArray.js"(exports, module) {
|
|
3312
|
+
"use strict";
|
|
3313
|
+
var $TypeError = require_type();
|
|
3314
|
+
var MAX_SAFE_INTEGER = require_maxSafeInteger();
|
|
3315
|
+
var Call = require_Call();
|
|
3316
|
+
var CreateDataPropertyOrThrow = require_CreateDataPropertyOrThrow();
|
|
3317
|
+
var Get = require_Get();
|
|
3318
|
+
var HasProperty = require_HasProperty();
|
|
3319
|
+
var IsArray = require_IsArray2();
|
|
3320
|
+
var LengthOfArrayLike = require_LengthOfArrayLike();
|
|
3321
|
+
var ToString = require_ToString2();
|
|
3322
|
+
module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) {
|
|
3323
|
+
var mapperFunction;
|
|
3324
|
+
if (arguments.length > 5) {
|
|
3325
|
+
mapperFunction = arguments[5];
|
|
3326
|
+
}
|
|
3327
|
+
var targetIndex = start;
|
|
3328
|
+
var sourceIndex = 0;
|
|
3329
|
+
while (sourceIndex < sourceLen) {
|
|
3330
|
+
var P = ToString(sourceIndex);
|
|
3331
|
+
var exists = HasProperty(source, P);
|
|
3332
|
+
if (exists === true) {
|
|
3333
|
+
var element = Get(source, P);
|
|
3334
|
+
if (typeof mapperFunction !== "undefined") {
|
|
3335
|
+
if (arguments.length <= 6) {
|
|
3336
|
+
throw new $TypeError("Assertion failed: thisArg is required when mapperFunction is provided");
|
|
3337
|
+
}
|
|
3338
|
+
element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]);
|
|
3339
|
+
}
|
|
3340
|
+
var shouldFlatten = false;
|
|
3341
|
+
if (depth > 0) {
|
|
3342
|
+
shouldFlatten = IsArray(element);
|
|
3343
|
+
}
|
|
3344
|
+
if (shouldFlatten) {
|
|
3345
|
+
var elementLen = LengthOfArrayLike(element);
|
|
3346
|
+
targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1);
|
|
3347
|
+
} else {
|
|
3348
|
+
if (targetIndex >= MAX_SAFE_INTEGER) {
|
|
3349
|
+
throw new $TypeError("index too large");
|
|
3350
|
+
}
|
|
3351
|
+
CreateDataPropertyOrThrow(target, ToString(targetIndex), element);
|
|
3352
|
+
targetIndex += 1;
|
|
3353
|
+
}
|
|
3354
|
+
}
|
|
3355
|
+
sourceIndex += 1;
|
|
3356
|
+
}
|
|
3357
|
+
return targetIndex;
|
|
3358
|
+
};
|
|
3359
|
+
}
|
|
3360
|
+
});
|
|
3361
|
+
|
|
3362
|
+
// node_modules/es-object-atoms/ToObject.js
|
|
3363
|
+
var require_ToObject = __commonJS({
|
|
3364
|
+
"node_modules/es-object-atoms/ToObject.js"(exports, module) {
|
|
3365
|
+
"use strict";
|
|
3366
|
+
var $Object = require_es_object_atoms();
|
|
3367
|
+
var RequireObjectCoercible = require_RequireObjectCoercible();
|
|
3368
|
+
module.exports = function ToObject(value) {
|
|
3369
|
+
RequireObjectCoercible(value);
|
|
3370
|
+
return $Object(value);
|
|
3371
|
+
};
|
|
3372
|
+
}
|
|
3373
|
+
});
|
|
3374
|
+
|
|
3375
|
+
// node_modules/es-abstract/2024/ToObject.js
|
|
3376
|
+
var require_ToObject2 = __commonJS({
|
|
3377
|
+
"node_modules/es-abstract/2024/ToObject.js"(exports, module) {
|
|
3378
|
+
"use strict";
|
|
3379
|
+
module.exports = require_ToObject();
|
|
3380
|
+
}
|
|
3381
|
+
});
|
|
3382
|
+
|
|
3383
|
+
// node_modules/array.prototype.flat/implementation.js
|
|
3384
|
+
var require_implementation4 = __commonJS({
|
|
3385
|
+
"node_modules/array.prototype.flat/implementation.js"(exports, module) {
|
|
3386
|
+
"use strict";
|
|
3387
|
+
var ArraySpeciesCreate = require_ArraySpeciesCreate();
|
|
3388
|
+
var FlattenIntoArray = require_FlattenIntoArray();
|
|
3389
|
+
var Get = require_Get();
|
|
3390
|
+
var ToIntegerOrInfinity = require_ToIntegerOrInfinity();
|
|
3391
|
+
var ToLength = require_ToLength();
|
|
3392
|
+
var ToObject = require_ToObject2();
|
|
3393
|
+
module.exports = function flat() {
|
|
3394
|
+
var O = ToObject(this);
|
|
3395
|
+
var sourceLen = ToLength(Get(O, "length"));
|
|
3396
|
+
var depthNum = 1;
|
|
3397
|
+
if (arguments.length > 0 && typeof arguments[0] !== "undefined") {
|
|
3398
|
+
depthNum = ToIntegerOrInfinity(arguments[0]);
|
|
3399
|
+
}
|
|
3400
|
+
var A = ArraySpeciesCreate(O, 0);
|
|
3401
|
+
FlattenIntoArray(A, O, sourceLen, 0, depthNum);
|
|
3402
|
+
return A;
|
|
3403
|
+
};
|
|
3404
|
+
}
|
|
3405
|
+
});
|
|
3406
|
+
|
|
3407
|
+
// node_modules/array.prototype.flat/polyfill.js
|
|
3408
|
+
var require_polyfill2 = __commonJS({
|
|
3409
|
+
"node_modules/array.prototype.flat/polyfill.js"(exports, module) {
|
|
3410
|
+
"use strict";
|
|
3411
|
+
var implementation = require_implementation4();
|
|
3412
|
+
module.exports = function getPolyfill() {
|
|
3413
|
+
return Array.prototype.flat || implementation;
|
|
3414
|
+
};
|
|
3415
|
+
}
|
|
3416
|
+
});
|
|
3417
|
+
|
|
3418
|
+
// node_modules/es-shim-unscopables/index.js
|
|
3419
|
+
var require_es_shim_unscopables = __commonJS({
|
|
3420
|
+
"node_modules/es-shim-unscopables/index.js"(exports, module) {
|
|
3421
|
+
"use strict";
|
|
3422
|
+
var hasOwn = require_hasown();
|
|
3423
|
+
var hasUnscopables = typeof Symbol === "function" && typeof Symbol.unscopables === "symbol";
|
|
3424
|
+
var map = hasUnscopables && Array.prototype[Symbol.unscopables];
|
|
3425
|
+
var $TypeError = TypeError;
|
|
3426
|
+
module.exports = function shimUnscopables(method) {
|
|
3427
|
+
if (typeof method !== "string" || !method) {
|
|
3428
|
+
throw new $TypeError("method must be a non-empty string");
|
|
3429
|
+
}
|
|
3430
|
+
if (!hasOwn(Array.prototype, method)) {
|
|
3431
|
+
throw new $TypeError("method must be on Array.prototype");
|
|
3432
|
+
}
|
|
3433
|
+
if (hasUnscopables && map) {
|
|
3434
|
+
map[method] = true;
|
|
3435
|
+
}
|
|
3436
|
+
};
|
|
3437
|
+
}
|
|
3438
|
+
});
|
|
3439
|
+
|
|
3440
|
+
// node_modules/array.prototype.flat/shim.js
|
|
3441
|
+
var require_shim2 = __commonJS({
|
|
3442
|
+
"node_modules/array.prototype.flat/shim.js"(exports, module) {
|
|
3443
|
+
"use strict";
|
|
3444
|
+
var define = require_define_properties();
|
|
3445
|
+
var shimUnscopables = require_es_shim_unscopables();
|
|
3446
|
+
var getPolyfill = require_polyfill2();
|
|
3447
|
+
module.exports = function shimFlat() {
|
|
3448
|
+
var polyfill = getPolyfill();
|
|
3449
|
+
define(
|
|
3450
|
+
Array.prototype,
|
|
3451
|
+
{ flat: polyfill },
|
|
3452
|
+
{ flat: function() {
|
|
3453
|
+
return Array.prototype.flat !== polyfill;
|
|
3454
|
+
} }
|
|
3455
|
+
);
|
|
3456
|
+
shimUnscopables("flat");
|
|
3457
|
+
return polyfill;
|
|
3458
|
+
};
|
|
3459
|
+
}
|
|
3460
|
+
});
|
|
3461
|
+
|
|
3462
|
+
// node_modules/array.prototype.flat/index.js
|
|
3463
|
+
var require_array_prototype = __commonJS({
|
|
3464
|
+
"node_modules/array.prototype.flat/index.js"(exports, module) {
|
|
3465
|
+
"use strict";
|
|
3466
|
+
var define = require_define_properties();
|
|
3467
|
+
var callBind = require_call_bind();
|
|
3468
|
+
var implementation = require_implementation4();
|
|
3469
|
+
var getPolyfill = require_polyfill2();
|
|
3470
|
+
var polyfill = getPolyfill();
|
|
3471
|
+
var shim = require_shim2();
|
|
3472
|
+
var boundFlat = callBind(polyfill);
|
|
3473
|
+
define(boundFlat, {
|
|
3474
|
+
getPolyfill,
|
|
3475
|
+
implementation,
|
|
3476
|
+
shim
|
|
3477
|
+
});
|
|
3478
|
+
module.exports = boundFlat;
|
|
3479
|
+
}
|
|
3480
|
+
});
|
|
3481
|
+
|
|
3482
|
+
// node_modules/smartwrap/src/main.js
|
|
3483
|
+
var require_main2 = __commonJS({
|
|
3484
|
+
"node_modules/smartwrap/src/main.js"(exports, module) {
|
|
3485
|
+
"use strict";
|
|
3486
|
+
var breakword = require_main();
|
|
3487
|
+
var stripansi = require_strip_ansi();
|
|
3488
|
+
var wcwidth2 = require_wcwidth();
|
|
3489
|
+
var flat = require_array_prototype();
|
|
3490
|
+
if (!Array.prototype.flat) flat.shim();
|
|
3491
|
+
var ANSIPattern = [
|
|
3492
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
3493
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
3494
|
+
].join("|");
|
|
3495
|
+
var ANSIRegex = new RegExp(ANSIPattern, "g");
|
|
3496
|
+
var defaults2 = () => {
|
|
3497
|
+
let obj = {};
|
|
3498
|
+
obj.breakword = false;
|
|
3499
|
+
obj.input = [];
|
|
3500
|
+
obj.minWidth = 2;
|
|
3501
|
+
obj.paddingLeft = 0;
|
|
3502
|
+
obj.paddingRight = 0;
|
|
3503
|
+
obj.errorChar = "\uFFFD";
|
|
3504
|
+
obj.returnFormat = "string";
|
|
3505
|
+
obj.skipPadding = false;
|
|
3506
|
+
obj.splitAt = [" ", " "];
|
|
3507
|
+
obj.trim = true;
|
|
3508
|
+
obj.width = 10;
|
|
3509
|
+
return obj;
|
|
3510
|
+
};
|
|
3511
|
+
var calculateSpaceRemaining = function(lineLength, spacesUsed, config) {
|
|
3512
|
+
return Math.max(lineLength - spacesUsed - config.paddingLeft - config.paddingRight, 0);
|
|
3513
|
+
};
|
|
3514
|
+
var validateInput = (text, options) => {
|
|
3515
|
+
let config = Object.assign({}, defaults2(), options || {});
|
|
3516
|
+
if (config.errorChar) {
|
|
3517
|
+
config.errorChar = config.errorChar.split("")[0];
|
|
3518
|
+
if (wcwidth2(config.errorChar) > 1)
|
|
3519
|
+
throw new Error(`Error character cannot be a wide character (${config.errorChar})`);
|
|
3520
|
+
}
|
|
3521
|
+
config.paddingLeft = Math.abs(config.paddingLeft);
|
|
3522
|
+
config.paddingRight = Math.abs(config.paddingRight);
|
|
3523
|
+
let lineLength = config.width - config.paddingLeft - config.paddingRight;
|
|
3524
|
+
if (lineLength < config.minWidth) {
|
|
3525
|
+
config.skipPadding = true;
|
|
3526
|
+
lineLength = config.minWidth;
|
|
3527
|
+
}
|
|
3528
|
+
if (config.trim) {
|
|
3529
|
+
text = text.trim();
|
|
3530
|
+
}
|
|
3531
|
+
return { text, config, lineLength };
|
|
3532
|
+
};
|
|
3533
|
+
var wrap2 = (input, options) => {
|
|
3534
|
+
let { text, config, lineLength } = validateInput(input, options);
|
|
3535
|
+
let words = [];
|
|
3536
|
+
if (!config.breakword) {
|
|
3537
|
+
if (config.splitAt.indexOf(" ") !== -1) {
|
|
3538
|
+
words = text.split(/ |\t/i);
|
|
3539
|
+
} else {
|
|
3540
|
+
words = text.split(" ");
|
|
3541
|
+
}
|
|
3542
|
+
} else {
|
|
3543
|
+
words = [text];
|
|
3544
|
+
}
|
|
3545
|
+
words = words.filter((val) => {
|
|
3546
|
+
if (val.length > 0) {
|
|
3547
|
+
return true;
|
|
3548
|
+
}
|
|
3549
|
+
});
|
|
3550
|
+
let lines = [
|
|
3551
|
+
[]
|
|
3552
|
+
];
|
|
3553
|
+
let spaceRemaining, splitIndex, word;
|
|
3554
|
+
let currentLine = 0;
|
|
3555
|
+
let spacesUsed = 0;
|
|
3556
|
+
while (words.length > 0) {
|
|
3557
|
+
spaceRemaining = calculateSpaceRemaining(lineLength, spacesUsed, config);
|
|
3558
|
+
word = words.shift();
|
|
3559
|
+
let wordLength = wcwidth2(word);
|
|
3560
|
+
switch (true) {
|
|
3561
|
+
// too long for an empty line and is a single character
|
|
3562
|
+
case (lineLength < wordLength && [...word].length === 1):
|
|
3563
|
+
words.unshift(config.errorChar);
|
|
3564
|
+
break;
|
|
3565
|
+
// too long for an empty line, must be broken between 2 lines
|
|
3566
|
+
case lineLength < wordLength:
|
|
3567
|
+
splitIndex = breakword(word, lineLength);
|
|
3568
|
+
let splitWord = [...word];
|
|
3569
|
+
words.unshift(splitWord.slice(0, splitIndex + 1).join(""));
|
|
3570
|
+
words.splice(1, 0, splitWord.slice(splitIndex + 1).join(""));
|
|
3571
|
+
break;
|
|
3572
|
+
// not enough space remaining in line, must be wrapped to next line
|
|
3573
|
+
case spaceRemaining < wordLength:
|
|
3574
|
+
lines.push([]);
|
|
3575
|
+
currentLine++;
|
|
3576
|
+
spacesUsed = 0;
|
|
3577
|
+
/* falls through */
|
|
3578
|
+
// fits on current line
|
|
3579
|
+
// eslint-disable-next-line
|
|
3580
|
+
default:
|
|
3581
|
+
lines[currentLine].push(word);
|
|
3582
|
+
spacesUsed += wordLength + 1;
|
|
3583
|
+
}
|
|
3584
|
+
}
|
|
3585
|
+
lines = lines.map((line) => {
|
|
3586
|
+
line = line.join(" ");
|
|
3587
|
+
if (!config.skipPadding) {
|
|
3588
|
+
line = Array(config.paddingLeft + 1).join(" ") + line + Array(config.paddingRight + 1).join(" ");
|
|
3589
|
+
}
|
|
3590
|
+
return line;
|
|
3591
|
+
});
|
|
3592
|
+
return lines.join("\n");
|
|
3593
|
+
};
|
|
3594
|
+
var splitAnsiInput = (text) => {
|
|
3595
|
+
let matches = [];
|
|
3596
|
+
let textArr = [...text];
|
|
3597
|
+
let textLength = textArr.length;
|
|
3598
|
+
var result;
|
|
3599
|
+
while ((result = ANSIRegex.exec(text)) !== null) {
|
|
3600
|
+
matches.push({
|
|
3601
|
+
start: result.index,
|
|
3602
|
+
end: result.index + result[0].length,
|
|
3603
|
+
match: result[0],
|
|
3604
|
+
length: result[0].length
|
|
3605
|
+
});
|
|
3606
|
+
}
|
|
3607
|
+
if (matches.length < 1) return [];
|
|
3608
|
+
matches = matches.reduce((prev, curr) => {
|
|
3609
|
+
let prevEnd = prev[prev.length - 1];
|
|
3610
|
+
if (prevEnd.end < curr.start) {
|
|
3611
|
+
prev.push({
|
|
3612
|
+
start: prevEnd.end,
|
|
3613
|
+
end: curr.start,
|
|
3614
|
+
length: curr.start - prevEnd.end,
|
|
3615
|
+
expand: true
|
|
3616
|
+
}, curr);
|
|
3617
|
+
} else {
|
|
3618
|
+
prev.push(curr);
|
|
3619
|
+
}
|
|
3620
|
+
return prev;
|
|
3621
|
+
}, [{ start: 0, end: 0 }]).splice(1);
|
|
3622
|
+
let lastMatchEnd = matches[matches.length - 1].end;
|
|
3623
|
+
if (lastMatchEnd < textLength) {
|
|
3624
|
+
matches.push({
|
|
3625
|
+
start: lastMatchEnd,
|
|
3626
|
+
end: textLength,
|
|
3627
|
+
expand: true
|
|
3628
|
+
});
|
|
3629
|
+
}
|
|
3630
|
+
let savedArr = matches.map((match) => {
|
|
3631
|
+
let value = text.substring(match.start, match.end);
|
|
3632
|
+
return match.expand ? [...value] : [value];
|
|
3633
|
+
}).flat(2);
|
|
3634
|
+
return savedArr;
|
|
3635
|
+
};
|
|
3636
|
+
var restoreANSI = (savedArr, processedArr) => {
|
|
3637
|
+
return processedArr.map((char) => {
|
|
3638
|
+
let result;
|
|
3639
|
+
if (char === "\n") {
|
|
3640
|
+
result = [char];
|
|
3641
|
+
} else {
|
|
3642
|
+
let splicePoint = savedArr.findIndex((element) => element === char) + 1;
|
|
3643
|
+
result = savedArr.splice(0, splicePoint);
|
|
3644
|
+
}
|
|
3645
|
+
const ANSIClosePattern = "^\\x1b\\[([0-9]+)*m";
|
|
3646
|
+
const ANSICloseRegex = new RegExp(ANSIClosePattern);
|
|
3647
|
+
const closeCodes = ["0", "21", "22", "23", "24", "25", "27", "28", "29", "39", "49", "54", "55"];
|
|
3648
|
+
let match;
|
|
3649
|
+
while (savedArr.length && (match = savedArr[0].match(ANSICloseRegex))) {
|
|
3650
|
+
if (!closeCodes.includes(match[1])) break;
|
|
3651
|
+
result.push(savedArr.shift());
|
|
3652
|
+
}
|
|
3653
|
+
return result.join("");
|
|
3654
|
+
}).concat(savedArr);
|
|
3655
|
+
};
|
|
3656
|
+
module.exports = (input, options) => {
|
|
3657
|
+
const processedLines = input.toString().split("\n").map((string) => {
|
|
3658
|
+
const savedANSI = splitAnsiInput(string);
|
|
3659
|
+
string = stripansi(string);
|
|
3660
|
+
string = wrap2(string, options);
|
|
3661
|
+
let charArr = [...string];
|
|
3662
|
+
charArr = savedANSI.length > 0 ? restoreANSI(savedANSI, charArr) : charArr;
|
|
3663
|
+
let outArr = charArr.join("").split("\n");
|
|
3664
|
+
return outArr;
|
|
3665
|
+
});
|
|
3666
|
+
return processedLines.flat(2).join("\n");
|
|
3667
|
+
};
|
|
3668
|
+
}
|
|
3669
|
+
});
|
|
3670
|
+
|
|
3671
|
+
// src/browser.ts
|
|
3672
|
+
var browser_exports = {};
|
|
3673
|
+
__export(browser_exports, {
|
|
3674
|
+
default: () => src_default
|
|
3675
|
+
});
|
|
3676
|
+
|
|
3677
|
+
// src/defaults.ts
|
|
3678
|
+
var defaults = {
|
|
3679
|
+
borderCharacters: {
|
|
3680
|
+
invisible: [
|
|
3681
|
+
{ v: " ", l: " ", j: " ", h: " ", r: " " },
|
|
3682
|
+
{ v: " ", l: " ", j: " ", h: " ", r: " " },
|
|
3683
|
+
{ v: " ", l: " ", j: " ", h: " ", r: " " }
|
|
3684
|
+
],
|
|
3685
|
+
solid: [
|
|
3686
|
+
{ v: "\u2502", l: "\u250C", j: "\u252C", h: "\u2500", r: "\u2510" },
|
|
3687
|
+
{ v: "\u2502", l: "\u251C", j: "\u253C", h: "\u2500", r: "\u2524" },
|
|
3688
|
+
{ v: "\u2502", l: "\u2514", j: "\u2534", h: "\u2500", r: "\u2518" }
|
|
3689
|
+
],
|
|
3690
|
+
dashed: [
|
|
3691
|
+
{ v: "|", l: "+", j: "+", h: "-", r: "+" },
|
|
3692
|
+
{ v: "|", l: "+", j: "+", h: "-", r: "+" },
|
|
3693
|
+
{ v: "|", l: "+", j: "+", h: "-", r: "+" }
|
|
3694
|
+
],
|
|
3695
|
+
none: [
|
|
3696
|
+
{ v: "", l: "", j: "", h: "", r: "" },
|
|
3697
|
+
{ v: "", l: "", j: "", h: "", r: "" },
|
|
3698
|
+
{ v: "", l: "", j: "", h: "", r: "" }
|
|
3699
|
+
]
|
|
3700
|
+
},
|
|
3701
|
+
align: "center",
|
|
3702
|
+
borderColor: null,
|
|
3703
|
+
borderStyle: "solid",
|
|
3704
|
+
color: false,
|
|
3705
|
+
COLUMNS: 80,
|
|
3706
|
+
// if !process.stdout.columns assume redirecting to write stream 80 columns is VT200 standard
|
|
3707
|
+
compact: false,
|
|
3708
|
+
defaultErrorValue: "\uFFFD",
|
|
3709
|
+
defaultValue: "",
|
|
3710
|
+
errorOnNull: false,
|
|
3711
|
+
FIXED_WIDTH: false,
|
|
3712
|
+
footerAlign: "center",
|
|
3713
|
+
footerColor: false,
|
|
3714
|
+
formatter: null,
|
|
3715
|
+
headerAlign: "center",
|
|
3716
|
+
headerColor: "yellow",
|
|
3717
|
+
isNull: false,
|
|
3718
|
+
// undocumented cell setting
|
|
3719
|
+
marginLeft: 2,
|
|
3720
|
+
marginTop: 1,
|
|
3721
|
+
paddingBottom: 0,
|
|
3722
|
+
paddingLeft: 1,
|
|
3723
|
+
paddingRight: 1,
|
|
3724
|
+
paddingTop: 0,
|
|
3725
|
+
showHeader: null,
|
|
3726
|
+
// undocumented
|
|
3727
|
+
truncate: false,
|
|
3728
|
+
width: "100%",
|
|
3729
|
+
GUTTER: 1,
|
|
3730
|
+
// undocumented
|
|
3731
|
+
columnSettings: [],
|
|
3732
|
+
// save so cell options can be merged into column options
|
|
3733
|
+
table: {
|
|
3734
|
+
body: "",
|
|
3735
|
+
columnInnerWidths: [],
|
|
3736
|
+
columnWidths: [],
|
|
3737
|
+
columns: [],
|
|
3738
|
+
footer: "",
|
|
3739
|
+
header: "",
|
|
3740
|
+
// post-rendered strings.
|
|
3741
|
+
height: 0,
|
|
3742
|
+
typeLocked: false
|
|
3743
|
+
// once a table type is selected can't switch
|
|
3744
|
+
}
|
|
3745
|
+
};
|
|
3746
|
+
defaults.borderCharacters["0"] = defaults.borderCharacters.none;
|
|
3747
|
+
defaults.borderCharacters["1"] = defaults.borderCharacters.solid;
|
|
3748
|
+
defaults.borderCharacters["2"] = defaults.borderCharacters.dashed;
|
|
3749
|
+
var defaults_default = defaults;
|
|
3750
|
+
|
|
3751
|
+
// src/style.ts
|
|
3752
|
+
var import_chalk = __toESM(require_stub());
|
|
3753
|
+
|
|
3754
|
+
// node_modules/kleur/index.mjs
|
|
3755
|
+
var FORCE_COLOR;
|
|
3756
|
+
var NODE_DISABLE_COLORS;
|
|
3757
|
+
var NO_COLOR;
|
|
3758
|
+
var TERM;
|
|
3759
|
+
var isTTY = true;
|
|
3760
|
+
if (typeof process !== "undefined") {
|
|
3761
|
+
({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});
|
|
3762
|
+
isTTY = process.stdout && process.stdout.isTTY;
|
|
3763
|
+
}
|
|
3764
|
+
var $ = {
|
|
3765
|
+
enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY),
|
|
3766
|
+
// modifiers
|
|
3767
|
+
reset: init(0, 0),
|
|
3768
|
+
bold: init(1, 22),
|
|
3769
|
+
dim: init(2, 22),
|
|
3770
|
+
italic: init(3, 23),
|
|
3771
|
+
underline: init(4, 24),
|
|
3772
|
+
inverse: init(7, 27),
|
|
3773
|
+
hidden: init(8, 28),
|
|
3774
|
+
strikethrough: init(9, 29),
|
|
3775
|
+
// colors
|
|
3776
|
+
black: init(30, 39),
|
|
3777
|
+
red: init(31, 39),
|
|
3778
|
+
green: init(32, 39),
|
|
3779
|
+
yellow: init(33, 39),
|
|
3780
|
+
blue: init(34, 39),
|
|
3781
|
+
magenta: init(35, 39),
|
|
3782
|
+
cyan: init(36, 39),
|
|
3783
|
+
white: init(37, 39),
|
|
3784
|
+
gray: init(90, 39),
|
|
3785
|
+
grey: init(90, 39),
|
|
3786
|
+
// background colors
|
|
3787
|
+
bgBlack: init(40, 49),
|
|
3788
|
+
bgRed: init(41, 49),
|
|
3789
|
+
bgGreen: init(42, 49),
|
|
3790
|
+
bgYellow: init(43, 49),
|
|
3791
|
+
bgBlue: init(44, 49),
|
|
3792
|
+
bgMagenta: init(45, 49),
|
|
3793
|
+
bgCyan: init(46, 49),
|
|
3794
|
+
bgWhite: init(47, 49)
|
|
3795
|
+
};
|
|
3796
|
+
function run(arr, str) {
|
|
3797
|
+
let i = 0, tmp, beg = "", end = "";
|
|
3798
|
+
for (; i < arr.length; i++) {
|
|
3799
|
+
tmp = arr[i];
|
|
3800
|
+
beg += tmp.open;
|
|
3801
|
+
end += tmp.close;
|
|
3802
|
+
if (!!~str.indexOf(tmp.close)) {
|
|
3803
|
+
str = str.replace(tmp.rgx, tmp.close + tmp.open);
|
|
3804
|
+
}
|
|
3805
|
+
}
|
|
3806
|
+
return beg + str + end;
|
|
3807
|
+
}
|
|
3808
|
+
function chain(has, keys) {
|
|
3809
|
+
let ctx = { has, keys };
|
|
3810
|
+
ctx.reset = $.reset.bind(ctx);
|
|
3811
|
+
ctx.bold = $.bold.bind(ctx);
|
|
3812
|
+
ctx.dim = $.dim.bind(ctx);
|
|
3813
|
+
ctx.italic = $.italic.bind(ctx);
|
|
3814
|
+
ctx.underline = $.underline.bind(ctx);
|
|
3815
|
+
ctx.inverse = $.inverse.bind(ctx);
|
|
3816
|
+
ctx.hidden = $.hidden.bind(ctx);
|
|
3817
|
+
ctx.strikethrough = $.strikethrough.bind(ctx);
|
|
3818
|
+
ctx.black = $.black.bind(ctx);
|
|
3819
|
+
ctx.red = $.red.bind(ctx);
|
|
3820
|
+
ctx.green = $.green.bind(ctx);
|
|
3821
|
+
ctx.yellow = $.yellow.bind(ctx);
|
|
3822
|
+
ctx.blue = $.blue.bind(ctx);
|
|
3823
|
+
ctx.magenta = $.magenta.bind(ctx);
|
|
3824
|
+
ctx.cyan = $.cyan.bind(ctx);
|
|
3825
|
+
ctx.white = $.white.bind(ctx);
|
|
3826
|
+
ctx.gray = $.gray.bind(ctx);
|
|
3827
|
+
ctx.grey = $.grey.bind(ctx);
|
|
3828
|
+
ctx.bgBlack = $.bgBlack.bind(ctx);
|
|
3829
|
+
ctx.bgRed = $.bgRed.bind(ctx);
|
|
3830
|
+
ctx.bgGreen = $.bgGreen.bind(ctx);
|
|
3831
|
+
ctx.bgYellow = $.bgYellow.bind(ctx);
|
|
3832
|
+
ctx.bgBlue = $.bgBlue.bind(ctx);
|
|
3833
|
+
ctx.bgMagenta = $.bgMagenta.bind(ctx);
|
|
3834
|
+
ctx.bgCyan = $.bgCyan.bind(ctx);
|
|
3835
|
+
ctx.bgWhite = $.bgWhite.bind(ctx);
|
|
3836
|
+
return ctx;
|
|
3837
|
+
}
|
|
3838
|
+
function init(open, close) {
|
|
3839
|
+
let blk = {
|
|
3840
|
+
open: `\x1B[${open}m`,
|
|
3841
|
+
close: `\x1B[${close}m`,
|
|
3842
|
+
rgx: new RegExp(`\\x1b\\[${close}m`, "g")
|
|
3843
|
+
};
|
|
3844
|
+
return function(txt) {
|
|
3845
|
+
if (this !== void 0 && this.has !== void 0) {
|
|
3846
|
+
!!~this.has.indexOf(open) || (this.has.push(open), this.keys.push(blk));
|
|
3847
|
+
return txt === void 0 ? this : $.enabled ? run(this.keys, txt + "") : txt + "";
|
|
3848
|
+
}
|
|
3849
|
+
return txt === void 0 ? chain([open], [blk]) : $.enabled ? run([blk], txt + "") : txt + "";
|
|
3850
|
+
};
|
|
3851
|
+
}
|
|
3852
|
+
var kleur_default = $;
|
|
3853
|
+
|
|
3854
|
+
// src/style.ts
|
|
3855
|
+
var import_strip_ansi = __toESM(require_strip_ansi());
|
|
3856
|
+
var colorLib = process && process.stdout ? import_chalk.default : kleur_default;
|
|
3857
|
+
var style = (str, ...colors) => {
|
|
3858
|
+
const out = colors.reduce(function(input, color) {
|
|
3859
|
+
return colorLib[color](input);
|
|
3860
|
+
}, str);
|
|
3861
|
+
return out;
|
|
3862
|
+
};
|
|
3863
|
+
var styleEachChar = (str, ...colors) => {
|
|
3864
|
+
const chars = [...(0, import_strip_ansi.default)(str)];
|
|
3865
|
+
const out = chars.reduce((prev, current) => {
|
|
3866
|
+
const coded = colors.reduce((input, color) => {
|
|
3867
|
+
return colorLib[color](input);
|
|
3868
|
+
}, current);
|
|
3869
|
+
return prev + coded;
|
|
3870
|
+
}, "");
|
|
3871
|
+
return out;
|
|
3872
|
+
};
|
|
3873
|
+
var resetStyle = function(str) {
|
|
3874
|
+
this.configure({ reset: true });
|
|
3875
|
+
return (0, import_strip_ansi.default)(str);
|
|
3876
|
+
};
|
|
3877
|
+
var colorizeCell = (str, cellOptions, rowType) => {
|
|
3878
|
+
let color = false;
|
|
3879
|
+
switch (true) {
|
|
3880
|
+
case rowType === "body":
|
|
3881
|
+
color = cellOptions.color || color;
|
|
3882
|
+
break;
|
|
3883
|
+
case rowType === "header":
|
|
3884
|
+
color = cellOptions.headerColor || color;
|
|
3885
|
+
break;
|
|
3886
|
+
default:
|
|
3887
|
+
color = cellOptions.footerColor || color;
|
|
3888
|
+
}
|
|
3889
|
+
if (color) {
|
|
3890
|
+
str = style(str, color);
|
|
3891
|
+
}
|
|
3892
|
+
return str;
|
|
3893
|
+
};
|
|
3894
|
+
var isColorEnabled = () => {
|
|
3895
|
+
return process && process.stdout ? colorLib.level > 0 : colorLib.enabled;
|
|
3896
|
+
};
|
|
3897
|
+
|
|
3898
|
+
// src/format.ts
|
|
3899
|
+
var import_strip_ansi2 = __toESM(require_strip_ansi());
|
|
3900
|
+
var import_smartwrap = __toESM(require_main2());
|
|
3901
|
+
var import_wcwidth = __toESM(require_wcwidth());
|
|
3902
|
+
var addPadding = (config, width) => {
|
|
3903
|
+
return width + config.paddingLeft + config.paddingRight;
|
|
3904
|
+
};
|
|
3905
|
+
var getMaxLength = (columnOptions, rows, columnIndex) => {
|
|
3906
|
+
let iterable;
|
|
3907
|
+
if (columnOptions && (columnOptions.value || columnOptions.alias)) {
|
|
3908
|
+
let val = columnOptions.alias || columnOptions.value;
|
|
3909
|
+
val = val.toString();
|
|
3910
|
+
const headerRow = Array(rows[0].length);
|
|
3911
|
+
headerRow[columnIndex] = val;
|
|
3912
|
+
iterable = rows.slice();
|
|
3913
|
+
iterable.push(headerRow);
|
|
3914
|
+
} else {
|
|
3915
|
+
iterable = rows;
|
|
3916
|
+
}
|
|
3917
|
+
const widest = iterable.reduce((prev, row) => {
|
|
3918
|
+
if (row[columnIndex]) {
|
|
3919
|
+
const value = row[columnIndex].value ? row[columnIndex].value : row[columnIndex];
|
|
3920
|
+
const width = Math.max(
|
|
3921
|
+
...(0, import_strip_ansi2.default)(value.toString()).split(/[\n\r]/).map((s) => (0, import_wcwidth.default)(s))
|
|
3922
|
+
);
|
|
3923
|
+
return width > prev ? width : prev;
|
|
3924
|
+
}
|
|
3925
|
+
return prev;
|
|
3926
|
+
}, 0);
|
|
3927
|
+
return widest;
|
|
3928
|
+
};
|
|
3929
|
+
var getAvailableWidth = (config) => {
|
|
3930
|
+
if (process && (process.stdout && process.stdout.columns || process.env && process.env.COLUMNS)) {
|
|
3931
|
+
let viewport = process.stdout && process.stdout.columns ? process.stdout.columns : process.env.COLUMNS;
|
|
3932
|
+
viewport = viewport - config.marginLeft;
|
|
3933
|
+
if (config.width !== "auto" && /^\d+%$/.test(config.width)) {
|
|
3934
|
+
return Math.min(1, config.width.slice(0, -1) * 0.01) * viewport;
|
|
3935
|
+
}
|
|
3936
|
+
if (config.width !== "auto" && /^\d+$/.test(config.width)) {
|
|
3937
|
+
config.FIXED_WIDTH = true;
|
|
3938
|
+
return config.width;
|
|
3939
|
+
}
|
|
3940
|
+
return viewport;
|
|
3941
|
+
}
|
|
3942
|
+
if (typeof globalThis.window !== "undefined") return globalThis.window.innerWidth;
|
|
3943
|
+
return config.COLUMNS - config.marginLeft;
|
|
3944
|
+
};
|
|
3945
|
+
var getStringLength = (str) => {
|
|
3946
|
+
return (0, import_wcwidth.default)((0, import_strip_ansi2.default)(str));
|
|
3947
|
+
};
|
|
3948
|
+
var wrapCellText = (config, cellValue, columnIndex, cellOptions, rowType) => {
|
|
3949
|
+
const startAnsiRegexp = /^(\x1b\[[0-9;]*m)+/;
|
|
3950
|
+
const endAnsiRegexp = /(\x1b\[[0-9;]*m)+$/;
|
|
3951
|
+
let str = cellValue.toString();
|
|
3952
|
+
const startMatches = str.match(startAnsiRegexp) || [""];
|
|
3953
|
+
str = str.replace(startAnsiRegexp, "");
|
|
3954
|
+
const endMatches = str.match(endAnsiRegexp) || [""];
|
|
3955
|
+
str = str.replace(endAnsiRegexp, "");
|
|
3956
|
+
let alignTgt;
|
|
3957
|
+
switch (rowType) {
|
|
3958
|
+
case "header":
|
|
3959
|
+
alignTgt = "headerAlign";
|
|
3960
|
+
break;
|
|
3961
|
+
case "body":
|
|
3962
|
+
alignTgt = "align";
|
|
3963
|
+
break;
|
|
3964
|
+
default:
|
|
3965
|
+
alignTgt = "footerAlign";
|
|
3966
|
+
}
|
|
3967
|
+
if (cellOptions[alignTgt] === "center") {
|
|
3968
|
+
cellOptions.paddingLeft = cellOptions.paddingRight = Math.max(
|
|
3969
|
+
cellOptions.paddingRight,
|
|
3970
|
+
cellOptions.paddingLeft,
|
|
3971
|
+
0
|
|
3972
|
+
);
|
|
3973
|
+
}
|
|
3974
|
+
const columnWidth = config.table.columnWidths[columnIndex];
|
|
3975
|
+
const innerWidth = columnWidth - cellOptions.paddingLeft - cellOptions.paddingRight - config.GUTTER;
|
|
3976
|
+
if (typeof config.truncate === "string") {
|
|
3977
|
+
str = truncate(str, cellOptions, innerWidth);
|
|
3978
|
+
} else {
|
|
3979
|
+
str = wrap(str, cellOptions, innerWidth);
|
|
3980
|
+
}
|
|
3981
|
+
const cell = str.split("\n").map((line) => {
|
|
3982
|
+
line = line.trim();
|
|
3983
|
+
const lineLength = getStringLength(line);
|
|
3984
|
+
if (lineLength < columnWidth) {
|
|
3985
|
+
let emptySpace = columnWidth - lineLength;
|
|
3986
|
+
switch (true) {
|
|
3987
|
+
case cellOptions[alignTgt] === "center":
|
|
3988
|
+
emptySpace--;
|
|
3989
|
+
const padBoth = Math.floor(emptySpace / 2);
|
|
3990
|
+
const padRemainder = emptySpace % 2;
|
|
3991
|
+
line = Array(padBoth + 1).join(" ") + line + Array(padBoth + 1 + padRemainder).join(" ");
|
|
3992
|
+
break;
|
|
3993
|
+
case cellOptions[alignTgt] === "right":
|
|
3994
|
+
line = Array(emptySpace - cellOptions.paddingRight).join(" ") + line + Array(cellOptions.paddingRight + 1).join(" ");
|
|
3995
|
+
break;
|
|
3996
|
+
default:
|
|
3997
|
+
line = Array(cellOptions.paddingLeft + 1).join(" ") + line + Array(emptySpace - cellOptions.paddingLeft).join(" ");
|
|
3998
|
+
}
|
|
3999
|
+
}
|
|
4000
|
+
return startMatches[0] + line + endMatches[0];
|
|
4001
|
+
});
|
|
4002
|
+
return { cell, innerWidth };
|
|
4003
|
+
};
|
|
4004
|
+
var truncate = (str, cellOptions, maxWidth) => {
|
|
4005
|
+
const stringWidth = (0, import_wcwidth.default)(str);
|
|
4006
|
+
if (maxWidth < stringWidth) {
|
|
4007
|
+
str = (0, import_smartwrap.default)(str, {
|
|
4008
|
+
width: maxWidth - cellOptions.truncate.length,
|
|
4009
|
+
breakword: true
|
|
4010
|
+
}).split("\n")[0];
|
|
4011
|
+
str = str + cellOptions.truncate;
|
|
4012
|
+
}
|
|
4013
|
+
return str;
|
|
4014
|
+
};
|
|
4015
|
+
var wrap = (str, cellOptions, innerWidth) => {
|
|
4016
|
+
const outstring = (0, import_smartwrap.default)(str, {
|
|
4017
|
+
errorChar: cellOptions.defaultErrorValue,
|
|
4018
|
+
minWidth: 1,
|
|
4019
|
+
trim: true,
|
|
4020
|
+
width: innerWidth
|
|
4021
|
+
});
|
|
4022
|
+
return outstring;
|
|
4023
|
+
};
|
|
4024
|
+
var getColumnWidths = (config, rows) => {
|
|
4025
|
+
const availableWidth = getAvailableWidth(config);
|
|
4026
|
+
const iterable = config.table.header[0] && config.table.header[0].length > 0 ? config.table.header[0] : rows[0];
|
|
4027
|
+
let widths = iterable.map((column, columnIndex) => {
|
|
4028
|
+
let result;
|
|
4029
|
+
switch (true) {
|
|
4030
|
+
// column width is a percentage of table width specified in column header
|
|
4031
|
+
case (typeof column === "object" && /^\d+%$/.test(column.width)):
|
|
4032
|
+
result = column.width.slice(0, -1) * 0.01 * availableWidth;
|
|
4033
|
+
result = addPadding(config, result);
|
|
4034
|
+
break;
|
|
4035
|
+
// column width is specified in column header
|
|
4036
|
+
case (typeof column === "object" && /^\d+$/.test(column.width)):
|
|
4037
|
+
result = column.width;
|
|
4038
|
+
break;
|
|
4039
|
+
// 'auto' sets column width to its longest value in the initial data set
|
|
4040
|
+
default: {
|
|
4041
|
+
const columnOptions = config.table.header[0][columnIndex] ? config.table.header[0][columnIndex] : {};
|
|
4042
|
+
const measurableRows = rows.length ? rows : config.table.header[0];
|
|
4043
|
+
result = getMaxLength(columnOptions, measurableRows, columnIndex);
|
|
4044
|
+
result = addPadding(config, result);
|
|
4045
|
+
}
|
|
4046
|
+
}
|
|
4047
|
+
result = result + config.GUTTER;
|
|
4048
|
+
return result;
|
|
4049
|
+
});
|
|
4050
|
+
const totalWidth = widths.reduce((prev, current) => prev + current);
|
|
4051
|
+
if (totalWidth > availableWidth || config.FIXED_WIDTH) {
|
|
4052
|
+
const proportion = (availableWidth / totalWidth).toFixed(2) - 0.01;
|
|
4053
|
+
const relativeWidths = widths.map((value) => Math.max(2, Math.floor(proportion * value)));
|
|
4054
|
+
if (config.FIXED_WIDTH) return relativeWidths;
|
|
4055
|
+
if (proportion > 0) {
|
|
4056
|
+
const totalRelativeWidths = relativeWidths.reduce((prev, current) => prev + current);
|
|
4057
|
+
widths = totalRelativeWidths < totalWidth ? relativeWidths : widths;
|
|
4058
|
+
}
|
|
4059
|
+
} else {
|
|
4060
|
+
widths = widths.map(Math.floor);
|
|
4061
|
+
}
|
|
4062
|
+
return widths;
|
|
4063
|
+
};
|
|
4064
|
+
|
|
4065
|
+
// src/render.ts
|
|
4066
|
+
var import_strip_ansi3 = __toESM(require_strip_ansi());
|
|
4067
|
+
var stringifyData = (config, inputData) => {
|
|
4068
|
+
const sections = {
|
|
4069
|
+
header: [],
|
|
4070
|
+
body: [],
|
|
4071
|
+
footer: []
|
|
4072
|
+
};
|
|
4073
|
+
const marginLeft = Array(config.marginLeft + 1).join(" ");
|
|
4074
|
+
const borderStyle = config.borderCharacters[config.borderStyle];
|
|
4075
|
+
const borders = [];
|
|
4076
|
+
const constructorType = getConstructorGeometry(inputData[0] || [], config);
|
|
4077
|
+
const rows = coerceConstructorGeometry(config, inputData, constructorType);
|
|
4078
|
+
if (!globalThis.columnWidths) {
|
|
4079
|
+
globalThis.columnWidths = {};
|
|
4080
|
+
}
|
|
4081
|
+
if (globalThis.columnWidths[config.tableId]) {
|
|
4082
|
+
config.table.columnWidths = globalThis.columnWidths[config.tableId];
|
|
4083
|
+
} else {
|
|
4084
|
+
const formattedRows = rows.map((row, rowIndex) => {
|
|
4085
|
+
return row.map((cell, cellIndex) => {
|
|
4086
|
+
return buildCell(config, cell, cellIndex, "body", rowIndex, rows, inputData, true);
|
|
4087
|
+
});
|
|
4088
|
+
});
|
|
4089
|
+
globalThis.columnWidths[config.tableId] = config.table.columnWidths = getColumnWidths(config, formattedRows);
|
|
4090
|
+
}
|
|
4091
|
+
switch (true) {
|
|
4092
|
+
case (config.showHeader !== null && !config.showHeader):
|
|
4093
|
+
sections.header = [];
|
|
4094
|
+
break;
|
|
4095
|
+
case config.showHeader === true:
|
|
4096
|
+
// explicitly true, show
|
|
4097
|
+
case !!config.table.header[0].find((obj) => obj.value || obj.alias):
|
|
4098
|
+
sections.header = config.table.header.map((row) => {
|
|
4099
|
+
return buildRow(config, row, "header", null, rows, inputData);
|
|
4100
|
+
});
|
|
4101
|
+
break;
|
|
4102
|
+
default:
|
|
4103
|
+
sections.header = [];
|
|
4104
|
+
}
|
|
4105
|
+
sections.body = rows.map((row, rowIndex) => {
|
|
4106
|
+
return buildRow(config, row, "body", rowIndex, rows, inputData);
|
|
4107
|
+
});
|
|
4108
|
+
sections.footer = config.table.footer instanceof Array && config.table.footer.length > 0 ? [config.table.footer] : [];
|
|
4109
|
+
sections.footer = sections.footer.map((row) => {
|
|
4110
|
+
return buildRow(config, row, "footer", null, rows, inputData);
|
|
4111
|
+
});
|
|
4112
|
+
for (let a = 0; a < 3; a++) {
|
|
4113
|
+
borders[a] = borderStyle[a].l;
|
|
4114
|
+
config.table.columnWidths.forEach((columnWidth, index, arr) => {
|
|
4115
|
+
borders[a] += Array(Math.max(columnWidth, 2)).join(borderStyle[a].h);
|
|
4116
|
+
borders[a] += index + 1 < arr.length ? borderStyle[a].j : "";
|
|
4117
|
+
});
|
|
4118
|
+
borders[a] += borderStyle[a].r;
|
|
4119
|
+
borders[a] = a < 2 ? `${marginLeft + borders[a]}
|
|
4120
|
+
` : marginLeft + borders[a];
|
|
4121
|
+
}
|
|
4122
|
+
let output = borders[0];
|
|
4123
|
+
Object.keys(sections).forEach((p, i) => {
|
|
4124
|
+
while (sections[p].length) {
|
|
4125
|
+
const row = sections[p].shift();
|
|
4126
|
+
row.forEach((line) => {
|
|
4127
|
+
output = `${output + marginLeft + borderStyle[1].v + line.join(borderStyle[1].v) + borderStyle[1].v}
|
|
4128
|
+
`;
|
|
4129
|
+
});
|
|
4130
|
+
switch (true) {
|
|
4131
|
+
// skip if end of body and no footer
|
|
4132
|
+
case (sections[p].length === 0 && i === 1 && sections.footer.length === 0):
|
|
4133
|
+
break;
|
|
4134
|
+
// skip if end of footer
|
|
4135
|
+
case (sections[p].length === 0 && i === 2):
|
|
4136
|
+
break;
|
|
4137
|
+
// skip if compact
|
|
4138
|
+
case (config.compact && p === "body" && !row.empty):
|
|
4139
|
+
break;
|
|
4140
|
+
// skip if border style is "none"
|
|
4141
|
+
case (config.borderStyle === "none" && config.compact):
|
|
4142
|
+
break;
|
|
4143
|
+
default:
|
|
4144
|
+
output += borders[1];
|
|
4145
|
+
}
|
|
4146
|
+
}
|
|
4147
|
+
});
|
|
4148
|
+
output += borders[2];
|
|
4149
|
+
const finalOutput = Array(config.marginTop + 1).join("\n") + output;
|
|
4150
|
+
config.height = finalOutput.split(/\r\n|\r|\n/).length;
|
|
4151
|
+
return finalOutput;
|
|
4152
|
+
};
|
|
4153
|
+
var buildRow = (config, row, rowType, rowIndex, rowData, inputData) => {
|
|
4154
|
+
let minRowHeight = 0;
|
|
4155
|
+
if (row.length === 0 && config.compact) {
|
|
4156
|
+
row.empty = true;
|
|
4157
|
+
return row;
|
|
4158
|
+
}
|
|
4159
|
+
const lengthDifference = config.table.columnWidths.length - row.length;
|
|
4160
|
+
if (lengthDifference > 0) {
|
|
4161
|
+
row = row.concat(Array.apply(null, new Array(lengthDifference)).map(() => null));
|
|
4162
|
+
} else if (lengthDifference < 0) {
|
|
4163
|
+
row.length = config.table.columnWidths.length;
|
|
4164
|
+
}
|
|
4165
|
+
row = row.map((elem, elemIndex) => {
|
|
4166
|
+
const cell = buildCell(config, elem, elemIndex, rowType, rowIndex, rowData, inputData);
|
|
4167
|
+
minRowHeight = minRowHeight < cell.length ? cell.length : minRowHeight;
|
|
4168
|
+
return cell;
|
|
4169
|
+
});
|
|
4170
|
+
minRowHeight = rowType === "header" ? minRowHeight : minRowHeight + (config.paddingBottom + config.paddingTop);
|
|
4171
|
+
const linedRow = Array.apply(null, { length: minRowHeight }).map(Function.call, () => []);
|
|
4172
|
+
row.forEach(function(cell, a) {
|
|
4173
|
+
const whitespace = Array(config.table.columnWidths[a]).join(" ");
|
|
4174
|
+
if (rowType === "body") {
|
|
4175
|
+
for (let i = 0; i < config.paddingTop; i++) {
|
|
4176
|
+
cell.unshift(whitespace);
|
|
4177
|
+
}
|
|
4178
|
+
for (let i = 0; i < config.paddingBottom; i++) {
|
|
4179
|
+
cell.push(whitespace);
|
|
4180
|
+
}
|
|
4181
|
+
}
|
|
4182
|
+
for (let i = 0; i < minRowHeight; i++) {
|
|
4183
|
+
linedRow[i].push(typeof cell[i] !== "undefined" ? cell[i] : whitespace);
|
|
4184
|
+
}
|
|
4185
|
+
});
|
|
4186
|
+
return linedRow;
|
|
4187
|
+
};
|
|
4188
|
+
var buildCell = (config, elem, columnIndex, rowType, rowIndex, rowData, inputData, dryRun = false) => {
|
|
4189
|
+
let cellValue = null;
|
|
4190
|
+
const cellOptions = Object.assign(
|
|
4191
|
+
{ reset: false },
|
|
4192
|
+
config,
|
|
4193
|
+
rowType !== "header" ? config.columnSettings[columnIndex] : {},
|
|
4194
|
+
typeof elem === "object" ? elem : {}
|
|
4195
|
+
);
|
|
4196
|
+
if (rowType === "header") {
|
|
4197
|
+
config.table.columns.push(cellOptions);
|
|
4198
|
+
cellValue = cellOptions.alias || cellOptions.value || "";
|
|
4199
|
+
} else {
|
|
4200
|
+
switch (true) {
|
|
4201
|
+
case (typeof elem === "undefined" || elem === null):
|
|
4202
|
+
cellValue = config.errorOnNull ? config.defaultErrorValue : config.defaultValue;
|
|
4203
|
+
if (!isColorEnabled()) {
|
|
4204
|
+
cellValue = (0, import_strip_ansi3.default)(cellValue);
|
|
4205
|
+
}
|
|
4206
|
+
cellOptions.isNull = true;
|
|
4207
|
+
break;
|
|
4208
|
+
case (typeof elem === "object" && elem !== null && typeof elem.value !== "undefined"):
|
|
4209
|
+
cellValue = elem.value;
|
|
4210
|
+
break;
|
|
4211
|
+
case typeof elem === "function":
|
|
4212
|
+
cellValue = elem.bind({
|
|
4213
|
+
configure: function(object) {
|
|
4214
|
+
return Object.assign(cellOptions, object);
|
|
4215
|
+
},
|
|
4216
|
+
style,
|
|
4217
|
+
resetStyle
|
|
4218
|
+
})(
|
|
4219
|
+
cellValue,
|
|
4220
|
+
columnIndex,
|
|
4221
|
+
rowIndex,
|
|
4222
|
+
rowData,
|
|
4223
|
+
inputData
|
|
4224
|
+
);
|
|
4225
|
+
break;
|
|
4226
|
+
default:
|
|
4227
|
+
cellValue = elem;
|
|
4228
|
+
}
|
|
4229
|
+
if (rowType === "body" && typeof cellOptions.formatter === "function") {
|
|
4230
|
+
cellValue = cellOptions.formatter.bind({
|
|
4231
|
+
configure: function(object) {
|
|
4232
|
+
return Object.assign(cellOptions, object);
|
|
4233
|
+
},
|
|
4234
|
+
style,
|
|
4235
|
+
resetStyle
|
|
4236
|
+
})(
|
|
4237
|
+
cellValue,
|
|
4238
|
+
columnIndex,
|
|
4239
|
+
rowIndex,
|
|
4240
|
+
rowData,
|
|
4241
|
+
inputData
|
|
4242
|
+
);
|
|
4243
|
+
}
|
|
4244
|
+
if (dryRun) {
|
|
4245
|
+
return cellValue;
|
|
4246
|
+
}
|
|
4247
|
+
}
|
|
4248
|
+
if (!cellOptions.reset) {
|
|
4249
|
+
cellValue = colorizeCell(cellValue, cellOptions, rowType);
|
|
4250
|
+
}
|
|
4251
|
+
const { cell, innerWidth } = wrapCellText(cellOptions, cellValue, columnIndex, cellOptions, rowType);
|
|
4252
|
+
if (rowType === "header") {
|
|
4253
|
+
config.table.columnInnerWidths.push(innerWidth);
|
|
4254
|
+
}
|
|
4255
|
+
return cell;
|
|
4256
|
+
};
|
|
4257
|
+
var getConstructorGeometry = (row, config) => {
|
|
4258
|
+
let type;
|
|
4259
|
+
if (typeof row === "object" && !(row instanceof Array)) {
|
|
4260
|
+
const keys = Object.keys(row);
|
|
4261
|
+
if (config.adapter === "automattic") {
|
|
4262
|
+
const key = keys[0];
|
|
4263
|
+
if (row[key] instanceof Array) {
|
|
4264
|
+
type = "automattic-cross";
|
|
4265
|
+
} else {
|
|
4266
|
+
type = "automattic-vertical";
|
|
4267
|
+
}
|
|
4268
|
+
} else {
|
|
4269
|
+
type = "o-horizontal";
|
|
4270
|
+
}
|
|
4271
|
+
} else {
|
|
4272
|
+
type = "a-horizontal";
|
|
4273
|
+
}
|
|
4274
|
+
return type;
|
|
4275
|
+
};
|
|
4276
|
+
var coerceConstructorGeometry = (config, rows, constructorType) => {
|
|
4277
|
+
let output = [];
|
|
4278
|
+
switch (constructorType) {
|
|
4279
|
+
case "automattic-cross":
|
|
4280
|
+
config.columnSettings[0] = config.columnSettings[0] || {};
|
|
4281
|
+
config.columnSettings[0].color = config.headerColor;
|
|
4282
|
+
output = rows.map((obj) => {
|
|
4283
|
+
const arr = [];
|
|
4284
|
+
const key = Object.keys(obj)[0];
|
|
4285
|
+
arr.push(key);
|
|
4286
|
+
return arr.concat(obj[key]);
|
|
4287
|
+
});
|
|
4288
|
+
break;
|
|
4289
|
+
case "automattic-vertical":
|
|
4290
|
+
config.columnSettings[0] = config.columnSettings[0] || {};
|
|
4291
|
+
config.columnSettings[0].color = config.headerColor;
|
|
4292
|
+
output = rows.map(function(value) {
|
|
4293
|
+
const key = Object.keys(value)[0];
|
|
4294
|
+
return [key, value[key]];
|
|
4295
|
+
});
|
|
4296
|
+
break;
|
|
4297
|
+
case "o-horizontal":
|
|
4298
|
+
if (config.table.header[0].length && config.table.header[0].every((obj) => obj.value)) {
|
|
4299
|
+
output = rows.map((row) => config.table.header[0].map((obj) => row[obj.value]));
|
|
4300
|
+
} else {
|
|
4301
|
+
output = rows.map((obj) => Object.values(obj));
|
|
4302
|
+
}
|
|
4303
|
+
break;
|
|
4304
|
+
case "a-horizontal":
|
|
4305
|
+
output = rows;
|
|
4306
|
+
break;
|
|
4307
|
+
default:
|
|
4308
|
+
}
|
|
4309
|
+
return output;
|
|
4310
|
+
};
|
|
4311
|
+
|
|
4312
|
+
// src/factory.ts
|
|
4313
|
+
var counter = 0;
|
|
4314
|
+
var Factory = function(paramsArr) {
|
|
4315
|
+
const _configKey = Symbol.config;
|
|
4316
|
+
let header = [];
|
|
4317
|
+
const body = [];
|
|
4318
|
+
let footer = [];
|
|
4319
|
+
let options = {};
|
|
4320
|
+
switch (true) {
|
|
4321
|
+
// header, rows, footer, and options
|
|
4322
|
+
case paramsArr.length === 4:
|
|
4323
|
+
header = paramsArr[0];
|
|
4324
|
+
body.push(...paramsArr[1]);
|
|
4325
|
+
footer = paramsArr[2];
|
|
4326
|
+
options = paramsArr[3];
|
|
4327
|
+
break;
|
|
4328
|
+
// header, rows, footer
|
|
4329
|
+
case (paramsArr.length === 3 && paramsArr[2] instanceof Array):
|
|
4330
|
+
header = paramsArr[0];
|
|
4331
|
+
body.push(...paramsArr[1]);
|
|
4332
|
+
footer = paramsArr[2];
|
|
4333
|
+
break;
|
|
4334
|
+
// header, rows, options
|
|
4335
|
+
case (paramsArr.length === 3 && typeof paramsArr[2] === "object"):
|
|
4336
|
+
header = paramsArr[0];
|
|
4337
|
+
body.push(...paramsArr[1]);
|
|
4338
|
+
options = paramsArr[2];
|
|
4339
|
+
break;
|
|
4340
|
+
// header, rows (rows, footer is not an option)
|
|
4341
|
+
case (paramsArr.length === 2 && paramsArr[1] instanceof Array):
|
|
4342
|
+
header = paramsArr[0];
|
|
4343
|
+
body.push(...paramsArr[1]);
|
|
4344
|
+
break;
|
|
4345
|
+
// rows, options
|
|
4346
|
+
case (paramsArr.length === 2 && typeof paramsArr[1] === "object"):
|
|
4347
|
+
body.push(...paramsArr[0]);
|
|
4348
|
+
options = paramsArr[1];
|
|
4349
|
+
break;
|
|
4350
|
+
// rows
|
|
4351
|
+
case (paramsArr.length === 1 && paramsArr[0] instanceof Array):
|
|
4352
|
+
body.push(...paramsArr[0]);
|
|
4353
|
+
break;
|
|
4354
|
+
// adapter called: i.e. `require('tty-table')('automattic-cli-table')`
|
|
4355
|
+
case (paramsArr.length === 1 && typeof paramsArr[0] === "string"): {
|
|
4356
|
+
const adapters = {
|
|
4357
|
+
"automattic-cli-table": () => require_stub(),
|
|
4358
|
+
"default-adapter": () => require_stub(),
|
|
4359
|
+
"terminal-adapter": () => require_stub()
|
|
4360
|
+
};
|
|
4361
|
+
const load = adapters[paramsArr[0]];
|
|
4362
|
+
if (!load) throw new Error(`Unknown adapter: "${paramsArr[0]}". Available adapters: ${Object.keys(adapters).join(", ")}`);
|
|
4363
|
+
return load();
|
|
4364
|
+
}
|
|
4365
|
+
/* istanbul ignore next */
|
|
4366
|
+
default:
|
|
4367
|
+
console.log("Error: Bad params. \nSee docs at github.com/tecfu/tty-table");
|
|
4368
|
+
process.exit();
|
|
4369
|
+
}
|
|
4370
|
+
const cloneddefaults = JSON.parse(JSON.stringify(defaults_default));
|
|
4371
|
+
const config = Object.assign({}, cloneddefaults, options);
|
|
4372
|
+
config.align = config.alignment || config.align;
|
|
4373
|
+
config.headerAlign = config.headerAlignment || config.headerAlign;
|
|
4374
|
+
if (config.truncate === true) config.truncate = "";
|
|
4375
|
+
if (config.borderColor) {
|
|
4376
|
+
config.borderCharacters[config.borderStyle] = config.borderCharacters[config.borderStyle].map(function(obj) {
|
|
4377
|
+
Object.keys(obj).forEach(function(key) {
|
|
4378
|
+
obj[key] = style(obj[key], config.borderColor);
|
|
4379
|
+
});
|
|
4380
|
+
return obj;
|
|
4381
|
+
});
|
|
4382
|
+
}
|
|
4383
|
+
config.columnSettings = header.slice(0);
|
|
4384
|
+
config.table.header = header;
|
|
4385
|
+
config.table.header = [config.table.header];
|
|
4386
|
+
config.table.footer = footer;
|
|
4387
|
+
if (config.terminalAdapter !== true) {
|
|
4388
|
+
counter++;
|
|
4389
|
+
}
|
|
4390
|
+
config.tableId = counter;
|
|
4391
|
+
const tableObject = Object.create(body);
|
|
4392
|
+
tableObject[_configKey] = config;
|
|
4393
|
+
tableObject.render = function() {
|
|
4394
|
+
const output = stringifyData(this[_configKey], this.slice(0));
|
|
4395
|
+
tableObject.height = this[_configKey].height;
|
|
4396
|
+
return output;
|
|
4397
|
+
};
|
|
4398
|
+
return tableObject;
|
|
4399
|
+
};
|
|
4400
|
+
var Table = function(...params) {
|
|
4401
|
+
return Factory(params);
|
|
4402
|
+
};
|
|
4403
|
+
Table.resetStyle = resetStyle;
|
|
4404
|
+
Table.style = styleEachChar;
|
|
4405
|
+
var factory_default = Table;
|
|
4406
|
+
|
|
4407
|
+
// src/index.ts
|
|
4408
|
+
var src_default = factory_default;
|
|
4409
|
+
return __toCommonJS(browser_exports);
|
|
4410
|
+
})();
|
|
4411
|
+
//# sourceMappingURL=tty-table.global.js.map
|