mp-darkmode 1.2.3-beta.6 → 1.2.3-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/darkmode.js +3597 -458
- package/dist/darkmode.js.map +1 -1
- package/dist/darkmode.min.js +1 -1
- package/package.json +3 -2
package/dist/darkmode.js
CHANGED
|
@@ -96,6 +96,134 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
96
96
|
/************************************************************************/
|
|
97
97
|
/******/ ({
|
|
98
98
|
|
|
99
|
+
/***/ "./node_modules/call-bind-apply-helpers/actualApply.js":
|
|
100
|
+
/*!*************************************************************!*\
|
|
101
|
+
!*** ./node_modules/call-bind-apply-helpers/actualApply.js ***!
|
|
102
|
+
\*************************************************************/
|
|
103
|
+
/*! no static exports found */
|
|
104
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
105
|
+
|
|
106
|
+
"use strict";
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
var bind = __webpack_require__(/*! function-bind */ "./node_modules/function-bind/index.js");
|
|
110
|
+
|
|
111
|
+
var $apply = __webpack_require__(/*! ./functionApply */ "./node_modules/call-bind-apply-helpers/functionApply.js");
|
|
112
|
+
var $call = __webpack_require__(/*! ./functionCall */ "./node_modules/call-bind-apply-helpers/functionCall.js");
|
|
113
|
+
var $reflectApply = __webpack_require__(/*! ./reflectApply */ "./node_modules/call-bind-apply-helpers/reflectApply.js");
|
|
114
|
+
|
|
115
|
+
/** @type {import('./actualApply')} */
|
|
116
|
+
module.exports = $reflectApply || bind.call($call, $apply);
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
/***/ }),
|
|
120
|
+
|
|
121
|
+
/***/ "./node_modules/call-bind-apply-helpers/functionApply.js":
|
|
122
|
+
/*!***************************************************************!*\
|
|
123
|
+
!*** ./node_modules/call-bind-apply-helpers/functionApply.js ***!
|
|
124
|
+
\***************************************************************/
|
|
125
|
+
/*! no static exports found */
|
|
126
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
127
|
+
|
|
128
|
+
"use strict";
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
/** @type {import('./functionApply')} */
|
|
132
|
+
module.exports = Function.prototype.apply;
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
/***/ }),
|
|
136
|
+
|
|
137
|
+
/***/ "./node_modules/call-bind-apply-helpers/functionCall.js":
|
|
138
|
+
/*!**************************************************************!*\
|
|
139
|
+
!*** ./node_modules/call-bind-apply-helpers/functionCall.js ***!
|
|
140
|
+
\**************************************************************/
|
|
141
|
+
/*! no static exports found */
|
|
142
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
143
|
+
|
|
144
|
+
"use strict";
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
/** @type {import('./functionCall')} */
|
|
148
|
+
module.exports = Function.prototype.call;
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
/***/ }),
|
|
152
|
+
|
|
153
|
+
/***/ "./node_modules/call-bind-apply-helpers/index.js":
|
|
154
|
+
/*!*******************************************************!*\
|
|
155
|
+
!*** ./node_modules/call-bind-apply-helpers/index.js ***!
|
|
156
|
+
\*******************************************************/
|
|
157
|
+
/*! no static exports found */
|
|
158
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
159
|
+
|
|
160
|
+
"use strict";
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
var bind = __webpack_require__(/*! function-bind */ "./node_modules/function-bind/index.js");
|
|
164
|
+
var $TypeError = __webpack_require__(/*! es-errors/type */ "./node_modules/es-errors/type.js");
|
|
165
|
+
|
|
166
|
+
var $call = __webpack_require__(/*! ./functionCall */ "./node_modules/call-bind-apply-helpers/functionCall.js");
|
|
167
|
+
var $actualApply = __webpack_require__(/*! ./actualApply */ "./node_modules/call-bind-apply-helpers/actualApply.js");
|
|
168
|
+
|
|
169
|
+
/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
|
|
170
|
+
module.exports = function callBindBasic(args) {
|
|
171
|
+
if (args.length < 1 || typeof args[0] !== 'function') {
|
|
172
|
+
throw new $TypeError('a function is required');
|
|
173
|
+
}
|
|
174
|
+
return $actualApply(bind, $call, args);
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
/***/ }),
|
|
179
|
+
|
|
180
|
+
/***/ "./node_modules/call-bind-apply-helpers/reflectApply.js":
|
|
181
|
+
/*!**************************************************************!*\
|
|
182
|
+
!*** ./node_modules/call-bind-apply-helpers/reflectApply.js ***!
|
|
183
|
+
\**************************************************************/
|
|
184
|
+
/*! no static exports found */
|
|
185
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
186
|
+
|
|
187
|
+
"use strict";
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
/** @type {import('./reflectApply')} */
|
|
191
|
+
module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
/***/ }),
|
|
195
|
+
|
|
196
|
+
/***/ "./node_modules/call-bound/index.js":
|
|
197
|
+
/*!******************************************!*\
|
|
198
|
+
!*** ./node_modules/call-bound/index.js ***!
|
|
199
|
+
\******************************************/
|
|
200
|
+
/*! no static exports found */
|
|
201
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
202
|
+
|
|
203
|
+
"use strict";
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "./node_modules/get-intrinsic/index.js");
|
|
207
|
+
|
|
208
|
+
var callBindBasic = __webpack_require__(/*! call-bind-apply-helpers */ "./node_modules/call-bind-apply-helpers/index.js");
|
|
209
|
+
|
|
210
|
+
/** @type {(thisArg: string, searchString: string, position?: number) => number} */
|
|
211
|
+
var $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]);
|
|
212
|
+
|
|
213
|
+
/** @type {import('.')} */
|
|
214
|
+
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
215
|
+
/* eslint no-extra-parens: 0 */
|
|
216
|
+
|
|
217
|
+
var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic(name, !!allowMissing));
|
|
218
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
219
|
+
return callBindBasic(/** @type {const} */ ([intrinsic]));
|
|
220
|
+
}
|
|
221
|
+
return intrinsic;
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
/***/ }),
|
|
226
|
+
|
|
99
227
|
/***/ "./node_modules/color-blend/dist/index.modern.js":
|
|
100
228
|
/*!*******************************************************!*\
|
|
101
229
|
!*** ./node_modules/color-blend/dist/index.modern.js ***!
|
|
@@ -121,8 +249,216 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
121
249
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saturation", function() { return Q; });
|
|
122
250
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "screen", function() { return C; });
|
|
123
251
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "softLight", function() { return K; });
|
|
124
|
-
function n(n,
|
|
125
|
-
|
|
252
|
+
function n(n, r, t) {
|
|
253
|
+
return {
|
|
254
|
+
r: 255 * t(n.r / 255, r.r / 255),
|
|
255
|
+
g: 255 * t(n.g / 255, r.g / 255),
|
|
256
|
+
b: 255 * t(n.b / 255, r.b / 255)
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
function r(n, r) {
|
|
260
|
+
return r;
|
|
261
|
+
}
|
|
262
|
+
function t(n, r) {
|
|
263
|
+
return n * r;
|
|
264
|
+
}
|
|
265
|
+
function u(n, r) {
|
|
266
|
+
return n + r - n * r;
|
|
267
|
+
}
|
|
268
|
+
function i(n, r) {
|
|
269
|
+
return a(r, n);
|
|
270
|
+
}
|
|
271
|
+
function o(n, r) {
|
|
272
|
+
return Math.min(n, r);
|
|
273
|
+
}
|
|
274
|
+
function e(n, r) {
|
|
275
|
+
return Math.min(Math.max(n, r), 1);
|
|
276
|
+
}
|
|
277
|
+
function c(n, r) {
|
|
278
|
+
return 0 === n ? 0 : 1 === r ? 1 : Math.min(1, n / (1 - r));
|
|
279
|
+
}
|
|
280
|
+
function f(n, r) {
|
|
281
|
+
return 1 === n ? 1 : 0 === r ? 0 : 1 - Math.min(1, (1 - n) / r);
|
|
282
|
+
}
|
|
283
|
+
function a(n, r) {
|
|
284
|
+
return r <= .5 ? t(n, 2 * r) : u(n, 2 * r - 1);
|
|
285
|
+
}
|
|
286
|
+
function b(n, r) {
|
|
287
|
+
return r <= .5 ? n - (1 - 2 * r) * n * (1 - n) : n + (2 * r - 1) * ((n <= .25 ? ((16 * n - 12) * n + 4) * n : Math.sqrt(n)) - n);
|
|
288
|
+
}
|
|
289
|
+
function g(n, r) {
|
|
290
|
+
return Math.abs(n - r);
|
|
291
|
+
}
|
|
292
|
+
function h(n, r) {
|
|
293
|
+
return n + r - 2 * n * r;
|
|
294
|
+
}
|
|
295
|
+
function M(n, r, t) {
|
|
296
|
+
return Math.min(Math.max(n || 0, r), t);
|
|
297
|
+
}
|
|
298
|
+
function m(n) {
|
|
299
|
+
return {
|
|
300
|
+
r: M(n.r, 0, 255),
|
|
301
|
+
g: M(n.g, 0, 255),
|
|
302
|
+
b: M(n.b, 0, 255),
|
|
303
|
+
a: M(n.a, 0, 1)
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
function d(n) {
|
|
307
|
+
return {
|
|
308
|
+
r: 255 * n.r,
|
|
309
|
+
g: 255 * n.g,
|
|
310
|
+
b: 255 * n.b,
|
|
311
|
+
a: n.a
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
function p(n) {
|
|
315
|
+
return {
|
|
316
|
+
r: n.r / 255,
|
|
317
|
+
g: n.g / 255,
|
|
318
|
+
b: n.b / 255,
|
|
319
|
+
a: n.a
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
function v(n, r) {
|
|
323
|
+
void 0 === r && (r = 0);
|
|
324
|
+
var t = Math.pow(10, r);
|
|
325
|
+
return {
|
|
326
|
+
r: Math.round(n.r * t) / t,
|
|
327
|
+
g: Math.round(n.g * t) / t,
|
|
328
|
+
b: Math.round(n.b * t) / t,
|
|
329
|
+
a: n.a
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
function x(n, r, t, u, i, o) {
|
|
333
|
+
return (1 - r / t) * u + r / t * Math.round((1 - n) * i + n * o);
|
|
334
|
+
}
|
|
335
|
+
function O(n, r, t, u, i) {
|
|
336
|
+
void 0 === i && (i = {
|
|
337
|
+
unitInput: !1,
|
|
338
|
+
unitOutput: !1,
|
|
339
|
+
roundOutput: !0
|
|
340
|
+
}), i.unitInput && (n = d(n), r = d(r)), n = m(n);
|
|
341
|
+
var o = (r = m(r)).a + n.a - r.a * n.a,
|
|
342
|
+
e = t(n, r, u),
|
|
343
|
+
c = m({
|
|
344
|
+
r: x(n.a, r.a, o, n.r, r.r, e.r),
|
|
345
|
+
g: x(n.a, r.a, o, n.g, r.g, e.g),
|
|
346
|
+
b: x(n.a, r.a, o, n.b, r.b, e.b),
|
|
347
|
+
a: o
|
|
348
|
+
});
|
|
349
|
+
return c = i.unitOutput ? p(c) : i.roundOutput ? v(c) : function (n) {
|
|
350
|
+
return v(n, 9);
|
|
351
|
+
}(c), c;
|
|
352
|
+
}
|
|
353
|
+
function s(n, r, t) {
|
|
354
|
+
return d(t(p(n), p(r)));
|
|
355
|
+
}
|
|
356
|
+
function I(n) {
|
|
357
|
+
return .3 * n.r + .59 * n.g + .11 * n.b;
|
|
358
|
+
}
|
|
359
|
+
function q(n, r) {
|
|
360
|
+
var t = r - I(n);
|
|
361
|
+
return function (n) {
|
|
362
|
+
var r = I(n),
|
|
363
|
+
t = n.r,
|
|
364
|
+
u = n.g,
|
|
365
|
+
i = n.b,
|
|
366
|
+
o = Math.min(t, u, i),
|
|
367
|
+
e = Math.max(t, u, i);
|
|
368
|
+
function c(n) {
|
|
369
|
+
return r + (n - r) * r / (r - o);
|
|
370
|
+
}
|
|
371
|
+
function f(n) {
|
|
372
|
+
return r + (n - r) * (1 - r) / (e - r);
|
|
373
|
+
}
|
|
374
|
+
return o < 0 && (t = c(t), u = c(u), i = c(i)), e > 1 && (t = f(t), u = f(u), i = f(i)), {
|
|
375
|
+
r: t,
|
|
376
|
+
g: u,
|
|
377
|
+
b: i
|
|
378
|
+
};
|
|
379
|
+
}({
|
|
380
|
+
r: n.r + t,
|
|
381
|
+
g: n.g + t,
|
|
382
|
+
b: n.b + t
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
function w(n) {
|
|
386
|
+
return Math.max(n.r, n.g, n.b) - Math.min(n.r, n.g, n.b);
|
|
387
|
+
}
|
|
388
|
+
function j(n, r) {
|
|
389
|
+
var t = ["r", "g", "b"].sort(function (r, t) {
|
|
390
|
+
return n[r] - n[t];
|
|
391
|
+
}),
|
|
392
|
+
u = t[0],
|
|
393
|
+
i = t[1],
|
|
394
|
+
o = t[2],
|
|
395
|
+
e = {
|
|
396
|
+
r: n.r,
|
|
397
|
+
g: n.g,
|
|
398
|
+
b: n.b
|
|
399
|
+
};
|
|
400
|
+
return e[o] > e[u] ? (e[i] = (e[i] - e[u]) * r / (e[o] - e[u]), e[o] = r) : e[i] = e[o] = 0, e[u] = 0, e;
|
|
401
|
+
}
|
|
402
|
+
function k(n, r) {
|
|
403
|
+
return q(j(r, w(n)), I(n));
|
|
404
|
+
}
|
|
405
|
+
function l(n, r) {
|
|
406
|
+
return q(j(n, w(r)), I(n));
|
|
407
|
+
}
|
|
408
|
+
function y(n, r) {
|
|
409
|
+
return q(r, I(n));
|
|
410
|
+
}
|
|
411
|
+
function z(n, r) {
|
|
412
|
+
return q(n, I(r));
|
|
413
|
+
}
|
|
414
|
+
function A(t, u) {
|
|
415
|
+
return O(t, u, n, r);
|
|
416
|
+
}
|
|
417
|
+
function B(r, u) {
|
|
418
|
+
return O(r, u, n, t);
|
|
419
|
+
}
|
|
420
|
+
function C(r, t) {
|
|
421
|
+
return O(r, t, n, u);
|
|
422
|
+
}
|
|
423
|
+
function D(r, t) {
|
|
424
|
+
return O(r, t, n, i);
|
|
425
|
+
}
|
|
426
|
+
function E(r, t) {
|
|
427
|
+
return O(r, t, n, o);
|
|
428
|
+
}
|
|
429
|
+
function F(r, t) {
|
|
430
|
+
return O(r, t, n, e);
|
|
431
|
+
}
|
|
432
|
+
function G(r, t) {
|
|
433
|
+
return O(r, t, n, c);
|
|
434
|
+
}
|
|
435
|
+
function H(r, t) {
|
|
436
|
+
return O(r, t, n, f);
|
|
437
|
+
}
|
|
438
|
+
function J(r, t) {
|
|
439
|
+
return O(r, t, n, a);
|
|
440
|
+
}
|
|
441
|
+
function K(r, t) {
|
|
442
|
+
return O(r, t, n, b);
|
|
443
|
+
}
|
|
444
|
+
function L(r, t) {
|
|
445
|
+
return O(r, t, n, g);
|
|
446
|
+
}
|
|
447
|
+
function N(r, t) {
|
|
448
|
+
return O(r, t, n, h);
|
|
449
|
+
}
|
|
450
|
+
function P(n, r) {
|
|
451
|
+
return O(n, r, s, k);
|
|
452
|
+
}
|
|
453
|
+
function Q(n, r) {
|
|
454
|
+
return O(n, r, s, l);
|
|
455
|
+
}
|
|
456
|
+
function R(n, r) {
|
|
457
|
+
return O(n, r, s, y);
|
|
458
|
+
}
|
|
459
|
+
function S(n, r) {
|
|
460
|
+
return O(n, r, s, z);
|
|
461
|
+
}
|
|
126
462
|
|
|
127
463
|
|
|
128
464
|
/***/ }),
|
|
@@ -136,158 +472,159 @@ function n(n,r,t){return{r:255*t(n.r/255,r.r/255),g:255*t(n.g/255,r.g/255),b:255
|
|
|
136
472
|
|
|
137
473
|
"use strict";
|
|
138
474
|
__webpack_require__.r(__webpack_exports__);
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
|
|
475
|
+
var colors = {
|
|
476
|
+
aliceblue: [240, 248, 255],
|
|
477
|
+
antiquewhite: [250, 235, 215],
|
|
478
|
+
aqua: [0, 255, 255],
|
|
479
|
+
aquamarine: [127, 255, 212],
|
|
480
|
+
azure: [240, 255, 255],
|
|
481
|
+
beige: [245, 245, 220],
|
|
482
|
+
bisque: [255, 228, 196],
|
|
483
|
+
black: [0, 0, 0],
|
|
484
|
+
blanchedalmond: [255, 235, 205],
|
|
485
|
+
blue: [0, 0, 255],
|
|
486
|
+
blueviolet: [138, 43, 226],
|
|
487
|
+
brown: [165, 42, 42],
|
|
488
|
+
burlywood: [222, 184, 135],
|
|
489
|
+
cadetblue: [95, 158, 160],
|
|
490
|
+
chartreuse: [127, 255, 0],
|
|
491
|
+
chocolate: [210, 105, 30],
|
|
492
|
+
coral: [255, 127, 80],
|
|
493
|
+
cornflowerblue: [100, 149, 237],
|
|
494
|
+
cornsilk: [255, 248, 220],
|
|
495
|
+
crimson: [220, 20, 60],
|
|
496
|
+
cyan: [0, 255, 255],
|
|
497
|
+
darkblue: [0, 0, 139],
|
|
498
|
+
darkcyan: [0, 139, 139],
|
|
499
|
+
darkgoldenrod: [184, 134, 11],
|
|
500
|
+
darkgray: [169, 169, 169],
|
|
501
|
+
darkgreen: [0, 100, 0],
|
|
502
|
+
darkgrey: [169, 169, 169],
|
|
503
|
+
darkkhaki: [189, 183, 107],
|
|
504
|
+
darkmagenta: [139, 0, 139],
|
|
505
|
+
darkolivegreen: [85, 107, 47],
|
|
506
|
+
darkorange: [255, 140, 0],
|
|
507
|
+
darkorchid: [153, 50, 204],
|
|
508
|
+
darkred: [139, 0, 0],
|
|
509
|
+
darksalmon: [233, 150, 122],
|
|
510
|
+
darkseagreen: [143, 188, 143],
|
|
511
|
+
darkslateblue: [72, 61, 139],
|
|
512
|
+
darkslategray: [47, 79, 79],
|
|
513
|
+
darkslategrey: [47, 79, 79],
|
|
514
|
+
darkturquoise: [0, 206, 209],
|
|
515
|
+
darkviolet: [148, 0, 211],
|
|
516
|
+
deeppink: [255, 20, 147],
|
|
517
|
+
deepskyblue: [0, 191, 255],
|
|
518
|
+
dimgray: [105, 105, 105],
|
|
519
|
+
dimgrey: [105, 105, 105],
|
|
520
|
+
dodgerblue: [30, 144, 255],
|
|
521
|
+
firebrick: [178, 34, 34],
|
|
522
|
+
floralwhite: [255, 250, 240],
|
|
523
|
+
forestgreen: [34, 139, 34],
|
|
524
|
+
fuchsia: [255, 0, 255],
|
|
525
|
+
gainsboro: [220, 220, 220],
|
|
526
|
+
ghostwhite: [248, 248, 255],
|
|
527
|
+
gold: [255, 215, 0],
|
|
528
|
+
goldenrod: [218, 165, 32],
|
|
529
|
+
gray: [128, 128, 128],
|
|
530
|
+
green: [0, 128, 0],
|
|
531
|
+
greenyellow: [173, 255, 47],
|
|
532
|
+
grey: [128, 128, 128],
|
|
533
|
+
honeydew: [240, 255, 240],
|
|
534
|
+
hotpink: [255, 105, 180],
|
|
535
|
+
indianred: [205, 92, 92],
|
|
536
|
+
indigo: [75, 0, 130],
|
|
537
|
+
ivory: [255, 255, 240],
|
|
538
|
+
khaki: [240, 230, 140],
|
|
539
|
+
lavender: [230, 230, 250],
|
|
540
|
+
lavenderblush: [255, 240, 245],
|
|
541
|
+
lawngreen: [124, 252, 0],
|
|
542
|
+
lemonchiffon: [255, 250, 205],
|
|
543
|
+
lightblue: [173, 216, 230],
|
|
544
|
+
lightcoral: [240, 128, 128],
|
|
545
|
+
lightcyan: [224, 255, 255],
|
|
546
|
+
lightgoldenrodyellow: [250, 250, 210],
|
|
547
|
+
lightgray: [211, 211, 211],
|
|
548
|
+
lightgreen: [144, 238, 144],
|
|
549
|
+
lightgrey: [211, 211, 211],
|
|
550
|
+
lightpink: [255, 182, 193],
|
|
551
|
+
lightsalmon: [255, 160, 122],
|
|
552
|
+
lightseagreen: [32, 178, 170],
|
|
553
|
+
lightskyblue: [135, 206, 250],
|
|
554
|
+
lightslategray: [119, 136, 153],
|
|
555
|
+
lightslategrey: [119, 136, 153],
|
|
556
|
+
lightsteelblue: [176, 196, 222],
|
|
557
|
+
lightyellow: [255, 255, 224],
|
|
558
|
+
lime: [0, 255, 0],
|
|
559
|
+
limegreen: [50, 205, 50],
|
|
560
|
+
linen: [250, 240, 230],
|
|
561
|
+
magenta: [255, 0, 255],
|
|
562
|
+
maroon: [128, 0, 0],
|
|
563
|
+
mediumaquamarine: [102, 205, 170],
|
|
564
|
+
mediumblue: [0, 0, 205],
|
|
565
|
+
mediumorchid: [186, 85, 211],
|
|
566
|
+
mediumpurple: [147, 112, 219],
|
|
567
|
+
mediumseagreen: [60, 179, 113],
|
|
568
|
+
mediumslateblue: [123, 104, 238],
|
|
569
|
+
mediumspringgreen: [0, 250, 154],
|
|
570
|
+
mediumturquoise: [72, 209, 204],
|
|
571
|
+
mediumvioletred: [199, 21, 133],
|
|
572
|
+
midnightblue: [25, 25, 112],
|
|
573
|
+
mintcream: [245, 255, 250],
|
|
574
|
+
mistyrose: [255, 228, 225],
|
|
575
|
+
moccasin: [255, 228, 181],
|
|
576
|
+
navajowhite: [255, 222, 173],
|
|
577
|
+
navy: [0, 0, 128],
|
|
578
|
+
oldlace: [253, 245, 230],
|
|
579
|
+
olive: [128, 128, 0],
|
|
580
|
+
olivedrab: [107, 142, 35],
|
|
581
|
+
orange: [255, 165, 0],
|
|
582
|
+
orangered: [255, 69, 0],
|
|
583
|
+
orchid: [218, 112, 214],
|
|
584
|
+
palegoldenrod: [238, 232, 170],
|
|
585
|
+
palegreen: [152, 251, 152],
|
|
586
|
+
paleturquoise: [175, 238, 238],
|
|
587
|
+
palevioletred: [219, 112, 147],
|
|
588
|
+
papayawhip: [255, 239, 213],
|
|
589
|
+
peachpuff: [255, 218, 185],
|
|
590
|
+
peru: [205, 133, 63],
|
|
591
|
+
pink: [255, 192, 203],
|
|
592
|
+
plum: [221, 160, 221],
|
|
593
|
+
powderblue: [176, 224, 230],
|
|
594
|
+
purple: [128, 0, 128],
|
|
595
|
+
rebeccapurple: [102, 51, 153],
|
|
596
|
+
red: [255, 0, 0],
|
|
597
|
+
rosybrown: [188, 143, 143],
|
|
598
|
+
royalblue: [65, 105, 225],
|
|
599
|
+
saddlebrown: [139, 69, 19],
|
|
600
|
+
salmon: [250, 128, 114],
|
|
601
|
+
sandybrown: [244, 164, 96],
|
|
602
|
+
seagreen: [46, 139, 87],
|
|
603
|
+
seashell: [255, 245, 238],
|
|
604
|
+
sienna: [160, 82, 45],
|
|
605
|
+
silver: [192, 192, 192],
|
|
606
|
+
skyblue: [135, 206, 235],
|
|
607
|
+
slateblue: [106, 90, 205],
|
|
608
|
+
slategray: [112, 128, 144],
|
|
609
|
+
slategrey: [112, 128, 144],
|
|
610
|
+
snow: [255, 250, 250],
|
|
611
|
+
springgreen: [0, 255, 127],
|
|
612
|
+
steelblue: [70, 130, 180],
|
|
613
|
+
tan: [210, 180, 140],
|
|
614
|
+
teal: [0, 128, 128],
|
|
615
|
+
thistle: [216, 191, 216],
|
|
616
|
+
tomato: [255, 99, 71],
|
|
617
|
+
turquoise: [64, 224, 208],
|
|
618
|
+
violet: [238, 130, 238],
|
|
619
|
+
wheat: [245, 222, 179],
|
|
620
|
+
white: [255, 255, 255],
|
|
621
|
+
whitesmoke: [245, 245, 245],
|
|
622
|
+
yellow: [255, 255, 0],
|
|
623
|
+
yellowgreen: [154, 205, 50]
|
|
624
|
+
};
|
|
625
|
+
for (var key in colors) {
|
|
626
|
+
Object.freeze(colors[key]);
|
|
627
|
+
}
|
|
291
628
|
/* harmony default export */ __webpack_exports__["default"] = (Object.freeze(colors));
|
|
292
629
|
|
|
293
630
|
/***/ }),
|
|
@@ -303,238 +640,192 @@ for (const key in colors) Object.freeze(colors[key]);
|
|
|
303
640
|
__webpack_require__.r(__webpack_exports__);
|
|
304
641
|
/* harmony import */ var color_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! color-name */ "./node_modules/color-name/index.js");
|
|
305
642
|
|
|
306
|
-
|
|
307
|
-
const reverseNames = Object.create(null);
|
|
643
|
+
var reverseNames = Object.create(null);
|
|
308
644
|
|
|
309
645
|
// Create a list of reverse color names
|
|
310
|
-
for (
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
646
|
+
for (var name in color_name__WEBPACK_IMPORTED_MODULE_0__["default"]) {
|
|
647
|
+
if (Object.hasOwn(color_name__WEBPACK_IMPORTED_MODULE_0__["default"], name)) {
|
|
648
|
+
reverseNames[color_name__WEBPACK_IMPORTED_MODULE_0__["default"][name]] = name;
|
|
649
|
+
}
|
|
314
650
|
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
get: {},
|
|
651
|
+
var cs = {
|
|
652
|
+
to: {},
|
|
653
|
+
get: {}
|
|
319
654
|
};
|
|
320
|
-
|
|
321
655
|
cs.get = function (string) {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
656
|
+
var prefix = string.slice(0, 3).toLowerCase();
|
|
657
|
+
var value;
|
|
658
|
+
var model;
|
|
659
|
+
switch (prefix) {
|
|
660
|
+
case 'hsl':
|
|
661
|
+
{
|
|
662
|
+
value = cs.get.hsl(string);
|
|
663
|
+
model = 'hsl';
|
|
664
|
+
break;
|
|
665
|
+
}
|
|
666
|
+
case 'hwb':
|
|
667
|
+
{
|
|
668
|
+
value = cs.get.hwb(string);
|
|
669
|
+
model = 'hwb';
|
|
670
|
+
break;
|
|
671
|
+
}
|
|
672
|
+
default:
|
|
673
|
+
{
|
|
674
|
+
value = cs.get.rgb(string);
|
|
675
|
+
model = 'rgb';
|
|
676
|
+
break;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
if (!value) {
|
|
680
|
+
return null;
|
|
681
|
+
}
|
|
682
|
+
return {
|
|
683
|
+
model: model,
|
|
684
|
+
value: value
|
|
685
|
+
};
|
|
350
686
|
};
|
|
351
|
-
|
|
352
687
|
cs.get.rgb = function (string) {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
|
|
407
|
-
}
|
|
408
|
-
} else if (match = string.toLowerCase().match(keyword)) {
|
|
409
|
-
if (match[1] === 'transparent') {
|
|
410
|
-
return [0, 0, 0, 0];
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
if (!Object.hasOwn(color_name__WEBPACK_IMPORTED_MODULE_0__["default"], match[1])) {
|
|
414
|
-
return null;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
// eslint-disable-next-line unicorn/prefer-spread
|
|
418
|
-
rgb = color_name__WEBPACK_IMPORTED_MODULE_0__["default"][match[1]].slice();
|
|
419
|
-
rgb[3] = 1;
|
|
420
|
-
|
|
421
|
-
return rgb;
|
|
422
|
-
} else {
|
|
423
|
-
return null;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
for (i = 0; i < 3; i++) {
|
|
427
|
-
rgb[i] = clamp(rgb[i], 0, 255);
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
rgb[3] = clamp(rgb[3], 0, 1);
|
|
688
|
+
if (!string) {
|
|
689
|
+
return null;
|
|
690
|
+
}
|
|
691
|
+
var abbr = /^#([a-f\d]{3,4})$/i;
|
|
692
|
+
var hex = /^#([a-f\d]{6})([a-f\d]{2})?$/i;
|
|
693
|
+
var rgba = /^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i;
|
|
694
|
+
var per = /^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i;
|
|
695
|
+
var keyword = /^(\w+)$/;
|
|
696
|
+
var rgb = [0, 0, 0, 1];
|
|
697
|
+
var match;
|
|
698
|
+
var i;
|
|
699
|
+
var hexAlpha;
|
|
700
|
+
if (match = string.match(hex)) {
|
|
701
|
+
hexAlpha = match[2];
|
|
702
|
+
match = match[1];
|
|
703
|
+
for (i = 0; i < 3; i++) {
|
|
704
|
+
// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19
|
|
705
|
+
var i2 = i * 2;
|
|
706
|
+
rgb[i] = Number.parseInt(match.slice(i2, i2 + 2), 16);
|
|
707
|
+
}
|
|
708
|
+
if (hexAlpha) {
|
|
709
|
+
rgb[3] = Number.parseInt(hexAlpha, 16) / 255;
|
|
710
|
+
}
|
|
711
|
+
} else if (match = string.match(abbr)) {
|
|
712
|
+
match = match[1];
|
|
713
|
+
hexAlpha = match[3];
|
|
714
|
+
for (i = 0; i < 3; i++) {
|
|
715
|
+
rgb[i] = Number.parseInt(match[i] + match[i], 16);
|
|
716
|
+
}
|
|
717
|
+
if (hexAlpha) {
|
|
718
|
+
rgb[3] = Number.parseInt(hexAlpha + hexAlpha, 16) / 255;
|
|
719
|
+
}
|
|
720
|
+
} else if (match = string.match(rgba)) {
|
|
721
|
+
for (i = 0; i < 3; i++) {
|
|
722
|
+
rgb[i] = Number.parseFloat(match[i + 1]);
|
|
723
|
+
}
|
|
724
|
+
if (match[4]) {
|
|
725
|
+
rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
|
|
726
|
+
}
|
|
727
|
+
} else if (match = string.match(per)) {
|
|
728
|
+
for (i = 0; i < 3; i++) {
|
|
729
|
+
rgb[i] = Math.round(Number.parseFloat(match[i + 1]) * 2.55);
|
|
730
|
+
}
|
|
731
|
+
if (match[4]) {
|
|
732
|
+
rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
|
|
733
|
+
}
|
|
734
|
+
} else if (match = string.toLowerCase().match(keyword)) {
|
|
735
|
+
if (match[1] === 'transparent') {
|
|
736
|
+
return [0, 0, 0, 0];
|
|
737
|
+
}
|
|
738
|
+
if (!Object.hasOwn(color_name__WEBPACK_IMPORTED_MODULE_0__["default"], match[1])) {
|
|
739
|
+
return null;
|
|
740
|
+
}
|
|
431
741
|
|
|
432
|
-
|
|
742
|
+
// eslint-disable-next-line unicorn/prefer-spread
|
|
743
|
+
rgb = color_name__WEBPACK_IMPORTED_MODULE_0__["default"][match[1]].slice();
|
|
744
|
+
rgb[3] = 1;
|
|
745
|
+
return rgb;
|
|
746
|
+
} else {
|
|
747
|
+
return null;
|
|
748
|
+
}
|
|
749
|
+
for (i = 0; i < 3; i++) {
|
|
750
|
+
rgb[i] = clamp(rgb[i], 0, 255);
|
|
751
|
+
}
|
|
752
|
+
rgb[3] = clamp(rgb[3], 0, 1);
|
|
753
|
+
return rgb;
|
|
433
754
|
};
|
|
434
|
-
|
|
435
755
|
cs.get.hsl = function (string) {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
return [h, s, l, a];
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
return null;
|
|
756
|
+
if (!string) {
|
|
757
|
+
return null;
|
|
758
|
+
}
|
|
759
|
+
var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i;
|
|
760
|
+
var match = string.match(hsl);
|
|
761
|
+
if (match) {
|
|
762
|
+
var alpha = Number.parseFloat(match[4]);
|
|
763
|
+
var h = (Number.parseFloat(match[1]) % 360 + 360) % 360;
|
|
764
|
+
var s = clamp(Number.parseFloat(match[2]), 0, 100);
|
|
765
|
+
var l = clamp(Number.parseFloat(match[3]), 0, 100);
|
|
766
|
+
var a = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
|
|
767
|
+
return [h, s, l, a];
|
|
768
|
+
}
|
|
769
|
+
return null;
|
|
454
770
|
};
|
|
455
|
-
|
|
456
771
|
cs.get.hwb = function (string) {
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
return null;
|
|
772
|
+
if (!string) {
|
|
773
|
+
return null;
|
|
774
|
+
}
|
|
775
|
+
var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i;
|
|
776
|
+
var match = string.match(hwb);
|
|
777
|
+
if (match) {
|
|
778
|
+
var alpha = Number.parseFloat(match[4]);
|
|
779
|
+
var h = (Number.parseFloat(match[1]) % 360 + 360) % 360;
|
|
780
|
+
var w = clamp(Number.parseFloat(match[2]), 0, 100);
|
|
781
|
+
var b = clamp(Number.parseFloat(match[3]), 0, 100);
|
|
782
|
+
var a = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
|
|
783
|
+
return [h, w, b, a];
|
|
784
|
+
}
|
|
785
|
+
return null;
|
|
474
786
|
};
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
return (
|
|
478
|
-
'#' +
|
|
479
|
-
hexDouble(rgba[0]) +
|
|
480
|
-
hexDouble(rgba[1]) +
|
|
481
|
-
hexDouble(rgba[2]) +
|
|
482
|
-
(rgba[3] < 1
|
|
483
|
-
? (hexDouble(Math.round(rgba[3] * 255)))
|
|
484
|
-
: '')
|
|
485
|
-
);
|
|
787
|
+
cs.to.hex = function () {
|
|
788
|
+
return '#' + hexDouble(arguments.length <= 0 ? undefined : arguments[0]) + hexDouble(arguments.length <= 1 ? undefined : arguments[1]) + hexDouble(arguments.length <= 2 ? undefined : arguments[2]) + ((arguments.length <= 3 ? undefined : arguments[3]) < 1 ? hexDouble(Math.round((arguments.length <= 3 ? undefined : arguments[3]) * 255)) : '');
|
|
486
789
|
};
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
return rgba.length < 4 || rgba[3] === 1
|
|
490
|
-
? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'
|
|
491
|
-
: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';
|
|
790
|
+
cs.to.rgb = function () {
|
|
791
|
+
return arguments.length < 4 || (arguments.length <= 3 ? undefined : arguments[3]) === 1 ? 'rgb(' + Math.round(arguments.length <= 0 ? undefined : arguments[0]) + ', ' + Math.round(arguments.length <= 1 ? undefined : arguments[1]) + ', ' + Math.round(arguments.length <= 2 ? undefined : arguments[2]) + ')' : 'rgba(' + Math.round(arguments.length <= 0 ? undefined : arguments[0]) + ', ' + Math.round(arguments.length <= 1 ? undefined : arguments[1]) + ', ' + Math.round(arguments.length <= 2 ? undefined : arguments[2]) + ', ' + (arguments.length <= 3 ? undefined : arguments[3]) + ')';
|
|
492
792
|
};
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
return rgba.length < 4 || rgba[3] === 1
|
|
500
|
-
? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'
|
|
501
|
-
: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';
|
|
793
|
+
cs.to.rgb.percent = function () {
|
|
794
|
+
var r = Math.round((arguments.length <= 0 ? undefined : arguments[0]) / 255 * 100);
|
|
795
|
+
var g = Math.round((arguments.length <= 1 ? undefined : arguments[1]) / 255 * 100);
|
|
796
|
+
var b = Math.round((arguments.length <= 2 ? undefined : arguments[2]) / 255 * 100);
|
|
797
|
+
return arguments.length < 4 || (arguments.length <= 3 ? undefined : arguments[3]) === 1 ? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)' : 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + (arguments.length <= 3 ? undefined : arguments[3]) + ')';
|
|
502
798
|
};
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
return hsla.length < 4 || hsla[3] === 1
|
|
506
|
-
? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'
|
|
507
|
-
: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';
|
|
799
|
+
cs.to.hsl = function () {
|
|
800
|
+
return arguments.length < 4 || (arguments.length <= 3 ? undefined : arguments[3]) === 1 ? 'hsl(' + (arguments.length <= 0 ? undefined : arguments[0]) + ', ' + (arguments.length <= 1 ? undefined : arguments[1]) + '%, ' + (arguments.length <= 2 ? undefined : arguments[2]) + '%)' : 'hsla(' + (arguments.length <= 0 ? undefined : arguments[0]) + ', ' + (arguments.length <= 1 ? undefined : arguments[1]) + '%, ' + (arguments.length <= 2 ? undefined : arguments[2]) + '%, ' + (arguments.length <= 3 ? undefined : arguments[3]) + ')';
|
|
508
801
|
};
|
|
509
802
|
|
|
510
803
|
// Hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax
|
|
511
804
|
// (hwb have alpha optional & 1 is default value)
|
|
512
|
-
cs.to.hwb = function (
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';
|
|
805
|
+
cs.to.hwb = function () {
|
|
806
|
+
var a = '';
|
|
807
|
+
if (arguments.length >= 4 && (arguments.length <= 3 ? undefined : arguments[3]) !== 1) {
|
|
808
|
+
a = ', ' + (arguments.length <= 3 ? undefined : arguments[3]);
|
|
809
|
+
}
|
|
810
|
+
return 'hwb(' + (arguments.length <= 0 ? undefined : arguments[0]) + ', ' + (arguments.length <= 1 ? undefined : arguments[1]) + '%, ' + (arguments.length <= 2 ? undefined : arguments[2]) + '%' + a + ')';
|
|
519
811
|
};
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
812
|
+
cs.to.keyword = function () {
|
|
813
|
+
for (var _len = arguments.length, rgb = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
814
|
+
rgb[_key] = arguments[_key];
|
|
815
|
+
}
|
|
816
|
+
return reverseNames[rgb.slice(0, 3)];
|
|
523
817
|
};
|
|
524
818
|
|
|
525
819
|
// Helpers
|
|
526
820
|
function clamp(number_, min, max) {
|
|
527
|
-
|
|
821
|
+
return Math.min(Math.max(min, number_), max);
|
|
528
822
|
}
|
|
529
|
-
|
|
530
823
|
function hexDouble(number_) {
|
|
531
|
-
|
|
532
|
-
|
|
824
|
+
var string_ = Math.round(number_).toString(16).toUpperCase();
|
|
825
|
+
return string_.length < 2 ? '0' + string_ : string_;
|
|
533
826
|
}
|
|
534
|
-
|
|
535
827
|
/* harmony default export */ __webpack_exports__["default"] = (cs);
|
|
536
828
|
|
|
537
|
-
|
|
538
829
|
/***/ }),
|
|
539
830
|
|
|
540
831
|
/***/ "./node_modules/color/index.js":
|
|
@@ -9739,43 +10030,2876 @@ Color.extend(contrastMethods);
|
|
|
9739
10030
|
|
|
9740
10031
|
/***/ }),
|
|
9741
10032
|
|
|
9742
|
-
/***/ "./
|
|
9743
|
-
|
|
9744
|
-
!*** ./
|
|
9745
|
-
|
|
9746
|
-
/*!
|
|
9747
|
-
/***/ (function(module,
|
|
10033
|
+
/***/ "./node_modules/define-data-property/index.js":
|
|
10034
|
+
/*!****************************************************!*\
|
|
10035
|
+
!*** ./node_modules/define-data-property/index.js ***!
|
|
10036
|
+
\****************************************************/
|
|
10037
|
+
/*! no static exports found */
|
|
10038
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
9748
10039
|
|
|
9749
10040
|
"use strict";
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
|
|
9770
|
-
|
|
9771
|
-
|
|
9772
|
-
|
|
9773
|
-
|
|
9774
|
-
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
|
|
10041
|
+
|
|
10042
|
+
|
|
10043
|
+
var $defineProperty = __webpack_require__(/*! es-define-property */ "./node_modules/es-define-property/index.js");
|
|
10044
|
+
|
|
10045
|
+
var $SyntaxError = __webpack_require__(/*! es-errors/syntax */ "./node_modules/es-errors/syntax.js");
|
|
10046
|
+
var $TypeError = __webpack_require__(/*! es-errors/type */ "./node_modules/es-errors/type.js");
|
|
10047
|
+
|
|
10048
|
+
var gopd = __webpack_require__(/*! gopd */ "./node_modules/gopd/index.js");
|
|
10049
|
+
|
|
10050
|
+
/** @type {import('.')} */
|
|
10051
|
+
module.exports = function defineDataProperty(
|
|
10052
|
+
obj,
|
|
10053
|
+
property,
|
|
10054
|
+
value
|
|
10055
|
+
) {
|
|
10056
|
+
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
|
10057
|
+
throw new $TypeError('`obj` must be an object or a function`');
|
|
10058
|
+
}
|
|
10059
|
+
if (typeof property !== 'string' && typeof property !== 'symbol') {
|
|
10060
|
+
throw new $TypeError('`property` must be a string or a symbol`');
|
|
10061
|
+
}
|
|
10062
|
+
if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
|
|
10063
|
+
throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');
|
|
10064
|
+
}
|
|
10065
|
+
if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
|
|
10066
|
+
throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');
|
|
10067
|
+
}
|
|
10068
|
+
if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
|
|
10069
|
+
throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');
|
|
10070
|
+
}
|
|
10071
|
+
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
|
|
10072
|
+
throw new $TypeError('`loose`, if provided, must be a boolean');
|
|
10073
|
+
}
|
|
10074
|
+
|
|
10075
|
+
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
10076
|
+
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
10077
|
+
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
10078
|
+
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
10079
|
+
|
|
10080
|
+
/* @type {false | TypedPropertyDescriptor<unknown>} */
|
|
10081
|
+
var desc = !!gopd && gopd(obj, property);
|
|
10082
|
+
|
|
10083
|
+
if ($defineProperty) {
|
|
10084
|
+
$defineProperty(obj, property, {
|
|
10085
|
+
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
10086
|
+
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
10087
|
+
value: value,
|
|
10088
|
+
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
10089
|
+
});
|
|
10090
|
+
} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
|
|
10091
|
+
// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
|
|
10092
|
+
obj[property] = value; // eslint-disable-line no-param-reassign
|
|
10093
|
+
} else {
|
|
10094
|
+
throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
|
|
10095
|
+
}
|
|
10096
|
+
};
|
|
10097
|
+
|
|
10098
|
+
|
|
10099
|
+
/***/ }),
|
|
10100
|
+
|
|
10101
|
+
/***/ "./node_modules/define-properties/index.js":
|
|
10102
|
+
/*!*************************************************!*\
|
|
10103
|
+
!*** ./node_modules/define-properties/index.js ***!
|
|
10104
|
+
\*************************************************/
|
|
10105
|
+
/*! no static exports found */
|
|
10106
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10107
|
+
|
|
10108
|
+
"use strict";
|
|
10109
|
+
|
|
10110
|
+
|
|
10111
|
+
var keys = __webpack_require__(/*! object-keys */ "./node_modules/object-keys/index.js");
|
|
10112
|
+
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
|
10113
|
+
|
|
10114
|
+
var toStr = Object.prototype.toString;
|
|
10115
|
+
var concat = Array.prototype.concat;
|
|
10116
|
+
var defineDataProperty = __webpack_require__(/*! define-data-property */ "./node_modules/define-data-property/index.js");
|
|
10117
|
+
|
|
10118
|
+
var isFunction = function (fn) {
|
|
10119
|
+
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
|
|
10120
|
+
};
|
|
10121
|
+
|
|
10122
|
+
var supportsDescriptors = __webpack_require__(/*! has-property-descriptors */ "./node_modules/has-property-descriptors/index.js")();
|
|
10123
|
+
|
|
10124
|
+
var defineProperty = function (object, name, value, predicate) {
|
|
10125
|
+
if (name in object) {
|
|
10126
|
+
if (predicate === true) {
|
|
10127
|
+
if (object[name] === value) {
|
|
10128
|
+
return;
|
|
10129
|
+
}
|
|
10130
|
+
} else if (!isFunction(predicate) || !predicate()) {
|
|
10131
|
+
return;
|
|
10132
|
+
}
|
|
10133
|
+
}
|
|
10134
|
+
|
|
10135
|
+
if (supportsDescriptors) {
|
|
10136
|
+
defineDataProperty(object, name, value, true);
|
|
10137
|
+
} else {
|
|
10138
|
+
defineDataProperty(object, name, value);
|
|
10139
|
+
}
|
|
10140
|
+
};
|
|
10141
|
+
|
|
10142
|
+
var defineProperties = function (object, map) {
|
|
10143
|
+
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
10144
|
+
var props = keys(map);
|
|
10145
|
+
if (hasSymbols) {
|
|
10146
|
+
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
10147
|
+
}
|
|
10148
|
+
for (var i = 0; i < props.length; i += 1) {
|
|
10149
|
+
defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
|
|
10150
|
+
}
|
|
10151
|
+
};
|
|
10152
|
+
|
|
10153
|
+
defineProperties.supportsDescriptors = !!supportsDescriptors;
|
|
10154
|
+
|
|
10155
|
+
module.exports = defineProperties;
|
|
10156
|
+
|
|
10157
|
+
|
|
10158
|
+
/***/ }),
|
|
10159
|
+
|
|
10160
|
+
/***/ "./node_modules/dunder-proto/get.js":
|
|
10161
|
+
/*!******************************************!*\
|
|
10162
|
+
!*** ./node_modules/dunder-proto/get.js ***!
|
|
10163
|
+
\******************************************/
|
|
10164
|
+
/*! no static exports found */
|
|
10165
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10166
|
+
|
|
10167
|
+
"use strict";
|
|
10168
|
+
|
|
10169
|
+
|
|
10170
|
+
var callBind = __webpack_require__(/*! call-bind-apply-helpers */ "./node_modules/call-bind-apply-helpers/index.js");
|
|
10171
|
+
var gOPD = __webpack_require__(/*! gopd */ "./node_modules/gopd/index.js");
|
|
10172
|
+
|
|
10173
|
+
var hasProtoAccessor;
|
|
10174
|
+
try {
|
|
10175
|
+
// eslint-disable-next-line no-extra-parens, no-proto
|
|
10176
|
+
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
|
|
10177
|
+
} catch (e) {
|
|
10178
|
+
if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
|
|
10179
|
+
throw e;
|
|
10180
|
+
}
|
|
10181
|
+
}
|
|
10182
|
+
|
|
10183
|
+
// eslint-disable-next-line no-extra-parens
|
|
10184
|
+
var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
|
|
10185
|
+
|
|
10186
|
+
var $Object = Object;
|
|
10187
|
+
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
10188
|
+
|
|
10189
|
+
/** @type {import('./get')} */
|
|
10190
|
+
module.exports = desc && typeof desc.get === 'function'
|
|
10191
|
+
? callBind([desc.get])
|
|
10192
|
+
: typeof $getPrototypeOf === 'function'
|
|
10193
|
+
? /** @type {import('./get')} */ function getDunder(value) {
|
|
10194
|
+
// eslint-disable-next-line eqeqeq
|
|
10195
|
+
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
10196
|
+
}
|
|
10197
|
+
: false;
|
|
10198
|
+
|
|
10199
|
+
|
|
10200
|
+
/***/ }),
|
|
10201
|
+
|
|
10202
|
+
/***/ "./node_modules/es-abstract-get/GetMethod.js":
|
|
10203
|
+
/*!***************************************************!*\
|
|
10204
|
+
!*** ./node_modules/es-abstract-get/GetMethod.js ***!
|
|
10205
|
+
\***************************************************/
|
|
10206
|
+
/*! no static exports found */
|
|
10207
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10208
|
+
|
|
10209
|
+
"use strict";
|
|
10210
|
+
|
|
10211
|
+
|
|
10212
|
+
var $TypeError = __webpack_require__(/*! es-errors/type */ "./node_modules/es-errors/type.js");
|
|
10213
|
+
|
|
10214
|
+
var isCallable = __webpack_require__(/*! is-callable */ "./node_modules/is-callable/index.js");
|
|
10215
|
+
|
|
10216
|
+
var inspect = __webpack_require__(/*! object-inspect */ "./node_modules/object-inspect/index.js");
|
|
10217
|
+
|
|
10218
|
+
var GetV = __webpack_require__(/*! ./GetV */ "./node_modules/es-abstract-get/GetV.js");
|
|
10219
|
+
var isPropertyKey = __webpack_require__(/*! ./isPropertyKey */ "./node_modules/es-abstract-get/isPropertyKey.js");
|
|
10220
|
+
|
|
10221
|
+
// https://262.ecma-international.org/6.0/#sec-getmethod
|
|
10222
|
+
|
|
10223
|
+
/** @type {import('./GetMethod')} */
|
|
10224
|
+
module.exports = function GetMethod(O, P) {
|
|
10225
|
+
// 7.3.9.1
|
|
10226
|
+
if (!isPropertyKey(P)) {
|
|
10227
|
+
throw new $TypeError('Assertion failed: P is not a Property Key');
|
|
10228
|
+
}
|
|
10229
|
+
|
|
10230
|
+
// 7.3.9.2
|
|
10231
|
+
var func = GetV(O, P);
|
|
10232
|
+
|
|
10233
|
+
// 7.3.9.4
|
|
10234
|
+
if (func == null) {
|
|
10235
|
+
return void 0;
|
|
10236
|
+
}
|
|
10237
|
+
|
|
10238
|
+
// 7.3.9.5
|
|
10239
|
+
if (!isCallable(func)) {
|
|
10240
|
+
throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));
|
|
10241
|
+
}
|
|
10242
|
+
|
|
10243
|
+
// 7.3.9.6
|
|
10244
|
+
return func;
|
|
10245
|
+
};
|
|
10246
|
+
|
|
10247
|
+
|
|
10248
|
+
/***/ }),
|
|
10249
|
+
|
|
10250
|
+
/***/ "./node_modules/es-abstract-get/GetV.js":
|
|
10251
|
+
/*!**********************************************!*\
|
|
10252
|
+
!*** ./node_modules/es-abstract-get/GetV.js ***!
|
|
10253
|
+
\**********************************************/
|
|
10254
|
+
/*! no static exports found */
|
|
10255
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10256
|
+
|
|
10257
|
+
"use strict";
|
|
10258
|
+
|
|
10259
|
+
|
|
10260
|
+
var $TypeError = __webpack_require__(/*! es-errors/type */ "./node_modules/es-errors/type.js");
|
|
10261
|
+
|
|
10262
|
+
var inspect = __webpack_require__(/*! object-inspect */ "./node_modules/object-inspect/index.js");
|
|
10263
|
+
|
|
10264
|
+
var isPropertyKey = __webpack_require__(/*! ./isPropertyKey */ "./node_modules/es-abstract-get/isPropertyKey.js");
|
|
10265
|
+
|
|
10266
|
+
// https://262.ecma-international.org/6.0/#sec-getv
|
|
10267
|
+
|
|
10268
|
+
/** @type {import('./GetV')} */
|
|
10269
|
+
module.exports = function GetV(V, P) {
|
|
10270
|
+
// 7.3.2.1
|
|
10271
|
+
if (!isPropertyKey(P)) {
|
|
10272
|
+
throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
|
|
10273
|
+
}
|
|
10274
|
+
|
|
10275
|
+
// 7.3.2.2-3
|
|
10276
|
+
// var O = ToObject(V);
|
|
10277
|
+
|
|
10278
|
+
// 7.3.2.4
|
|
10279
|
+
return /** @type {Record<typeof P, unknown>} */ (V)[P]; // O.[[Get]](P, V)
|
|
10280
|
+
};
|
|
10281
|
+
|
|
10282
|
+
|
|
10283
|
+
/***/ }),
|
|
10284
|
+
|
|
10285
|
+
/***/ "./node_modules/es-abstract-get/isPropertyKey.js":
|
|
10286
|
+
/*!*******************************************************!*\
|
|
10287
|
+
!*** ./node_modules/es-abstract-get/isPropertyKey.js ***!
|
|
10288
|
+
\*******************************************************/
|
|
10289
|
+
/*! no static exports found */
|
|
10290
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10291
|
+
|
|
10292
|
+
"use strict";
|
|
10293
|
+
|
|
10294
|
+
|
|
10295
|
+
/** @type {import('./isPropertyKey')} */
|
|
10296
|
+
module.exports = function isPropertyKey(argument) {
|
|
10297
|
+
return typeof argument === 'string' || typeof argument === 'symbol';
|
|
10298
|
+
};
|
|
10299
|
+
|
|
10300
|
+
|
|
10301
|
+
/***/ }),
|
|
10302
|
+
|
|
10303
|
+
/***/ "./node_modules/es-abstract/2024/HasOwnProperty.js":
|
|
10304
|
+
/*!*********************************************************!*\
|
|
10305
|
+
!*** ./node_modules/es-abstract/2024/HasOwnProperty.js ***!
|
|
10306
|
+
\*********************************************************/
|
|
10307
|
+
/*! no static exports found */
|
|
10308
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10309
|
+
|
|
10310
|
+
"use strict";
|
|
10311
|
+
|
|
10312
|
+
|
|
10313
|
+
var $TypeError = __webpack_require__(/*! es-errors/type */ "./node_modules/es-errors/type.js");
|
|
10314
|
+
|
|
10315
|
+
var hasOwn = __webpack_require__(/*! hasown */ "./node_modules/hasown/index.js");
|
|
10316
|
+
var isObject = __webpack_require__(/*! es-object-atoms/isObject */ "./node_modules/es-object-atoms/isObject.js");
|
|
10317
|
+
|
|
10318
|
+
var isPropertyKey = __webpack_require__(/*! ../helpers/isPropertyKey */ "./node_modules/es-abstract/helpers/isPropertyKey.js");
|
|
10319
|
+
|
|
10320
|
+
// https://262.ecma-international.org/6.0/#sec-hasownproperty
|
|
10321
|
+
|
|
10322
|
+
module.exports = function HasOwnProperty(O, P) {
|
|
10323
|
+
if (!isObject(O)) {
|
|
10324
|
+
throw new $TypeError('Assertion failed: `O` must be an Object');
|
|
10325
|
+
}
|
|
10326
|
+
if (!isPropertyKey(P)) {
|
|
10327
|
+
throw new $TypeError('Assertion failed: `P` must be a Property Key');
|
|
10328
|
+
}
|
|
10329
|
+
return hasOwn(O, P);
|
|
10330
|
+
};
|
|
10331
|
+
|
|
10332
|
+
|
|
10333
|
+
/***/ }),
|
|
10334
|
+
|
|
10335
|
+
/***/ "./node_modules/es-abstract/2024/ToPrimitive.js":
|
|
10336
|
+
/*!******************************************************!*\
|
|
10337
|
+
!*** ./node_modules/es-abstract/2024/ToPrimitive.js ***!
|
|
10338
|
+
\******************************************************/
|
|
10339
|
+
/*! no static exports found */
|
|
10340
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10341
|
+
|
|
10342
|
+
"use strict";
|
|
10343
|
+
|
|
10344
|
+
|
|
10345
|
+
var toPrimitive = __webpack_require__(/*! es-to-primitive/es2015 */ "./node_modules/es-to-primitive/es2015.js");
|
|
10346
|
+
|
|
10347
|
+
// https://262.ecma-international.org/6.0/#sec-toprimitive
|
|
10348
|
+
|
|
10349
|
+
module.exports = function ToPrimitive(input) {
|
|
10350
|
+
if (arguments.length > 1) {
|
|
10351
|
+
return toPrimitive(input, arguments[1]);
|
|
10352
|
+
}
|
|
10353
|
+
return toPrimitive(input);
|
|
10354
|
+
};
|
|
10355
|
+
|
|
10356
|
+
|
|
10357
|
+
/***/ }),
|
|
10358
|
+
|
|
10359
|
+
/***/ "./node_modules/es-abstract/2024/ToPropertyKey.js":
|
|
10360
|
+
/*!********************************************************!*\
|
|
10361
|
+
!*** ./node_modules/es-abstract/2024/ToPropertyKey.js ***!
|
|
10362
|
+
\********************************************************/
|
|
10363
|
+
/*! no static exports found */
|
|
10364
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10365
|
+
|
|
10366
|
+
"use strict";
|
|
10367
|
+
|
|
10368
|
+
|
|
10369
|
+
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "./node_modules/get-intrinsic/index.js");
|
|
10370
|
+
|
|
10371
|
+
var $String = GetIntrinsic('%String%');
|
|
10372
|
+
|
|
10373
|
+
var ToPrimitive = __webpack_require__(/*! ./ToPrimitive */ "./node_modules/es-abstract/2024/ToPrimitive.js");
|
|
10374
|
+
var ToString = __webpack_require__(/*! ./ToString */ "./node_modules/es-abstract/2024/ToString.js");
|
|
10375
|
+
|
|
10376
|
+
// https://262.ecma-international.org/6.0/#sec-topropertykey
|
|
10377
|
+
|
|
10378
|
+
module.exports = function ToPropertyKey(argument) {
|
|
10379
|
+
var key = ToPrimitive(argument, $String);
|
|
10380
|
+
return typeof key === 'symbol' ? key : ToString(key);
|
|
10381
|
+
};
|
|
10382
|
+
|
|
10383
|
+
|
|
10384
|
+
/***/ }),
|
|
10385
|
+
|
|
10386
|
+
/***/ "./node_modules/es-abstract/2024/ToString.js":
|
|
10387
|
+
/*!***************************************************!*\
|
|
10388
|
+
!*** ./node_modules/es-abstract/2024/ToString.js ***!
|
|
10389
|
+
\***************************************************/
|
|
10390
|
+
/*! no static exports found */
|
|
10391
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10392
|
+
|
|
10393
|
+
"use strict";
|
|
10394
|
+
|
|
10395
|
+
|
|
10396
|
+
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "./node_modules/get-intrinsic/index.js");
|
|
10397
|
+
|
|
10398
|
+
var $String = GetIntrinsic('%String%');
|
|
10399
|
+
var $TypeError = __webpack_require__(/*! es-errors/type */ "./node_modules/es-errors/type.js");
|
|
10400
|
+
|
|
10401
|
+
// https://262.ecma-international.org/6.0/#sec-tostring
|
|
10402
|
+
|
|
10403
|
+
module.exports = function ToString(argument) {
|
|
10404
|
+
if (typeof argument === 'symbol') {
|
|
10405
|
+
throw new $TypeError('Cannot convert a Symbol value to a string');
|
|
10406
|
+
}
|
|
10407
|
+
return $String(argument);
|
|
10408
|
+
};
|
|
10409
|
+
|
|
10410
|
+
|
|
10411
|
+
/***/ }),
|
|
10412
|
+
|
|
10413
|
+
/***/ "./node_modules/es-abstract/helpers/isPropertyKey.js":
|
|
10414
|
+
/*!***********************************************************!*\
|
|
10415
|
+
!*** ./node_modules/es-abstract/helpers/isPropertyKey.js ***!
|
|
10416
|
+
\***********************************************************/
|
|
10417
|
+
/*! no static exports found */
|
|
10418
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10419
|
+
|
|
10420
|
+
"use strict";
|
|
10421
|
+
|
|
10422
|
+
|
|
10423
|
+
module.exports = function isPropertyKey(argument) {
|
|
10424
|
+
return typeof argument === 'string' || typeof argument === 'symbol';
|
|
10425
|
+
};
|
|
10426
|
+
|
|
10427
|
+
|
|
10428
|
+
/***/ }),
|
|
10429
|
+
|
|
10430
|
+
/***/ "./node_modules/es-define-property/index.js":
|
|
10431
|
+
/*!**************************************************!*\
|
|
10432
|
+
!*** ./node_modules/es-define-property/index.js ***!
|
|
10433
|
+
\**************************************************/
|
|
10434
|
+
/*! no static exports found */
|
|
10435
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10436
|
+
|
|
10437
|
+
"use strict";
|
|
10438
|
+
|
|
10439
|
+
|
|
10440
|
+
/** @type {import('.')} */
|
|
10441
|
+
var $defineProperty = Object.defineProperty || false;
|
|
10442
|
+
if ($defineProperty) {
|
|
10443
|
+
try {
|
|
10444
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
10445
|
+
} catch (e) {
|
|
10446
|
+
// IE 8 has a broken defineProperty
|
|
10447
|
+
$defineProperty = false;
|
|
10448
|
+
}
|
|
10449
|
+
}
|
|
10450
|
+
|
|
10451
|
+
module.exports = $defineProperty;
|
|
10452
|
+
|
|
10453
|
+
|
|
10454
|
+
/***/ }),
|
|
10455
|
+
|
|
10456
|
+
/***/ "./node_modules/es-errors/eval.js":
|
|
10457
|
+
/*!****************************************!*\
|
|
10458
|
+
!*** ./node_modules/es-errors/eval.js ***!
|
|
10459
|
+
\****************************************/
|
|
10460
|
+
/*! no static exports found */
|
|
10461
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10462
|
+
|
|
10463
|
+
"use strict";
|
|
10464
|
+
|
|
10465
|
+
|
|
10466
|
+
/** @type {import('./eval')} */
|
|
10467
|
+
module.exports = EvalError;
|
|
10468
|
+
|
|
10469
|
+
|
|
10470
|
+
/***/ }),
|
|
10471
|
+
|
|
10472
|
+
/***/ "./node_modules/es-errors/index.js":
|
|
10473
|
+
/*!*****************************************!*\
|
|
10474
|
+
!*** ./node_modules/es-errors/index.js ***!
|
|
10475
|
+
\*****************************************/
|
|
10476
|
+
/*! no static exports found */
|
|
10477
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10478
|
+
|
|
10479
|
+
"use strict";
|
|
10480
|
+
|
|
10481
|
+
|
|
10482
|
+
/** @type {import('.')} */
|
|
10483
|
+
module.exports = Error;
|
|
10484
|
+
|
|
10485
|
+
|
|
10486
|
+
/***/ }),
|
|
10487
|
+
|
|
10488
|
+
/***/ "./node_modules/es-errors/range.js":
|
|
10489
|
+
/*!*****************************************!*\
|
|
10490
|
+
!*** ./node_modules/es-errors/range.js ***!
|
|
10491
|
+
\*****************************************/
|
|
10492
|
+
/*! no static exports found */
|
|
10493
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10494
|
+
|
|
10495
|
+
"use strict";
|
|
10496
|
+
|
|
10497
|
+
|
|
10498
|
+
/** @type {import('./range')} */
|
|
10499
|
+
module.exports = RangeError;
|
|
10500
|
+
|
|
10501
|
+
|
|
10502
|
+
/***/ }),
|
|
10503
|
+
|
|
10504
|
+
/***/ "./node_modules/es-errors/ref.js":
|
|
10505
|
+
/*!***************************************!*\
|
|
10506
|
+
!*** ./node_modules/es-errors/ref.js ***!
|
|
10507
|
+
\***************************************/
|
|
10508
|
+
/*! no static exports found */
|
|
10509
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10510
|
+
|
|
10511
|
+
"use strict";
|
|
10512
|
+
|
|
10513
|
+
|
|
10514
|
+
/** @type {import('./ref')} */
|
|
10515
|
+
module.exports = ReferenceError;
|
|
10516
|
+
|
|
10517
|
+
|
|
10518
|
+
/***/ }),
|
|
10519
|
+
|
|
10520
|
+
/***/ "./node_modules/es-errors/syntax.js":
|
|
10521
|
+
/*!******************************************!*\
|
|
10522
|
+
!*** ./node_modules/es-errors/syntax.js ***!
|
|
10523
|
+
\******************************************/
|
|
10524
|
+
/*! no static exports found */
|
|
10525
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10526
|
+
|
|
10527
|
+
"use strict";
|
|
10528
|
+
|
|
10529
|
+
|
|
10530
|
+
/** @type {import('./syntax')} */
|
|
10531
|
+
module.exports = SyntaxError;
|
|
10532
|
+
|
|
10533
|
+
|
|
10534
|
+
/***/ }),
|
|
10535
|
+
|
|
10536
|
+
/***/ "./node_modules/es-errors/type.js":
|
|
10537
|
+
/*!****************************************!*\
|
|
10538
|
+
!*** ./node_modules/es-errors/type.js ***!
|
|
10539
|
+
\****************************************/
|
|
10540
|
+
/*! no static exports found */
|
|
10541
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10542
|
+
|
|
10543
|
+
"use strict";
|
|
10544
|
+
|
|
10545
|
+
|
|
10546
|
+
/** @type {import('./type')} */
|
|
10547
|
+
module.exports = TypeError;
|
|
10548
|
+
|
|
10549
|
+
|
|
10550
|
+
/***/ }),
|
|
10551
|
+
|
|
10552
|
+
/***/ "./node_modules/es-errors/uri.js":
|
|
10553
|
+
/*!***************************************!*\
|
|
10554
|
+
!*** ./node_modules/es-errors/uri.js ***!
|
|
10555
|
+
\***************************************/
|
|
10556
|
+
/*! no static exports found */
|
|
10557
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10558
|
+
|
|
10559
|
+
"use strict";
|
|
10560
|
+
|
|
10561
|
+
|
|
10562
|
+
/** @type {import('./uri')} */
|
|
10563
|
+
module.exports = URIError;
|
|
10564
|
+
|
|
10565
|
+
|
|
10566
|
+
/***/ }),
|
|
10567
|
+
|
|
10568
|
+
/***/ "./node_modules/es-object-atoms/RequireObjectCoercible.js":
|
|
10569
|
+
/*!****************************************************************!*\
|
|
10570
|
+
!*** ./node_modules/es-object-atoms/RequireObjectCoercible.js ***!
|
|
10571
|
+
\****************************************************************/
|
|
10572
|
+
/*! no static exports found */
|
|
10573
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10574
|
+
|
|
10575
|
+
"use strict";
|
|
10576
|
+
|
|
10577
|
+
|
|
10578
|
+
var $TypeError = __webpack_require__(/*! es-errors/type */ "./node_modules/es-errors/type.js");
|
|
10579
|
+
|
|
10580
|
+
/** @type {import('./RequireObjectCoercible')} */
|
|
10581
|
+
module.exports = function RequireObjectCoercible(value) {
|
|
10582
|
+
if (value == null) {
|
|
10583
|
+
throw new $TypeError((arguments.length > 0 && arguments[1]) || ('Cannot call method on ' + value));
|
|
10584
|
+
}
|
|
10585
|
+
return value;
|
|
10586
|
+
};
|
|
10587
|
+
|
|
10588
|
+
|
|
10589
|
+
/***/ }),
|
|
10590
|
+
|
|
10591
|
+
/***/ "./node_modules/es-object-atoms/ToObject.js":
|
|
10592
|
+
/*!**************************************************!*\
|
|
10593
|
+
!*** ./node_modules/es-object-atoms/ToObject.js ***!
|
|
10594
|
+
\**************************************************/
|
|
10595
|
+
/*! no static exports found */
|
|
10596
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10597
|
+
|
|
10598
|
+
"use strict";
|
|
10599
|
+
|
|
10600
|
+
|
|
10601
|
+
var $Object = __webpack_require__(/*! ./ */ "./node_modules/es-object-atoms/index.js");
|
|
10602
|
+
var RequireObjectCoercible = __webpack_require__(/*! ./RequireObjectCoercible */ "./node_modules/es-object-atoms/RequireObjectCoercible.js");
|
|
10603
|
+
|
|
10604
|
+
/** @type {import('./ToObject')} */
|
|
10605
|
+
module.exports = function ToObject(value) {
|
|
10606
|
+
RequireObjectCoercible(value);
|
|
10607
|
+
return $Object(value);
|
|
10608
|
+
};
|
|
10609
|
+
|
|
10610
|
+
|
|
10611
|
+
/***/ }),
|
|
10612
|
+
|
|
10613
|
+
/***/ "./node_modules/es-object-atoms/index.js":
|
|
10614
|
+
/*!***********************************************!*\
|
|
10615
|
+
!*** ./node_modules/es-object-atoms/index.js ***!
|
|
10616
|
+
\***********************************************/
|
|
10617
|
+
/*! no static exports found */
|
|
10618
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10619
|
+
|
|
10620
|
+
"use strict";
|
|
10621
|
+
|
|
10622
|
+
|
|
10623
|
+
/** @type {import('.')} */
|
|
10624
|
+
module.exports = Object;
|
|
10625
|
+
|
|
10626
|
+
|
|
10627
|
+
/***/ }),
|
|
10628
|
+
|
|
10629
|
+
/***/ "./node_modules/es-object-atoms/isObject.js":
|
|
10630
|
+
/*!**************************************************!*\
|
|
10631
|
+
!*** ./node_modules/es-object-atoms/isObject.js ***!
|
|
10632
|
+
\**************************************************/
|
|
10633
|
+
/*! no static exports found */
|
|
10634
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10635
|
+
|
|
10636
|
+
"use strict";
|
|
10637
|
+
|
|
10638
|
+
|
|
10639
|
+
/** @type {import('./isObject')} */
|
|
10640
|
+
module.exports = function isObject(x) {
|
|
10641
|
+
return !!x && (typeof x === 'function' || typeof x === 'object');
|
|
10642
|
+
};
|
|
10643
|
+
|
|
10644
|
+
|
|
10645
|
+
/***/ }),
|
|
10646
|
+
|
|
10647
|
+
/***/ "./node_modules/es-to-primitive/es2015.js":
|
|
10648
|
+
/*!************************************************!*\
|
|
10649
|
+
!*** ./node_modules/es-to-primitive/es2015.js ***!
|
|
10650
|
+
\************************************************/
|
|
10651
|
+
/*! no static exports found */
|
|
10652
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10653
|
+
|
|
10654
|
+
"use strict";
|
|
10655
|
+
|
|
10656
|
+
|
|
10657
|
+
var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';
|
|
10658
|
+
|
|
10659
|
+
var isCallable = __webpack_require__(/*! is-callable */ "./node_modules/is-callable/index.js");
|
|
10660
|
+
var isDate = __webpack_require__(/*! is-date-object */ "./node_modules/is-date-object/index.js");
|
|
10661
|
+
var isSymbol = __webpack_require__(/*! is-symbol */ "./node_modules/is-symbol/index.js");
|
|
10662
|
+
var $TypeError = __webpack_require__(/*! es-errors/type */ "./node_modules/es-errors/type.js");
|
|
10663
|
+
|
|
10664
|
+
var isPrimitive = __webpack_require__(/*! ./helpers/isPrimitive */ "./node_modules/es-to-primitive/helpers/isPrimitive.js");
|
|
10665
|
+
|
|
10666
|
+
/** @import { primitiveES6 } from './es2015' */
|
|
10667
|
+
|
|
10668
|
+
/** @type {(O: { valueOf?: () => unknown, toString?: () => unknown }, hint: 'number' | 'string') => primitiveES6} */
|
|
10669
|
+
function OrdinaryToPrimitive(O, hint) {
|
|
10670
|
+
if (typeof O === 'undefined' || O === null) {
|
|
10671
|
+
throw new $TypeError('Cannot call method on ' + O);
|
|
10672
|
+
}
|
|
10673
|
+
if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {
|
|
10674
|
+
throw new $TypeError('hint must be "string" or "number"');
|
|
10675
|
+
}
|
|
10676
|
+
/** @type {('toString' | 'valueOf')[]} */
|
|
10677
|
+
var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
|
|
10678
|
+
var method, result, i;
|
|
10679
|
+
for (i = 0; i < methodNames.length; ++i) {
|
|
10680
|
+
method = O[methodNames[i]];
|
|
10681
|
+
if (isCallable(method)) {
|
|
10682
|
+
result = method.call(O);
|
|
10683
|
+
if (isPrimitive(result)) {
|
|
10684
|
+
return /** @type {primitiveES6} */ (result);
|
|
10685
|
+
}
|
|
10686
|
+
}
|
|
10687
|
+
}
|
|
10688
|
+
throw new $TypeError('No default value');
|
|
10689
|
+
}
|
|
10690
|
+
|
|
10691
|
+
var GetMethod = __webpack_require__(/*! es-abstract-get/GetMethod */ "./node_modules/es-abstract-get/GetMethod.js");
|
|
10692
|
+
|
|
10693
|
+
/** @type {import('./es2015')} */
|
|
10694
|
+
// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive
|
|
10695
|
+
module.exports = function ToPrimitive(input) {
|
|
10696
|
+
if (isPrimitive(input)) {
|
|
10697
|
+
return /** @type {primitiveES6} */ (input);
|
|
10698
|
+
}
|
|
10699
|
+
/** @type {'default' | 'string' | 'number'} */
|
|
10700
|
+
var hint = 'default';
|
|
10701
|
+
if (arguments.length > 1) {
|
|
10702
|
+
if (arguments[1] === String) {
|
|
10703
|
+
hint = 'string';
|
|
10704
|
+
} else if (arguments[1] === Number) {
|
|
10705
|
+
hint = 'number';
|
|
10706
|
+
}
|
|
10707
|
+
}
|
|
10708
|
+
|
|
10709
|
+
var exoticToPrim;
|
|
10710
|
+
if (hasSymbols) {
|
|
10711
|
+
if (Symbol.toPrimitive) {
|
|
10712
|
+
|
|
10713
|
+
exoticToPrim = GetMethod(
|
|
10714
|
+
/** @type {{ [k in SymbolConstructor['toPrimitive']]?: Function }} */
|
|
10715
|
+
(input),
|
|
10716
|
+
Symbol.toPrimitive
|
|
10717
|
+
);
|
|
10718
|
+
} else if (isSymbol(input)) {
|
|
10719
|
+
exoticToPrim = Symbol.prototype.valueOf;
|
|
10720
|
+
}
|
|
10721
|
+
}
|
|
10722
|
+
if (typeof exoticToPrim !== 'undefined') {
|
|
10723
|
+
var result = exoticToPrim.call(input, hint);
|
|
10724
|
+
if (isPrimitive(result)) {
|
|
10725
|
+
return /** @type {primitiveES6} */ (result);
|
|
10726
|
+
}
|
|
10727
|
+
throw new $TypeError('unable to convert exotic object to primitive');
|
|
10728
|
+
}
|
|
10729
|
+
if (hint === 'default' && (isDate(input) || isSymbol(input))) {
|
|
10730
|
+
hint = /** @type {const} */ ('string');
|
|
10731
|
+
}
|
|
10732
|
+
|
|
10733
|
+
return OrdinaryToPrimitive(input, hint === 'default' ? 'number' : hint);
|
|
10734
|
+
};
|
|
10735
|
+
|
|
10736
|
+
|
|
10737
|
+
/***/ }),
|
|
10738
|
+
|
|
10739
|
+
/***/ "./node_modules/es-to-primitive/helpers/isPrimitive.js":
|
|
10740
|
+
/*!*************************************************************!*\
|
|
10741
|
+
!*** ./node_modules/es-to-primitive/helpers/isPrimitive.js ***!
|
|
10742
|
+
\*************************************************************/
|
|
10743
|
+
/*! no static exports found */
|
|
10744
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10745
|
+
|
|
10746
|
+
"use strict";
|
|
10747
|
+
|
|
10748
|
+
|
|
10749
|
+
/** @import { primitive } from '../' */
|
|
10750
|
+
/** @import { primitiveES5 } from '../es5' */
|
|
10751
|
+
|
|
10752
|
+
/** @type {<T extends primitive | primitiveES5>(value: unknown) => value is T} */
|
|
10753
|
+
module.exports = function isPrimitive(value) {
|
|
10754
|
+
return value === null || (typeof value !== 'function' && typeof value !== 'object');
|
|
10755
|
+
};
|
|
10756
|
+
|
|
10757
|
+
|
|
10758
|
+
/***/ }),
|
|
10759
|
+
|
|
10760
|
+
/***/ "./node_modules/function-bind/implementation.js":
|
|
10761
|
+
/*!******************************************************!*\
|
|
10762
|
+
!*** ./node_modules/function-bind/implementation.js ***!
|
|
10763
|
+
\******************************************************/
|
|
10764
|
+
/*! no static exports found */
|
|
10765
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10766
|
+
|
|
10767
|
+
"use strict";
|
|
10768
|
+
|
|
10769
|
+
|
|
10770
|
+
/* eslint no-invalid-this: 1 */
|
|
10771
|
+
|
|
10772
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
10773
|
+
var toStr = Object.prototype.toString;
|
|
10774
|
+
var max = Math.max;
|
|
10775
|
+
var funcType = '[object Function]';
|
|
10776
|
+
|
|
10777
|
+
var concatty = function concatty(a, b) {
|
|
10778
|
+
var arr = [];
|
|
10779
|
+
|
|
10780
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
10781
|
+
arr[i] = a[i];
|
|
10782
|
+
}
|
|
10783
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
10784
|
+
arr[j + a.length] = b[j];
|
|
10785
|
+
}
|
|
10786
|
+
|
|
10787
|
+
return arr;
|
|
10788
|
+
};
|
|
10789
|
+
|
|
10790
|
+
var slicy = function slicy(arrLike, offset) {
|
|
10791
|
+
var arr = [];
|
|
10792
|
+
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
10793
|
+
arr[j] = arrLike[i];
|
|
10794
|
+
}
|
|
10795
|
+
return arr;
|
|
10796
|
+
};
|
|
10797
|
+
|
|
10798
|
+
var joiny = function (arr, joiner) {
|
|
10799
|
+
var str = '';
|
|
10800
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
10801
|
+
str += arr[i];
|
|
10802
|
+
if (i + 1 < arr.length) {
|
|
10803
|
+
str += joiner;
|
|
10804
|
+
}
|
|
10805
|
+
}
|
|
10806
|
+
return str;
|
|
10807
|
+
};
|
|
10808
|
+
|
|
10809
|
+
module.exports = function bind(that) {
|
|
10810
|
+
var target = this;
|
|
10811
|
+
if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
|
|
10812
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
10813
|
+
}
|
|
10814
|
+
var args = slicy(arguments, 1);
|
|
10815
|
+
|
|
10816
|
+
var bound;
|
|
10817
|
+
var binder = function () {
|
|
10818
|
+
if (this instanceof bound) {
|
|
10819
|
+
var result = target.apply(
|
|
10820
|
+
this,
|
|
10821
|
+
concatty(args, arguments)
|
|
10822
|
+
);
|
|
10823
|
+
if (Object(result) === result) {
|
|
10824
|
+
return result;
|
|
10825
|
+
}
|
|
10826
|
+
return this;
|
|
10827
|
+
}
|
|
10828
|
+
return target.apply(
|
|
10829
|
+
that,
|
|
10830
|
+
concatty(args, arguments)
|
|
10831
|
+
);
|
|
10832
|
+
|
|
10833
|
+
};
|
|
10834
|
+
|
|
10835
|
+
var boundLength = max(0, target.length - args.length);
|
|
10836
|
+
var boundArgs = [];
|
|
10837
|
+
for (var i = 0; i < boundLength; i++) {
|
|
10838
|
+
boundArgs[i] = '$' + i;
|
|
10839
|
+
}
|
|
10840
|
+
|
|
10841
|
+
bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
10842
|
+
|
|
10843
|
+
if (target.prototype) {
|
|
10844
|
+
var Empty = function Empty() {};
|
|
10845
|
+
Empty.prototype = target.prototype;
|
|
10846
|
+
bound.prototype = new Empty();
|
|
10847
|
+
Empty.prototype = null;
|
|
10848
|
+
}
|
|
10849
|
+
|
|
10850
|
+
return bound;
|
|
10851
|
+
};
|
|
10852
|
+
|
|
10853
|
+
|
|
10854
|
+
/***/ }),
|
|
10855
|
+
|
|
10856
|
+
/***/ "./node_modules/function-bind/index.js":
|
|
10857
|
+
/*!*********************************************!*\
|
|
10858
|
+
!*** ./node_modules/function-bind/index.js ***!
|
|
10859
|
+
\*********************************************/
|
|
10860
|
+
/*! no static exports found */
|
|
10861
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10862
|
+
|
|
10863
|
+
"use strict";
|
|
10864
|
+
|
|
10865
|
+
|
|
10866
|
+
var implementation = __webpack_require__(/*! ./implementation */ "./node_modules/function-bind/implementation.js");
|
|
10867
|
+
|
|
10868
|
+
module.exports = Function.prototype.bind || implementation;
|
|
10869
|
+
|
|
10870
|
+
|
|
10871
|
+
/***/ }),
|
|
10872
|
+
|
|
10873
|
+
/***/ "./node_modules/get-intrinsic/index.js":
|
|
10874
|
+
/*!*********************************************!*\
|
|
10875
|
+
!*** ./node_modules/get-intrinsic/index.js ***!
|
|
10876
|
+
\*********************************************/
|
|
10877
|
+
/*! no static exports found */
|
|
10878
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10879
|
+
|
|
10880
|
+
"use strict";
|
|
10881
|
+
|
|
10882
|
+
|
|
10883
|
+
var undefined;
|
|
10884
|
+
|
|
10885
|
+
var $Object = __webpack_require__(/*! es-object-atoms */ "./node_modules/es-object-atoms/index.js");
|
|
10886
|
+
|
|
10887
|
+
var $Error = __webpack_require__(/*! es-errors */ "./node_modules/es-errors/index.js");
|
|
10888
|
+
var $EvalError = __webpack_require__(/*! es-errors/eval */ "./node_modules/es-errors/eval.js");
|
|
10889
|
+
var $RangeError = __webpack_require__(/*! es-errors/range */ "./node_modules/es-errors/range.js");
|
|
10890
|
+
var $ReferenceError = __webpack_require__(/*! es-errors/ref */ "./node_modules/es-errors/ref.js");
|
|
10891
|
+
var $SyntaxError = __webpack_require__(/*! es-errors/syntax */ "./node_modules/es-errors/syntax.js");
|
|
10892
|
+
var $TypeError = __webpack_require__(/*! es-errors/type */ "./node_modules/es-errors/type.js");
|
|
10893
|
+
var $URIError = __webpack_require__(/*! es-errors/uri */ "./node_modules/es-errors/uri.js");
|
|
10894
|
+
|
|
10895
|
+
var abs = __webpack_require__(/*! math-intrinsics/abs */ "./node_modules/math-intrinsics/abs.js");
|
|
10896
|
+
var floor = __webpack_require__(/*! math-intrinsics/floor */ "./node_modules/math-intrinsics/floor.js");
|
|
10897
|
+
var max = __webpack_require__(/*! math-intrinsics/max */ "./node_modules/math-intrinsics/max.js");
|
|
10898
|
+
var min = __webpack_require__(/*! math-intrinsics/min */ "./node_modules/math-intrinsics/min.js");
|
|
10899
|
+
var pow = __webpack_require__(/*! math-intrinsics/pow */ "./node_modules/math-intrinsics/pow.js");
|
|
10900
|
+
var round = __webpack_require__(/*! math-intrinsics/round */ "./node_modules/math-intrinsics/round.js");
|
|
10901
|
+
var sign = __webpack_require__(/*! math-intrinsics/sign */ "./node_modules/math-intrinsics/sign.js");
|
|
10902
|
+
|
|
10903
|
+
var $Function = Function;
|
|
10904
|
+
|
|
10905
|
+
// eslint-disable-next-line consistent-return
|
|
10906
|
+
var getEvalledConstructor = function (expressionSyntax) {
|
|
10907
|
+
try {
|
|
10908
|
+
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
10909
|
+
} catch (e) {}
|
|
10910
|
+
};
|
|
10911
|
+
|
|
10912
|
+
var $gOPD = __webpack_require__(/*! gopd */ "./node_modules/gopd/index.js");
|
|
10913
|
+
var $defineProperty = __webpack_require__(/*! es-define-property */ "./node_modules/es-define-property/index.js");
|
|
10914
|
+
|
|
10915
|
+
var throwTypeError = function () {
|
|
10916
|
+
throw new $TypeError();
|
|
10917
|
+
};
|
|
10918
|
+
var ThrowTypeError = $gOPD
|
|
10919
|
+
? (function () {
|
|
10920
|
+
try {
|
|
10921
|
+
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
10922
|
+
arguments.callee; // IE 8 does not throw here
|
|
10923
|
+
return throwTypeError;
|
|
10924
|
+
} catch (calleeThrows) {
|
|
10925
|
+
try {
|
|
10926
|
+
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
10927
|
+
return $gOPD(arguments, 'callee').get;
|
|
10928
|
+
} catch (gOPDthrows) {
|
|
10929
|
+
return throwTypeError;
|
|
10930
|
+
}
|
|
10931
|
+
}
|
|
10932
|
+
}())
|
|
10933
|
+
: throwTypeError;
|
|
10934
|
+
|
|
10935
|
+
var hasSymbols = __webpack_require__(/*! has-symbols */ "./node_modules/has-symbols/index.js")();
|
|
10936
|
+
|
|
10937
|
+
var getProto = __webpack_require__(/*! get-proto */ "./node_modules/get-proto/index.js");
|
|
10938
|
+
var $ObjectGPO = __webpack_require__(/*! get-proto/Object.getPrototypeOf */ "./node_modules/get-proto/Object.getPrototypeOf.js");
|
|
10939
|
+
var $ReflectGPO = __webpack_require__(/*! get-proto/Reflect.getPrototypeOf */ "./node_modules/get-proto/Reflect.getPrototypeOf.js");
|
|
10940
|
+
|
|
10941
|
+
var $apply = __webpack_require__(/*! call-bind-apply-helpers/functionApply */ "./node_modules/call-bind-apply-helpers/functionApply.js");
|
|
10942
|
+
var $call = __webpack_require__(/*! call-bind-apply-helpers/functionCall */ "./node_modules/call-bind-apply-helpers/functionCall.js");
|
|
10943
|
+
|
|
10944
|
+
var needsEval = {};
|
|
10945
|
+
|
|
10946
|
+
var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);
|
|
10947
|
+
|
|
10948
|
+
var INTRINSICS = {
|
|
10949
|
+
__proto__: null,
|
|
10950
|
+
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
|
|
10951
|
+
'%Array%': Array,
|
|
10952
|
+
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
|
|
10953
|
+
'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,
|
|
10954
|
+
'%AsyncFromSyncIteratorPrototype%': undefined,
|
|
10955
|
+
'%AsyncFunction%': needsEval,
|
|
10956
|
+
'%AsyncGenerator%': needsEval,
|
|
10957
|
+
'%AsyncGeneratorFunction%': needsEval,
|
|
10958
|
+
'%AsyncIteratorPrototype%': needsEval,
|
|
10959
|
+
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
|
|
10960
|
+
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
|
|
10961
|
+
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,
|
|
10962
|
+
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,
|
|
10963
|
+
'%Boolean%': Boolean,
|
|
10964
|
+
'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
|
|
10965
|
+
'%Date%': Date,
|
|
10966
|
+
'%decodeURI%': decodeURI,
|
|
10967
|
+
'%decodeURIComponent%': decodeURIComponent,
|
|
10968
|
+
'%encodeURI%': encodeURI,
|
|
10969
|
+
'%encodeURIComponent%': encodeURIComponent,
|
|
10970
|
+
'%Error%': $Error,
|
|
10971
|
+
'%eval%': eval, // eslint-disable-line no-eval
|
|
10972
|
+
'%EvalError%': $EvalError,
|
|
10973
|
+
'%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array,
|
|
10974
|
+
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
|
|
10975
|
+
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
|
|
10976
|
+
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
|
|
10977
|
+
'%Function%': $Function,
|
|
10978
|
+
'%GeneratorFunction%': needsEval,
|
|
10979
|
+
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
|
|
10980
|
+
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
|
|
10981
|
+
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
|
|
10982
|
+
'%isFinite%': isFinite,
|
|
10983
|
+
'%isNaN%': isNaN,
|
|
10984
|
+
'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,
|
|
10985
|
+
'%JSON%': typeof JSON === 'object' ? JSON : undefined,
|
|
10986
|
+
'%Map%': typeof Map === 'undefined' ? undefined : Map,
|
|
10987
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),
|
|
10988
|
+
'%Math%': Math,
|
|
10989
|
+
'%Number%': Number,
|
|
10990
|
+
'%Object%': $Object,
|
|
10991
|
+
'%Object.getOwnPropertyDescriptor%': $gOPD,
|
|
10992
|
+
'%parseFloat%': parseFloat,
|
|
10993
|
+
'%parseInt%': parseInt,
|
|
10994
|
+
'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
|
|
10995
|
+
'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
|
|
10996
|
+
'%RangeError%': $RangeError,
|
|
10997
|
+
'%ReferenceError%': $ReferenceError,
|
|
10998
|
+
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
|
|
10999
|
+
'%RegExp%': RegExp,
|
|
11000
|
+
'%Set%': typeof Set === 'undefined' ? undefined : Set,
|
|
11001
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),
|
|
11002
|
+
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
|
|
11003
|
+
'%String%': String,
|
|
11004
|
+
'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,
|
|
11005
|
+
'%Symbol%': hasSymbols ? Symbol : undefined,
|
|
11006
|
+
'%SyntaxError%': $SyntaxError,
|
|
11007
|
+
'%ThrowTypeError%': ThrowTypeError,
|
|
11008
|
+
'%TypedArray%': TypedArray,
|
|
11009
|
+
'%TypeError%': $TypeError,
|
|
11010
|
+
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
|
|
11011
|
+
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
|
|
11012
|
+
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
|
|
11013
|
+
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
|
|
11014
|
+
'%URIError%': $URIError,
|
|
11015
|
+
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
|
|
11016
|
+
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
|
|
11017
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,
|
|
11018
|
+
|
|
11019
|
+
'%Function.prototype.call%': $call,
|
|
11020
|
+
'%Function.prototype.apply%': $apply,
|
|
11021
|
+
'%Object.defineProperty%': $defineProperty,
|
|
11022
|
+
'%Object.getPrototypeOf%': $ObjectGPO,
|
|
11023
|
+
'%Math.abs%': abs,
|
|
11024
|
+
'%Math.floor%': floor,
|
|
11025
|
+
'%Math.max%': max,
|
|
11026
|
+
'%Math.min%': min,
|
|
11027
|
+
'%Math.pow%': pow,
|
|
11028
|
+
'%Math.round%': round,
|
|
11029
|
+
'%Math.sign%': sign,
|
|
11030
|
+
'%Reflect.getPrototypeOf%': $ReflectGPO
|
|
11031
|
+
};
|
|
11032
|
+
|
|
11033
|
+
if (getProto) {
|
|
11034
|
+
try {
|
|
11035
|
+
null.error; // eslint-disable-line no-unused-expressions
|
|
11036
|
+
} catch (e) {
|
|
11037
|
+
// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
|
|
11038
|
+
var errorProto = getProto(getProto(e));
|
|
11039
|
+
INTRINSICS['%Error.prototype%'] = errorProto;
|
|
11040
|
+
}
|
|
11041
|
+
}
|
|
11042
|
+
|
|
11043
|
+
var doEval = function doEval(name) {
|
|
11044
|
+
var value;
|
|
11045
|
+
if (name === '%AsyncFunction%') {
|
|
11046
|
+
value = getEvalledConstructor('async function () {}');
|
|
11047
|
+
} else if (name === '%GeneratorFunction%') {
|
|
11048
|
+
value = getEvalledConstructor('function* () {}');
|
|
11049
|
+
} else if (name === '%AsyncGeneratorFunction%') {
|
|
11050
|
+
value = getEvalledConstructor('async function* () {}');
|
|
11051
|
+
} else if (name === '%AsyncGenerator%') {
|
|
11052
|
+
var fn = doEval('%AsyncGeneratorFunction%');
|
|
11053
|
+
if (fn) {
|
|
11054
|
+
value = fn.prototype;
|
|
11055
|
+
}
|
|
11056
|
+
} else if (name === '%AsyncIteratorPrototype%') {
|
|
11057
|
+
var gen = doEval('%AsyncGenerator%');
|
|
11058
|
+
if (gen && getProto) {
|
|
11059
|
+
value = getProto(gen.prototype);
|
|
11060
|
+
}
|
|
11061
|
+
}
|
|
11062
|
+
|
|
11063
|
+
INTRINSICS[name] = value;
|
|
11064
|
+
|
|
11065
|
+
return value;
|
|
11066
|
+
};
|
|
11067
|
+
|
|
11068
|
+
var LEGACY_ALIASES = {
|
|
11069
|
+
__proto__: null,
|
|
11070
|
+
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
11071
|
+
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
11072
|
+
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
11073
|
+
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
11074
|
+
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
11075
|
+
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
11076
|
+
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
11077
|
+
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
11078
|
+
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
11079
|
+
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
11080
|
+
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
11081
|
+
'%DatePrototype%': ['Date', 'prototype'],
|
|
11082
|
+
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
11083
|
+
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
11084
|
+
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
11085
|
+
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
11086
|
+
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
11087
|
+
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
11088
|
+
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
11089
|
+
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
11090
|
+
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
11091
|
+
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
11092
|
+
'%JSONParse%': ['JSON', 'parse'],
|
|
11093
|
+
'%JSONStringify%': ['JSON', 'stringify'],
|
|
11094
|
+
'%MapPrototype%': ['Map', 'prototype'],
|
|
11095
|
+
'%NumberPrototype%': ['Number', 'prototype'],
|
|
11096
|
+
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
11097
|
+
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
11098
|
+
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
11099
|
+
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
11100
|
+
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
11101
|
+
'%Promise_all%': ['Promise', 'all'],
|
|
11102
|
+
'%Promise_reject%': ['Promise', 'reject'],
|
|
11103
|
+
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
11104
|
+
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
11105
|
+
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
11106
|
+
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
11107
|
+
'%SetPrototype%': ['Set', 'prototype'],
|
|
11108
|
+
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
11109
|
+
'%StringPrototype%': ['String', 'prototype'],
|
|
11110
|
+
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
11111
|
+
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
11112
|
+
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
11113
|
+
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
11114
|
+
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
11115
|
+
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
11116
|
+
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
11117
|
+
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
11118
|
+
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
11119
|
+
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
11120
|
+
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
11121
|
+
};
|
|
11122
|
+
|
|
11123
|
+
var bind = __webpack_require__(/*! function-bind */ "./node_modules/function-bind/index.js");
|
|
11124
|
+
var hasOwn = __webpack_require__(/*! hasown */ "./node_modules/hasown/index.js");
|
|
11125
|
+
var $concat = bind.call($call, Array.prototype.concat);
|
|
11126
|
+
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
11127
|
+
var $replace = bind.call($call, String.prototype.replace);
|
|
11128
|
+
var $strSlice = bind.call($call, String.prototype.slice);
|
|
11129
|
+
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
11130
|
+
|
|
11131
|
+
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
11132
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
11133
|
+
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
11134
|
+
var stringToPath = function stringToPath(string) {
|
|
11135
|
+
var first = $strSlice(string, 0, 1);
|
|
11136
|
+
var last = $strSlice(string, -1);
|
|
11137
|
+
if (first === '%' && last !== '%') {
|
|
11138
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
|
11139
|
+
} else if (last === '%' && first !== '%') {
|
|
11140
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
|
11141
|
+
}
|
|
11142
|
+
var result = [];
|
|
11143
|
+
$replace(string, rePropName, function (match, number, quote, subString) {
|
|
11144
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
|
11145
|
+
});
|
|
11146
|
+
return result;
|
|
11147
|
+
};
|
|
11148
|
+
/* end adaptation */
|
|
11149
|
+
|
|
11150
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
11151
|
+
var intrinsicName = name;
|
|
11152
|
+
var alias;
|
|
11153
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
11154
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
11155
|
+
intrinsicName = '%' + alias[0] + '%';
|
|
11156
|
+
}
|
|
11157
|
+
|
|
11158
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
11159
|
+
var value = INTRINSICS[intrinsicName];
|
|
11160
|
+
if (value === needsEval) {
|
|
11161
|
+
value = doEval(intrinsicName);
|
|
11162
|
+
}
|
|
11163
|
+
if (typeof value === 'undefined' && !allowMissing) {
|
|
11164
|
+
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
11165
|
+
}
|
|
11166
|
+
|
|
11167
|
+
return {
|
|
11168
|
+
alias: alias,
|
|
11169
|
+
name: intrinsicName,
|
|
11170
|
+
value: value
|
|
11171
|
+
};
|
|
11172
|
+
}
|
|
11173
|
+
|
|
11174
|
+
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
|
11175
|
+
};
|
|
11176
|
+
|
|
11177
|
+
module.exports = function GetIntrinsic(name, allowMissing) {
|
|
11178
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
11179
|
+
throw new $TypeError('intrinsic name must be a non-empty string');
|
|
11180
|
+
}
|
|
11181
|
+
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
11182
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
11183
|
+
}
|
|
11184
|
+
|
|
11185
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
11186
|
+
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
11187
|
+
}
|
|
11188
|
+
var parts = stringToPath(name);
|
|
11189
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
11190
|
+
|
|
11191
|
+
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
11192
|
+
var intrinsicRealName = intrinsic.name;
|
|
11193
|
+
var value = intrinsic.value;
|
|
11194
|
+
var skipFurtherCaching = false;
|
|
11195
|
+
|
|
11196
|
+
var alias = intrinsic.alias;
|
|
11197
|
+
if (alias) {
|
|
11198
|
+
intrinsicBaseName = alias[0];
|
|
11199
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
11200
|
+
}
|
|
11201
|
+
|
|
11202
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
11203
|
+
var part = parts[i];
|
|
11204
|
+
var first = $strSlice(part, 0, 1);
|
|
11205
|
+
var last = $strSlice(part, -1);
|
|
11206
|
+
if (
|
|
11207
|
+
(
|
|
11208
|
+
(first === '"' || first === "'" || first === '`')
|
|
11209
|
+
|| (last === '"' || last === "'" || last === '`')
|
|
11210
|
+
)
|
|
11211
|
+
&& first !== last
|
|
11212
|
+
) {
|
|
11213
|
+
throw new $SyntaxError('property names with quotes must have matching quotes');
|
|
11214
|
+
}
|
|
11215
|
+
if (part === 'constructor' || !isOwn) {
|
|
11216
|
+
skipFurtherCaching = true;
|
|
11217
|
+
}
|
|
11218
|
+
|
|
11219
|
+
intrinsicBaseName += '.' + part;
|
|
11220
|
+
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
11221
|
+
|
|
11222
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
11223
|
+
value = INTRINSICS[intrinsicRealName];
|
|
11224
|
+
} else if (value != null) {
|
|
11225
|
+
if (!(part in value)) {
|
|
11226
|
+
if (!allowMissing) {
|
|
11227
|
+
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
11228
|
+
}
|
|
11229
|
+
return void undefined;
|
|
11230
|
+
}
|
|
11231
|
+
if ($gOPD && (i + 1) >= parts.length) {
|
|
11232
|
+
var desc = $gOPD(value, part);
|
|
11233
|
+
isOwn = !!desc;
|
|
11234
|
+
|
|
11235
|
+
// By convention, when a data property is converted to an accessor
|
|
11236
|
+
// property to emulate a data property that does not suffer from
|
|
11237
|
+
// the override mistake, that accessor's getter is marked with
|
|
11238
|
+
// an `originalValue` property. Here, when we detect this, we
|
|
11239
|
+
// uphold the illusion by pretending to see that original data
|
|
11240
|
+
// property, i.e., returning the value rather than the getter
|
|
11241
|
+
// itself.
|
|
11242
|
+
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
11243
|
+
value = desc.get;
|
|
11244
|
+
} else {
|
|
11245
|
+
value = value[part];
|
|
11246
|
+
}
|
|
11247
|
+
} else {
|
|
11248
|
+
isOwn = hasOwn(value, part);
|
|
11249
|
+
value = value[part];
|
|
11250
|
+
}
|
|
11251
|
+
|
|
11252
|
+
if (isOwn && !skipFurtherCaching) {
|
|
11253
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
11254
|
+
}
|
|
11255
|
+
}
|
|
11256
|
+
}
|
|
11257
|
+
return value;
|
|
11258
|
+
};
|
|
11259
|
+
|
|
11260
|
+
|
|
11261
|
+
/***/ }),
|
|
11262
|
+
|
|
11263
|
+
/***/ "./node_modules/get-proto/Object.getPrototypeOf.js":
|
|
11264
|
+
/*!*********************************************************!*\
|
|
11265
|
+
!*** ./node_modules/get-proto/Object.getPrototypeOf.js ***!
|
|
11266
|
+
\*********************************************************/
|
|
11267
|
+
/*! no static exports found */
|
|
11268
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11269
|
+
|
|
11270
|
+
"use strict";
|
|
11271
|
+
|
|
11272
|
+
|
|
11273
|
+
var $Object = __webpack_require__(/*! es-object-atoms */ "./node_modules/es-object-atoms/index.js");
|
|
11274
|
+
|
|
11275
|
+
/** @type {import('./Object.getPrototypeOf')} */
|
|
11276
|
+
module.exports = $Object.getPrototypeOf || null;
|
|
11277
|
+
|
|
11278
|
+
|
|
11279
|
+
/***/ }),
|
|
11280
|
+
|
|
11281
|
+
/***/ "./node_modules/get-proto/Reflect.getPrototypeOf.js":
|
|
11282
|
+
/*!**********************************************************!*\
|
|
11283
|
+
!*** ./node_modules/get-proto/Reflect.getPrototypeOf.js ***!
|
|
11284
|
+
\**********************************************************/
|
|
11285
|
+
/*! no static exports found */
|
|
11286
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11287
|
+
|
|
11288
|
+
"use strict";
|
|
11289
|
+
|
|
11290
|
+
|
|
11291
|
+
/** @type {import('./Reflect.getPrototypeOf')} */
|
|
11292
|
+
module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;
|
|
11293
|
+
|
|
11294
|
+
|
|
11295
|
+
/***/ }),
|
|
11296
|
+
|
|
11297
|
+
/***/ "./node_modules/get-proto/index.js":
|
|
11298
|
+
/*!*****************************************!*\
|
|
11299
|
+
!*** ./node_modules/get-proto/index.js ***!
|
|
11300
|
+
\*****************************************/
|
|
11301
|
+
/*! no static exports found */
|
|
11302
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11303
|
+
|
|
11304
|
+
"use strict";
|
|
11305
|
+
|
|
11306
|
+
|
|
11307
|
+
var reflectGetProto = __webpack_require__(/*! ./Reflect.getPrototypeOf */ "./node_modules/get-proto/Reflect.getPrototypeOf.js");
|
|
11308
|
+
var originalGetProto = __webpack_require__(/*! ./Object.getPrototypeOf */ "./node_modules/get-proto/Object.getPrototypeOf.js");
|
|
11309
|
+
|
|
11310
|
+
var getDunderProto = __webpack_require__(/*! dunder-proto/get */ "./node_modules/dunder-proto/get.js");
|
|
11311
|
+
|
|
11312
|
+
/** @type {import('.')} */
|
|
11313
|
+
module.exports = reflectGetProto
|
|
11314
|
+
? function getProto(O) {
|
|
11315
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
11316
|
+
return reflectGetProto(O);
|
|
11317
|
+
}
|
|
11318
|
+
: originalGetProto
|
|
11319
|
+
? function getProto(O) {
|
|
11320
|
+
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
|
|
11321
|
+
throw new TypeError('getProto: not an object');
|
|
11322
|
+
}
|
|
11323
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
11324
|
+
return originalGetProto(O);
|
|
11325
|
+
}
|
|
11326
|
+
: getDunderProto
|
|
11327
|
+
? function getProto(O) {
|
|
11328
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
11329
|
+
return getDunderProto(O);
|
|
11330
|
+
}
|
|
11331
|
+
: null;
|
|
11332
|
+
|
|
11333
|
+
|
|
11334
|
+
/***/ }),
|
|
11335
|
+
|
|
11336
|
+
/***/ "./node_modules/gopd/gOPD.js":
|
|
11337
|
+
/*!***********************************!*\
|
|
11338
|
+
!*** ./node_modules/gopd/gOPD.js ***!
|
|
11339
|
+
\***********************************/
|
|
11340
|
+
/*! no static exports found */
|
|
11341
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11342
|
+
|
|
11343
|
+
"use strict";
|
|
11344
|
+
|
|
11345
|
+
|
|
11346
|
+
/** @type {import('./gOPD')} */
|
|
11347
|
+
module.exports = Object.getOwnPropertyDescriptor;
|
|
11348
|
+
|
|
11349
|
+
|
|
11350
|
+
/***/ }),
|
|
11351
|
+
|
|
11352
|
+
/***/ "./node_modules/gopd/index.js":
|
|
11353
|
+
/*!************************************!*\
|
|
11354
|
+
!*** ./node_modules/gopd/index.js ***!
|
|
11355
|
+
\************************************/
|
|
11356
|
+
/*! no static exports found */
|
|
11357
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11358
|
+
|
|
11359
|
+
"use strict";
|
|
11360
|
+
|
|
11361
|
+
|
|
11362
|
+
/** @type {import('.')} */
|
|
11363
|
+
var $gOPD = __webpack_require__(/*! ./gOPD */ "./node_modules/gopd/gOPD.js");
|
|
11364
|
+
|
|
11365
|
+
if ($gOPD) {
|
|
11366
|
+
try {
|
|
11367
|
+
$gOPD([], 'length');
|
|
11368
|
+
} catch (e) {
|
|
11369
|
+
// IE 8 has a broken gOPD
|
|
11370
|
+
$gOPD = null;
|
|
11371
|
+
}
|
|
11372
|
+
}
|
|
11373
|
+
|
|
11374
|
+
module.exports = $gOPD;
|
|
11375
|
+
|
|
11376
|
+
|
|
11377
|
+
/***/ }),
|
|
11378
|
+
|
|
11379
|
+
/***/ "./node_modules/has-property-descriptors/index.js":
|
|
11380
|
+
/*!********************************************************!*\
|
|
11381
|
+
!*** ./node_modules/has-property-descriptors/index.js ***!
|
|
11382
|
+
\********************************************************/
|
|
11383
|
+
/*! no static exports found */
|
|
11384
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11385
|
+
|
|
11386
|
+
"use strict";
|
|
11387
|
+
|
|
11388
|
+
|
|
11389
|
+
var $defineProperty = __webpack_require__(/*! es-define-property */ "./node_modules/es-define-property/index.js");
|
|
11390
|
+
|
|
11391
|
+
var hasPropertyDescriptors = function hasPropertyDescriptors() {
|
|
11392
|
+
return !!$defineProperty;
|
|
11393
|
+
};
|
|
11394
|
+
|
|
11395
|
+
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
11396
|
+
// node v0.6 has a bug where array lengths can be Set but not Defined
|
|
11397
|
+
if (!$defineProperty) {
|
|
11398
|
+
return null;
|
|
11399
|
+
}
|
|
11400
|
+
try {
|
|
11401
|
+
return $defineProperty([], 'length', { value: 1 }).length !== 1;
|
|
11402
|
+
} catch (e) {
|
|
11403
|
+
// In Firefox 4-22, defining length on an array throws an exception.
|
|
11404
|
+
return true;
|
|
11405
|
+
}
|
|
11406
|
+
};
|
|
11407
|
+
|
|
11408
|
+
module.exports = hasPropertyDescriptors;
|
|
11409
|
+
|
|
11410
|
+
|
|
11411
|
+
/***/ }),
|
|
11412
|
+
|
|
11413
|
+
/***/ "./node_modules/has-symbols/index.js":
|
|
11414
|
+
/*!*******************************************!*\
|
|
11415
|
+
!*** ./node_modules/has-symbols/index.js ***!
|
|
11416
|
+
\*******************************************/
|
|
11417
|
+
/*! no static exports found */
|
|
11418
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11419
|
+
|
|
11420
|
+
"use strict";
|
|
11421
|
+
|
|
11422
|
+
|
|
11423
|
+
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
11424
|
+
var hasSymbolSham = __webpack_require__(/*! ./shams */ "./node_modules/has-symbols/shams.js");
|
|
11425
|
+
|
|
11426
|
+
/** @type {import('.')} */
|
|
11427
|
+
module.exports = function hasNativeSymbols() {
|
|
11428
|
+
if (typeof origSymbol !== 'function') { return false; }
|
|
11429
|
+
if (typeof Symbol !== 'function') { return false; }
|
|
11430
|
+
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
11431
|
+
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
|
11432
|
+
|
|
11433
|
+
return hasSymbolSham();
|
|
11434
|
+
};
|
|
11435
|
+
|
|
11436
|
+
|
|
11437
|
+
/***/ }),
|
|
11438
|
+
|
|
11439
|
+
/***/ "./node_modules/has-symbols/shams.js":
|
|
11440
|
+
/*!*******************************************!*\
|
|
11441
|
+
!*** ./node_modules/has-symbols/shams.js ***!
|
|
11442
|
+
\*******************************************/
|
|
11443
|
+
/*! no static exports found */
|
|
11444
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11445
|
+
|
|
11446
|
+
"use strict";
|
|
11447
|
+
|
|
11448
|
+
|
|
11449
|
+
/** @type {import('./shams')} */
|
|
11450
|
+
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
11451
|
+
module.exports = function hasSymbols() {
|
|
11452
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
11453
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
11454
|
+
|
|
11455
|
+
/** @type {{ [k in symbol]?: unknown }} */
|
|
11456
|
+
var obj = {};
|
|
11457
|
+
var sym = Symbol('test');
|
|
11458
|
+
var symObj = Object(sym);
|
|
11459
|
+
if (typeof sym === 'string') { return false; }
|
|
11460
|
+
|
|
11461
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
11462
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
11463
|
+
|
|
11464
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
11465
|
+
// if (sym instanceof Symbol) { return false; }
|
|
11466
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
11467
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
|
11468
|
+
|
|
11469
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
11470
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
11471
|
+
|
|
11472
|
+
var symVal = 42;
|
|
11473
|
+
obj[sym] = symVal;
|
|
11474
|
+
for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
11475
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
11476
|
+
|
|
11477
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
11478
|
+
|
|
11479
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
11480
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
11481
|
+
|
|
11482
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
11483
|
+
|
|
11484
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
11485
|
+
// eslint-disable-next-line no-extra-parens
|
|
11486
|
+
var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));
|
|
11487
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
11488
|
+
}
|
|
11489
|
+
|
|
11490
|
+
return true;
|
|
11491
|
+
};
|
|
11492
|
+
|
|
11493
|
+
|
|
11494
|
+
/***/ }),
|
|
11495
|
+
|
|
11496
|
+
/***/ "./node_modules/has-tostringtag/shams.js":
|
|
11497
|
+
/*!***********************************************!*\
|
|
11498
|
+
!*** ./node_modules/has-tostringtag/shams.js ***!
|
|
11499
|
+
\***********************************************/
|
|
11500
|
+
/*! no static exports found */
|
|
11501
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11502
|
+
|
|
11503
|
+
"use strict";
|
|
11504
|
+
|
|
11505
|
+
|
|
11506
|
+
var hasSymbols = __webpack_require__(/*! has-symbols/shams */ "./node_modules/has-symbols/shams.js");
|
|
11507
|
+
|
|
11508
|
+
/** @type {import('.')} */
|
|
11509
|
+
module.exports = function hasToStringTagShams() {
|
|
11510
|
+
return hasSymbols() && !!Symbol.toStringTag;
|
|
11511
|
+
};
|
|
11512
|
+
|
|
11513
|
+
|
|
11514
|
+
/***/ }),
|
|
11515
|
+
|
|
11516
|
+
/***/ "./node_modules/hasown/index.js":
|
|
11517
|
+
/*!**************************************!*\
|
|
11518
|
+
!*** ./node_modules/hasown/index.js ***!
|
|
11519
|
+
\**************************************/
|
|
11520
|
+
/*! no static exports found */
|
|
11521
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11522
|
+
|
|
11523
|
+
"use strict";
|
|
11524
|
+
|
|
11525
|
+
|
|
11526
|
+
var call = Function.prototype.call;
|
|
11527
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
11528
|
+
var bind = __webpack_require__(/*! function-bind */ "./node_modules/function-bind/index.js");
|
|
11529
|
+
|
|
11530
|
+
/** @type {import('.')} */
|
|
11531
|
+
module.exports = bind.call(call, $hasOwn);
|
|
11532
|
+
|
|
11533
|
+
|
|
11534
|
+
/***/ }),
|
|
11535
|
+
|
|
11536
|
+
/***/ "./node_modules/is-callable/index.js":
|
|
11537
|
+
/*!*******************************************!*\
|
|
11538
|
+
!*** ./node_modules/is-callable/index.js ***!
|
|
11539
|
+
\*******************************************/
|
|
11540
|
+
/*! no static exports found */
|
|
11541
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11542
|
+
|
|
11543
|
+
"use strict";
|
|
11544
|
+
|
|
11545
|
+
|
|
11546
|
+
var fnToStr = Function.prototype.toString;
|
|
11547
|
+
var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;
|
|
11548
|
+
var badArrayLike;
|
|
11549
|
+
var isCallableMarker;
|
|
11550
|
+
if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {
|
|
11551
|
+
try {
|
|
11552
|
+
badArrayLike = Object.defineProperty({}, 'length', {
|
|
11553
|
+
get: function () {
|
|
11554
|
+
throw isCallableMarker;
|
|
11555
|
+
}
|
|
11556
|
+
});
|
|
11557
|
+
isCallableMarker = {};
|
|
11558
|
+
// eslint-disable-next-line no-throw-literal
|
|
11559
|
+
reflectApply(function () { throw 42; }, null, badArrayLike);
|
|
11560
|
+
} catch (_) {
|
|
11561
|
+
if (_ !== isCallableMarker) {
|
|
11562
|
+
reflectApply = null;
|
|
11563
|
+
}
|
|
11564
|
+
}
|
|
11565
|
+
} else {
|
|
11566
|
+
reflectApply = null;
|
|
11567
|
+
}
|
|
11568
|
+
|
|
11569
|
+
var constructorRegex = /^\s*class\b/;
|
|
11570
|
+
var isES6ClassFn = function isES6ClassFunction(value) {
|
|
11571
|
+
try {
|
|
11572
|
+
var fnStr = fnToStr.call(value);
|
|
11573
|
+
return constructorRegex.test(fnStr);
|
|
11574
|
+
} catch (e) {
|
|
11575
|
+
return false; // not a function
|
|
11576
|
+
}
|
|
11577
|
+
};
|
|
11578
|
+
|
|
11579
|
+
var tryFunctionObject = function tryFunctionToStr(value) {
|
|
11580
|
+
try {
|
|
11581
|
+
if (isES6ClassFn(value)) { return false; }
|
|
11582
|
+
fnToStr.call(value);
|
|
11583
|
+
return true;
|
|
11584
|
+
} catch (e) {
|
|
11585
|
+
return false;
|
|
11586
|
+
}
|
|
11587
|
+
};
|
|
11588
|
+
var toStr = Object.prototype.toString;
|
|
11589
|
+
var objectClass = '[object Object]';
|
|
11590
|
+
var fnClass = '[object Function]';
|
|
11591
|
+
var genClass = '[object GeneratorFunction]';
|
|
11592
|
+
var ddaClass = '[object HTMLAllCollection]'; // IE 11
|
|
11593
|
+
var ddaClass2 = '[object HTML document.all class]';
|
|
11594
|
+
var ddaClass3 = '[object HTMLCollection]'; // IE 9-10
|
|
11595
|
+
var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`
|
|
11596
|
+
|
|
11597
|
+
var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing
|
|
11598
|
+
|
|
11599
|
+
var isDDA = function isDocumentDotAll() { return false; };
|
|
11600
|
+
if (typeof document === 'object') {
|
|
11601
|
+
// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly
|
|
11602
|
+
var all = document.all;
|
|
11603
|
+
if (toStr.call(all) === toStr.call(document.all)) {
|
|
11604
|
+
isDDA = function isDocumentDotAll(value) {
|
|
11605
|
+
/* globals document: false */
|
|
11606
|
+
// in IE 6-8, typeof document.all is "object" and it's truthy
|
|
11607
|
+
if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {
|
|
11608
|
+
try {
|
|
11609
|
+
var str = toStr.call(value);
|
|
11610
|
+
return (
|
|
11611
|
+
str === ddaClass
|
|
11612
|
+
|| str === ddaClass2
|
|
11613
|
+
|| str === ddaClass3 // opera 12.16
|
|
11614
|
+
|| str === objectClass // IE 6-8
|
|
11615
|
+
) && value('') == null; // eslint-disable-line eqeqeq
|
|
11616
|
+
} catch (e) { /**/ }
|
|
11617
|
+
}
|
|
11618
|
+
return false;
|
|
11619
|
+
};
|
|
11620
|
+
}
|
|
11621
|
+
}
|
|
11622
|
+
|
|
11623
|
+
module.exports = reflectApply
|
|
11624
|
+
? function isCallable(value) {
|
|
11625
|
+
if (isDDA(value)) { return true; }
|
|
11626
|
+
if (!value) { return false; }
|
|
11627
|
+
if (typeof value !== 'function' && typeof value !== 'object') { return false; }
|
|
11628
|
+
try {
|
|
11629
|
+
reflectApply(value, null, badArrayLike);
|
|
11630
|
+
} catch (e) {
|
|
11631
|
+
if (e !== isCallableMarker) { return false; }
|
|
11632
|
+
}
|
|
11633
|
+
return !isES6ClassFn(value) && tryFunctionObject(value);
|
|
11634
|
+
}
|
|
11635
|
+
: function isCallable(value) {
|
|
11636
|
+
if (isDDA(value)) { return true; }
|
|
11637
|
+
if (!value) { return false; }
|
|
11638
|
+
if (typeof value !== 'function' && typeof value !== 'object') { return false; }
|
|
11639
|
+
if (hasToStringTag) { return tryFunctionObject(value); }
|
|
11640
|
+
if (isES6ClassFn(value)) { return false; }
|
|
11641
|
+
var strClass = toStr.call(value);
|
|
11642
|
+
if (strClass !== fnClass && strClass !== genClass && !(/^\[object HTML/).test(strClass)) { return false; }
|
|
11643
|
+
return tryFunctionObject(value);
|
|
11644
|
+
};
|
|
11645
|
+
|
|
11646
|
+
|
|
11647
|
+
/***/ }),
|
|
11648
|
+
|
|
11649
|
+
/***/ "./node_modules/is-date-object/index.js":
|
|
11650
|
+
/*!**********************************************!*\
|
|
11651
|
+
!*** ./node_modules/is-date-object/index.js ***!
|
|
11652
|
+
\**********************************************/
|
|
11653
|
+
/*! no static exports found */
|
|
11654
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11655
|
+
|
|
11656
|
+
"use strict";
|
|
11657
|
+
|
|
11658
|
+
|
|
11659
|
+
var callBound = __webpack_require__(/*! call-bound */ "./node_modules/call-bound/index.js");
|
|
11660
|
+
|
|
11661
|
+
var getDay = callBound('Date.prototype.getDay');
|
|
11662
|
+
/** @type {import('.')} */
|
|
11663
|
+
var tryDateObject = function tryDateGetDayCall(value) {
|
|
11664
|
+
try {
|
|
11665
|
+
getDay(value);
|
|
11666
|
+
return true;
|
|
11667
|
+
} catch (e) {
|
|
11668
|
+
return false;
|
|
11669
|
+
}
|
|
11670
|
+
};
|
|
11671
|
+
|
|
11672
|
+
/** @type {(value: unknown) => string} */
|
|
11673
|
+
var toStr = callBound('Object.prototype.toString');
|
|
11674
|
+
var dateClass = '[object Date]';
|
|
11675
|
+
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ "./node_modules/has-tostringtag/shams.js")();
|
|
11676
|
+
|
|
11677
|
+
/** @type {import('.')} */
|
|
11678
|
+
module.exports = function isDateObject(value) {
|
|
11679
|
+
if (typeof value !== 'object' || value === null) {
|
|
11680
|
+
return false;
|
|
11681
|
+
}
|
|
11682
|
+
return hasToStringTag ? tryDateObject(value) : toStr(value) === dateClass;
|
|
11683
|
+
};
|
|
11684
|
+
|
|
11685
|
+
|
|
11686
|
+
/***/ }),
|
|
11687
|
+
|
|
11688
|
+
/***/ "./node_modules/is-regex/index.js":
|
|
11689
|
+
/*!****************************************!*\
|
|
11690
|
+
!*** ./node_modules/is-regex/index.js ***!
|
|
11691
|
+
\****************************************/
|
|
11692
|
+
/*! no static exports found */
|
|
11693
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11694
|
+
|
|
11695
|
+
"use strict";
|
|
11696
|
+
|
|
11697
|
+
|
|
11698
|
+
var callBound = __webpack_require__(/*! call-bound */ "./node_modules/call-bound/index.js");
|
|
11699
|
+
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ "./node_modules/has-tostringtag/shams.js")();
|
|
11700
|
+
var hasOwn = __webpack_require__(/*! hasown */ "./node_modules/hasown/index.js");
|
|
11701
|
+
var gOPD = __webpack_require__(/*! gopd */ "./node_modules/gopd/index.js");
|
|
11702
|
+
|
|
11703
|
+
/** @type {import('.')} */
|
|
11704
|
+
var fn;
|
|
11705
|
+
|
|
11706
|
+
if (hasToStringTag) {
|
|
11707
|
+
/** @type {(receiver: ThisParameterType<typeof RegExp.prototype.exec>, ...args: Parameters<typeof RegExp.prototype.exec>) => ReturnType<typeof RegExp.prototype.exec>} */
|
|
11708
|
+
var $exec = callBound('RegExp.prototype.exec');
|
|
11709
|
+
/** @type {object} */
|
|
11710
|
+
var isRegexMarker = {};
|
|
11711
|
+
|
|
11712
|
+
var throwRegexMarker = function () {
|
|
11713
|
+
throw isRegexMarker;
|
|
11714
|
+
};
|
|
11715
|
+
/** @type {{ toString(): never, valueOf(): never, [Symbol.toPrimitive]?(): never }} */
|
|
11716
|
+
var badStringifier = {
|
|
11717
|
+
toString: throwRegexMarker,
|
|
11718
|
+
valueOf: throwRegexMarker
|
|
11719
|
+
};
|
|
11720
|
+
|
|
11721
|
+
if (typeof Symbol.toPrimitive === 'symbol') {
|
|
11722
|
+
badStringifier[Symbol.toPrimitive] = throwRegexMarker;
|
|
11723
|
+
}
|
|
11724
|
+
|
|
11725
|
+
/** @type {import('.')} */
|
|
11726
|
+
// @ts-expect-error TS can't figure out that the $exec call always throws
|
|
11727
|
+
// eslint-disable-next-line consistent-return
|
|
11728
|
+
fn = function isRegex(value) {
|
|
11729
|
+
if (!value || typeof value !== 'object') {
|
|
11730
|
+
return false;
|
|
11731
|
+
}
|
|
11732
|
+
|
|
11733
|
+
// eslint-disable-next-line no-extra-parens
|
|
11734
|
+
var descriptor = /** @type {NonNullable<typeof gOPD>} */ (gOPD)(/** @type {{ lastIndex?: unknown }} */ (value), 'lastIndex');
|
|
11735
|
+
var hasLastIndexDataProperty = descriptor && hasOwn(descriptor, 'value');
|
|
11736
|
+
if (!hasLastIndexDataProperty) {
|
|
11737
|
+
return false;
|
|
11738
|
+
}
|
|
11739
|
+
|
|
11740
|
+
try {
|
|
11741
|
+
// eslint-disable-next-line no-extra-parens
|
|
11742
|
+
$exec(value, /** @type {string} */ (/** @type {unknown} */ (badStringifier)));
|
|
11743
|
+
} catch (e) {
|
|
11744
|
+
return e === isRegexMarker;
|
|
11745
|
+
}
|
|
11746
|
+
};
|
|
11747
|
+
} else {
|
|
11748
|
+
/** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
|
|
11749
|
+
var $toString = callBound('Object.prototype.toString');
|
|
11750
|
+
/** @const @type {'[object RegExp]'} */
|
|
11751
|
+
var regexClass = '[object RegExp]';
|
|
11752
|
+
|
|
11753
|
+
/** @type {import('.')} */
|
|
11754
|
+
fn = function isRegex(value) {
|
|
11755
|
+
// In older browsers, typeof regex incorrectly returns 'function'
|
|
11756
|
+
if (!value || (typeof value !== 'object' && typeof value !== 'function')) {
|
|
11757
|
+
return false;
|
|
11758
|
+
}
|
|
11759
|
+
|
|
11760
|
+
return $toString(value) === regexClass;
|
|
11761
|
+
};
|
|
11762
|
+
}
|
|
11763
|
+
|
|
11764
|
+
module.exports = fn;
|
|
11765
|
+
|
|
11766
|
+
|
|
11767
|
+
/***/ }),
|
|
11768
|
+
|
|
11769
|
+
/***/ "./node_modules/is-symbol/index.js":
|
|
11770
|
+
/*!*****************************************!*\
|
|
11771
|
+
!*** ./node_modules/is-symbol/index.js ***!
|
|
11772
|
+
\*****************************************/
|
|
11773
|
+
/*! no static exports found */
|
|
11774
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11775
|
+
|
|
11776
|
+
"use strict";
|
|
11777
|
+
|
|
11778
|
+
|
|
11779
|
+
var callBound = __webpack_require__(/*! call-bound */ "./node_modules/call-bound/index.js");
|
|
11780
|
+
var $toString = callBound('Object.prototype.toString');
|
|
11781
|
+
var hasSymbols = __webpack_require__(/*! has-symbols */ "./node_modules/has-symbols/index.js")();
|
|
11782
|
+
var safeRegexTest = __webpack_require__(/*! safe-regex-test */ "./node_modules/safe-regex-test/index.js");
|
|
11783
|
+
|
|
11784
|
+
if (hasSymbols) {
|
|
11785
|
+
var $symToStr = callBound('Symbol.prototype.toString');
|
|
11786
|
+
var isSymString = safeRegexTest(/^Symbol\(.*\)$/);
|
|
11787
|
+
|
|
11788
|
+
/** @type {(value: object) => value is Symbol} */
|
|
11789
|
+
var isSymbolObject = function isRealSymbolObject(value) {
|
|
11790
|
+
if (typeof value.valueOf() !== 'symbol') {
|
|
11791
|
+
return false;
|
|
11792
|
+
}
|
|
11793
|
+
return isSymString($symToStr(value));
|
|
11794
|
+
};
|
|
11795
|
+
|
|
11796
|
+
/** @type {import('.')} */
|
|
11797
|
+
module.exports = function isSymbol(value) {
|
|
11798
|
+
if (typeof value === 'symbol') {
|
|
11799
|
+
return true;
|
|
11800
|
+
}
|
|
11801
|
+
if (!value || typeof value !== 'object' || $toString(value) !== '[object Symbol]') {
|
|
11802
|
+
return false;
|
|
11803
|
+
}
|
|
11804
|
+
try {
|
|
11805
|
+
return isSymbolObject(value);
|
|
11806
|
+
} catch (e) {
|
|
11807
|
+
return false;
|
|
11808
|
+
}
|
|
11809
|
+
};
|
|
11810
|
+
} else {
|
|
11811
|
+
/** @type {import('.')} */
|
|
11812
|
+
module.exports = function isSymbol(value) {
|
|
11813
|
+
// this environment does not support Symbols.
|
|
11814
|
+
return false && false;
|
|
11815
|
+
};
|
|
11816
|
+
}
|
|
11817
|
+
|
|
11818
|
+
|
|
11819
|
+
/***/ }),
|
|
11820
|
+
|
|
11821
|
+
/***/ "./node_modules/math-intrinsics/abs.js":
|
|
11822
|
+
/*!*********************************************!*\
|
|
11823
|
+
!*** ./node_modules/math-intrinsics/abs.js ***!
|
|
11824
|
+
\*********************************************/
|
|
11825
|
+
/*! no static exports found */
|
|
11826
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11827
|
+
|
|
11828
|
+
"use strict";
|
|
11829
|
+
|
|
11830
|
+
|
|
11831
|
+
/** @type {import('./abs')} */
|
|
11832
|
+
module.exports = Math.abs;
|
|
11833
|
+
|
|
11834
|
+
|
|
11835
|
+
/***/ }),
|
|
11836
|
+
|
|
11837
|
+
/***/ "./node_modules/math-intrinsics/floor.js":
|
|
11838
|
+
/*!***********************************************!*\
|
|
11839
|
+
!*** ./node_modules/math-intrinsics/floor.js ***!
|
|
11840
|
+
\***********************************************/
|
|
11841
|
+
/*! no static exports found */
|
|
11842
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11843
|
+
|
|
11844
|
+
"use strict";
|
|
11845
|
+
|
|
11846
|
+
|
|
11847
|
+
/** @type {import('./floor')} */
|
|
11848
|
+
module.exports = Math.floor;
|
|
11849
|
+
|
|
11850
|
+
|
|
11851
|
+
/***/ }),
|
|
11852
|
+
|
|
11853
|
+
/***/ "./node_modules/math-intrinsics/isNaN.js":
|
|
11854
|
+
/*!***********************************************!*\
|
|
11855
|
+
!*** ./node_modules/math-intrinsics/isNaN.js ***!
|
|
11856
|
+
\***********************************************/
|
|
11857
|
+
/*! no static exports found */
|
|
11858
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11859
|
+
|
|
11860
|
+
"use strict";
|
|
11861
|
+
|
|
11862
|
+
|
|
11863
|
+
/** @type {import('./isNaN')} */
|
|
11864
|
+
module.exports = Number.isNaN || function isNaN(a) {
|
|
11865
|
+
return a !== a;
|
|
11866
|
+
};
|
|
11867
|
+
|
|
11868
|
+
|
|
11869
|
+
/***/ }),
|
|
11870
|
+
|
|
11871
|
+
/***/ "./node_modules/math-intrinsics/max.js":
|
|
11872
|
+
/*!*********************************************!*\
|
|
11873
|
+
!*** ./node_modules/math-intrinsics/max.js ***!
|
|
11874
|
+
\*********************************************/
|
|
11875
|
+
/*! no static exports found */
|
|
11876
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11877
|
+
|
|
11878
|
+
"use strict";
|
|
11879
|
+
|
|
11880
|
+
|
|
11881
|
+
/** @type {import('./max')} */
|
|
11882
|
+
module.exports = Math.max;
|
|
11883
|
+
|
|
11884
|
+
|
|
11885
|
+
/***/ }),
|
|
11886
|
+
|
|
11887
|
+
/***/ "./node_modules/math-intrinsics/min.js":
|
|
11888
|
+
/*!*********************************************!*\
|
|
11889
|
+
!*** ./node_modules/math-intrinsics/min.js ***!
|
|
11890
|
+
\*********************************************/
|
|
11891
|
+
/*! no static exports found */
|
|
11892
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11893
|
+
|
|
11894
|
+
"use strict";
|
|
11895
|
+
|
|
11896
|
+
|
|
11897
|
+
/** @type {import('./min')} */
|
|
11898
|
+
module.exports = Math.min;
|
|
11899
|
+
|
|
11900
|
+
|
|
11901
|
+
/***/ }),
|
|
11902
|
+
|
|
11903
|
+
/***/ "./node_modules/math-intrinsics/pow.js":
|
|
11904
|
+
/*!*********************************************!*\
|
|
11905
|
+
!*** ./node_modules/math-intrinsics/pow.js ***!
|
|
11906
|
+
\*********************************************/
|
|
11907
|
+
/*! no static exports found */
|
|
11908
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11909
|
+
|
|
11910
|
+
"use strict";
|
|
11911
|
+
|
|
11912
|
+
|
|
11913
|
+
/** @type {import('./pow')} */
|
|
11914
|
+
module.exports = Math.pow;
|
|
11915
|
+
|
|
11916
|
+
|
|
11917
|
+
/***/ }),
|
|
11918
|
+
|
|
11919
|
+
/***/ "./node_modules/math-intrinsics/round.js":
|
|
11920
|
+
/*!***********************************************!*\
|
|
11921
|
+
!*** ./node_modules/math-intrinsics/round.js ***!
|
|
11922
|
+
\***********************************************/
|
|
11923
|
+
/*! no static exports found */
|
|
11924
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11925
|
+
|
|
11926
|
+
"use strict";
|
|
11927
|
+
|
|
11928
|
+
|
|
11929
|
+
/** @type {import('./round')} */
|
|
11930
|
+
module.exports = Math.round;
|
|
11931
|
+
|
|
11932
|
+
|
|
11933
|
+
/***/ }),
|
|
11934
|
+
|
|
11935
|
+
/***/ "./node_modules/math-intrinsics/sign.js":
|
|
11936
|
+
/*!**********************************************!*\
|
|
11937
|
+
!*** ./node_modules/math-intrinsics/sign.js ***!
|
|
11938
|
+
\**********************************************/
|
|
11939
|
+
/*! no static exports found */
|
|
11940
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11941
|
+
|
|
11942
|
+
"use strict";
|
|
11943
|
+
|
|
11944
|
+
|
|
11945
|
+
var $isNaN = __webpack_require__(/*! ./isNaN */ "./node_modules/math-intrinsics/isNaN.js");
|
|
11946
|
+
|
|
11947
|
+
/** @type {import('./sign')} */
|
|
11948
|
+
module.exports = function sign(number) {
|
|
11949
|
+
if ($isNaN(number) || number === 0) {
|
|
11950
|
+
return number;
|
|
11951
|
+
}
|
|
11952
|
+
return number < 0 ? -1 : +1;
|
|
11953
|
+
};
|
|
11954
|
+
|
|
11955
|
+
|
|
11956
|
+
/***/ }),
|
|
11957
|
+
|
|
11958
|
+
/***/ "./node_modules/object-inspect/index.js":
|
|
11959
|
+
/*!**********************************************!*\
|
|
11960
|
+
!*** ./node_modules/object-inspect/index.js ***!
|
|
11961
|
+
\**********************************************/
|
|
11962
|
+
/*! no static exports found */
|
|
11963
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
11964
|
+
|
|
11965
|
+
/* WEBPACK VAR INJECTION */(function(global) {var hasMap = typeof Map === 'function' && Map.prototype;
|
|
11966
|
+
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
|
|
11967
|
+
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
|
|
11968
|
+
var mapForEach = hasMap && Map.prototype.forEach;
|
|
11969
|
+
var hasSet = typeof Set === 'function' && Set.prototype;
|
|
11970
|
+
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
|
|
11971
|
+
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
|
|
11972
|
+
var setForEach = hasSet && Set.prototype.forEach;
|
|
11973
|
+
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
|
|
11974
|
+
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
11975
|
+
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
|
|
11976
|
+
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
11977
|
+
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
|
|
11978
|
+
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
11979
|
+
var booleanValueOf = Boolean.prototype.valueOf;
|
|
11980
|
+
var objectToString = Object.prototype.toString;
|
|
11981
|
+
var functionToString = Function.prototype.toString;
|
|
11982
|
+
var $match = String.prototype.match;
|
|
11983
|
+
var $slice = String.prototype.slice;
|
|
11984
|
+
var $replace = String.prototype.replace;
|
|
11985
|
+
var $toUpperCase = String.prototype.toUpperCase;
|
|
11986
|
+
var $toLowerCase = String.prototype.toLowerCase;
|
|
11987
|
+
var $test = RegExp.prototype.test;
|
|
11988
|
+
var $concat = Array.prototype.concat;
|
|
11989
|
+
var $join = Array.prototype.join;
|
|
11990
|
+
var $arrSlice = Array.prototype.slice;
|
|
11991
|
+
var $floor = Math.floor;
|
|
11992
|
+
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
11993
|
+
var gOPS = Object.getOwnPropertySymbols;
|
|
11994
|
+
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
|
11995
|
+
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
|
|
11996
|
+
// ie, `has-tostringtag/shams
|
|
11997
|
+
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
|
|
11998
|
+
? Symbol.toStringTag
|
|
11999
|
+
: null;
|
|
12000
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
12001
|
+
|
|
12002
|
+
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
|
|
12003
|
+
[].__proto__ === Array.prototype // eslint-disable-line no-proto
|
|
12004
|
+
? function (O) {
|
|
12005
|
+
return O.__proto__; // eslint-disable-line no-proto
|
|
12006
|
+
}
|
|
12007
|
+
: null
|
|
12008
|
+
);
|
|
12009
|
+
|
|
12010
|
+
function addNumericSeparator(num, str) {
|
|
12011
|
+
if (
|
|
12012
|
+
num === Infinity
|
|
12013
|
+
|| num === -Infinity
|
|
12014
|
+
|| num !== num
|
|
12015
|
+
|| (num && num > -1000 && num < 1000)
|
|
12016
|
+
|| $test.call(/e/, str)
|
|
12017
|
+
) {
|
|
12018
|
+
return str;
|
|
12019
|
+
}
|
|
12020
|
+
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
12021
|
+
if (typeof num === 'number') {
|
|
12022
|
+
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
|
12023
|
+
if (int !== num) {
|
|
12024
|
+
var intStr = String(int);
|
|
12025
|
+
var dec = $slice.call(str, intStr.length + 1);
|
|
12026
|
+
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
|
12027
|
+
}
|
|
12028
|
+
}
|
|
12029
|
+
return $replace.call(str, sepRegex, '$&_');
|
|
12030
|
+
}
|
|
12031
|
+
|
|
12032
|
+
var utilInspect = __webpack_require__(/*! ./util.inspect */ 0);
|
|
12033
|
+
var inspectCustom = utilInspect.custom;
|
|
12034
|
+
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
12035
|
+
|
|
12036
|
+
var quotes = {
|
|
12037
|
+
__proto__: null,
|
|
12038
|
+
'double': '"',
|
|
12039
|
+
single: "'"
|
|
12040
|
+
};
|
|
12041
|
+
var quoteREs = {
|
|
12042
|
+
__proto__: null,
|
|
12043
|
+
'double': /(["\\])/g,
|
|
12044
|
+
single: /(['\\])/g
|
|
12045
|
+
};
|
|
12046
|
+
|
|
12047
|
+
module.exports = function inspect_(obj, options, depth, seen) {
|
|
12048
|
+
var opts = options || {};
|
|
12049
|
+
|
|
12050
|
+
if (has(opts, 'quoteStyle') && !has(quotes, opts.quoteStyle)) {
|
|
12051
|
+
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
12052
|
+
}
|
|
12053
|
+
if (
|
|
12054
|
+
has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
|
|
12055
|
+
? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
|
|
12056
|
+
: opts.maxStringLength !== null
|
|
12057
|
+
)
|
|
12058
|
+
) {
|
|
12059
|
+
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
12060
|
+
}
|
|
12061
|
+
var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
|
|
12062
|
+
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
|
|
12063
|
+
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
|
|
12064
|
+
}
|
|
12065
|
+
|
|
12066
|
+
if (
|
|
12067
|
+
has(opts, 'indent')
|
|
12068
|
+
&& opts.indent !== null
|
|
12069
|
+
&& opts.indent !== '\t'
|
|
12070
|
+
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
|
|
12071
|
+
) {
|
|
12072
|
+
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
12073
|
+
}
|
|
12074
|
+
if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
|
12075
|
+
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
12076
|
+
}
|
|
12077
|
+
var numericSeparator = opts.numericSeparator;
|
|
12078
|
+
|
|
12079
|
+
if (typeof obj === 'undefined') {
|
|
12080
|
+
return 'undefined';
|
|
12081
|
+
}
|
|
12082
|
+
if (obj === null) {
|
|
12083
|
+
return 'null';
|
|
12084
|
+
}
|
|
12085
|
+
if (typeof obj === 'boolean') {
|
|
12086
|
+
return obj ? 'true' : 'false';
|
|
12087
|
+
}
|
|
12088
|
+
|
|
12089
|
+
if (typeof obj === 'string') {
|
|
12090
|
+
return inspectString(obj, opts);
|
|
12091
|
+
}
|
|
12092
|
+
if (typeof obj === 'number') {
|
|
12093
|
+
if (obj === 0) {
|
|
12094
|
+
return Infinity / obj > 0 ? '0' : '-0';
|
|
12095
|
+
}
|
|
12096
|
+
var str = String(obj);
|
|
12097
|
+
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
12098
|
+
}
|
|
12099
|
+
if (typeof obj === 'bigint') {
|
|
12100
|
+
var bigIntStr = String(obj) + 'n';
|
|
12101
|
+
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
12102
|
+
}
|
|
12103
|
+
|
|
12104
|
+
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
|
|
12105
|
+
if (typeof depth === 'undefined') { depth = 0; }
|
|
12106
|
+
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
|
|
12107
|
+
return isArray(obj) ? '[Array]' : '[Object]';
|
|
12108
|
+
}
|
|
12109
|
+
|
|
12110
|
+
var indent = getIndent(opts, depth);
|
|
12111
|
+
|
|
12112
|
+
if (typeof seen === 'undefined') {
|
|
12113
|
+
seen = [];
|
|
12114
|
+
} else if (indexOf(seen, obj) >= 0) {
|
|
12115
|
+
return '[Circular]';
|
|
12116
|
+
}
|
|
12117
|
+
|
|
12118
|
+
function inspect(value, from, noIndent) {
|
|
12119
|
+
if (from) {
|
|
12120
|
+
seen = $arrSlice.call(seen);
|
|
12121
|
+
seen.push(from);
|
|
12122
|
+
}
|
|
12123
|
+
if (noIndent) {
|
|
12124
|
+
var newOpts = {
|
|
12125
|
+
depth: opts.depth
|
|
12126
|
+
};
|
|
12127
|
+
if (has(opts, 'quoteStyle')) {
|
|
12128
|
+
newOpts.quoteStyle = opts.quoteStyle;
|
|
12129
|
+
}
|
|
12130
|
+
return inspect_(value, newOpts, depth + 1, seen);
|
|
12131
|
+
}
|
|
12132
|
+
return inspect_(value, opts, depth + 1, seen);
|
|
12133
|
+
}
|
|
12134
|
+
|
|
12135
|
+
if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
|
|
12136
|
+
var name = nameOf(obj);
|
|
12137
|
+
var keys = arrObjKeys(obj, inspect);
|
|
12138
|
+
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
|
12139
|
+
}
|
|
12140
|
+
if (isSymbol(obj)) {
|
|
12141
|
+
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
|
|
12142
|
+
return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
12143
|
+
}
|
|
12144
|
+
if (isElement(obj)) {
|
|
12145
|
+
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
|
12146
|
+
var attrs = obj.attributes || [];
|
|
12147
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
12148
|
+
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
|
12149
|
+
}
|
|
12150
|
+
s += '>';
|
|
12151
|
+
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
|
|
12152
|
+
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
|
12153
|
+
return s;
|
|
12154
|
+
}
|
|
12155
|
+
if (isArray(obj)) {
|
|
12156
|
+
if (obj.length === 0) { return '[]'; }
|
|
12157
|
+
var xs = arrObjKeys(obj, inspect);
|
|
12158
|
+
if (indent && !singleLineValues(xs)) {
|
|
12159
|
+
return '[' + indentedJoin(xs, indent) + ']';
|
|
12160
|
+
}
|
|
12161
|
+
return '[ ' + $join.call(xs, ', ') + ' ]';
|
|
12162
|
+
}
|
|
12163
|
+
if (isError(obj)) {
|
|
12164
|
+
var parts = arrObjKeys(obj, inspect);
|
|
12165
|
+
if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
|
12166
|
+
return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
|
|
12167
|
+
}
|
|
12168
|
+
if (parts.length === 0) { return '[' + String(obj) + ']'; }
|
|
12169
|
+
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
|
|
12170
|
+
}
|
|
12171
|
+
if (typeof obj === 'object' && customInspect) {
|
|
12172
|
+
if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
|
|
12173
|
+
return utilInspect(obj, { depth: maxDepth - depth });
|
|
12174
|
+
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
|
12175
|
+
return obj.inspect();
|
|
12176
|
+
}
|
|
12177
|
+
}
|
|
12178
|
+
if (isMap(obj)) {
|
|
12179
|
+
var mapParts = [];
|
|
12180
|
+
if (mapForEach) {
|
|
12181
|
+
mapForEach.call(obj, function (value, key) {
|
|
12182
|
+
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
|
|
12183
|
+
});
|
|
12184
|
+
}
|
|
12185
|
+
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
|
|
12186
|
+
}
|
|
12187
|
+
if (isSet(obj)) {
|
|
12188
|
+
var setParts = [];
|
|
12189
|
+
if (setForEach) {
|
|
12190
|
+
setForEach.call(obj, function (value) {
|
|
12191
|
+
setParts.push(inspect(value, obj));
|
|
12192
|
+
});
|
|
12193
|
+
}
|
|
12194
|
+
return collectionOf('Set', setSize.call(obj), setParts, indent);
|
|
12195
|
+
}
|
|
12196
|
+
if (isWeakMap(obj)) {
|
|
12197
|
+
return weakCollectionOf('WeakMap');
|
|
12198
|
+
}
|
|
12199
|
+
if (isWeakSet(obj)) {
|
|
12200
|
+
return weakCollectionOf('WeakSet');
|
|
12201
|
+
}
|
|
12202
|
+
if (isWeakRef(obj)) {
|
|
12203
|
+
return weakCollectionOf('WeakRef');
|
|
12204
|
+
}
|
|
12205
|
+
if (isNumber(obj)) {
|
|
12206
|
+
return markBoxed(inspect(Number(obj)));
|
|
12207
|
+
}
|
|
12208
|
+
if (isBigInt(obj)) {
|
|
12209
|
+
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
12210
|
+
}
|
|
12211
|
+
if (isBoolean(obj)) {
|
|
12212
|
+
return markBoxed(booleanValueOf.call(obj));
|
|
12213
|
+
}
|
|
12214
|
+
if (isString(obj)) {
|
|
12215
|
+
return markBoxed(inspect(String(obj)));
|
|
12216
|
+
}
|
|
12217
|
+
// note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
|
|
12218
|
+
/* eslint-env browser */
|
|
12219
|
+
if (typeof window !== 'undefined' && obj === window) {
|
|
12220
|
+
return '{ [object Window] }';
|
|
12221
|
+
}
|
|
12222
|
+
if (
|
|
12223
|
+
(typeof globalThis !== 'undefined' && obj === globalThis)
|
|
12224
|
+
|| (typeof global !== 'undefined' && obj === global)
|
|
12225
|
+
) {
|
|
12226
|
+
return '{ [object globalThis] }';
|
|
12227
|
+
}
|
|
12228
|
+
if (!isDate(obj) && !isRegExp(obj)) {
|
|
12229
|
+
var ys = arrObjKeys(obj, inspect);
|
|
12230
|
+
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
12231
|
+
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
|
12232
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
|
|
12233
|
+
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
|
|
12234
|
+
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
|
|
12235
|
+
if (ys.length === 0) { return tag + '{}'; }
|
|
12236
|
+
if (indent) {
|
|
12237
|
+
return tag + '{' + indentedJoin(ys, indent) + '}';
|
|
12238
|
+
}
|
|
12239
|
+
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
|
12240
|
+
}
|
|
12241
|
+
return String(obj);
|
|
12242
|
+
};
|
|
12243
|
+
|
|
12244
|
+
function wrapQuotes(s, defaultStyle, opts) {
|
|
12245
|
+
var style = opts.quoteStyle || defaultStyle;
|
|
12246
|
+
var quoteChar = quotes[style];
|
|
12247
|
+
return quoteChar + s + quoteChar;
|
|
12248
|
+
}
|
|
12249
|
+
|
|
12250
|
+
function quote(s) {
|
|
12251
|
+
return $replace.call(String(s), /"/g, '"');
|
|
12252
|
+
}
|
|
12253
|
+
|
|
12254
|
+
function canTrustToString(obj) {
|
|
12255
|
+
return !toStringTag || !(typeof obj === 'object' && (toStringTag in obj || typeof obj[toStringTag] !== 'undefined'));
|
|
12256
|
+
}
|
|
12257
|
+
function isArray(obj) { return toStr(obj) === '[object Array]' && canTrustToString(obj); }
|
|
12258
|
+
function isDate(obj) { return toStr(obj) === '[object Date]' && canTrustToString(obj); }
|
|
12259
|
+
function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && canTrustToString(obj); }
|
|
12260
|
+
function isError(obj) { return toStr(obj) === '[object Error]' && canTrustToString(obj); }
|
|
12261
|
+
function isString(obj) { return toStr(obj) === '[object String]' && canTrustToString(obj); }
|
|
12262
|
+
function isNumber(obj) { return toStr(obj) === '[object Number]' && canTrustToString(obj); }
|
|
12263
|
+
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && canTrustToString(obj); }
|
|
12264
|
+
|
|
12265
|
+
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
|
|
12266
|
+
function isSymbol(obj) {
|
|
12267
|
+
if (hasShammedSymbols) {
|
|
12268
|
+
return obj && typeof obj === 'object' && obj instanceof Symbol;
|
|
12269
|
+
}
|
|
12270
|
+
if (typeof obj === 'symbol') {
|
|
12271
|
+
return true;
|
|
12272
|
+
}
|
|
12273
|
+
if (!obj || typeof obj !== 'object' || !symToString) {
|
|
12274
|
+
return false;
|
|
12275
|
+
}
|
|
12276
|
+
try {
|
|
12277
|
+
symToString.call(obj);
|
|
12278
|
+
return true;
|
|
12279
|
+
} catch (e) {}
|
|
12280
|
+
return false;
|
|
12281
|
+
}
|
|
12282
|
+
|
|
12283
|
+
function isBigInt(obj) {
|
|
12284
|
+
if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
|
|
12285
|
+
return false;
|
|
12286
|
+
}
|
|
12287
|
+
try {
|
|
12288
|
+
bigIntValueOf.call(obj);
|
|
12289
|
+
return true;
|
|
12290
|
+
} catch (e) {}
|
|
12291
|
+
return false;
|
|
12292
|
+
}
|
|
12293
|
+
|
|
12294
|
+
var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
|
|
12295
|
+
function has(obj, key) {
|
|
12296
|
+
return hasOwn.call(obj, key);
|
|
12297
|
+
}
|
|
12298
|
+
|
|
12299
|
+
function toStr(obj) {
|
|
12300
|
+
return objectToString.call(obj);
|
|
12301
|
+
}
|
|
12302
|
+
|
|
12303
|
+
function nameOf(f) {
|
|
12304
|
+
if (f.name) { return f.name; }
|
|
12305
|
+
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
12306
|
+
if (m) { return m[1]; }
|
|
12307
|
+
return null;
|
|
12308
|
+
}
|
|
12309
|
+
|
|
12310
|
+
function indexOf(xs, x) {
|
|
12311
|
+
if (xs.indexOf) { return xs.indexOf(x); }
|
|
12312
|
+
for (var i = 0, l = xs.length; i < l; i++) {
|
|
12313
|
+
if (xs[i] === x) { return i; }
|
|
12314
|
+
}
|
|
12315
|
+
return -1;
|
|
12316
|
+
}
|
|
12317
|
+
|
|
12318
|
+
function isMap(x) {
|
|
12319
|
+
if (!mapSize || !x || typeof x !== 'object') {
|
|
12320
|
+
return false;
|
|
12321
|
+
}
|
|
12322
|
+
try {
|
|
12323
|
+
mapSize.call(x);
|
|
12324
|
+
try {
|
|
12325
|
+
setSize.call(x);
|
|
12326
|
+
} catch (s) {
|
|
12327
|
+
return true;
|
|
12328
|
+
}
|
|
12329
|
+
return x instanceof Map; // core-js workaround, pre-v2.5.0
|
|
12330
|
+
} catch (e) {}
|
|
12331
|
+
return false;
|
|
12332
|
+
}
|
|
12333
|
+
|
|
12334
|
+
function isWeakMap(x) {
|
|
12335
|
+
if (!weakMapHas || !x || typeof x !== 'object') {
|
|
12336
|
+
return false;
|
|
12337
|
+
}
|
|
12338
|
+
try {
|
|
12339
|
+
weakMapHas.call(x, weakMapHas);
|
|
12340
|
+
try {
|
|
12341
|
+
weakSetHas.call(x, weakSetHas);
|
|
12342
|
+
} catch (s) {
|
|
12343
|
+
return true;
|
|
12344
|
+
}
|
|
12345
|
+
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
|
|
12346
|
+
} catch (e) {}
|
|
12347
|
+
return false;
|
|
12348
|
+
}
|
|
12349
|
+
|
|
12350
|
+
function isWeakRef(x) {
|
|
12351
|
+
if (!weakRefDeref || !x || typeof x !== 'object') {
|
|
12352
|
+
return false;
|
|
12353
|
+
}
|
|
12354
|
+
try {
|
|
12355
|
+
weakRefDeref.call(x);
|
|
12356
|
+
return true;
|
|
12357
|
+
} catch (e) {}
|
|
12358
|
+
return false;
|
|
12359
|
+
}
|
|
12360
|
+
|
|
12361
|
+
function isSet(x) {
|
|
12362
|
+
if (!setSize || !x || typeof x !== 'object') {
|
|
12363
|
+
return false;
|
|
12364
|
+
}
|
|
12365
|
+
try {
|
|
12366
|
+
setSize.call(x);
|
|
12367
|
+
try {
|
|
12368
|
+
mapSize.call(x);
|
|
12369
|
+
} catch (m) {
|
|
12370
|
+
return true;
|
|
12371
|
+
}
|
|
12372
|
+
return x instanceof Set; // core-js workaround, pre-v2.5.0
|
|
12373
|
+
} catch (e) {}
|
|
12374
|
+
return false;
|
|
12375
|
+
}
|
|
12376
|
+
|
|
12377
|
+
function isWeakSet(x) {
|
|
12378
|
+
if (!weakSetHas || !x || typeof x !== 'object') {
|
|
12379
|
+
return false;
|
|
12380
|
+
}
|
|
12381
|
+
try {
|
|
12382
|
+
weakSetHas.call(x, weakSetHas);
|
|
12383
|
+
try {
|
|
12384
|
+
weakMapHas.call(x, weakMapHas);
|
|
12385
|
+
} catch (s) {
|
|
12386
|
+
return true;
|
|
12387
|
+
}
|
|
12388
|
+
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
|
|
12389
|
+
} catch (e) {}
|
|
12390
|
+
return false;
|
|
12391
|
+
}
|
|
12392
|
+
|
|
12393
|
+
function isElement(x) {
|
|
12394
|
+
if (!x || typeof x !== 'object') { return false; }
|
|
12395
|
+
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
|
|
12396
|
+
return true;
|
|
12397
|
+
}
|
|
12398
|
+
return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
|
|
12399
|
+
}
|
|
12400
|
+
|
|
12401
|
+
function inspectString(str, opts) {
|
|
12402
|
+
if (str.length > opts.maxStringLength) {
|
|
12403
|
+
var remaining = str.length - opts.maxStringLength;
|
|
12404
|
+
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
|
12405
|
+
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
12406
|
+
}
|
|
12407
|
+
var quoteRE = quoteREs[opts.quoteStyle || 'single'];
|
|
12408
|
+
quoteRE.lastIndex = 0;
|
|
12409
|
+
// eslint-disable-next-line no-control-regex
|
|
12410
|
+
var s = $replace.call($replace.call(str, quoteRE, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
12411
|
+
return wrapQuotes(s, 'single', opts);
|
|
12412
|
+
}
|
|
12413
|
+
|
|
12414
|
+
function lowbyte(c) {
|
|
12415
|
+
var n = c.charCodeAt(0);
|
|
12416
|
+
var x = {
|
|
12417
|
+
8: 'b',
|
|
12418
|
+
9: 't',
|
|
12419
|
+
10: 'n',
|
|
12420
|
+
12: 'f',
|
|
12421
|
+
13: 'r'
|
|
12422
|
+
}[n];
|
|
12423
|
+
if (x) { return '\\' + x; }
|
|
12424
|
+
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
|
|
12425
|
+
}
|
|
12426
|
+
|
|
12427
|
+
function markBoxed(str) {
|
|
12428
|
+
return 'Object(' + str + ')';
|
|
12429
|
+
}
|
|
12430
|
+
|
|
12431
|
+
function weakCollectionOf(type) {
|
|
12432
|
+
return type + ' { ? }';
|
|
12433
|
+
}
|
|
12434
|
+
|
|
12435
|
+
function collectionOf(type, size, entries, indent) {
|
|
12436
|
+
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
|
|
12437
|
+
return type + ' (' + size + ') {' + joinedEntries + '}';
|
|
12438
|
+
}
|
|
12439
|
+
|
|
12440
|
+
function singleLineValues(xs) {
|
|
12441
|
+
for (var i = 0; i < xs.length; i++) {
|
|
12442
|
+
if (indexOf(xs[i], '\n') >= 0) {
|
|
12443
|
+
return false;
|
|
12444
|
+
}
|
|
12445
|
+
}
|
|
12446
|
+
return true;
|
|
12447
|
+
}
|
|
12448
|
+
|
|
12449
|
+
function getIndent(opts, depth) {
|
|
12450
|
+
var baseIndent;
|
|
12451
|
+
if (opts.indent === '\t') {
|
|
12452
|
+
baseIndent = '\t';
|
|
12453
|
+
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
|
|
12454
|
+
baseIndent = $join.call(Array(opts.indent + 1), ' ');
|
|
12455
|
+
} else {
|
|
12456
|
+
return null;
|
|
12457
|
+
}
|
|
12458
|
+
return {
|
|
12459
|
+
base: baseIndent,
|
|
12460
|
+
prev: $join.call(Array(depth + 1), baseIndent)
|
|
12461
|
+
};
|
|
12462
|
+
}
|
|
12463
|
+
|
|
12464
|
+
function indentedJoin(xs, indent) {
|
|
12465
|
+
if (xs.length === 0) { return ''; }
|
|
12466
|
+
var lineJoiner = '\n' + indent.prev + indent.base;
|
|
12467
|
+
return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
|
|
12468
|
+
}
|
|
12469
|
+
|
|
12470
|
+
function arrObjKeys(obj, inspect) {
|
|
12471
|
+
var isArr = isArray(obj);
|
|
12472
|
+
var xs = [];
|
|
12473
|
+
if (isArr) {
|
|
12474
|
+
xs.length = obj.length;
|
|
12475
|
+
for (var i = 0; i < obj.length; i++) {
|
|
12476
|
+
xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
|
|
12477
|
+
}
|
|
12478
|
+
}
|
|
12479
|
+
var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
|
|
12480
|
+
var symMap;
|
|
12481
|
+
if (hasShammedSymbols) {
|
|
12482
|
+
symMap = {};
|
|
12483
|
+
for (var k = 0; k < syms.length; k++) {
|
|
12484
|
+
symMap['$' + syms[k]] = syms[k];
|
|
12485
|
+
}
|
|
12486
|
+
}
|
|
12487
|
+
|
|
12488
|
+
for (var key in obj) { // eslint-disable-line no-restricted-syntax
|
|
12489
|
+
if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
12490
|
+
if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
12491
|
+
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
|
|
12492
|
+
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
|
|
12493
|
+
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
12494
|
+
} else if ($test.call(/[^\w$]/, key)) {
|
|
12495
|
+
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
|
|
12496
|
+
} else {
|
|
12497
|
+
xs.push(key + ': ' + inspect(obj[key], obj));
|
|
12498
|
+
}
|
|
12499
|
+
}
|
|
12500
|
+
if (typeof gOPS === 'function') {
|
|
12501
|
+
for (var j = 0; j < syms.length; j++) {
|
|
12502
|
+
if (isEnumerable.call(obj, syms[j])) {
|
|
12503
|
+
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
|
|
12504
|
+
}
|
|
12505
|
+
}
|
|
12506
|
+
}
|
|
12507
|
+
return xs;
|
|
12508
|
+
}
|
|
12509
|
+
|
|
12510
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
|
|
12511
|
+
|
|
12512
|
+
/***/ }),
|
|
12513
|
+
|
|
12514
|
+
/***/ "./node_modules/object-keys/implementation.js":
|
|
12515
|
+
/*!****************************************************!*\
|
|
12516
|
+
!*** ./node_modules/object-keys/implementation.js ***!
|
|
12517
|
+
\****************************************************/
|
|
12518
|
+
/*! no static exports found */
|
|
12519
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
12520
|
+
|
|
12521
|
+
"use strict";
|
|
12522
|
+
|
|
12523
|
+
|
|
12524
|
+
var keysShim;
|
|
12525
|
+
if (!Object.keys) {
|
|
12526
|
+
// modified from https://github.com/es-shims/es5-shim
|
|
12527
|
+
var has = Object.prototype.hasOwnProperty;
|
|
12528
|
+
var toStr = Object.prototype.toString;
|
|
12529
|
+
var isArgs = __webpack_require__(/*! ./isArguments */ "./node_modules/object-keys/isArguments.js"); // eslint-disable-line global-require
|
|
12530
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
12531
|
+
var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
|
|
12532
|
+
var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
|
|
12533
|
+
var dontEnums = [
|
|
12534
|
+
'toString',
|
|
12535
|
+
'toLocaleString',
|
|
12536
|
+
'valueOf',
|
|
12537
|
+
'hasOwnProperty',
|
|
12538
|
+
'isPrototypeOf',
|
|
12539
|
+
'propertyIsEnumerable',
|
|
12540
|
+
'constructor'
|
|
12541
|
+
];
|
|
12542
|
+
var equalsConstructorPrototype = function (o) {
|
|
12543
|
+
var ctor = o.constructor;
|
|
12544
|
+
return ctor && ctor.prototype === o;
|
|
12545
|
+
};
|
|
12546
|
+
var excludedKeys = {
|
|
12547
|
+
$applicationCache: true,
|
|
12548
|
+
$console: true,
|
|
12549
|
+
$external: true,
|
|
12550
|
+
$frame: true,
|
|
12551
|
+
$frameElement: true,
|
|
12552
|
+
$frames: true,
|
|
12553
|
+
$innerHeight: true,
|
|
12554
|
+
$innerWidth: true,
|
|
12555
|
+
$onmozfullscreenchange: true,
|
|
12556
|
+
$onmozfullscreenerror: true,
|
|
12557
|
+
$outerHeight: true,
|
|
12558
|
+
$outerWidth: true,
|
|
12559
|
+
$pageXOffset: true,
|
|
12560
|
+
$pageYOffset: true,
|
|
12561
|
+
$parent: true,
|
|
12562
|
+
$scrollLeft: true,
|
|
12563
|
+
$scrollTop: true,
|
|
12564
|
+
$scrollX: true,
|
|
12565
|
+
$scrollY: true,
|
|
12566
|
+
$self: true,
|
|
12567
|
+
$webkitIndexedDB: true,
|
|
12568
|
+
$webkitStorageInfo: true,
|
|
12569
|
+
$window: true
|
|
12570
|
+
};
|
|
12571
|
+
var hasAutomationEqualityBug = (function () {
|
|
12572
|
+
/* global window */
|
|
12573
|
+
if (typeof window === 'undefined') { return false; }
|
|
12574
|
+
for (var k in window) {
|
|
12575
|
+
try {
|
|
12576
|
+
if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
|
|
12577
|
+
try {
|
|
12578
|
+
equalsConstructorPrototype(window[k]);
|
|
12579
|
+
} catch (e) {
|
|
12580
|
+
return true;
|
|
12581
|
+
}
|
|
12582
|
+
}
|
|
12583
|
+
} catch (e) {
|
|
12584
|
+
return true;
|
|
12585
|
+
}
|
|
12586
|
+
}
|
|
12587
|
+
return false;
|
|
12588
|
+
}());
|
|
12589
|
+
var equalsConstructorPrototypeIfNotBuggy = function (o) {
|
|
12590
|
+
/* global window */
|
|
12591
|
+
if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
|
|
12592
|
+
return equalsConstructorPrototype(o);
|
|
12593
|
+
}
|
|
12594
|
+
try {
|
|
12595
|
+
return equalsConstructorPrototype(o);
|
|
12596
|
+
} catch (e) {
|
|
12597
|
+
return false;
|
|
12598
|
+
}
|
|
12599
|
+
};
|
|
12600
|
+
|
|
12601
|
+
keysShim = function keys(object) {
|
|
12602
|
+
var isObject = object !== null && typeof object === 'object';
|
|
12603
|
+
var isFunction = toStr.call(object) === '[object Function]';
|
|
12604
|
+
var isArguments = isArgs(object);
|
|
12605
|
+
var isString = isObject && toStr.call(object) === '[object String]';
|
|
12606
|
+
var theKeys = [];
|
|
12607
|
+
|
|
12608
|
+
if (!isObject && !isFunction && !isArguments) {
|
|
12609
|
+
throw new TypeError('Object.keys called on a non-object');
|
|
12610
|
+
}
|
|
12611
|
+
|
|
12612
|
+
var skipProto = hasProtoEnumBug && isFunction;
|
|
12613
|
+
if (isString && object.length > 0 && !has.call(object, 0)) {
|
|
12614
|
+
for (var i = 0; i < object.length; ++i) {
|
|
12615
|
+
theKeys.push(String(i));
|
|
12616
|
+
}
|
|
12617
|
+
}
|
|
12618
|
+
|
|
12619
|
+
if (isArguments && object.length > 0) {
|
|
12620
|
+
for (var j = 0; j < object.length; ++j) {
|
|
12621
|
+
theKeys.push(String(j));
|
|
12622
|
+
}
|
|
12623
|
+
} else {
|
|
12624
|
+
for (var name in object) {
|
|
12625
|
+
if (!(skipProto && name === 'prototype') && has.call(object, name)) {
|
|
12626
|
+
theKeys.push(String(name));
|
|
12627
|
+
}
|
|
12628
|
+
}
|
|
12629
|
+
}
|
|
12630
|
+
|
|
12631
|
+
if (hasDontEnumBug) {
|
|
12632
|
+
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
|
|
12633
|
+
|
|
12634
|
+
for (var k = 0; k < dontEnums.length; ++k) {
|
|
12635
|
+
if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
|
|
12636
|
+
theKeys.push(dontEnums[k]);
|
|
12637
|
+
}
|
|
12638
|
+
}
|
|
12639
|
+
}
|
|
12640
|
+
return theKeys;
|
|
12641
|
+
};
|
|
12642
|
+
}
|
|
12643
|
+
module.exports = keysShim;
|
|
12644
|
+
|
|
12645
|
+
|
|
12646
|
+
/***/ }),
|
|
12647
|
+
|
|
12648
|
+
/***/ "./node_modules/object-keys/index.js":
|
|
12649
|
+
/*!*******************************************!*\
|
|
12650
|
+
!*** ./node_modules/object-keys/index.js ***!
|
|
12651
|
+
\*******************************************/
|
|
12652
|
+
/*! no static exports found */
|
|
12653
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
12654
|
+
|
|
12655
|
+
"use strict";
|
|
12656
|
+
|
|
12657
|
+
|
|
12658
|
+
var slice = Array.prototype.slice;
|
|
12659
|
+
var isArgs = __webpack_require__(/*! ./isArguments */ "./node_modules/object-keys/isArguments.js");
|
|
12660
|
+
|
|
12661
|
+
var origKeys = Object.keys;
|
|
12662
|
+
var keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__(/*! ./implementation */ "./node_modules/object-keys/implementation.js");
|
|
12663
|
+
|
|
12664
|
+
var originalKeys = Object.keys;
|
|
12665
|
+
|
|
12666
|
+
keysShim.shim = function shimObjectKeys() {
|
|
12667
|
+
if (Object.keys) {
|
|
12668
|
+
var keysWorksWithArguments = (function () {
|
|
12669
|
+
// Safari 5.0 bug
|
|
12670
|
+
var args = Object.keys(arguments);
|
|
12671
|
+
return args && args.length === arguments.length;
|
|
12672
|
+
}(1, 2));
|
|
12673
|
+
if (!keysWorksWithArguments) {
|
|
12674
|
+
Object.keys = function keys(object) { // eslint-disable-line func-name-matching
|
|
12675
|
+
if (isArgs(object)) {
|
|
12676
|
+
return originalKeys(slice.call(object));
|
|
12677
|
+
}
|
|
12678
|
+
return originalKeys(object);
|
|
12679
|
+
};
|
|
12680
|
+
}
|
|
12681
|
+
} else {
|
|
12682
|
+
Object.keys = keysShim;
|
|
12683
|
+
}
|
|
12684
|
+
return Object.keys || keysShim;
|
|
12685
|
+
};
|
|
12686
|
+
|
|
12687
|
+
module.exports = keysShim;
|
|
12688
|
+
|
|
12689
|
+
|
|
12690
|
+
/***/ }),
|
|
12691
|
+
|
|
12692
|
+
/***/ "./node_modules/object-keys/isArguments.js":
|
|
12693
|
+
/*!*************************************************!*\
|
|
12694
|
+
!*** ./node_modules/object-keys/isArguments.js ***!
|
|
12695
|
+
\*************************************************/
|
|
12696
|
+
/*! no static exports found */
|
|
12697
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
12698
|
+
|
|
12699
|
+
"use strict";
|
|
12700
|
+
|
|
12701
|
+
|
|
12702
|
+
var toStr = Object.prototype.toString;
|
|
12703
|
+
|
|
12704
|
+
module.exports = function isArguments(value) {
|
|
12705
|
+
var str = toStr.call(value);
|
|
12706
|
+
var isArgs = str === '[object Arguments]';
|
|
12707
|
+
if (!isArgs) {
|
|
12708
|
+
isArgs = str !== '[object Array]' &&
|
|
12709
|
+
value !== null &&
|
|
12710
|
+
typeof value === 'object' &&
|
|
12711
|
+
typeof value.length === 'number' &&
|
|
12712
|
+
value.length >= 0 &&
|
|
12713
|
+
toStr.call(value.callee) === '[object Function]';
|
|
12714
|
+
}
|
|
12715
|
+
return isArgs;
|
|
12716
|
+
};
|
|
12717
|
+
|
|
12718
|
+
|
|
12719
|
+
/***/ }),
|
|
12720
|
+
|
|
12721
|
+
/***/ "./node_modules/object.hasown/auto.js":
|
|
12722
|
+
/*!********************************************!*\
|
|
12723
|
+
!*** ./node_modules/object.hasown/auto.js ***!
|
|
12724
|
+
\********************************************/
|
|
12725
|
+
/*! no static exports found */
|
|
12726
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
12727
|
+
|
|
12728
|
+
"use strict";
|
|
12729
|
+
|
|
12730
|
+
|
|
12731
|
+
__webpack_require__(/*! ./shim */ "./node_modules/object.hasown/shim.js")();
|
|
12732
|
+
|
|
12733
|
+
|
|
12734
|
+
/***/ }),
|
|
12735
|
+
|
|
12736
|
+
/***/ "./node_modules/object.hasown/implementation.js":
|
|
12737
|
+
/*!******************************************************!*\
|
|
12738
|
+
!*** ./node_modules/object.hasown/implementation.js ***!
|
|
12739
|
+
\******************************************************/
|
|
12740
|
+
/*! no static exports found */
|
|
12741
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
12742
|
+
|
|
12743
|
+
"use strict";
|
|
12744
|
+
|
|
12745
|
+
|
|
12746
|
+
var ToObject = __webpack_require__(/*! es-object-atoms/ToObject */ "./node_modules/es-object-atoms/ToObject.js");
|
|
12747
|
+
var ToPropertyKey = __webpack_require__(/*! es-abstract/2024/ToPropertyKey */ "./node_modules/es-abstract/2024/ToPropertyKey.js");
|
|
12748
|
+
var HasOwnProperty = __webpack_require__(/*! es-abstract/2024/HasOwnProperty */ "./node_modules/es-abstract/2024/HasOwnProperty.js");
|
|
12749
|
+
|
|
12750
|
+
module.exports = function hasOwn(O, P) {
|
|
12751
|
+
var obj = ToObject(O);
|
|
12752
|
+
var key = ToPropertyKey(P);
|
|
12753
|
+
return HasOwnProperty(obj, key);
|
|
12754
|
+
};
|
|
12755
|
+
|
|
12756
|
+
|
|
12757
|
+
/***/ }),
|
|
12758
|
+
|
|
12759
|
+
/***/ "./node_modules/object.hasown/polyfill.js":
|
|
12760
|
+
/*!************************************************!*\
|
|
12761
|
+
!*** ./node_modules/object.hasown/polyfill.js ***!
|
|
12762
|
+
\************************************************/
|
|
12763
|
+
/*! no static exports found */
|
|
12764
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
12765
|
+
|
|
12766
|
+
"use strict";
|
|
12767
|
+
|
|
12768
|
+
|
|
12769
|
+
var implementation = __webpack_require__(/*! ./implementation */ "./node_modules/object.hasown/implementation.js");
|
|
12770
|
+
|
|
12771
|
+
module.exports = function getPolyfill() {
|
|
12772
|
+
return Object.hasOwn || implementation;
|
|
12773
|
+
};
|
|
12774
|
+
|
|
12775
|
+
|
|
12776
|
+
/***/ }),
|
|
12777
|
+
|
|
12778
|
+
/***/ "./node_modules/object.hasown/shim.js":
|
|
12779
|
+
/*!********************************************!*\
|
|
12780
|
+
!*** ./node_modules/object.hasown/shim.js ***!
|
|
12781
|
+
\********************************************/
|
|
12782
|
+
/*! no static exports found */
|
|
12783
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
12784
|
+
|
|
12785
|
+
"use strict";
|
|
12786
|
+
|
|
12787
|
+
|
|
12788
|
+
var getPolyfill = __webpack_require__(/*! ./polyfill */ "./node_modules/object.hasown/polyfill.js");
|
|
12789
|
+
var define = __webpack_require__(/*! define-properties */ "./node_modules/define-properties/index.js");
|
|
12790
|
+
|
|
12791
|
+
module.exports = function shimObjectHasOwn() {
|
|
12792
|
+
var polyfill = getPolyfill();
|
|
12793
|
+
define(
|
|
12794
|
+
Object,
|
|
12795
|
+
{ hasOwn: polyfill },
|
|
12796
|
+
{ hasOwn: function () { return Object.hasOwn !== polyfill; } }
|
|
12797
|
+
);
|
|
12798
|
+
return polyfill;
|
|
12799
|
+
};
|
|
12800
|
+
|
|
12801
|
+
|
|
12802
|
+
/***/ }),
|
|
12803
|
+
|
|
12804
|
+
/***/ "./node_modules/safe-regex-test/index.js":
|
|
12805
|
+
/*!***********************************************!*\
|
|
12806
|
+
!*** ./node_modules/safe-regex-test/index.js ***!
|
|
12807
|
+
\***********************************************/
|
|
12808
|
+
/*! no static exports found */
|
|
12809
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
12810
|
+
|
|
12811
|
+
"use strict";
|
|
12812
|
+
|
|
12813
|
+
|
|
12814
|
+
var callBound = __webpack_require__(/*! call-bound */ "./node_modules/call-bound/index.js");
|
|
12815
|
+
var isRegex = __webpack_require__(/*! is-regex */ "./node_modules/is-regex/index.js");
|
|
12816
|
+
|
|
12817
|
+
var $exec = callBound('RegExp.prototype.exec');
|
|
12818
|
+
var $TypeError = __webpack_require__(/*! es-errors/type */ "./node_modules/es-errors/type.js");
|
|
12819
|
+
|
|
12820
|
+
/** @type {import('.')} */
|
|
12821
|
+
module.exports = function regexTester(regex) {
|
|
12822
|
+
if (!isRegex(regex)) {
|
|
12823
|
+
throw new $TypeError('`regex` must be a RegExp');
|
|
12824
|
+
}
|
|
12825
|
+
return function test(s) {
|
|
12826
|
+
return $exec(regex, s) !== null;
|
|
12827
|
+
};
|
|
12828
|
+
};
|
|
12829
|
+
|
|
12830
|
+
|
|
12831
|
+
/***/ }),
|
|
12832
|
+
|
|
12833
|
+
/***/ "./node_modules/webpack/buildin/global.js":
|
|
12834
|
+
/*!***********************************!*\
|
|
12835
|
+
!*** (webpack)/buildin/global.js ***!
|
|
12836
|
+
\***********************************/
|
|
12837
|
+
/*! no static exports found */
|
|
12838
|
+
/***/ (function(module, exports) {
|
|
12839
|
+
|
|
12840
|
+
var g;
|
|
12841
|
+
|
|
12842
|
+
// This works in non-strict mode
|
|
12843
|
+
g = (function() {
|
|
12844
|
+
return this;
|
|
12845
|
+
})();
|
|
12846
|
+
|
|
12847
|
+
try {
|
|
12848
|
+
// This works if eval is allowed (see CSP)
|
|
12849
|
+
g = g || new Function("return this")();
|
|
12850
|
+
} catch (e) {
|
|
12851
|
+
// This works if the window reference is available
|
|
12852
|
+
if (typeof window === "object") g = window;
|
|
12853
|
+
}
|
|
12854
|
+
|
|
12855
|
+
// g can still be undefined, but nothing to do about it...
|
|
12856
|
+
// We return undefined, instead of nothing here, so it's
|
|
12857
|
+
// easier to handle this case. if(!global) { ...}
|
|
12858
|
+
|
|
12859
|
+
module.exports = g;
|
|
12860
|
+
|
|
12861
|
+
|
|
12862
|
+
/***/ }),
|
|
12863
|
+
|
|
12864
|
+
/***/ "./src/darkmode.js":
|
|
12865
|
+
/*!*************************!*\
|
|
12866
|
+
!*** ./src/darkmode.js ***!
|
|
12867
|
+
\*************************/
|
|
12868
|
+
/*! exports provided: run, init, convertBg, updateStyle, getContrast, extend */
|
|
12869
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12870
|
+
|
|
12871
|
+
"use strict";
|
|
12872
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12873
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "run", function() { return run; });
|
|
12874
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "init", function() { return init; });
|
|
12875
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertBg", function() { return convertBg; });
|
|
12876
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateStyle", function() { return updateStyle; });
|
|
12877
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getContrast", function() { return getContrast; });
|
|
12878
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return extend; });
|
|
12879
|
+
/* harmony import */ var object_hasown_auto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! object.hasown/auto */ "./node_modules/object.hasown/auto.js");
|
|
12880
|
+
/* harmony import */ var object_hasown_auto__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(object_hasown_auto__WEBPACK_IMPORTED_MODULE_0__);
|
|
12881
|
+
/* harmony import */ var _modules_constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/constant */ "./src/modules/constant.js");
|
|
12882
|
+
/* harmony import */ var _modules_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/config */ "./src/modules/config.js");
|
|
12883
|
+
/* harmony import */ var _modules_global__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/global */ "./src/modules/global.js");
|
|
12884
|
+
/* harmony import */ var _modules_domUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/domUtils */ "./src/modules/domUtils.js");
|
|
12885
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12886
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12887
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12888
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12889
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12890
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12891
|
+
/**
|
|
12892
|
+
* @name Darkmode主入口
|
|
12893
|
+
*
|
|
12894
|
+
* @function run 初始化Dark Mode配置并运行Dark Mode处理
|
|
12895
|
+
* @param {DOM Object Array} nodes 要处理的节点列表
|
|
12896
|
+
* @param {Object} opt Dark Mode配置,详见init配置说明
|
|
12897
|
+
* @return void
|
|
12898
|
+
*
|
|
12899
|
+
* @function init 初始化Dark Mode配置
|
|
12900
|
+
* @param {Function} opt.begin 开始处理时触发的回调
|
|
12901
|
+
* @param {Function} opt.showFirstPage 首屏处理完成时触发的回调
|
|
12902
|
+
* @param {Function} opt.error 发生error时触发的回调
|
|
9779
12903
|
* @param {string} opt.mode 强制指定的颜色模式(dark|light), 指定了就不监听系统颜色
|
|
9780
12904
|
* @param {Object} opt.whitelist 节点白名单
|
|
9781
12905
|
* @param {Array} opt.whitelist.tagName 标签名列表
|
|
@@ -9810,9 +12934,13 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
9810
12934
|
*
|
|
9811
12935
|
*/
|
|
9812
12936
|
|
|
12937
|
+
// Object.hasOwn polyfill:color-string / colorjs.io 等依赖在模块初始化时即调用 Object.hasOwn,
|
|
12938
|
+
// 而该 API 在 iOS 15.4 以下不支持,因此必须作为最顶部、最先执行的 import
|
|
12939
|
+
|
|
12940
|
+
|
|
9813
12941
|
// 常量
|
|
9814
12942
|
|
|
9815
|
-
var classReg = new RegExp("".concat(
|
|
12943
|
+
var classReg = new RegExp("".concat(_modules_constant__WEBPACK_IMPORTED_MODULE_1__["CLASS_PREFIX"], "[^ ]+"), 'g');
|
|
9816
12944
|
|
|
9817
12945
|
// Darkmode配置
|
|
9818
12946
|
|
|
@@ -9825,24 +12953,24 @@ var switchToDarkmode = function switchToDarkmode(mqlObj) {
|
|
|
9825
12953
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
9826
12954
|
type: 'dom'
|
|
9827
12955
|
};
|
|
9828
|
-
opt.force && (
|
|
12956
|
+
opt.force && (_modules_global__WEBPACK_IMPORTED_MODULE_3__["cssUtils"].isFinish = false); // 如果是强制运行Dark Mode处理逻辑,则重置为未运行
|
|
9829
12957
|
|
|
9830
|
-
if (
|
|
12958
|
+
if (_modules_global__WEBPACK_IMPORTED_MODULE_3__["cssUtils"].isFinish) return; // 已运行过Dark Mode处理逻辑则不再运行
|
|
9831
12959
|
|
|
9832
12960
|
try {
|
|
9833
|
-
|
|
12961
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["sdk"].isDarkmode = _modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].mode ? _modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].mode === 'dark' : mqlObj.matches;
|
|
9834
12962
|
if (opt.type === 'dom') {
|
|
9835
12963
|
// 处理节点
|
|
9836
|
-
|
|
9837
|
-
Array.prototype.forEach.call(
|
|
9838
|
-
if (
|
|
12964
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["sdk"].isDarkmode && typeof _modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].begin === 'function' && _modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].begin(_modules_global__WEBPACK_IMPORTED_MODULE_3__["domUtils"].hasDelay());
|
|
12965
|
+
Array.prototype.forEach.call(_modules_global__WEBPACK_IMPORTED_MODULE_3__["domUtils"].get(), function (node) {
|
|
12966
|
+
if (_modules_global__WEBPACK_IMPORTED_MODULE_3__["sdk"].isDarkmode && node.className && typeof node.className === 'string') {
|
|
9839
12967
|
node.className = node.className.replace(classReg, ''); // 过滤掉原有的Dark Mode class,避免外部复制文章时把文章内的Dark Mode class也复制过去导致新文章在Dark Mode下样式错乱
|
|
9840
12968
|
}
|
|
9841
12969
|
|
|
9842
|
-
if (
|
|
9843
|
-
if (!
|
|
12970
|
+
if (_modules_global__WEBPACK_IMPORTED_MODULE_3__["sdk"].isDarkmode || _modules_global__WEBPACK_IMPORTED_MODULE_3__["plugins"].length) {
|
|
12971
|
+
if (!_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].needJudgeFirstPage) {
|
|
9844
12972
|
// 不需要判断首屏
|
|
9845
|
-
|
|
12973
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["cssUtils"].addCss(_modules_global__WEBPACK_IMPORTED_MODULE_3__["sdk"].convert(node)); // 写入非首屏样式
|
|
9846
12974
|
} else {
|
|
9847
12975
|
// 判断首屏
|
|
9848
12976
|
var rect = node.getBoundingClientRect();
|
|
@@ -9850,32 +12978,32 @@ var switchToDarkmode = function switchToDarkmode(mqlObj) {
|
|
|
9850
12978
|
var bottom = rect.bottom;
|
|
9851
12979
|
if (top <= 0 && bottom <= 0) {
|
|
9852
12980
|
// 首屏前面
|
|
9853
|
-
|
|
9854
|
-
} else if (top > 0 && top <
|
|
12981
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["cssUtils"].addCss(_modules_global__WEBPACK_IMPORTED_MODULE_3__["sdk"].convert(node)); // 写入非首屏样式
|
|
12982
|
+
} else if (top > 0 && top < _modules_constant__WEBPACK_IMPORTED_MODULE_1__["PAGE_HEIGHT"] || bottom > 0 && bottom < _modules_constant__WEBPACK_IMPORTED_MODULE_1__["PAGE_HEIGHT"]) {
|
|
9855
12983
|
// 首屏
|
|
9856
|
-
|
|
9857
|
-
|
|
12984
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["domUtils"].addFirstPageNode(node); // 记录首屏节点
|
|
12985
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["cssUtils"].addCss(_modules_global__WEBPACK_IMPORTED_MODULE_3__["sdk"].convert(node), true); // 写入首屏样式
|
|
9858
12986
|
} else {
|
|
9859
12987
|
// 首屏后面,理论上,这里最多只会进来一次
|
|
9860
|
-
|
|
12988
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].needJudgeFirstPage = false; // 至此,不需要再判断首屏了
|
|
9861
12989
|
|
|
9862
12990
|
// 显示首屏
|
|
9863
|
-
|
|
9864
|
-
|
|
9865
|
-
typeof
|
|
12991
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["cssUtils"].writeStyle(true); // 写入首屏样式表
|
|
12992
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["domUtils"].showFirstPageNodes(); // 显示首屏节点
|
|
12993
|
+
typeof _modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].showFirstPage === 'function' && _modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].showFirstPage(); // 执行首屏回调
|
|
9866
12994
|
|
|
9867
|
-
|
|
12995
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["cssUtils"].addCss(_modules_global__WEBPACK_IMPORTED_MODULE_3__["sdk"].convert(node)); // 写入非首屏样式
|
|
9868
12996
|
}
|
|
9869
12997
|
}
|
|
9870
12998
|
}
|
|
9871
12999
|
});
|
|
9872
13000
|
|
|
9873
|
-
|
|
13001
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["plugins"].loopTimes++;
|
|
9874
13002
|
} else if (opt.type === 'bg') {
|
|
9875
13003
|
// 处理背景
|
|
9876
|
-
|
|
9877
|
-
return
|
|
9878
|
-
|
|
13004
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["sdk"].isDarkmode && _modules_global__WEBPACK_IMPORTED_MODULE_3__["tnQueue"].forEach(function (text) {
|
|
13005
|
+
return _modules_global__WEBPACK_IMPORTED_MODULE_3__["bgStack"].contains(text, function (bg) {
|
|
13006
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["cssUtils"].addCss(_modules_global__WEBPACK_IMPORTED_MODULE_3__["cssUtils"].genCss(bg.className, bg.cssKV)); // 写入非首屏样式
|
|
9879
13007
|
typeof bg.cb === 'function' && bg.cb(bg);
|
|
9880
13008
|
|
|
9881
13009
|
// 还得处理该背景下的所有新老节点
|
|
@@ -9883,8 +13011,8 @@ var switchToDarkmode = function switchToDarkmode(mqlObj) {
|
|
|
9883
13011
|
bg.elOld !== bg.el && els.push(bg.el);
|
|
9884
13012
|
els.forEach(function (el) {
|
|
9885
13013
|
var _el$COLORATTR, _el$BGCOLORATTR, _el$ORIGINAL_COLORATT, _el$ORIGINAL_BGCOLORA, _el$BGIMAGEATTR, _el$COMPLEMENTARY_BGI;
|
|
9886
|
-
var inheritAttrs = [[
|
|
9887
|
-
var children = Object(
|
|
13014
|
+
var inheritAttrs = [[_modules_constant__WEBPACK_IMPORTED_MODULE_1__["COLORATTR"], (_el$COLORATTR = el[_modules_constant__WEBPACK_IMPORTED_MODULE_1__["COLORATTR"]]) !== null && _el$COLORATTR !== void 0 ? _el$COLORATTR : null], [_modules_constant__WEBPACK_IMPORTED_MODULE_1__["BGCOLORATTR"], (_el$BGCOLORATTR = el[_modules_constant__WEBPACK_IMPORTED_MODULE_1__["BGCOLORATTR"]]) !== null && _el$BGCOLORATTR !== void 0 ? _el$BGCOLORATTR : null], [_modules_constant__WEBPACK_IMPORTED_MODULE_1__["ORIGINAL_COLORATTR"], (_el$ORIGINAL_COLORATT = el[_modules_constant__WEBPACK_IMPORTED_MODULE_1__["ORIGINAL_COLORATTR"]]) !== null && _el$ORIGINAL_COLORATT !== void 0 ? _el$ORIGINAL_COLORATT : null], [_modules_constant__WEBPACK_IMPORTED_MODULE_1__["ORIGINAL_BGCOLORATTR"], (_el$ORIGINAL_BGCOLORA = el[_modules_constant__WEBPACK_IMPORTED_MODULE_1__["ORIGINAL_BGCOLORATTR"]]) !== null && _el$ORIGINAL_BGCOLORA !== void 0 ? _el$ORIGINAL_BGCOLORA : null], [_modules_constant__WEBPACK_IMPORTED_MODULE_1__["BGIMAGEATTR"], (_el$BGIMAGEATTR = el[_modules_constant__WEBPACK_IMPORTED_MODULE_1__["BGIMAGEATTR"]]) !== null && _el$BGIMAGEATTR !== void 0 ? _el$BGIMAGEATTR : null], [_modules_constant__WEBPACK_IMPORTED_MODULE_1__["COMPLEMENTARY_BGIMAGECOLORATTR"], (_el$COMPLEMENTARY_BGI = el[_modules_constant__WEBPACK_IMPORTED_MODULE_1__["COMPLEMENTARY_BGIMAGECOLORATTR"]]) !== null && _el$COMPLEMENTARY_BGI !== void 0 ? _el$COMPLEMENTARY_BGI : null]];
|
|
13015
|
+
var children = Object(_modules_domUtils__WEBPACK_IMPORTED_MODULE_4__["getChildrenAndIt"])(el, true);
|
|
9888
13016
|
children.forEach(function (child) {
|
|
9889
13017
|
// 重置继承属性
|
|
9890
13018
|
inheritAttrs.forEach(function (_ref) {
|
|
@@ -9900,35 +13028,35 @@ var switchToDarkmode = function switchToDarkmode(mqlObj) {
|
|
|
9900
13028
|
});
|
|
9901
13029
|
children.forEach(function (child) {
|
|
9902
13030
|
// 重新运行Dark Mode处理逻辑
|
|
9903
|
-
|
|
13031
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["cssUtils"].addCss(_modules_global__WEBPACK_IMPORTED_MODULE_3__["sdk"].convert(child, undefined, false, true));
|
|
9904
13032
|
});
|
|
9905
13033
|
});
|
|
9906
13034
|
});
|
|
9907
13035
|
});
|
|
9908
13036
|
}
|
|
9909
|
-
if (
|
|
13037
|
+
if (_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].needJudgeFirstPage || !_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].needJudgeFirstPage && !_modules_global__WEBPACK_IMPORTED_MODULE_3__["domUtils"].showFirstPage) {
|
|
9910
13038
|
// config.needJudgeFirstPage === ture,表示需要判断首屏但是正文长度没超过一屏
|
|
9911
13039
|
// config.needJudgeFirstPage === false && domUtils.showFirstPage === false,表示不需要判断首屏且没有做首屏优化
|
|
9912
|
-
typeof
|
|
13040
|
+
typeof _modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].showFirstPage === 'function' && _modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].showFirstPage(); // 执行首屏回调
|
|
9913
13041
|
}
|
|
9914
13042
|
|
|
9915
|
-
|
|
9916
|
-
|
|
13043
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["cssUtils"].writeStyle(); // 写入非首屏样式表
|
|
13044
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["domUtils"].emptyFirstPageNodes(); // 清空记录的首屏节点
|
|
9917
13045
|
|
|
9918
|
-
if (!
|
|
13046
|
+
if (!_modules_global__WEBPACK_IMPORTED_MODULE_3__["sdk"].isDarkmode) {
|
|
9919
13047
|
// 非Dark Mode
|
|
9920
13048
|
// 首次加载页面时为非Dark Mode,标记为不需要判断首屏
|
|
9921
|
-
|
|
13049
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].needJudgeFirstPage = false;
|
|
9922
13050
|
|
|
9923
13051
|
// 首次加载页面时为非Dark Mode,标记为不延迟判断背景
|
|
9924
|
-
|
|
9925
|
-
if (
|
|
9926
|
-
|
|
13052
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].delayBgJudge = false;
|
|
13053
|
+
if (_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].container === null && opt.type === 'dom' && _modules_global__WEBPACK_IMPORTED_MODULE_3__["domUtils"].length) {
|
|
13054
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["domUtils"].delay(); // 将节点转移到延迟处理队列里
|
|
9927
13055
|
}
|
|
9928
13056
|
}
|
|
9929
13057
|
} catch (e) {
|
|
9930
13058
|
console.log('An error occurred when running the dark mode conversion algorithm\n', e);
|
|
9931
|
-
typeof
|
|
13059
|
+
typeof _modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].error === 'function' && _modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].error(e);
|
|
9932
13060
|
}
|
|
9933
13061
|
};
|
|
9934
13062
|
|
|
@@ -9936,7 +13064,7 @@ var switchToDarkmode = function switchToDarkmode(mqlObj) {
|
|
|
9936
13064
|
function run(nodes, opt) {
|
|
9937
13065
|
init(opt); // 初始化配置
|
|
9938
13066
|
|
|
9939
|
-
|
|
13067
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["domUtils"].set(nodes);
|
|
9940
13068
|
switchToDarkmode(mql, {
|
|
9941
13069
|
force: true,
|
|
9942
13070
|
type: 'dom'
|
|
@@ -9947,12 +13075,12 @@ function run(nodes, opt) {
|
|
|
9947
13075
|
// 初始化Dark Mode配置
|
|
9948
13076
|
function init() {
|
|
9949
13077
|
var opt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9950
|
-
if (
|
|
13078
|
+
if (_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].hasInit) return; // 只可设置一次配置
|
|
9951
13079
|
|
|
9952
|
-
|
|
13080
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].hasInit = true; // 记录为配置已设置
|
|
9953
13081
|
|
|
9954
|
-
var tagName =
|
|
9955
|
-
var attribute =
|
|
13082
|
+
var tagName = _modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].whitelist.tagName;
|
|
13083
|
+
var attribute = _modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].whitelist.attribute;
|
|
9956
13084
|
if (opt.whitelist) {
|
|
9957
13085
|
opt.whitelist.tagName instanceof Array && opt.whitelist.tagName.forEach(function (item) {
|
|
9958
13086
|
item = item.toUpperCase();
|
|
@@ -9963,24 +13091,24 @@ function init() {
|
|
|
9963
13091
|
});
|
|
9964
13092
|
}
|
|
9965
13093
|
if (['dark', 'light'].indexOf(opt.mode) > -1) {
|
|
9966
|
-
|
|
9967
|
-
opt.mode === 'dark' && document.getElementsByTagName('html')[0].classList.add(
|
|
9968
|
-
}
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
9979
|
-
|
|
9980
|
-
|
|
9981
|
-
if (!
|
|
13094
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].set('string', opt, 'mode');
|
|
13095
|
+
opt.mode === 'dark' && document.getElementsByTagName('html')[0].classList.add(_modules_constant__WEBPACK_IMPORTED_MODULE_1__["HTML_CLASS"]);
|
|
13096
|
+
}
|
|
13097
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].set('function', opt, 'begin');
|
|
13098
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].set('function', opt, 'showFirstPage');
|
|
13099
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].set('function', opt, 'error');
|
|
13100
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].set('boolean', opt, 'needJudgeFirstPage');
|
|
13101
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].set('boolean', opt, 'delayBgJudge');
|
|
13102
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].set('dom', opt, 'container');
|
|
13103
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].set('string', opt, 'cssSelectorsPrefix');
|
|
13104
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].set('string', opt, 'defaultLightTextColor');
|
|
13105
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].set('string', opt, 'defaultLightBgColor');
|
|
13106
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].set('string', opt, 'defaultDarkTextColor');
|
|
13107
|
+
_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].set('string', opt, 'defaultDarkBgColor');
|
|
13108
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["sdk"].init();
|
|
13109
|
+
if (!_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].mode && mql === null && window.matchMedia) {
|
|
9982
13110
|
// 匹配媒体查询
|
|
9983
|
-
mql = window.matchMedia(
|
|
13111
|
+
mql = window.matchMedia(_modules_constant__WEBPACK_IMPORTED_MODULE_1__["MEDIA_QUERY"]);
|
|
9984
13112
|
mql.addListener(switchToDarkmode); // 监听
|
|
9985
13113
|
}
|
|
9986
13114
|
}
|
|
@@ -9989,10 +13117,10 @@ function init() {
|
|
|
9989
13117
|
|
|
9990
13118
|
// 处理背景
|
|
9991
13119
|
function convertBg(nodes) {
|
|
9992
|
-
|
|
9993
|
-
if (
|
|
9994
|
-
|
|
9995
|
-
|
|
13120
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["domUtils"].set(nodes);
|
|
13121
|
+
if (_modules_config__WEBPACK_IMPORTED_MODULE_2__["default"].container !== null) {
|
|
13122
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["bgStack"].update(nodes); // 更新背景堆栈
|
|
13123
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["tnQueue"].update(nodes); // 更新文字队列
|
|
9996
13124
|
}
|
|
9997
13125
|
|
|
9998
13126
|
switchToDarkmode(mql, {
|
|
@@ -10004,24 +13132,24 @@ function convertBg(nodes) {
|
|
|
10004
13132
|
|
|
10005
13133
|
// 更新节点Dark Mode样式
|
|
10006
13134
|
function updateStyle(node, styles) {
|
|
10007
|
-
if (!
|
|
10008
|
-
|
|
13135
|
+
if (!_modules_global__WEBPACK_IMPORTED_MODULE_3__["cssUtils"].isFinish) return; // 没有运行过Dark Mode处理逻辑则无需运行
|
|
13136
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["cssUtils"].addCss(_modules_global__WEBPACK_IMPORTED_MODULE_3__["sdk"].convert(node, styles ? Object.keys(styles).map(function (key) {
|
|
10009
13137
|
return [key, styles[key]];
|
|
10010
13138
|
}) : undefined, true), false);
|
|
10011
|
-
|
|
13139
|
+
_modules_global__WEBPACK_IMPORTED_MODULE_3__["cssUtils"].writeStyle();
|
|
10012
13140
|
}
|
|
10013
13141
|
;
|
|
10014
13142
|
|
|
10015
13143
|
// 获取两个颜色的对比度
|
|
10016
13144
|
function getContrast(color1, color2) {
|
|
10017
|
-
return
|
|
13145
|
+
return _modules_global__WEBPACK_IMPORTED_MODULE_3__["sdk"].getContrast(color1, color2);
|
|
10018
13146
|
}
|
|
10019
13147
|
;
|
|
10020
13148
|
|
|
10021
13149
|
// 挂载插件
|
|
10022
13150
|
function extend(pluginList) {
|
|
10023
13151
|
pluginList.forEach(function (plugin) {
|
|
10024
|
-
return
|
|
13152
|
+
return _modules_global__WEBPACK_IMPORTED_MODULE_3__["plugins"].extend(plugin);
|
|
10025
13153
|
});
|
|
10026
13154
|
}
|
|
10027
13155
|
;
|
|
@@ -11967,6 +15095,17 @@ var TextNodeQueue = /*#__PURE__*/function () {
|
|
|
11967
15095
|
|
|
11968
15096
|
;
|
|
11969
15097
|
|
|
15098
|
+
/***/ }),
|
|
15099
|
+
|
|
15100
|
+
/***/ 0:
|
|
15101
|
+
/*!********************************!*\
|
|
15102
|
+
!*** ./util.inspect (ignored) ***!
|
|
15103
|
+
\********************************/
|
|
15104
|
+
/*! no static exports found */
|
|
15105
|
+
/***/ (function(module, exports) {
|
|
15106
|
+
|
|
15107
|
+
/* (ignored) */
|
|
15108
|
+
|
|
11970
15109
|
/***/ })
|
|
11971
15110
|
|
|
11972
15111
|
/******/ });
|