@rsbuild/core 1.6.10 → 1.6.12-canary-63b4dae2-20251204065915

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.
@@ -0,0 +1,1200 @@
1
+ (() => {
2
+ var __webpack_modules__ = {
3
+ 520: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
+ "use strict";
5
+ const clone = __nccwpck_require__(377);
6
+ const typeOf = __nccwpck_require__(778);
7
+ const isPlainObject = __nccwpck_require__(967);
8
+ function cloneDeep(val, instanceClone) {
9
+ switch (typeOf(val)) {
10
+ case "object":
11
+ return cloneObjectDeep(val, instanceClone);
12
+ case "array":
13
+ return cloneArrayDeep(val, instanceClone);
14
+ default: {
15
+ return clone(val);
16
+ }
17
+ }
18
+ }
19
+ function cloneObjectDeep(val, instanceClone) {
20
+ if (typeof instanceClone === "function") {
21
+ return instanceClone(val);
22
+ }
23
+ if (instanceClone || isPlainObject(val)) {
24
+ const res = new val.constructor();
25
+ for (let key in val) {
26
+ res[key] = cloneDeep(val[key], instanceClone);
27
+ }
28
+ return res;
29
+ }
30
+ return val;
31
+ }
32
+ function cloneArrayDeep(val, instanceClone) {
33
+ const res = new val.constructor(val.length);
34
+ for (let i = 0; i < val.length; i++) {
35
+ res[i] = cloneDeep(val[i], instanceClone);
36
+ }
37
+ return res;
38
+ }
39
+ module.exports = cloneDeep;
40
+ },
41
+ 790: (module) => {
42
+ module.exports = flatten;
43
+ flatten.flatten = flatten;
44
+ flatten.unflatten = unflatten;
45
+ function isBuffer(obj) {
46
+ return (
47
+ obj &&
48
+ obj.constructor &&
49
+ typeof obj.constructor.isBuffer === "function" &&
50
+ obj.constructor.isBuffer(obj)
51
+ );
52
+ }
53
+ function keyIdentity(key) {
54
+ return key;
55
+ }
56
+ function flatten(target, opts) {
57
+ opts = opts || {};
58
+ const delimiter = opts.delimiter || ".";
59
+ const maxDepth = opts.maxDepth;
60
+ const transformKey = opts.transformKey || keyIdentity;
61
+ const output = {};
62
+ function step(object, prev, currentDepth) {
63
+ currentDepth = currentDepth || 1;
64
+ Object.keys(object).forEach(function (key) {
65
+ const value = object[key];
66
+ const isarray = opts.safe && Array.isArray(value);
67
+ const type = Object.prototype.toString.call(value);
68
+ const isbuffer = isBuffer(value);
69
+ const isobject =
70
+ type === "[object Object]" || type === "[object Array]";
71
+ const newKey = prev
72
+ ? prev + delimiter + transformKey(key)
73
+ : transformKey(key);
74
+ if (
75
+ !isarray &&
76
+ !isbuffer &&
77
+ isobject &&
78
+ Object.keys(value).length &&
79
+ (!opts.maxDepth || currentDepth < maxDepth)
80
+ ) {
81
+ return step(value, newKey, currentDepth + 1);
82
+ }
83
+ output[newKey] = value;
84
+ });
85
+ }
86
+ step(target);
87
+ return output;
88
+ }
89
+ function unflatten(target, opts) {
90
+ opts = opts || {};
91
+ const delimiter = opts.delimiter || ".";
92
+ const overwrite = opts.overwrite || false;
93
+ const transformKey = opts.transformKey || keyIdentity;
94
+ const result = {};
95
+ const isbuffer = isBuffer(target);
96
+ if (
97
+ isbuffer ||
98
+ Object.prototype.toString.call(target) !== "[object Object]"
99
+ ) {
100
+ return target;
101
+ }
102
+ function getkey(key) {
103
+ const parsedKey = Number(key);
104
+ return isNaN(parsedKey) || key.indexOf(".") !== -1 || opts.object
105
+ ? key
106
+ : parsedKey;
107
+ }
108
+ function addKeys(keyPrefix, recipient, target) {
109
+ return Object.keys(target).reduce(function (result, key) {
110
+ result[keyPrefix + delimiter + key] = target[key];
111
+ return result;
112
+ }, recipient);
113
+ }
114
+ function isEmpty(val) {
115
+ const type = Object.prototype.toString.call(val);
116
+ const isArray = type === "[object Array]";
117
+ const isObject = type === "[object Object]";
118
+ if (!val) {
119
+ return true;
120
+ } else if (isArray) {
121
+ return !val.length;
122
+ } else if (isObject) {
123
+ return !Object.keys(val).length;
124
+ }
125
+ }
126
+ target = Object.keys(target).reduce(function (result, key) {
127
+ const type = Object.prototype.toString.call(target[key]);
128
+ const isObject =
129
+ type === "[object Object]" || type === "[object Array]";
130
+ if (!isObject || isEmpty(target[key])) {
131
+ result[key] = target[key];
132
+ return result;
133
+ } else {
134
+ return addKeys(key, result, flatten(target[key], opts));
135
+ }
136
+ }, {});
137
+ Object.keys(target).forEach(function (key) {
138
+ const split = key.split(delimiter).map(transformKey);
139
+ let key1 = getkey(split.shift());
140
+ let key2 = getkey(split[0]);
141
+ let recipient = result;
142
+ while (key2 !== undefined) {
143
+ if (key1 === "__proto__") {
144
+ return;
145
+ }
146
+ const type = Object.prototype.toString.call(recipient[key1]);
147
+ const isobject =
148
+ type === "[object Object]" || type === "[object Array]";
149
+ if (
150
+ !overwrite &&
151
+ !isobject &&
152
+ typeof recipient[key1] !== "undefined"
153
+ ) {
154
+ return;
155
+ }
156
+ if (
157
+ (overwrite && !isobject) ||
158
+ (!overwrite && recipient[key1] == null)
159
+ ) {
160
+ recipient[key1] =
161
+ typeof key2 === "number" && !opts.object ? [] : {};
162
+ }
163
+ recipient = recipient[key1];
164
+ if (split.length > 0) {
165
+ key1 = getkey(split.shift());
166
+ key2 = getkey(split[0]);
167
+ }
168
+ }
169
+ recipient[key1] = unflatten(target[key], opts);
170
+ });
171
+ return result;
172
+ }
173
+ },
174
+ 967: (module, __unused_webpack_exports, __nccwpck_require__) => {
175
+ "use strict";
176
+ /*!
177
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
178
+ *
179
+ * Copyright (c) 2014-2017, Jon Schlinkert.
180
+ * Released under the MIT License.
181
+ */ var isObject = __nccwpck_require__(281);
182
+ function isObjectObject(o) {
183
+ return (
184
+ isObject(o) === true &&
185
+ Object.prototype.toString.call(o) === "[object Object]"
186
+ );
187
+ }
188
+ module.exports = function isPlainObject(o) {
189
+ var ctor, prot;
190
+ if (isObjectObject(o) === false) return false;
191
+ ctor = o.constructor;
192
+ if (typeof ctor !== "function") return false;
193
+ prot = ctor.prototype;
194
+ if (isObjectObject(prot) === false) return false;
195
+ if (prot.hasOwnProperty("isPrototypeOf") === false) {
196
+ return false;
197
+ }
198
+ return true;
199
+ };
200
+ },
201
+ 281: (module) => {
202
+ "use strict";
203
+ /*!
204
+ * isobject <https://github.com/jonschlinkert/isobject>
205
+ *
206
+ * Copyright (c) 2014-2017, Jon Schlinkert.
207
+ * Released under the MIT License.
208
+ */ module.exports = function isObject(val) {
209
+ return (
210
+ val != null && typeof val === "object" && Array.isArray(val) === false
211
+ );
212
+ };
213
+ },
214
+ 778: (module) => {
215
+ var toString = Object.prototype.toString;
216
+ module.exports = function kindOf(val) {
217
+ if (val === void 0) return "undefined";
218
+ if (val === null) return "null";
219
+ var type = typeof val;
220
+ if (type === "boolean") return "boolean";
221
+ if (type === "string") return "string";
222
+ if (type === "number") return "number";
223
+ if (type === "symbol") return "symbol";
224
+ if (type === "function") {
225
+ return isGeneratorFn(val) ? "generatorfunction" : "function";
226
+ }
227
+ if (isArray(val)) return "array";
228
+ if (isBuffer(val)) return "buffer";
229
+ if (isArguments(val)) return "arguments";
230
+ if (isDate(val)) return "date";
231
+ if (isError(val)) return "error";
232
+ if (isRegexp(val)) return "regexp";
233
+ switch (ctorName(val)) {
234
+ case "Symbol":
235
+ return "symbol";
236
+ case "Promise":
237
+ return "promise";
238
+ case "WeakMap":
239
+ return "weakmap";
240
+ case "WeakSet":
241
+ return "weakset";
242
+ case "Map":
243
+ return "map";
244
+ case "Set":
245
+ return "set";
246
+ case "Int8Array":
247
+ return "int8array";
248
+ case "Uint8Array":
249
+ return "uint8array";
250
+ case "Uint8ClampedArray":
251
+ return "uint8clampedarray";
252
+ case "Int16Array":
253
+ return "int16array";
254
+ case "Uint16Array":
255
+ return "uint16array";
256
+ case "Int32Array":
257
+ return "int32array";
258
+ case "Uint32Array":
259
+ return "uint32array";
260
+ case "Float32Array":
261
+ return "float32array";
262
+ case "Float64Array":
263
+ return "float64array";
264
+ }
265
+ if (isGeneratorObj(val)) {
266
+ return "generator";
267
+ }
268
+ type = toString.call(val);
269
+ switch (type) {
270
+ case "[object Object]":
271
+ return "object";
272
+ case "[object Map Iterator]":
273
+ return "mapiterator";
274
+ case "[object Set Iterator]":
275
+ return "setiterator";
276
+ case "[object String Iterator]":
277
+ return "stringiterator";
278
+ case "[object Array Iterator]":
279
+ return "arrayiterator";
280
+ }
281
+ return type.slice(8, -1).toLowerCase().replace(/\s/g, "");
282
+ };
283
+ function ctorName(val) {
284
+ return typeof val.constructor === "function"
285
+ ? val.constructor.name
286
+ : null;
287
+ }
288
+ function isArray(val) {
289
+ if (Array.isArray) return Array.isArray(val);
290
+ return val instanceof Array;
291
+ }
292
+ function isError(val) {
293
+ return (
294
+ val instanceof Error ||
295
+ (typeof val.message === "string" &&
296
+ val.constructor &&
297
+ typeof val.constructor.stackTraceLimit === "number")
298
+ );
299
+ }
300
+ function isDate(val) {
301
+ if (val instanceof Date) return true;
302
+ return (
303
+ typeof val.toDateString === "function" &&
304
+ typeof val.getDate === "function" &&
305
+ typeof val.setDate === "function"
306
+ );
307
+ }
308
+ function isRegexp(val) {
309
+ if (val instanceof RegExp) return true;
310
+ return (
311
+ typeof val.flags === "string" &&
312
+ typeof val.ignoreCase === "boolean" &&
313
+ typeof val.multiline === "boolean" &&
314
+ typeof val.global === "boolean"
315
+ );
316
+ }
317
+ function isGeneratorFn(name, val) {
318
+ return ctorName(name) === "GeneratorFunction";
319
+ }
320
+ function isGeneratorObj(val) {
321
+ return (
322
+ typeof val.throw === "function" &&
323
+ typeof val.return === "function" &&
324
+ typeof val.next === "function"
325
+ );
326
+ }
327
+ function isArguments(val) {
328
+ try {
329
+ if (
330
+ typeof val.length === "number" &&
331
+ typeof val.callee === "function"
332
+ ) {
333
+ return true;
334
+ }
335
+ } catch (err) {
336
+ if (err.message.indexOf("callee") !== -1) {
337
+ return true;
338
+ }
339
+ }
340
+ return false;
341
+ }
342
+ function isBuffer(val) {
343
+ if (val.constructor && typeof val.constructor.isBuffer === "function") {
344
+ return val.constructor.isBuffer(val);
345
+ }
346
+ return false;
347
+ }
348
+ },
349
+ 377: (module, __unused_webpack_exports, __nccwpck_require__) => {
350
+ "use strict";
351
+ /*!
352
+ * shallow-clone <https://github.com/jonschlinkert/shallow-clone>
353
+ *
354
+ * Copyright (c) 2015-present, Jon Schlinkert.
355
+ * Released under the MIT License.
356
+ */ const valueOf = Symbol.prototype.valueOf;
357
+ const typeOf = __nccwpck_require__(778);
358
+ function clone(val, deep) {
359
+ switch (typeOf(val)) {
360
+ case "array":
361
+ return val.slice();
362
+ case "object":
363
+ return Object.assign({}, val);
364
+ case "date":
365
+ return new val.constructor(Number(val));
366
+ case "map":
367
+ return new Map(val);
368
+ case "set":
369
+ return new Set(val);
370
+ case "buffer":
371
+ return cloneBuffer(val);
372
+ case "symbol":
373
+ return cloneSymbol(val);
374
+ case "arraybuffer":
375
+ return cloneArrayBuffer(val);
376
+ case "float32array":
377
+ case "float64array":
378
+ case "int16array":
379
+ case "int32array":
380
+ case "int8array":
381
+ case "uint16array":
382
+ case "uint32array":
383
+ case "uint8clampedarray":
384
+ case "uint8array":
385
+ return cloneTypedArray(val);
386
+ case "regexp":
387
+ return cloneRegExp(val);
388
+ case "error":
389
+ return Object.create(val);
390
+ default: {
391
+ return val;
392
+ }
393
+ }
394
+ }
395
+ function cloneRegExp(val) {
396
+ const flags =
397
+ val.flags !== void 0 ? val.flags : /\w+$/.exec(val) || void 0;
398
+ const re = new val.constructor(val.source, flags);
399
+ re.lastIndex = val.lastIndex;
400
+ return re;
401
+ }
402
+ function cloneArrayBuffer(val) {
403
+ const res = new val.constructor(val.byteLength);
404
+ new Uint8Array(res).set(new Uint8Array(val));
405
+ return res;
406
+ }
407
+ function cloneTypedArray(val, deep) {
408
+ return new val.constructor(val.buffer, val.byteOffset, val.length);
409
+ }
410
+ function cloneBuffer(val) {
411
+ const len = val.length;
412
+ const buf = Buffer.allocUnsafe
413
+ ? Buffer.allocUnsafe(len)
414
+ : Buffer.from(len);
415
+ val.copy(buf);
416
+ return buf;
417
+ }
418
+ function cloneSymbol(val) {
419
+ return valueOf ? Object(valueOf.call(val)) : {};
420
+ }
421
+ module.exports = clone;
422
+ },
423
+ 153: function (__unused_webpack_module, exports, __nccwpck_require__) {
424
+ "use strict";
425
+ var __read =
426
+ (this && this.__read) ||
427
+ function (o, n) {
428
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
429
+ if (!m) return o;
430
+ var i = m.call(o),
431
+ r,
432
+ ar = [],
433
+ e;
434
+ try {
435
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
436
+ ar.push(r.value);
437
+ } catch (error) {
438
+ e = { error };
439
+ } finally {
440
+ try {
441
+ if (r && !r.done && (m = i["return"])) m.call(i);
442
+ } finally {
443
+ if (e) throw e.error;
444
+ }
445
+ }
446
+ return ar;
447
+ };
448
+ var __spreadArray =
449
+ (this && this.__spreadArray) ||
450
+ function (to, from, pack) {
451
+ if (pack || arguments.length === 2)
452
+ for (var i = 0, l = from.length, ar; i < l; i++) {
453
+ if (ar || !(i in from)) {
454
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
455
+ ar[i] = from[i];
456
+ }
457
+ }
458
+ return to.concat(ar || Array.prototype.slice.call(from));
459
+ };
460
+ var __importDefault =
461
+ (this && this.__importDefault) ||
462
+ function (mod) {
463
+ return mod && mod.__esModule ? mod : { default: mod };
464
+ };
465
+ Object.defineProperty(exports, "__esModule", { value: true });
466
+ exports.unique =
467
+ exports.mergeWithRules =
468
+ exports.mergeWithCustomize =
469
+ exports["default"] =
470
+ exports.merge =
471
+ exports.CustomizeRule =
472
+ exports.customizeObject =
473
+ exports.customizeArray =
474
+ void 0;
475
+ var wildcard_1 = __importDefault(__nccwpck_require__(838));
476
+ var merge_with_1 = __importDefault(__nccwpck_require__(498));
477
+ var join_arrays_1 = __importDefault(__nccwpck_require__(168));
478
+ var unique_1 = __importDefault(__nccwpck_require__(62));
479
+ exports.unique = unique_1.default;
480
+ var types_1 = __nccwpck_require__(160);
481
+ Object.defineProperty(exports, "CustomizeRule", {
482
+ enumerable: true,
483
+ get: function () {
484
+ return types_1.CustomizeRule;
485
+ },
486
+ });
487
+ var utils_1 = __nccwpck_require__(452);
488
+ function merge(firstConfiguration) {
489
+ var configurations = [];
490
+ for (var _i = 1; _i < arguments.length; _i++) {
491
+ configurations[_i - 1] = arguments[_i];
492
+ }
493
+ return mergeWithCustomize({}).apply(
494
+ void 0,
495
+ __spreadArray([firstConfiguration], __read(configurations), false),
496
+ );
497
+ }
498
+ exports.merge = merge;
499
+ exports["default"] = merge;
500
+ function mergeWithCustomize(options) {
501
+ return function mergeWithOptions(firstConfiguration) {
502
+ var configurations = [];
503
+ for (var _i = 1; _i < arguments.length; _i++) {
504
+ configurations[_i - 1] = arguments[_i];
505
+ }
506
+ if (
507
+ (0, utils_1.isUndefined)(firstConfiguration) ||
508
+ configurations.some(utils_1.isUndefined)
509
+ ) {
510
+ throw new TypeError("Merging undefined is not supported");
511
+ }
512
+ if (firstConfiguration.then) {
513
+ throw new TypeError("Promises are not supported");
514
+ }
515
+ if (!firstConfiguration) {
516
+ return {};
517
+ }
518
+ if (configurations.length === 0) {
519
+ if (Array.isArray(firstConfiguration)) {
520
+ if (firstConfiguration.length === 0) {
521
+ return {};
522
+ }
523
+ if (firstConfiguration.some(utils_1.isUndefined)) {
524
+ throw new TypeError("Merging undefined is not supported");
525
+ }
526
+ if (firstConfiguration[0].then) {
527
+ throw new TypeError("Promises are not supported");
528
+ }
529
+ return (0, merge_with_1.default)(
530
+ firstConfiguration,
531
+ (0, join_arrays_1.default)(options),
532
+ );
533
+ }
534
+ return firstConfiguration;
535
+ }
536
+ return (0, merge_with_1.default)(
537
+ [firstConfiguration].concat(configurations),
538
+ (0, join_arrays_1.default)(options),
539
+ );
540
+ };
541
+ }
542
+ exports.mergeWithCustomize = mergeWithCustomize;
543
+ function customizeArray(rules) {
544
+ return function (a, b, key) {
545
+ var matchedRule =
546
+ Object.keys(rules).find(function (rule) {
547
+ return (0, wildcard_1.default)(rule, key);
548
+ }) || "";
549
+ if (matchedRule) {
550
+ switch (rules[matchedRule]) {
551
+ case types_1.CustomizeRule.Prepend:
552
+ return __spreadArray(
553
+ __spreadArray([], __read(b), false),
554
+ __read(a),
555
+ false,
556
+ );
557
+ case types_1.CustomizeRule.Replace:
558
+ return b;
559
+ case types_1.CustomizeRule.Append:
560
+ default:
561
+ return __spreadArray(
562
+ __spreadArray([], __read(a), false),
563
+ __read(b),
564
+ false,
565
+ );
566
+ }
567
+ }
568
+ };
569
+ }
570
+ exports.customizeArray = customizeArray;
571
+ function mergeWithRules(rules) {
572
+ return mergeWithCustomize({
573
+ customizeArray: function (a, b, key) {
574
+ var currentRule = rules;
575
+ key.split(".").forEach(function (k) {
576
+ if (!currentRule) {
577
+ return;
578
+ }
579
+ currentRule = currentRule[k];
580
+ });
581
+ if ((0, utils_1.isPlainObject)(currentRule)) {
582
+ return mergeWithRule({ currentRule, a, b });
583
+ }
584
+ if (typeof currentRule === "string") {
585
+ return mergeIndividualRule({ currentRule, a, b });
586
+ }
587
+ return undefined;
588
+ },
589
+ });
590
+ }
591
+ exports.mergeWithRules = mergeWithRules;
592
+ var isArray = Array.isArray;
593
+ function mergeWithRule(_a) {
594
+ var currentRule = _a.currentRule,
595
+ a = _a.a,
596
+ b = _a.b;
597
+ if (!isArray(a)) {
598
+ return a;
599
+ }
600
+ var bAllMatches = [];
601
+ var ret = a.map(function (ao) {
602
+ if (!(0, utils_1.isPlainObject)(currentRule)) {
603
+ return ao;
604
+ }
605
+ var ret = {};
606
+ var rulesToMatch = [];
607
+ var operations = {};
608
+ Object.entries(currentRule).forEach(function (_a) {
609
+ var _b = __read(_a, 2),
610
+ k = _b[0],
611
+ v = _b[1];
612
+ if (v === types_1.CustomizeRule.Match) {
613
+ rulesToMatch.push(k);
614
+ } else {
615
+ operations[k] = v;
616
+ }
617
+ });
618
+ var bMatches = b.filter(function (o) {
619
+ var matches = rulesToMatch.every(function (rule) {
620
+ return (0, utils_1.isSameCondition)(ao[rule], o[rule]);
621
+ });
622
+ if (matches) {
623
+ bAllMatches.push(o);
624
+ }
625
+ return matches;
626
+ });
627
+ if (!(0, utils_1.isPlainObject)(ao)) {
628
+ return ao;
629
+ }
630
+ Object.entries(ao).forEach(function (_a) {
631
+ var _b = __read(_a, 2),
632
+ k = _b[0],
633
+ v = _b[1];
634
+ var rule = currentRule;
635
+ switch (currentRule[k]) {
636
+ case types_1.CustomizeRule.Match:
637
+ ret[k] = v;
638
+ Object.entries(rule).forEach(function (_a) {
639
+ var _b = __read(_a, 2),
640
+ k = _b[0],
641
+ v = _b[1];
642
+ if (
643
+ v === types_1.CustomizeRule.Replace &&
644
+ bMatches.length > 0
645
+ ) {
646
+ var val = last(bMatches)[k];
647
+ if (typeof val !== "undefined") {
648
+ ret[k] = val;
649
+ }
650
+ }
651
+ });
652
+ break;
653
+ case types_1.CustomizeRule.Append:
654
+ if (!bMatches.length) {
655
+ ret[k] = v;
656
+ break;
657
+ }
658
+ var appendValue = last(bMatches)[k];
659
+ if (!isArray(v) || !isArray(appendValue)) {
660
+ throw new TypeError("Trying to append non-arrays");
661
+ }
662
+ ret[k] = v.concat(appendValue);
663
+ break;
664
+ case types_1.CustomizeRule.Merge:
665
+ if (!bMatches.length) {
666
+ ret[k] = v;
667
+ break;
668
+ }
669
+ var lastValue = last(bMatches)[k];
670
+ if (
671
+ !(0, utils_1.isPlainObject)(v) ||
672
+ !(0, utils_1.isPlainObject)(lastValue)
673
+ ) {
674
+ throw new TypeError("Trying to merge non-objects");
675
+ }
676
+ ret[k] = merge(v, lastValue);
677
+ break;
678
+ case types_1.CustomizeRule.Prepend:
679
+ if (!bMatches.length) {
680
+ ret[k] = v;
681
+ break;
682
+ }
683
+ var prependValue = last(bMatches)[k];
684
+ if (!isArray(v) || !isArray(prependValue)) {
685
+ throw new TypeError("Trying to prepend non-arrays");
686
+ }
687
+ ret[k] = prependValue.concat(v);
688
+ break;
689
+ case types_1.CustomizeRule.Replace:
690
+ ret[k] = bMatches.length > 0 ? last(bMatches)[k] : v;
691
+ break;
692
+ default:
693
+ var currentRule_1 = operations[k];
694
+ var b_1 = bMatches
695
+ .map(function (o) {
696
+ return o[k];
697
+ })
698
+ .reduce(function (acc, val) {
699
+ return isArray(acc) && isArray(val)
700
+ ? __spreadArray(
701
+ __spreadArray([], __read(acc), false),
702
+ __read(val),
703
+ false,
704
+ )
705
+ : acc;
706
+ }, []);
707
+ ret[k] = mergeWithRule({
708
+ currentRule: currentRule_1,
709
+ a: v,
710
+ b: b_1,
711
+ });
712
+ break;
713
+ }
714
+ });
715
+ return ret;
716
+ });
717
+ return ret.concat(
718
+ b.filter(function (o) {
719
+ return !bAllMatches.includes(o);
720
+ }),
721
+ );
722
+ }
723
+ function mergeIndividualRule(_a) {
724
+ var currentRule = _a.currentRule,
725
+ a = _a.a,
726
+ b = _a.b;
727
+ switch (currentRule) {
728
+ case types_1.CustomizeRule.Append:
729
+ return a.concat(b);
730
+ case types_1.CustomizeRule.Prepend:
731
+ return b.concat(a);
732
+ case types_1.CustomizeRule.Replace:
733
+ return b;
734
+ }
735
+ return a;
736
+ }
737
+ function last(arr) {
738
+ return arr[arr.length - 1];
739
+ }
740
+ function customizeObject(rules) {
741
+ return function (a, b, key) {
742
+ switch (rules[key]) {
743
+ case types_1.CustomizeRule.Prepend:
744
+ return (0, merge_with_1.default)(
745
+ [b, a],
746
+ (0, join_arrays_1.default)(),
747
+ );
748
+ case types_1.CustomizeRule.Replace:
749
+ return b;
750
+ case types_1.CustomizeRule.Append:
751
+ return (0, merge_with_1.default)(
752
+ [a, b],
753
+ (0, join_arrays_1.default)(),
754
+ );
755
+ }
756
+ };
757
+ }
758
+ exports.customizeObject = customizeObject;
759
+ },
760
+ 168: function (__unused_webpack_module, exports, __nccwpck_require__) {
761
+ "use strict";
762
+ var __read =
763
+ (this && this.__read) ||
764
+ function (o, n) {
765
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
766
+ if (!m) return o;
767
+ var i = m.call(o),
768
+ r,
769
+ ar = [],
770
+ e;
771
+ try {
772
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
773
+ ar.push(r.value);
774
+ } catch (error) {
775
+ e = { error };
776
+ } finally {
777
+ try {
778
+ if (r && !r.done && (m = i["return"])) m.call(i);
779
+ } finally {
780
+ if (e) throw e.error;
781
+ }
782
+ }
783
+ return ar;
784
+ };
785
+ var __spreadArray =
786
+ (this && this.__spreadArray) ||
787
+ function (to, from, pack) {
788
+ if (pack || arguments.length === 2)
789
+ for (var i = 0, l = from.length, ar; i < l; i++) {
790
+ if (ar || !(i in from)) {
791
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
792
+ ar[i] = from[i];
793
+ }
794
+ }
795
+ return to.concat(ar || Array.prototype.slice.call(from));
796
+ };
797
+ var __importDefault =
798
+ (this && this.__importDefault) ||
799
+ function (mod) {
800
+ return mod && mod.__esModule ? mod : { default: mod };
801
+ };
802
+ Object.defineProperty(exports, "__esModule", { value: true });
803
+ var clone_deep_1 = __importDefault(__nccwpck_require__(520));
804
+ var merge_with_1 = __importDefault(__nccwpck_require__(498));
805
+ var utils_1 = __nccwpck_require__(452);
806
+ var isArray = Array.isArray;
807
+ function joinArrays(_a) {
808
+ var _b = _a === void 0 ? {} : _a,
809
+ customizeArray = _b.customizeArray,
810
+ customizeObject = _b.customizeObject,
811
+ key = _b.key;
812
+ return function _joinArrays(a, b, k) {
813
+ var newKey = key ? "".concat(key, ".").concat(k) : k;
814
+ if ((0, utils_1.isFunction)(a) && (0, utils_1.isFunction)(b)) {
815
+ return function () {
816
+ var args = [];
817
+ for (var _i = 0; _i < arguments.length; _i++) {
818
+ args[_i] = arguments[_i];
819
+ }
820
+ return _joinArrays(
821
+ a.apply(void 0, __spreadArray([], __read(args), false)),
822
+ b.apply(void 0, __spreadArray([], __read(args), false)),
823
+ k,
824
+ );
825
+ };
826
+ }
827
+ if (isArray(a) && isArray(b)) {
828
+ var customResult = customizeArray && customizeArray(a, b, newKey);
829
+ return (
830
+ customResult ||
831
+ __spreadArray(
832
+ __spreadArray([], __read(a), false),
833
+ __read(b),
834
+ false,
835
+ )
836
+ );
837
+ }
838
+ if ((0, utils_1.isRegex)(b)) {
839
+ return b;
840
+ }
841
+ if ((0, utils_1.isPlainObject)(a) && (0, utils_1.isPlainObject)(b)) {
842
+ var customResult = customizeObject && customizeObject(a, b, newKey);
843
+ return (
844
+ customResult ||
845
+ (0, merge_with_1.default)(
846
+ [a, b],
847
+ joinArrays({ customizeArray, customizeObject, key: newKey }),
848
+ )
849
+ );
850
+ }
851
+ if ((0, utils_1.isPlainObject)(b)) {
852
+ return (0, clone_deep_1.default)(b);
853
+ }
854
+ if (isArray(b)) {
855
+ return __spreadArray([], __read(b), false);
856
+ }
857
+ return b;
858
+ };
859
+ }
860
+ exports["default"] = joinArrays;
861
+ },
862
+ 498: function (__unused_webpack_module, exports) {
863
+ "use strict";
864
+ var __read =
865
+ (this && this.__read) ||
866
+ function (o, n) {
867
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
868
+ if (!m) return o;
869
+ var i = m.call(o),
870
+ r,
871
+ ar = [],
872
+ e;
873
+ try {
874
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
875
+ ar.push(r.value);
876
+ } catch (error) {
877
+ e = { error };
878
+ } finally {
879
+ try {
880
+ if (r && !r.done && (m = i["return"])) m.call(i);
881
+ } finally {
882
+ if (e) throw e.error;
883
+ }
884
+ }
885
+ return ar;
886
+ };
887
+ Object.defineProperty(exports, "__esModule", { value: true });
888
+ function mergeWith(objects, customizer) {
889
+ var _a = __read(objects),
890
+ first = _a[0],
891
+ rest = _a.slice(1);
892
+ var ret = first;
893
+ rest.forEach(function (a) {
894
+ ret = mergeTo(ret, a, customizer);
895
+ });
896
+ return ret;
897
+ }
898
+ function mergeTo(a, b, customizer) {
899
+ var ret = {};
900
+ Object.keys(a)
901
+ .concat(Object.keys(b))
902
+ .forEach(function (k) {
903
+ var v = customizer(a[k], b[k], k);
904
+ ret[k] = typeof v === "undefined" ? a[k] : v;
905
+ });
906
+ return ret;
907
+ }
908
+ exports["default"] = mergeWith;
909
+ },
910
+ 160: (__unused_webpack_module, exports) => {
911
+ "use strict";
912
+ Object.defineProperty(exports, "__esModule", { value: true });
913
+ exports.CustomizeRule = void 0;
914
+ var CustomizeRule;
915
+ (function (CustomizeRule) {
916
+ CustomizeRule["Match"] = "match";
917
+ CustomizeRule["Merge"] = "merge";
918
+ CustomizeRule["Append"] = "append";
919
+ CustomizeRule["Prepend"] = "prepend";
920
+ CustomizeRule["Replace"] = "replace";
921
+ })(CustomizeRule || (exports.CustomizeRule = CustomizeRule = {}));
922
+ },
923
+ 62: function (__unused_webpack_module, exports) {
924
+ "use strict";
925
+ var __read =
926
+ (this && this.__read) ||
927
+ function (o, n) {
928
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
929
+ if (!m) return o;
930
+ var i = m.call(o),
931
+ r,
932
+ ar = [],
933
+ e;
934
+ try {
935
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
936
+ ar.push(r.value);
937
+ } catch (error) {
938
+ e = { error };
939
+ } finally {
940
+ try {
941
+ if (r && !r.done && (m = i["return"])) m.call(i);
942
+ } finally {
943
+ if (e) throw e.error;
944
+ }
945
+ }
946
+ return ar;
947
+ };
948
+ var __spreadArray =
949
+ (this && this.__spreadArray) ||
950
+ function (to, from, pack) {
951
+ if (pack || arguments.length === 2)
952
+ for (var i = 0, l = from.length, ar; i < l; i++) {
953
+ if (ar || !(i in from)) {
954
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
955
+ ar[i] = from[i];
956
+ }
957
+ }
958
+ return to.concat(ar || Array.prototype.slice.call(from));
959
+ };
960
+ Object.defineProperty(exports, "__esModule", { value: true });
961
+ function mergeUnique(key, uniques, getter) {
962
+ var uniquesSet = new Set(uniques);
963
+ return function (a, b, k) {
964
+ return (
965
+ k === key &&
966
+ Array.from(
967
+ __spreadArray(
968
+ __spreadArray([], __read(a), false),
969
+ __read(b),
970
+ false,
971
+ )
972
+ .map(function (it) {
973
+ return { key: getter(it), value: it };
974
+ })
975
+ .map(function (_a) {
976
+ var key = _a.key,
977
+ value = _a.value;
978
+ return { key: uniquesSet.has(key) ? key : value, value };
979
+ })
980
+ .reduce(function (m, _a) {
981
+ var key = _a.key,
982
+ value = _a.value;
983
+ m.delete(key);
984
+ return m.set(key, value);
985
+ }, new Map())
986
+ .values(),
987
+ )
988
+ );
989
+ };
990
+ }
991
+ exports["default"] = mergeUnique;
992
+ },
993
+ 452: function (__unused_webpack_module, exports, __nccwpck_require__) {
994
+ "use strict";
995
+ var __read =
996
+ (this && this.__read) ||
997
+ function (o, n) {
998
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
999
+ if (!m) return o;
1000
+ var i = m.call(o),
1001
+ r,
1002
+ ar = [],
1003
+ e;
1004
+ try {
1005
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
1006
+ ar.push(r.value);
1007
+ } catch (error) {
1008
+ e = { error };
1009
+ } finally {
1010
+ try {
1011
+ if (r && !r.done && (m = i["return"])) m.call(i);
1012
+ } finally {
1013
+ if (e) throw e.error;
1014
+ }
1015
+ }
1016
+ return ar;
1017
+ };
1018
+ Object.defineProperty(exports, "__esModule", { value: true });
1019
+ exports.isSameCondition =
1020
+ exports.isUndefined =
1021
+ exports.isPlainObject =
1022
+ exports.isFunction =
1023
+ exports.isRegex =
1024
+ void 0;
1025
+ var flat_1 = __nccwpck_require__(790);
1026
+ function isRegex(o) {
1027
+ return o instanceof RegExp;
1028
+ }
1029
+ exports.isRegex = isRegex;
1030
+ function isFunction(functionToCheck) {
1031
+ return (
1032
+ functionToCheck &&
1033
+ {}.toString.call(functionToCheck) === "[object Function]"
1034
+ );
1035
+ }
1036
+ exports.isFunction = isFunction;
1037
+ function isPlainObject(a) {
1038
+ if (a === null || Array.isArray(a)) {
1039
+ return false;
1040
+ }
1041
+ return typeof a === "object";
1042
+ }
1043
+ exports.isPlainObject = isPlainObject;
1044
+ function isUndefined(a) {
1045
+ return typeof a === "undefined";
1046
+ }
1047
+ exports.isUndefined = isUndefined;
1048
+ function isSameCondition(a, b) {
1049
+ var _a, _b;
1050
+ if (!a || !b) {
1051
+ return a === b;
1052
+ }
1053
+ if (
1054
+ typeof a === "string" ||
1055
+ typeof b === "string" ||
1056
+ isRegex(a) ||
1057
+ isRegex(b) ||
1058
+ isFunction(a) ||
1059
+ isFunction(b)
1060
+ ) {
1061
+ return a.toString() === b.toString();
1062
+ }
1063
+ var entriesA = Object.entries((0, flat_1.flatten)(a));
1064
+ var entriesB = Object.entries((0, flat_1.flatten)(b));
1065
+ if (entriesA.length !== entriesB.length) {
1066
+ return false;
1067
+ }
1068
+ for (var i = 0; i < entriesA.length; i++) {
1069
+ entriesA[i][0] = entriesA[i][0].replace(/\b\d+\b/g, "[]");
1070
+ entriesB[i][0] = entriesB[i][0].replace(/\b\d+\b/g, "[]");
1071
+ }
1072
+ function cmp(_a, _b) {
1073
+ var _c = __read(_a, 2),
1074
+ k1 = _c[0],
1075
+ v1 = _c[1];
1076
+ var _d = __read(_b, 2),
1077
+ k2 = _d[0],
1078
+ v2 = _d[1];
1079
+ if (k1 < k2) return -1;
1080
+ if (k1 > k2) return 1;
1081
+ if (v1 < v2) return -1;
1082
+ if (v1 > v2) return 1;
1083
+ return 0;
1084
+ }
1085
+ entriesA.sort(cmp);
1086
+ entriesB.sort(cmp);
1087
+ if (entriesA.length !== entriesB.length) {
1088
+ return false;
1089
+ }
1090
+ for (var i = 0; i < entriesA.length; i++) {
1091
+ if (
1092
+ entriesA[i][0] !== entriesB[i][0] ||
1093
+ ((_a = entriesA[i][1]) === null || _a === void 0
1094
+ ? void 0
1095
+ : _a.toString()) !==
1096
+ ((_b = entriesB[i][1]) === null || _b === void 0
1097
+ ? void 0
1098
+ : _b.toString())
1099
+ ) {
1100
+ return false;
1101
+ }
1102
+ }
1103
+ return true;
1104
+ }
1105
+ exports.isSameCondition = isSameCondition;
1106
+ },
1107
+ 838: (module) => {
1108
+ "use strict";
1109
+ var REGEXP_PARTS = /(\*|\?)/g;
1110
+ function WildcardMatcher(text, separator) {
1111
+ this.text = text = text || "";
1112
+ this.hasWild = text.indexOf("*") >= 0;
1113
+ this.separator = separator;
1114
+ this.parts = text.split(separator).map(this.classifyPart.bind(this));
1115
+ }
1116
+ WildcardMatcher.prototype.match = function (input) {
1117
+ var matches = true;
1118
+ var parts = this.parts;
1119
+ var ii;
1120
+ var partsCount = parts.length;
1121
+ var testParts;
1122
+ if (typeof input == "string" || input instanceof String) {
1123
+ if (!this.hasWild && this.text != input) {
1124
+ matches = false;
1125
+ } else {
1126
+ testParts = (input || "").split(this.separator);
1127
+ for (ii = 0; matches && ii < partsCount; ii++) {
1128
+ if (parts[ii] === "*") {
1129
+ continue;
1130
+ } else if (ii < testParts.length) {
1131
+ matches =
1132
+ parts[ii] instanceof RegExp
1133
+ ? parts[ii].test(testParts[ii])
1134
+ : parts[ii] === testParts[ii];
1135
+ } else {
1136
+ matches = false;
1137
+ }
1138
+ }
1139
+ matches = matches && testParts;
1140
+ }
1141
+ } else if (typeof input.splice == "function") {
1142
+ matches = [];
1143
+ for (ii = input.length; ii--; ) {
1144
+ if (this.match(input[ii])) {
1145
+ matches[matches.length] = input[ii];
1146
+ }
1147
+ }
1148
+ } else if (typeof input == "object") {
1149
+ matches = {};
1150
+ for (var key in input) {
1151
+ if (this.match(key)) {
1152
+ matches[key] = input[key];
1153
+ }
1154
+ }
1155
+ }
1156
+ return matches;
1157
+ };
1158
+ WildcardMatcher.prototype.classifyPart = function (part) {
1159
+ if (part === "*") {
1160
+ return part;
1161
+ } else if (part.indexOf("*") >= 0 || part.indexOf("?") >= 0) {
1162
+ return new RegExp(part.replace(REGEXP_PARTS, ".$1"));
1163
+ }
1164
+ return part;
1165
+ };
1166
+ module.exports = function (text, test, separator) {
1167
+ var matcher = new WildcardMatcher(text, separator || /[\/\.]/);
1168
+ if (typeof test != "undefined") {
1169
+ return matcher.match(test);
1170
+ }
1171
+ return matcher;
1172
+ };
1173
+ },
1174
+ };
1175
+ var __webpack_module_cache__ = {};
1176
+ function __nccwpck_require__(moduleId) {
1177
+ var cachedModule = __webpack_module_cache__[moduleId];
1178
+ if (cachedModule !== undefined) {
1179
+ return cachedModule.exports;
1180
+ }
1181
+ var module = (__webpack_module_cache__[moduleId] = { exports: {} });
1182
+ var threw = true;
1183
+ try {
1184
+ __webpack_modules__[moduleId].call(
1185
+ module.exports,
1186
+ module,
1187
+ module.exports,
1188
+ __nccwpck_require__,
1189
+ );
1190
+ threw = false;
1191
+ } finally {
1192
+ if (threw) delete __webpack_module_cache__[moduleId];
1193
+ }
1194
+ return module.exports;
1195
+ }
1196
+ if (typeof __nccwpck_require__ !== "undefined")
1197
+ __nccwpck_require__.ab = __dirname + "/";
1198
+ var __webpack_exports__ = __nccwpck_require__(153);
1199
+ module.exports = __webpack_exports__;
1200
+ })();