@trops/dash-core 0.1.98 → 0.1.99

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/index.esm.js CHANGED
@@ -15,7 +15,6 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
15
15
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
16
16
  import { Menu, Transition, Dialog, Disclosure } from '@headlessui/react';
17
17
  import { EllipsisVerticalIcon } from '@heroicons/react/20/solid';
18
- import deepEqual from 'deep-equal';
19
18
  import clsx from 'clsx';
20
19
  import { DndProvider, useDrag, useDrop } from 'react-dnd';
21
20
  import { HTML5Backend } from 'react-dnd-html5-backend';
@@ -4215,6 +4214,4124 @@ var LayoutBuilderAddItemModal = function LayoutBuilderAddItemModal(_ref) {
4215
4214
  });
4216
4215
  };
4217
4216
 
4217
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4218
+
4219
+ function getDefaultExportFromCjs (x) {
4220
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
4221
+ }
4222
+
4223
+ function getAugmentedNamespace(n) {
4224
+ if (n.__esModule) return n;
4225
+ var f = n.default;
4226
+ if (typeof f == "function") {
4227
+ var a = function a () {
4228
+ if (this instanceof a) {
4229
+ return Reflect.construct(f, arguments, this.constructor);
4230
+ }
4231
+ return f.apply(this, arguments);
4232
+ };
4233
+ a.prototype = f.prototype;
4234
+ } else a = {};
4235
+ Object.defineProperty(a, '__esModule', {value: true});
4236
+ Object.keys(n).forEach(function (k) {
4237
+ var d = Object.getOwnPropertyDescriptor(n, k);
4238
+ Object.defineProperty(a, k, d.get ? d : {
4239
+ enumerable: true,
4240
+ get: function () {
4241
+ return n[k];
4242
+ }
4243
+ });
4244
+ });
4245
+ return a;
4246
+ }
4247
+
4248
+ var toStr$5 = Object.prototype.toString;
4249
+
4250
+ var isArguments$3 = function isArguments(value) {
4251
+ var str = toStr$5.call(value);
4252
+ var isArgs = str === '[object Arguments]';
4253
+ if (!isArgs) {
4254
+ isArgs = str !== '[object Array]' &&
4255
+ value !== null &&
4256
+ typeof value === 'object' &&
4257
+ typeof value.length === 'number' &&
4258
+ value.length >= 0 &&
4259
+ toStr$5.call(value.callee) === '[object Function]';
4260
+ }
4261
+ return isArgs;
4262
+ };
4263
+
4264
+ var implementation$a;
4265
+ var hasRequiredImplementation$1;
4266
+
4267
+ function requireImplementation$1 () {
4268
+ if (hasRequiredImplementation$1) return implementation$a;
4269
+ hasRequiredImplementation$1 = 1;
4270
+
4271
+ var keysShim;
4272
+ if (!Object.keys) {
4273
+ // modified from https://github.com/es-shims/es5-shim
4274
+ var has = Object.prototype.hasOwnProperty;
4275
+ var toStr = Object.prototype.toString;
4276
+ var isArgs = isArguments$3; // eslint-disable-line global-require
4277
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
4278
+ var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
4279
+ var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
4280
+ var dontEnums = [
4281
+ 'toString',
4282
+ 'toLocaleString',
4283
+ 'valueOf',
4284
+ 'hasOwnProperty',
4285
+ 'isPrototypeOf',
4286
+ 'propertyIsEnumerable',
4287
+ 'constructor'
4288
+ ];
4289
+ var equalsConstructorPrototype = function (o) {
4290
+ var ctor = o.constructor;
4291
+ return ctor && ctor.prototype === o;
4292
+ };
4293
+ var excludedKeys = {
4294
+ $applicationCache: true,
4295
+ $console: true,
4296
+ $external: true,
4297
+ $frame: true,
4298
+ $frameElement: true,
4299
+ $frames: true,
4300
+ $innerHeight: true,
4301
+ $innerWidth: true,
4302
+ $onmozfullscreenchange: true,
4303
+ $onmozfullscreenerror: true,
4304
+ $outerHeight: true,
4305
+ $outerWidth: true,
4306
+ $pageXOffset: true,
4307
+ $pageYOffset: true,
4308
+ $parent: true,
4309
+ $scrollLeft: true,
4310
+ $scrollTop: true,
4311
+ $scrollX: true,
4312
+ $scrollY: true,
4313
+ $self: true,
4314
+ $webkitIndexedDB: true,
4315
+ $webkitStorageInfo: true,
4316
+ $window: true
4317
+ };
4318
+ var hasAutomationEqualityBug = (function () {
4319
+ /* global window */
4320
+ if (typeof window === 'undefined') { return false; }
4321
+ for (var k in window) {
4322
+ try {
4323
+ if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
4324
+ try {
4325
+ equalsConstructorPrototype(window[k]);
4326
+ } catch (e) {
4327
+ return true;
4328
+ }
4329
+ }
4330
+ } catch (e) {
4331
+ return true;
4332
+ }
4333
+ }
4334
+ return false;
4335
+ }());
4336
+ var equalsConstructorPrototypeIfNotBuggy = function (o) {
4337
+ /* global window */
4338
+ if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
4339
+ return equalsConstructorPrototype(o);
4340
+ }
4341
+ try {
4342
+ return equalsConstructorPrototype(o);
4343
+ } catch (e) {
4344
+ return false;
4345
+ }
4346
+ };
4347
+
4348
+ keysShim = function keys(object) {
4349
+ var isObject = object !== null && typeof object === 'object';
4350
+ var isFunction = toStr.call(object) === '[object Function]';
4351
+ var isArguments = isArgs(object);
4352
+ var isString = isObject && toStr.call(object) === '[object String]';
4353
+ var theKeys = [];
4354
+
4355
+ if (!isObject && !isFunction && !isArguments) {
4356
+ throw new TypeError('Object.keys called on a non-object');
4357
+ }
4358
+
4359
+ var skipProto = hasProtoEnumBug && isFunction;
4360
+ if (isString && object.length > 0 && !has.call(object, 0)) {
4361
+ for (var i = 0; i < object.length; ++i) {
4362
+ theKeys.push(String(i));
4363
+ }
4364
+ }
4365
+
4366
+ if (isArguments && object.length > 0) {
4367
+ for (var j = 0; j < object.length; ++j) {
4368
+ theKeys.push(String(j));
4369
+ }
4370
+ } else {
4371
+ for (var name in object) {
4372
+ if (!(skipProto && name === 'prototype') && has.call(object, name)) {
4373
+ theKeys.push(String(name));
4374
+ }
4375
+ }
4376
+ }
4377
+
4378
+ if (hasDontEnumBug) {
4379
+ var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
4380
+
4381
+ for (var k = 0; k < dontEnums.length; ++k) {
4382
+ if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
4383
+ theKeys.push(dontEnums[k]);
4384
+ }
4385
+ }
4386
+ }
4387
+ return theKeys;
4388
+ };
4389
+ }
4390
+ implementation$a = keysShim;
4391
+ return implementation$a;
4392
+ }
4393
+
4394
+ var slice = Array.prototype.slice;
4395
+ var isArgs = isArguments$3;
4396
+
4397
+ var origKeys = Object.keys;
4398
+ var keysShim = origKeys ? function keys(o) { return origKeys(o); } : requireImplementation$1();
4399
+
4400
+ var originalKeys = Object.keys;
4401
+
4402
+ keysShim.shim = function shimObjectKeys() {
4403
+ if (Object.keys) {
4404
+ var keysWorksWithArguments = (function () {
4405
+ // Safari 5.0 bug
4406
+ var args = Object.keys(arguments);
4407
+ return args && args.length === arguments.length;
4408
+ }(1, 2));
4409
+ if (!keysWorksWithArguments) {
4410
+ Object.keys = function keys(object) { // eslint-disable-line func-name-matching
4411
+ if (isArgs(object)) {
4412
+ return originalKeys(slice.call(object));
4413
+ }
4414
+ return originalKeys(object);
4415
+ };
4416
+ }
4417
+ } else {
4418
+ Object.keys = keysShim;
4419
+ }
4420
+ return Object.keys || keysShim;
4421
+ };
4422
+
4423
+ var objectKeys$2 = keysShim;
4424
+
4425
+ /** @type {import('.')} */
4426
+ var $defineProperty$3 = Object.defineProperty || false;
4427
+ if ($defineProperty$3) {
4428
+ try {
4429
+ $defineProperty$3({}, 'a', { value: 1 });
4430
+ } catch (e) {
4431
+ // IE 8 has a broken defineProperty
4432
+ $defineProperty$3 = false;
4433
+ }
4434
+ }
4435
+
4436
+ var esDefineProperty = $defineProperty$3;
4437
+
4438
+ /** @type {import('./syntax')} */
4439
+ var syntax = SyntaxError;
4440
+
4441
+ /** @type {import('./type')} */
4442
+ var type = TypeError;
4443
+
4444
+ /** @type {import('./gOPD')} */
4445
+ var gOPD$6 = Object.getOwnPropertyDescriptor;
4446
+
4447
+ /** @type {import('.')} */
4448
+ var $gOPD$2 = gOPD$6;
4449
+
4450
+ if ($gOPD$2) {
4451
+ try {
4452
+ $gOPD$2([], 'length');
4453
+ } catch (e) {
4454
+ // IE 8 has a broken gOPD
4455
+ $gOPD$2 = null;
4456
+ }
4457
+ }
4458
+
4459
+ var gopd$1 = $gOPD$2;
4460
+
4461
+ var $defineProperty$2 = esDefineProperty;
4462
+
4463
+ var $SyntaxError$2 = syntax;
4464
+ var $TypeError$b = type;
4465
+
4466
+ var gopd = gopd$1;
4467
+
4468
+ /** @type {import('.')} */
4469
+ var defineDataProperty$1 = function defineDataProperty(
4470
+ obj,
4471
+ property,
4472
+ value
4473
+ ) {
4474
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
4475
+ throw new $TypeError$b('`obj` must be an object or a function`');
4476
+ }
4477
+ if (typeof property !== 'string' && typeof property !== 'symbol') {
4478
+ throw new $TypeError$b('`property` must be a string or a symbol`');
4479
+ }
4480
+ if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
4481
+ throw new $TypeError$b('`nonEnumerable`, if provided, must be a boolean or null');
4482
+ }
4483
+ if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
4484
+ throw new $TypeError$b('`nonWritable`, if provided, must be a boolean or null');
4485
+ }
4486
+ if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
4487
+ throw new $TypeError$b('`nonConfigurable`, if provided, must be a boolean or null');
4488
+ }
4489
+ if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
4490
+ throw new $TypeError$b('`loose`, if provided, must be a boolean');
4491
+ }
4492
+
4493
+ var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
4494
+ var nonWritable = arguments.length > 4 ? arguments[4] : null;
4495
+ var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
4496
+ var loose = arguments.length > 6 ? arguments[6] : false;
4497
+
4498
+ /* @type {false | TypedPropertyDescriptor<unknown>} */
4499
+ var desc = !!gopd && gopd(obj, property);
4500
+
4501
+ if ($defineProperty$2) {
4502
+ $defineProperty$2(obj, property, {
4503
+ configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
4504
+ enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
4505
+ value: value,
4506
+ writable: nonWritable === null && desc ? desc.writable : !nonWritable
4507
+ });
4508
+ } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
4509
+ // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
4510
+ obj[property] = value; // eslint-disable-line no-param-reassign
4511
+ } else {
4512
+ throw new $SyntaxError$2('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
4513
+ }
4514
+ };
4515
+
4516
+ var $defineProperty$1 = esDefineProperty;
4517
+
4518
+ var hasPropertyDescriptors = function hasPropertyDescriptors() {
4519
+ return !!$defineProperty$1;
4520
+ };
4521
+
4522
+ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
4523
+ // node v0.6 has a bug where array lengths can be Set but not Defined
4524
+ if (!$defineProperty$1) {
4525
+ return null;
4526
+ }
4527
+ try {
4528
+ return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
4529
+ } catch (e) {
4530
+ // In Firefox 4-22, defining length on an array throws an exception.
4531
+ return true;
4532
+ }
4533
+ };
4534
+
4535
+ var hasPropertyDescriptors_1 = hasPropertyDescriptors;
4536
+
4537
+ var keys = objectKeys$2;
4538
+ var hasSymbols$5 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
4539
+
4540
+ var toStr$4 = Object.prototype.toString;
4541
+ var concat = Array.prototype.concat;
4542
+ var defineDataProperty = defineDataProperty$1;
4543
+
4544
+ var isFunction = function (fn) {
4545
+ return typeof fn === 'function' && toStr$4.call(fn) === '[object Function]';
4546
+ };
4547
+
4548
+ var supportsDescriptors$2 = hasPropertyDescriptors_1();
4549
+
4550
+ var defineProperty$1 = function (object, name, value, predicate) {
4551
+ if (name in object) {
4552
+ if (predicate === true) {
4553
+ if (object[name] === value) {
4554
+ return;
4555
+ }
4556
+ } else if (!isFunction(predicate) || !predicate()) {
4557
+ return;
4558
+ }
4559
+ }
4560
+
4561
+ if (supportsDescriptors$2) {
4562
+ defineDataProperty(object, name, value, true);
4563
+ } else {
4564
+ defineDataProperty(object, name, value);
4565
+ }
4566
+ };
4567
+
4568
+ var defineProperties$1 = function (object, map) {
4569
+ var predicates = arguments.length > 2 ? arguments[2] : {};
4570
+ var props = keys(map);
4571
+ if (hasSymbols$5) {
4572
+ props = concat.call(props, Object.getOwnPropertySymbols(map));
4573
+ }
4574
+ for (var i = 0; i < props.length; i += 1) {
4575
+ defineProperty$1(object, props[i], map[props[i]], predicates[props[i]]);
4576
+ }
4577
+ };
4578
+
4579
+ defineProperties$1.supportsDescriptors = !!supportsDescriptors$2;
4580
+
4581
+ var defineProperties_1 = defineProperties$1;
4582
+
4583
+ var callBind$7 = {exports: {}};
4584
+
4585
+ /** @type {import('.')} */
4586
+ var esObjectAtoms = Object;
4587
+
4588
+ /** @type {import('.')} */
4589
+ var esErrors = Error;
4590
+
4591
+ /** @type {import('./eval')} */
4592
+ var _eval = EvalError;
4593
+
4594
+ /** @type {import('./range')} */
4595
+ var range = RangeError;
4596
+
4597
+ /** @type {import('./ref')} */
4598
+ var ref = ReferenceError;
4599
+
4600
+ /** @type {import('./uri')} */
4601
+ var uri = URIError;
4602
+
4603
+ /** @type {import('./abs')} */
4604
+ var abs$1 = Math.abs;
4605
+
4606
+ /** @type {import('./floor')} */
4607
+ var floor$1 = Math.floor;
4608
+
4609
+ /** @type {import('./max')} */
4610
+ var max$1 = Math.max;
4611
+
4612
+ /** @type {import('./min')} */
4613
+ var min$1 = Math.min;
4614
+
4615
+ /** @type {import('./pow')} */
4616
+ var pow$1 = Math.pow;
4617
+
4618
+ /** @type {import('./round')} */
4619
+ var round$1 = Math.round;
4620
+
4621
+ /** @type {import('./isNaN')} */
4622
+ var _isNaN = Number.isNaN || function isNaN(a) {
4623
+ return a !== a;
4624
+ };
4625
+
4626
+ var $isNaN = _isNaN;
4627
+
4628
+ /** @type {import('./sign')} */
4629
+ var sign$1 = function sign(number) {
4630
+ if ($isNaN(number) || number === 0) {
4631
+ return number;
4632
+ }
4633
+ return number < 0 ? -1 : +1;
4634
+ };
4635
+
4636
+ var shams$1;
4637
+ var hasRequiredShams;
4638
+
4639
+ function requireShams () {
4640
+ if (hasRequiredShams) return shams$1;
4641
+ hasRequiredShams = 1;
4642
+
4643
+ /** @type {import('./shams')} */
4644
+ /* eslint complexity: [2, 18], max-statements: [2, 33] */
4645
+ shams$1 = function hasSymbols() {
4646
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
4647
+ if (typeof Symbol.iterator === 'symbol') { return true; }
4648
+
4649
+ /** @type {{ [k in symbol]?: unknown }} */
4650
+ var obj = {};
4651
+ var sym = Symbol('test');
4652
+ var symObj = Object(sym);
4653
+ if (typeof sym === 'string') { return false; }
4654
+
4655
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
4656
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
4657
+
4658
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
4659
+ // if (sym instanceof Symbol) { return false; }
4660
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
4661
+ // if (!(symObj instanceof Symbol)) { return false; }
4662
+
4663
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
4664
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
4665
+
4666
+ var symVal = 42;
4667
+ obj[sym] = symVal;
4668
+ for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
4669
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
4670
+
4671
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
4672
+
4673
+ var syms = Object.getOwnPropertySymbols(obj);
4674
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
4675
+
4676
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
4677
+
4678
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
4679
+ // eslint-disable-next-line no-extra-parens
4680
+ var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));
4681
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
4682
+ }
4683
+
4684
+ return true;
4685
+ };
4686
+ return shams$1;
4687
+ }
4688
+
4689
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
4690
+ var hasSymbolSham = requireShams();
4691
+
4692
+ /** @type {import('.')} */
4693
+ var hasSymbols$4 = function hasNativeSymbols() {
4694
+ if (typeof origSymbol !== 'function') { return false; }
4695
+ if (typeof Symbol !== 'function') { return false; }
4696
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
4697
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
4698
+
4699
+ return hasSymbolSham();
4700
+ };
4701
+
4702
+ var Reflect_getPrototypeOf;
4703
+ var hasRequiredReflect_getPrototypeOf;
4704
+
4705
+ function requireReflect_getPrototypeOf () {
4706
+ if (hasRequiredReflect_getPrototypeOf) return Reflect_getPrototypeOf;
4707
+ hasRequiredReflect_getPrototypeOf = 1;
4708
+
4709
+ /** @type {import('./Reflect.getPrototypeOf')} */
4710
+ Reflect_getPrototypeOf = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;
4711
+ return Reflect_getPrototypeOf;
4712
+ }
4713
+
4714
+ var Object_getPrototypeOf;
4715
+ var hasRequiredObject_getPrototypeOf;
4716
+
4717
+ function requireObject_getPrototypeOf () {
4718
+ if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
4719
+ hasRequiredObject_getPrototypeOf = 1;
4720
+
4721
+ var $Object = esObjectAtoms;
4722
+
4723
+ /** @type {import('./Object.getPrototypeOf')} */
4724
+ Object_getPrototypeOf = $Object.getPrototypeOf || null;
4725
+ return Object_getPrototypeOf;
4726
+ }
4727
+
4728
+ var implementation$9;
4729
+ var hasRequiredImplementation;
4730
+
4731
+ function requireImplementation () {
4732
+ if (hasRequiredImplementation) return implementation$9;
4733
+ hasRequiredImplementation = 1;
4734
+
4735
+ /* eslint no-invalid-this: 1 */
4736
+
4737
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
4738
+ var toStr = Object.prototype.toString;
4739
+ var max = Math.max;
4740
+ var funcType = '[object Function]';
4741
+
4742
+ var concatty = function concatty(a, b) {
4743
+ var arr = [];
4744
+
4745
+ for (var i = 0; i < a.length; i += 1) {
4746
+ arr[i] = a[i];
4747
+ }
4748
+ for (var j = 0; j < b.length; j += 1) {
4749
+ arr[j + a.length] = b[j];
4750
+ }
4751
+
4752
+ return arr;
4753
+ };
4754
+
4755
+ var slicy = function slicy(arrLike, offset) {
4756
+ var arr = [];
4757
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
4758
+ arr[j] = arrLike[i];
4759
+ }
4760
+ return arr;
4761
+ };
4762
+
4763
+ var joiny = function (arr, joiner) {
4764
+ var str = '';
4765
+ for (var i = 0; i < arr.length; i += 1) {
4766
+ str += arr[i];
4767
+ if (i + 1 < arr.length) {
4768
+ str += joiner;
4769
+ }
4770
+ }
4771
+ return str;
4772
+ };
4773
+
4774
+ implementation$9 = function bind(that) {
4775
+ var target = this;
4776
+ if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
4777
+ throw new TypeError(ERROR_MESSAGE + target);
4778
+ }
4779
+ var args = slicy(arguments, 1);
4780
+
4781
+ var bound;
4782
+ var binder = function () {
4783
+ if (this instanceof bound) {
4784
+ var result = target.apply(
4785
+ this,
4786
+ concatty(args, arguments)
4787
+ );
4788
+ if (Object(result) === result) {
4789
+ return result;
4790
+ }
4791
+ return this;
4792
+ }
4793
+ return target.apply(
4794
+ that,
4795
+ concatty(args, arguments)
4796
+ );
4797
+
4798
+ };
4799
+
4800
+ var boundLength = max(0, target.length - args.length);
4801
+ var boundArgs = [];
4802
+ for (var i = 0; i < boundLength; i++) {
4803
+ boundArgs[i] = '$' + i;
4804
+ }
4805
+
4806
+ bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
4807
+
4808
+ if (target.prototype) {
4809
+ var Empty = function Empty() {};
4810
+ Empty.prototype = target.prototype;
4811
+ bound.prototype = new Empty();
4812
+ Empty.prototype = null;
4813
+ }
4814
+
4815
+ return bound;
4816
+ };
4817
+ return implementation$9;
4818
+ }
4819
+
4820
+ var functionBind;
4821
+ var hasRequiredFunctionBind;
4822
+
4823
+ function requireFunctionBind () {
4824
+ if (hasRequiredFunctionBind) return functionBind;
4825
+ hasRequiredFunctionBind = 1;
4826
+
4827
+ var implementation = requireImplementation();
4828
+
4829
+ functionBind = Function.prototype.bind || implementation;
4830
+ return functionBind;
4831
+ }
4832
+
4833
+ var functionCall;
4834
+ var hasRequiredFunctionCall;
4835
+
4836
+ function requireFunctionCall () {
4837
+ if (hasRequiredFunctionCall) return functionCall;
4838
+ hasRequiredFunctionCall = 1;
4839
+
4840
+ /** @type {import('./functionCall')} */
4841
+ functionCall = Function.prototype.call;
4842
+ return functionCall;
4843
+ }
4844
+
4845
+ var functionApply;
4846
+ var hasRequiredFunctionApply;
4847
+
4848
+ function requireFunctionApply () {
4849
+ if (hasRequiredFunctionApply) return functionApply;
4850
+ hasRequiredFunctionApply = 1;
4851
+
4852
+ /** @type {import('./functionApply')} */
4853
+ functionApply = Function.prototype.apply;
4854
+ return functionApply;
4855
+ }
4856
+
4857
+ /** @type {import('./reflectApply')} */
4858
+ var reflectApply$1 = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
4859
+
4860
+ var bind$4 = requireFunctionBind();
4861
+
4862
+ var $apply$2 = requireFunctionApply();
4863
+ var $call$2 = requireFunctionCall();
4864
+ var $reflectApply = reflectApply$1;
4865
+
4866
+ /** @type {import('./actualApply')} */
4867
+ var actualApply$1 = $reflectApply || bind$4.call($call$2, $apply$2);
4868
+
4869
+ var bind$3 = requireFunctionBind();
4870
+ var $TypeError$a = type;
4871
+
4872
+ var $call$1 = requireFunctionCall();
4873
+ var $actualApply = actualApply$1;
4874
+
4875
+ /** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
4876
+ var callBindApplyHelpers = function callBindBasic(args) {
4877
+ if (args.length < 1 || typeof args[0] !== 'function') {
4878
+ throw new $TypeError$a('a function is required');
4879
+ }
4880
+ return $actualApply(bind$3, $call$1, args);
4881
+ };
4882
+
4883
+ var callBind$6 = callBindApplyHelpers;
4884
+ var gOPD$5 = gopd$1;
4885
+
4886
+ var hasProtoAccessor;
4887
+ try {
4888
+ // eslint-disable-next-line no-extra-parens, no-proto
4889
+ hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
4890
+ } catch (e) {
4891
+ if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
4892
+ throw e;
4893
+ }
4894
+ }
4895
+
4896
+ // eslint-disable-next-line no-extra-parens
4897
+ var desc = !!hasProtoAccessor && gOPD$5 && gOPD$5(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
4898
+
4899
+ var $Object$3 = Object;
4900
+ var $getPrototypeOf = $Object$3.getPrototypeOf;
4901
+
4902
+ /** @type {import('./get')} */
4903
+ var get = desc && typeof desc.get === 'function'
4904
+ ? callBind$6([desc.get])
4905
+ : typeof $getPrototypeOf === 'function'
4906
+ ? /** @type {import('./get')} */ function getDunder(value) {
4907
+ // eslint-disable-next-line eqeqeq
4908
+ return $getPrototypeOf(value == null ? value : $Object$3(value));
4909
+ }
4910
+ : false;
4911
+
4912
+ var reflectGetProto = requireReflect_getPrototypeOf();
4913
+ var originalGetProto = requireObject_getPrototypeOf();
4914
+
4915
+ var getDunderProto = get;
4916
+
4917
+ /** @type {import('.')} */
4918
+ var getProto$3 = reflectGetProto
4919
+ ? function getProto(O) {
4920
+ // @ts-expect-error TS can't narrow inside a closure, for some reason
4921
+ return reflectGetProto(O);
4922
+ }
4923
+ : originalGetProto
4924
+ ? function getProto(O) {
4925
+ if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
4926
+ throw new TypeError('getProto: not an object');
4927
+ }
4928
+ // @ts-expect-error TS can't narrow inside a closure, for some reason
4929
+ return originalGetProto(O);
4930
+ }
4931
+ : getDunderProto
4932
+ ? function getProto(O) {
4933
+ // @ts-expect-error TS can't narrow inside a closure, for some reason
4934
+ return getDunderProto(O);
4935
+ }
4936
+ : null;
4937
+
4938
+ var call = Function.prototype.call;
4939
+ var $hasOwn = Object.prototype.hasOwnProperty;
4940
+ var bind$2 = requireFunctionBind();
4941
+
4942
+ /** @type {import('.')} */
4943
+ var hasown = bind$2.call(call, $hasOwn);
4944
+
4945
+ var undefined$1;
4946
+
4947
+ var $Object$2 = esObjectAtoms;
4948
+
4949
+ var $Error = esErrors;
4950
+ var $EvalError = _eval;
4951
+ var $RangeError = range;
4952
+ var $ReferenceError = ref;
4953
+ var $SyntaxError$1 = syntax;
4954
+ var $TypeError$9 = type;
4955
+ var $URIError = uri;
4956
+
4957
+ var abs = abs$1;
4958
+ var floor = floor$1;
4959
+ var max = max$1;
4960
+ var min = min$1;
4961
+ var pow = pow$1;
4962
+ var round = round$1;
4963
+ var sign = sign$1;
4964
+
4965
+ var $Function = Function;
4966
+
4967
+ // eslint-disable-next-line consistent-return
4968
+ var getEvalledConstructor = function (expressionSyntax) {
4969
+ try {
4970
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
4971
+ } catch (e) {}
4972
+ };
4973
+
4974
+ var $gOPD$1 = gopd$1;
4975
+ var $defineProperty = esDefineProperty;
4976
+
4977
+ var throwTypeError = function () {
4978
+ throw new $TypeError$9();
4979
+ };
4980
+ var ThrowTypeError = $gOPD$1
4981
+ ? (function () {
4982
+ try {
4983
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
4984
+ arguments.callee; // IE 8 does not throw here
4985
+ return throwTypeError;
4986
+ } catch (calleeThrows) {
4987
+ try {
4988
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
4989
+ return $gOPD$1(arguments, 'callee').get;
4990
+ } catch (gOPDthrows) {
4991
+ return throwTypeError;
4992
+ }
4993
+ }
4994
+ }())
4995
+ : throwTypeError;
4996
+
4997
+ var hasSymbols$3 = hasSymbols$4();
4998
+
4999
+ var getProto$2 = getProto$3;
5000
+ var $ObjectGPO = requireObject_getPrototypeOf();
5001
+ var $ReflectGPO = requireReflect_getPrototypeOf();
5002
+
5003
+ var $apply$1 = requireFunctionApply();
5004
+ var $call = requireFunctionCall();
5005
+
5006
+ var needsEval = {};
5007
+
5008
+ var TypedArray = typeof Uint8Array === 'undefined' || !getProto$2 ? undefined$1 : getProto$2(Uint8Array);
5009
+
5010
+ var INTRINSICS = {
5011
+ __proto__: null,
5012
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
5013
+ '%Array%': Array,
5014
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
5015
+ '%ArrayIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
5016
+ '%AsyncFromSyncIteratorPrototype%': undefined$1,
5017
+ '%AsyncFunction%': needsEval,
5018
+ '%AsyncGenerator%': needsEval,
5019
+ '%AsyncGeneratorFunction%': needsEval,
5020
+ '%AsyncIteratorPrototype%': needsEval,
5021
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
5022
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
5023
+ '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
5024
+ '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
5025
+ '%Boolean%': Boolean,
5026
+ '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
5027
+ '%Date%': Date,
5028
+ '%decodeURI%': decodeURI,
5029
+ '%decodeURIComponent%': decodeURIComponent,
5030
+ '%encodeURI%': encodeURI,
5031
+ '%encodeURIComponent%': encodeURIComponent,
5032
+ '%Error%': $Error,
5033
+ '%eval%': eval, // eslint-disable-line no-eval
5034
+ '%EvalError%': $EvalError,
5035
+ '%Float16Array%': typeof Float16Array === 'undefined' ? undefined$1 : Float16Array,
5036
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
5037
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
5038
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
5039
+ '%Function%': $Function,
5040
+ '%GeneratorFunction%': needsEval,
5041
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
5042
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
5043
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
5044
+ '%isFinite%': isFinite,
5045
+ '%isNaN%': isNaN,
5046
+ '%IteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
5047
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
5048
+ '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
5049
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
5050
+ '%Math%': Math,
5051
+ '%Number%': Number,
5052
+ '%Object%': $Object$2,
5053
+ '%Object.getOwnPropertyDescriptor%': $gOPD$1,
5054
+ '%parseFloat%': parseFloat,
5055
+ '%parseInt%': parseInt,
5056
+ '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
5057
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
5058
+ '%RangeError%': $RangeError,
5059
+ '%ReferenceError%': $ReferenceError,
5060
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
5061
+ '%RegExp%': RegExp,
5062
+ '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
5063
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
5064
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
5065
+ '%String%': String,
5066
+ '%StringIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
5067
+ '%Symbol%': hasSymbols$3 ? Symbol : undefined$1,
5068
+ '%SyntaxError%': $SyntaxError$1,
5069
+ '%ThrowTypeError%': ThrowTypeError,
5070
+ '%TypedArray%': TypedArray,
5071
+ '%TypeError%': $TypeError$9,
5072
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
5073
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
5074
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
5075
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
5076
+ '%URIError%': $URIError,
5077
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
5078
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
5079
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
5080
+
5081
+ '%Function.prototype.call%': $call,
5082
+ '%Function.prototype.apply%': $apply$1,
5083
+ '%Object.defineProperty%': $defineProperty,
5084
+ '%Object.getPrototypeOf%': $ObjectGPO,
5085
+ '%Math.abs%': abs,
5086
+ '%Math.floor%': floor,
5087
+ '%Math.max%': max,
5088
+ '%Math.min%': min,
5089
+ '%Math.pow%': pow,
5090
+ '%Math.round%': round,
5091
+ '%Math.sign%': sign,
5092
+ '%Reflect.getPrototypeOf%': $ReflectGPO
5093
+ };
5094
+
5095
+ if (getProto$2) {
5096
+ try {
5097
+ null.error; // eslint-disable-line no-unused-expressions
5098
+ } catch (e) {
5099
+ // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
5100
+ var errorProto = getProto$2(getProto$2(e));
5101
+ INTRINSICS['%Error.prototype%'] = errorProto;
5102
+ }
5103
+ }
5104
+
5105
+ var doEval = function doEval(name) {
5106
+ var value;
5107
+ if (name === '%AsyncFunction%') {
5108
+ value = getEvalledConstructor('async function () {}');
5109
+ } else if (name === '%GeneratorFunction%') {
5110
+ value = getEvalledConstructor('function* () {}');
5111
+ } else if (name === '%AsyncGeneratorFunction%') {
5112
+ value = getEvalledConstructor('async function* () {}');
5113
+ } else if (name === '%AsyncGenerator%') {
5114
+ var fn = doEval('%AsyncGeneratorFunction%');
5115
+ if (fn) {
5116
+ value = fn.prototype;
5117
+ }
5118
+ } else if (name === '%AsyncIteratorPrototype%') {
5119
+ var gen = doEval('%AsyncGenerator%');
5120
+ if (gen && getProto$2) {
5121
+ value = getProto$2(gen.prototype);
5122
+ }
5123
+ }
5124
+
5125
+ INTRINSICS[name] = value;
5126
+
5127
+ return value;
5128
+ };
5129
+
5130
+ var LEGACY_ALIASES = {
5131
+ __proto__: null,
5132
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
5133
+ '%ArrayPrototype%': ['Array', 'prototype'],
5134
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
5135
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
5136
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
5137
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
5138
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
5139
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
5140
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
5141
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
5142
+ '%DataViewPrototype%': ['DataView', 'prototype'],
5143
+ '%DatePrototype%': ['Date', 'prototype'],
5144
+ '%ErrorPrototype%': ['Error', 'prototype'],
5145
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
5146
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
5147
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
5148
+ '%FunctionPrototype%': ['Function', 'prototype'],
5149
+ '%Generator%': ['GeneratorFunction', 'prototype'],
5150
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
5151
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
5152
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
5153
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
5154
+ '%JSONParse%': ['JSON', 'parse'],
5155
+ '%JSONStringify%': ['JSON', 'stringify'],
5156
+ '%MapPrototype%': ['Map', 'prototype'],
5157
+ '%NumberPrototype%': ['Number', 'prototype'],
5158
+ '%ObjectPrototype%': ['Object', 'prototype'],
5159
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
5160
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
5161
+ '%PromisePrototype%': ['Promise', 'prototype'],
5162
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
5163
+ '%Promise_all%': ['Promise', 'all'],
5164
+ '%Promise_reject%': ['Promise', 'reject'],
5165
+ '%Promise_resolve%': ['Promise', 'resolve'],
5166
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
5167
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
5168
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
5169
+ '%SetPrototype%': ['Set', 'prototype'],
5170
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
5171
+ '%StringPrototype%': ['String', 'prototype'],
5172
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
5173
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
5174
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
5175
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
5176
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
5177
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
5178
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
5179
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
5180
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
5181
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
5182
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
5183
+ };
5184
+
5185
+ var bind$1 = requireFunctionBind();
5186
+ var hasOwn$3 = hasown;
5187
+ var $concat$1 = bind$1.call($call, Array.prototype.concat);
5188
+ var $spliceApply = bind$1.call($apply$1, Array.prototype.splice);
5189
+ var $replace$1 = bind$1.call($call, String.prototype.replace);
5190
+ var $strSlice = bind$1.call($call, String.prototype.slice);
5191
+ var $exec$1 = bind$1.call($call, RegExp.prototype.exec);
5192
+
5193
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
5194
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
5195
+ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
5196
+ var stringToPath = function stringToPath(string) {
5197
+ var first = $strSlice(string, 0, 1);
5198
+ var last = $strSlice(string, -1);
5199
+ if (first === '%' && last !== '%') {
5200
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
5201
+ } else if (last === '%' && first !== '%') {
5202
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
5203
+ }
5204
+ var result = [];
5205
+ $replace$1(string, rePropName, function (match, number, quote, subString) {
5206
+ result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
5207
+ });
5208
+ return result;
5209
+ };
5210
+ /* end adaptation */
5211
+
5212
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
5213
+ var intrinsicName = name;
5214
+ var alias;
5215
+ if (hasOwn$3(LEGACY_ALIASES, intrinsicName)) {
5216
+ alias = LEGACY_ALIASES[intrinsicName];
5217
+ intrinsicName = '%' + alias[0] + '%';
5218
+ }
5219
+
5220
+ if (hasOwn$3(INTRINSICS, intrinsicName)) {
5221
+ var value = INTRINSICS[intrinsicName];
5222
+ if (value === needsEval) {
5223
+ value = doEval(intrinsicName);
5224
+ }
5225
+ if (typeof value === 'undefined' && !allowMissing) {
5226
+ throw new $TypeError$9('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
5227
+ }
5228
+
5229
+ return {
5230
+ alias: alias,
5231
+ name: intrinsicName,
5232
+ value: value
5233
+ };
5234
+ }
5235
+
5236
+ throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
5237
+ };
5238
+
5239
+ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
5240
+ if (typeof name !== 'string' || name.length === 0) {
5241
+ throw new $TypeError$9('intrinsic name must be a non-empty string');
5242
+ }
5243
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
5244
+ throw new $TypeError$9('"allowMissing" argument must be a boolean');
5245
+ }
5246
+
5247
+ if ($exec$1(/^%?[^%]*%?$/, name) === null) {
5248
+ throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
5249
+ }
5250
+ var parts = stringToPath(name);
5251
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
5252
+
5253
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
5254
+ var intrinsicRealName = intrinsic.name;
5255
+ var value = intrinsic.value;
5256
+ var skipFurtherCaching = false;
5257
+
5258
+ var alias = intrinsic.alias;
5259
+ if (alias) {
5260
+ intrinsicBaseName = alias[0];
5261
+ $spliceApply(parts, $concat$1([0, 1], alias));
5262
+ }
5263
+
5264
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
5265
+ var part = parts[i];
5266
+ var first = $strSlice(part, 0, 1);
5267
+ var last = $strSlice(part, -1);
5268
+ if (
5269
+ (
5270
+ (first === '"' || first === "'" || first === '`')
5271
+ || (last === '"' || last === "'" || last === '`')
5272
+ )
5273
+ && first !== last
5274
+ ) {
5275
+ throw new $SyntaxError$1('property names with quotes must have matching quotes');
5276
+ }
5277
+ if (part === 'constructor' || !isOwn) {
5278
+ skipFurtherCaching = true;
5279
+ }
5280
+
5281
+ intrinsicBaseName += '.' + part;
5282
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
5283
+
5284
+ if (hasOwn$3(INTRINSICS, intrinsicRealName)) {
5285
+ value = INTRINSICS[intrinsicRealName];
5286
+ } else if (value != null) {
5287
+ if (!(part in value)) {
5288
+ if (!allowMissing) {
5289
+ throw new $TypeError$9('base intrinsic for ' + name + ' exists, but the property is not available.');
5290
+ }
5291
+ return void undefined$1;
5292
+ }
5293
+ if ($gOPD$1 && (i + 1) >= parts.length) {
5294
+ var desc = $gOPD$1(value, part);
5295
+ isOwn = !!desc;
5296
+
5297
+ // By convention, when a data property is converted to an accessor
5298
+ // property to emulate a data property that does not suffer from
5299
+ // the override mistake, that accessor's getter is marked with
5300
+ // an `originalValue` property. Here, when we detect this, we
5301
+ // uphold the illusion by pretending to see that original data
5302
+ // property, i.e., returning the value rather than the getter
5303
+ // itself.
5304
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
5305
+ value = desc.get;
5306
+ } else {
5307
+ value = value[part];
5308
+ }
5309
+ } else {
5310
+ isOwn = hasOwn$3(value, part);
5311
+ value = value[part];
5312
+ }
5313
+
5314
+ if (isOwn && !skipFurtherCaching) {
5315
+ INTRINSICS[intrinsicRealName] = value;
5316
+ }
5317
+ }
5318
+ }
5319
+ return value;
5320
+ };
5321
+
5322
+ var GetIntrinsic$8 = getIntrinsic;
5323
+ var define$5 = defineDataProperty$1;
5324
+ var hasDescriptors$1 = hasPropertyDescriptors_1();
5325
+ var gOPD$4 = gopd$1;
5326
+
5327
+ var $TypeError$8 = type;
5328
+ var $floor$1 = GetIntrinsic$8('%Math.floor%');
5329
+
5330
+ /** @type {import('.')} */
5331
+ var setFunctionLength = function setFunctionLength(fn, length) {
5332
+ if (typeof fn !== 'function') {
5333
+ throw new $TypeError$8('`fn` is not a function');
5334
+ }
5335
+ if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor$1(length) !== length) {
5336
+ throw new $TypeError$8('`length` must be a positive 32-bit integer');
5337
+ }
5338
+
5339
+ var loose = arguments.length > 2 && !!arguments[2];
5340
+
5341
+ var functionLengthIsConfigurable = true;
5342
+ var functionLengthIsWritable = true;
5343
+ if ('length' in fn && gOPD$4) {
5344
+ var desc = gOPD$4(fn, 'length');
5345
+ if (desc && !desc.configurable) {
5346
+ functionLengthIsConfigurable = false;
5347
+ }
5348
+ if (desc && !desc.writable) {
5349
+ functionLengthIsWritable = false;
5350
+ }
5351
+ }
5352
+
5353
+ if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
5354
+ if (hasDescriptors$1) {
5355
+ define$5(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true);
5356
+ } else {
5357
+ define$5(/** @type {Parameters<define>[0]} */ (fn), 'length', length);
5358
+ }
5359
+ }
5360
+ return fn;
5361
+ };
5362
+
5363
+ var bind = requireFunctionBind();
5364
+ var $apply = requireFunctionApply();
5365
+ var actualApply = actualApply$1;
5366
+
5367
+ /** @type {import('./applyBind')} */
5368
+ var applyBind = function applyBind() {
5369
+ return actualApply(bind, $apply, arguments);
5370
+ };
5371
+
5372
+ (function (module) {
5373
+
5374
+ var setFunctionLength$1 = setFunctionLength;
5375
+
5376
+ var $defineProperty = esDefineProperty;
5377
+
5378
+ var callBindBasic = callBindApplyHelpers;
5379
+ var applyBind$1 = applyBind;
5380
+
5381
+ module.exports = function callBind(originalFunction) {
5382
+ var func = callBindBasic(arguments);
5383
+ var adjustedLength = originalFunction.length - (arguments.length - 1);
5384
+ return setFunctionLength$1(
5385
+ func,
5386
+ 1 + (adjustedLength > 0 ? adjustedLength : 0),
5387
+ true
5388
+ );
5389
+ };
5390
+
5391
+ if ($defineProperty) {
5392
+ $defineProperty(module.exports, 'apply', { value: applyBind$1 });
5393
+ } else {
5394
+ module.exports.apply = applyBind$1;
5395
+ }
5396
+ } (callBind$7));
5397
+
5398
+ var callBindExports = callBind$7.exports;
5399
+
5400
+ var GetIntrinsic$7 = getIntrinsic;
5401
+
5402
+ var callBindBasic = callBindApplyHelpers;
5403
+
5404
+ /** @type {(thisArg: string, searchString: string, position?: number) => number} */
5405
+ var $indexOf$2 = callBindBasic([GetIntrinsic$7('%String.prototype.indexOf%')]);
5406
+
5407
+ /** @type {import('.')} */
5408
+ var callBound$i = function callBoundIntrinsic(name, allowMissing) {
5409
+ /* eslint no-extra-parens: 0 */
5410
+
5411
+ var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic$7(name, !!allowMissing));
5412
+ if (typeof intrinsic === 'function' && $indexOf$2(name, '.prototype.') > -1) {
5413
+ return callBindBasic(/** @type {const} */ ([intrinsic]));
5414
+ }
5415
+ return intrinsic;
5416
+ };
5417
+
5418
+ // modified from https://github.com/es-shims/es6-shim
5419
+ var objectKeys$1 = objectKeys$2;
5420
+ var hasSymbols$2 = requireShams()();
5421
+ var callBound$h = callBound$i;
5422
+ var $Object$1 = esObjectAtoms;
5423
+ var $push = callBound$h('Array.prototype.push');
5424
+ var $propIsEnumerable = callBound$h('Object.prototype.propertyIsEnumerable');
5425
+ var originalGetSymbols = hasSymbols$2 ? $Object$1.getOwnPropertySymbols : null;
5426
+
5427
+ // eslint-disable-next-line no-unused-vars
5428
+ var implementation$8 = function assign(target, source1) {
5429
+ if (target == null) { throw new TypeError('target must be an object'); }
5430
+ var to = $Object$1(target); // step 1
5431
+ if (arguments.length === 1) {
5432
+ return to; // step 2
5433
+ }
5434
+ for (var s = 1; s < arguments.length; ++s) {
5435
+ var from = $Object$1(arguments[s]); // step 3.a.i
5436
+
5437
+ // step 3.a.ii:
5438
+ var keys = objectKeys$1(from);
5439
+ var getSymbols = hasSymbols$2 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
5440
+ if (getSymbols) {
5441
+ var syms = getSymbols(from);
5442
+ for (var j = 0; j < syms.length; ++j) {
5443
+ var key = syms[j];
5444
+ if ($propIsEnumerable(from, key)) {
5445
+ $push(keys, key);
5446
+ }
5447
+ }
5448
+ }
5449
+
5450
+ // step 3.a.iii:
5451
+ for (var i = 0; i < keys.length; ++i) {
5452
+ var nextKey = keys[i];
5453
+ if ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2
5454
+ var propValue = from[nextKey]; // step 3.a.iii.2.a
5455
+ to[nextKey] = propValue; // step 3.a.iii.2.b
5456
+ }
5457
+ }
5458
+ }
5459
+
5460
+ return to; // step 4
5461
+ };
5462
+
5463
+ var implementation$7 = implementation$8;
5464
+
5465
+ var lacksProperEnumerationOrder = function () {
5466
+ if (!Object.assign) {
5467
+ return false;
5468
+ }
5469
+ /*
5470
+ * v8, specifically in node 4.x, has a bug with incorrect property enumeration order
5471
+ * note: this does not detect the bug unless there's 20 characters
5472
+ */
5473
+ var str = 'abcdefghijklmnopqrst';
5474
+ var letters = str.split('');
5475
+ var map = {};
5476
+ for (var i = 0; i < letters.length; ++i) {
5477
+ map[letters[i]] = letters[i];
5478
+ }
5479
+ var obj = Object.assign({}, map);
5480
+ var actual = '';
5481
+ for (var k in obj) {
5482
+ actual += k;
5483
+ }
5484
+ return str !== actual;
5485
+ };
5486
+
5487
+ var assignHasPendingExceptions = function () {
5488
+ if (!Object.assign || !Object.preventExtensions) {
5489
+ return false;
5490
+ }
5491
+ /*
5492
+ * Firefox 37 still has "pending exception" logic in its Object.assign implementation,
5493
+ * which is 72% slower than our shim, and Firefox 40's native implementation.
5494
+ */
5495
+ var thrower = Object.preventExtensions({ 1: 2 });
5496
+ try {
5497
+ Object.assign(thrower, 'xy');
5498
+ } catch (e) {
5499
+ return thrower[1] === 'y';
5500
+ }
5501
+ return false;
5502
+ };
5503
+
5504
+ var polyfill$4 = function getPolyfill() {
5505
+ if (!Object.assign) {
5506
+ return implementation$7;
5507
+ }
5508
+ if (lacksProperEnumerationOrder()) {
5509
+ return implementation$7;
5510
+ }
5511
+ if (assignHasPendingExceptions()) {
5512
+ return implementation$7;
5513
+ }
5514
+ return Object.assign;
5515
+ };
5516
+
5517
+ var define$4 = defineProperties_1;
5518
+ var getPolyfill$5 = polyfill$4;
5519
+
5520
+ var shim$5 = function shimAssign() {
5521
+ var polyfill = getPolyfill$5();
5522
+ define$4(
5523
+ Object,
5524
+ { assign: polyfill },
5525
+ { assign: function () { return Object.assign !== polyfill; } }
5526
+ );
5527
+ return polyfill;
5528
+ };
5529
+
5530
+ var defineProperties = defineProperties_1;
5531
+ var callBind$5 = callBindExports;
5532
+
5533
+ var implementation$6 = implementation$8;
5534
+ var getPolyfill$4 = polyfill$4;
5535
+ var shim$4 = shim$5;
5536
+
5537
+ var polyfill$3 = callBind$5.apply(getPolyfill$4());
5538
+ // eslint-disable-next-line no-unused-vars
5539
+ var bound = function assign(target, source1) {
5540
+ return polyfill$3(Object, arguments);
5541
+ };
5542
+
5543
+ defineProperties(bound, {
5544
+ getPolyfill: getPolyfill$4,
5545
+ implementation: implementation$6,
5546
+ shim: shim$4
5547
+ });
5548
+
5549
+ var object_assign = bound;
5550
+
5551
+ var GetIntrinsic$6 = getIntrinsic;
5552
+
5553
+ var callBind$4 = callBindExports;
5554
+
5555
+ var $indexOf$1 = callBind$4(GetIntrinsic$6('String.prototype.indexOf'));
5556
+
5557
+ var callBound$g = function callBoundIntrinsic(name, allowMissing) {
5558
+ var intrinsic = GetIntrinsic$6(name, !!allowMissing);
5559
+ if (typeof intrinsic === 'function' && $indexOf$1(name, '.prototype.') > -1) {
5560
+ return callBind$4(intrinsic);
5561
+ }
5562
+ return intrinsic;
5563
+ };
5564
+
5565
+ var functionsHaveNames = function functionsHaveNames() {
5566
+ return typeof function f() {}.name === 'string';
5567
+ };
5568
+
5569
+ var gOPD$3 = Object.getOwnPropertyDescriptor;
5570
+ if (gOPD$3) {
5571
+ try {
5572
+ gOPD$3([], 'length');
5573
+ } catch (e) {
5574
+ // IE 8 has a broken gOPD
5575
+ gOPD$3 = null;
5576
+ }
5577
+ }
5578
+
5579
+ functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {
5580
+ if (!functionsHaveNames() || !gOPD$3) {
5581
+ return false;
5582
+ }
5583
+ var desc = gOPD$3(function () {}, 'name');
5584
+ return !!desc && !!desc.configurable;
5585
+ };
5586
+
5587
+ var $bind = Function.prototype.bind;
5588
+
5589
+ functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {
5590
+ return functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== '';
5591
+ };
5592
+
5593
+ var functionsHaveNames_1 = functionsHaveNames;
5594
+
5595
+ var define$3 = defineDataProperty$1;
5596
+ var hasDescriptors = hasPropertyDescriptors_1();
5597
+ var functionsHaveConfigurableNames = functionsHaveNames_1.functionsHaveConfigurableNames();
5598
+
5599
+ var $TypeError$7 = type;
5600
+
5601
+ /** @type {import('.')} */
5602
+ var setFunctionName$1 = function setFunctionName(fn, name) {
5603
+ if (typeof fn !== 'function') {
5604
+ throw new $TypeError$7('`fn` is not a function');
5605
+ }
5606
+ var loose = arguments.length > 2 && !!arguments[2];
5607
+ if (!loose || functionsHaveConfigurableNames) {
5608
+ if (hasDescriptors) {
5609
+ define$3(/** @type {Parameters<define>[0]} */ (fn), 'name', name, true, true);
5610
+ } else {
5611
+ define$3(/** @type {Parameters<define>[0]} */ (fn), 'name', name);
5612
+ }
5613
+ }
5614
+ return fn;
5615
+ };
5616
+
5617
+ var setFunctionName = setFunctionName$1;
5618
+ var $TypeError$6 = type;
5619
+
5620
+ var $Object = Object;
5621
+
5622
+ var implementation$5 = setFunctionName(function flags() {
5623
+ if (this == null || this !== $Object(this)) {
5624
+ throw new $TypeError$6('RegExp.prototype.flags getter called on non-object');
5625
+ }
5626
+ var result = '';
5627
+ if (this.hasIndices) {
5628
+ result += 'd';
5629
+ }
5630
+ if (this.global) {
5631
+ result += 'g';
5632
+ }
5633
+ if (this.ignoreCase) {
5634
+ result += 'i';
5635
+ }
5636
+ if (this.multiline) {
5637
+ result += 'm';
5638
+ }
5639
+ if (this.dotAll) {
5640
+ result += 's';
5641
+ }
5642
+ if (this.unicode) {
5643
+ result += 'u';
5644
+ }
5645
+ if (this.unicodeSets) {
5646
+ result += 'v';
5647
+ }
5648
+ if (this.sticky) {
5649
+ result += 'y';
5650
+ }
5651
+ return result;
5652
+ }, 'get flags', true);
5653
+
5654
+ var implementation$4 = implementation$5;
5655
+
5656
+ var supportsDescriptors$1 = defineProperties_1.supportsDescriptors;
5657
+ var $gOPD = Object.getOwnPropertyDescriptor;
5658
+
5659
+ var polyfill$2 = function getPolyfill() {
5660
+ if (supportsDescriptors$1 && (/a/mig).flags === 'gim') {
5661
+ var descriptor = $gOPD(RegExp.prototype, 'flags');
5662
+ if (
5663
+ descriptor
5664
+ && typeof descriptor.get === 'function'
5665
+ && 'dotAll' in RegExp.prototype
5666
+ && 'hasIndices' in RegExp.prototype
5667
+ ) {
5668
+ /* eslint getter-return: 0 */
5669
+ var calls = '';
5670
+ var o = {};
5671
+ Object.defineProperty(o, 'hasIndices', {
5672
+ get: function () {
5673
+ calls += 'd';
5674
+ }
5675
+ });
5676
+ Object.defineProperty(o, 'sticky', {
5677
+ get: function () {
5678
+ calls += 'y';
5679
+ }
5680
+ });
5681
+
5682
+ descriptor.get.call(o);
5683
+
5684
+ if (calls === 'dy') {
5685
+ return descriptor.get;
5686
+ }
5687
+ }
5688
+ }
5689
+ return implementation$4;
5690
+ };
5691
+
5692
+ var supportsDescriptors = defineProperties_1.supportsDescriptors;
5693
+ var getPolyfill$3 = polyfill$2;
5694
+ var gOPD$2 = gopd$1;
5695
+ var defineProperty = Object.defineProperty;
5696
+ var $TypeError$5 = esErrors;
5697
+ var getProto$1 = getProto$3;
5698
+ var regex = /a/;
5699
+
5700
+ var shim$3 = function shimFlags() {
5701
+ if (!supportsDescriptors || !getProto$1) {
5702
+ throw new $TypeError$5('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');
5703
+ }
5704
+ var polyfill = getPolyfill$3();
5705
+ var proto = getProto$1(regex);
5706
+ var descriptor = gOPD$2(proto, 'flags');
5707
+ if (!descriptor || descriptor.get !== polyfill) {
5708
+ defineProperty(proto, 'flags', {
5709
+ configurable: true,
5710
+ enumerable: false,
5711
+ get: polyfill
5712
+ });
5713
+ }
5714
+ return polyfill;
5715
+ };
5716
+
5717
+ var define$2 = defineProperties_1;
5718
+ var callBind$3 = callBindExports;
5719
+
5720
+ var implementation$3 = implementation$5;
5721
+ var getPolyfill$2 = polyfill$2;
5722
+ var shim$2 = shim$3;
5723
+
5724
+ var flagsBound = callBind$3(getPolyfill$2());
5725
+
5726
+ define$2(flagsBound, {
5727
+ getPolyfill: getPolyfill$2,
5728
+ implementation: implementation$3,
5729
+ shim: shim$2
5730
+ });
5731
+
5732
+ var regexp_prototype_flags = flagsBound;
5733
+
5734
+ var esGetIterator = {exports: {}};
5735
+
5736
+ var hasSymbols$1 = requireShams();
5737
+
5738
+ /** @type {import('.')} */
5739
+ var shams = function hasToStringTagShams() {
5740
+ return hasSymbols$1() && !!Symbol.toStringTag;
5741
+ };
5742
+
5743
+ var hasToStringTag$7 = shams();
5744
+ var callBound$f = callBound$i;
5745
+
5746
+ var $toString$7 = callBound$f('Object.prototype.toString');
5747
+
5748
+ /** @type {import('.')} */
5749
+ var isStandardArguments = function isArguments(value) {
5750
+ if (
5751
+ hasToStringTag$7
5752
+ && value
5753
+ && typeof value === 'object'
5754
+ && Symbol.toStringTag in value
5755
+ ) {
5756
+ return false;
5757
+ }
5758
+ return $toString$7(value) === '[object Arguments]';
5759
+ };
5760
+
5761
+ /** @type {import('.')} */
5762
+ var isLegacyArguments = function isArguments(value) {
5763
+ if (isStandardArguments(value)) {
5764
+ return true;
5765
+ }
5766
+ return value !== null
5767
+ && typeof value === 'object'
5768
+ && 'length' in value
5769
+ && typeof value.length === 'number'
5770
+ && value.length >= 0
5771
+ && $toString$7(value) !== '[object Array]'
5772
+ && 'callee' in value
5773
+ && $toString$7(value.callee) === '[object Function]';
5774
+ };
5775
+
5776
+ var supportsStandardArguments = (function () {
5777
+ return isStandardArguments(arguments);
5778
+ }());
5779
+
5780
+ // @ts-expect-error TODO make this not error
5781
+ isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests
5782
+
5783
+ /** @type {import('.')} */
5784
+ var isArguments$2 = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
5785
+
5786
+ var _nodeResolve_empty = {};
5787
+
5788
+ var _nodeResolve_empty$1 = /*#__PURE__*/Object.freeze({
5789
+ __proto__: null,
5790
+ default: _nodeResolve_empty
5791
+ });
5792
+
5793
+ var require$$0 = /*@__PURE__*/getAugmentedNamespace(_nodeResolve_empty$1);
5794
+
5795
+ var hasMap = typeof Map === 'function' && Map.prototype;
5796
+ var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
5797
+ var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
5798
+ var mapForEach = hasMap && Map.prototype.forEach;
5799
+ var hasSet = typeof Set === 'function' && Set.prototype;
5800
+ var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
5801
+ var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
5802
+ var setForEach = hasSet && Set.prototype.forEach;
5803
+ var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
5804
+ var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
5805
+ var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
5806
+ var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
5807
+ var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
5808
+ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
5809
+ var booleanValueOf = Boolean.prototype.valueOf;
5810
+ var objectToString = Object.prototype.toString;
5811
+ var functionToString = Function.prototype.toString;
5812
+ var $match = String.prototype.match;
5813
+ var $slice$1 = String.prototype.slice;
5814
+ var $replace = String.prototype.replace;
5815
+ var $toUpperCase = String.prototype.toUpperCase;
5816
+ var $toLowerCase = String.prototype.toLowerCase;
5817
+ var $test = RegExp.prototype.test;
5818
+ var $concat = Array.prototype.concat;
5819
+ var $join = Array.prototype.join;
5820
+ var $arrSlice = Array.prototype.slice;
5821
+ var $floor = Math.floor;
5822
+ var bigIntValueOf$1 = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
5823
+ var gOPS = Object.getOwnPropertySymbols;
5824
+ var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
5825
+ var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
5826
+ // ie, `has-tostringtag/shams
5827
+ var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
5828
+ ? Symbol.toStringTag
5829
+ : null;
5830
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
5831
+
5832
+ var gPO$1 = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
5833
+ [].__proto__ === Array.prototype // eslint-disable-line no-proto
5834
+ ? function (O) {
5835
+ return O.__proto__; // eslint-disable-line no-proto
5836
+ }
5837
+ : null
5838
+ );
5839
+
5840
+ function addNumericSeparator(num, str) {
5841
+ if (
5842
+ num === Infinity
5843
+ || num === -Infinity
5844
+ || num !== num
5845
+ || (num && num > -1000 && num < 1000)
5846
+ || $test.call(/e/, str)
5847
+ ) {
5848
+ return str;
5849
+ }
5850
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
5851
+ if (typeof num === 'number') {
5852
+ var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
5853
+ if (int !== num) {
5854
+ var intStr = String(int);
5855
+ var dec = $slice$1.call(str, intStr.length + 1);
5856
+ return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
5857
+ }
5858
+ }
5859
+ return $replace.call(str, sepRegex, '$&_');
5860
+ }
5861
+
5862
+ var utilInspect = require$$0;
5863
+ var inspectCustom = utilInspect.custom;
5864
+ var inspectSymbol = isSymbol$2(inspectCustom) ? inspectCustom : null;
5865
+
5866
+ var quotes = {
5867
+ __proto__: null,
5868
+ 'double': '"',
5869
+ single: "'"
5870
+ };
5871
+ var quoteREs = {
5872
+ __proto__: null,
5873
+ 'double': /(["\\])/g,
5874
+ single: /(['\\])/g
5875
+ };
5876
+
5877
+ var objectInspect = function inspect_(obj, options, depth, seen) {
5878
+ var opts = options || {};
5879
+
5880
+ if (has$1(opts, 'quoteStyle') && !has$1(quotes, opts.quoteStyle)) {
5881
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
5882
+ }
5883
+ if (
5884
+ has$1(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
5885
+ ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
5886
+ : opts.maxStringLength !== null
5887
+ )
5888
+ ) {
5889
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
5890
+ }
5891
+ var customInspect = has$1(opts, 'customInspect') ? opts.customInspect : true;
5892
+ if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
5893
+ throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
5894
+ }
5895
+
5896
+ if (
5897
+ has$1(opts, 'indent')
5898
+ && opts.indent !== null
5899
+ && opts.indent !== '\t'
5900
+ && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
5901
+ ) {
5902
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
5903
+ }
5904
+ if (has$1(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
5905
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
5906
+ }
5907
+ var numericSeparator = opts.numericSeparator;
5908
+
5909
+ if (typeof obj === 'undefined') {
5910
+ return 'undefined';
5911
+ }
5912
+ if (obj === null) {
5913
+ return 'null';
5914
+ }
5915
+ if (typeof obj === 'boolean') {
5916
+ return obj ? 'true' : 'false';
5917
+ }
5918
+
5919
+ if (typeof obj === 'string') {
5920
+ return inspectString(obj, opts);
5921
+ }
5922
+ if (typeof obj === 'number') {
5923
+ if (obj === 0) {
5924
+ return Infinity / obj > 0 ? '0' : '-0';
5925
+ }
5926
+ var str = String(obj);
5927
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
5928
+ }
5929
+ if (typeof obj === 'bigint') {
5930
+ var bigIntStr = String(obj) + 'n';
5931
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
5932
+ }
5933
+
5934
+ var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
5935
+ if (typeof depth === 'undefined') { depth = 0; }
5936
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
5937
+ return isArray$3(obj) ? '[Array]' : '[Object]';
5938
+ }
5939
+
5940
+ var indent = getIndent(opts, depth);
5941
+
5942
+ if (typeof seen === 'undefined') {
5943
+ seen = [];
5944
+ } else if (indexOf(seen, obj) >= 0) {
5945
+ return '[Circular]';
5946
+ }
5947
+
5948
+ function inspect(value, from, noIndent) {
5949
+ if (from) {
5950
+ seen = $arrSlice.call(seen);
5951
+ seen.push(from);
5952
+ }
5953
+ if (noIndent) {
5954
+ var newOpts = {
5955
+ depth: opts.depth
5956
+ };
5957
+ if (has$1(opts, 'quoteStyle')) {
5958
+ newOpts.quoteStyle = opts.quoteStyle;
5959
+ }
5960
+ return inspect_(value, newOpts, depth + 1, seen);
5961
+ }
5962
+ return inspect_(value, opts, depth + 1, seen);
5963
+ }
5964
+
5965
+ if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
5966
+ var name = nameOf(obj);
5967
+ var keys = arrObjKeys(obj, inspect);
5968
+ return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
5969
+ }
5970
+ if (isSymbol$2(obj)) {
5971
+ var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
5972
+ return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
5973
+ }
5974
+ if (isElement(obj)) {
5975
+ var s = '<' + $toLowerCase.call(String(obj.nodeName));
5976
+ var attrs = obj.attributes || [];
5977
+ for (var i = 0; i < attrs.length; i++) {
5978
+ s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
5979
+ }
5980
+ s += '>';
5981
+ if (obj.childNodes && obj.childNodes.length) { s += '...'; }
5982
+ s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
5983
+ return s;
5984
+ }
5985
+ if (isArray$3(obj)) {
5986
+ if (obj.length === 0) { return '[]'; }
5987
+ var xs = arrObjKeys(obj, inspect);
5988
+ if (indent && !singleLineValues(xs)) {
5989
+ return '[' + indentedJoin(xs, indent) + ']';
5990
+ }
5991
+ return '[ ' + $join.call(xs, ', ') + ' ]';
5992
+ }
5993
+ if (isError(obj)) {
5994
+ var parts = arrObjKeys(obj, inspect);
5995
+ if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
5996
+ return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
5997
+ }
5998
+ if (parts.length === 0) { return '[' + String(obj) + ']'; }
5999
+ return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
6000
+ }
6001
+ if (typeof obj === 'object' && customInspect) {
6002
+ if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
6003
+ return utilInspect(obj, { depth: maxDepth - depth });
6004
+ } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
6005
+ return obj.inspect();
6006
+ }
6007
+ }
6008
+ if (isMap$3(obj)) {
6009
+ var mapParts = [];
6010
+ if (mapForEach) {
6011
+ mapForEach.call(obj, function (value, key) {
6012
+ mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
6013
+ });
6014
+ }
6015
+ return collectionOf('Map', mapSize.call(obj), mapParts, indent);
6016
+ }
6017
+ if (isSet$3(obj)) {
6018
+ var setParts = [];
6019
+ if (setForEach) {
6020
+ setForEach.call(obj, function (value) {
6021
+ setParts.push(inspect(value, obj));
6022
+ });
6023
+ }
6024
+ return collectionOf('Set', setSize.call(obj), setParts, indent);
6025
+ }
6026
+ if (isWeakMap$1(obj)) {
6027
+ return weakCollectionOf('WeakMap');
6028
+ }
6029
+ if (isWeakSet$1(obj)) {
6030
+ return weakCollectionOf('WeakSet');
6031
+ }
6032
+ if (isWeakRef(obj)) {
6033
+ return weakCollectionOf('WeakRef');
6034
+ }
6035
+ if (isNumber$1(obj)) {
6036
+ return markBoxed(inspect(Number(obj)));
6037
+ }
6038
+ if (isBigInt$1(obj)) {
6039
+ return markBoxed(inspect(bigIntValueOf$1.call(obj)));
6040
+ }
6041
+ if (isBoolean$1(obj)) {
6042
+ return markBoxed(booleanValueOf.call(obj));
6043
+ }
6044
+ if (isString$3(obj)) {
6045
+ return markBoxed(inspect(String(obj)));
6046
+ }
6047
+ // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
6048
+ /* eslint-env browser */
6049
+ if (typeof window !== 'undefined' && obj === window) {
6050
+ return '{ [object Window] }';
6051
+ }
6052
+ if (
6053
+ (typeof globalThis !== 'undefined' && obj === globalThis)
6054
+ || (typeof commonjsGlobal !== 'undefined' && obj === commonjsGlobal)
6055
+ ) {
6056
+ return '{ [object globalThis] }';
6057
+ }
6058
+ if (!isDate$1(obj) && !isRegExp(obj)) {
6059
+ var ys = arrObjKeys(obj, inspect);
6060
+ var isPlainObject = gPO$1 ? gPO$1(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
6061
+ var protoTag = obj instanceof Object ? '' : 'null prototype';
6062
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice$1.call(toStr$3(obj), 8, -1) : protoTag ? 'Object' : '';
6063
+ var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
6064
+ var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
6065
+ if (ys.length === 0) { return tag + '{}'; }
6066
+ if (indent) {
6067
+ return tag + '{' + indentedJoin(ys, indent) + '}';
6068
+ }
6069
+ return tag + '{ ' + $join.call(ys, ', ') + ' }';
6070
+ }
6071
+ return String(obj);
6072
+ };
6073
+
6074
+ function wrapQuotes(s, defaultStyle, opts) {
6075
+ var style = opts.quoteStyle || defaultStyle;
6076
+ var quoteChar = quotes[style];
6077
+ return quoteChar + s + quoteChar;
6078
+ }
6079
+
6080
+ function quote(s) {
6081
+ return $replace.call(String(s), /"/g, '&quot;');
6082
+ }
6083
+
6084
+ function canTrustToString(obj) {
6085
+ return !toStringTag || !(typeof obj === 'object' && (toStringTag in obj || typeof obj[toStringTag] !== 'undefined'));
6086
+ }
6087
+ function isArray$3(obj) { return toStr$3(obj) === '[object Array]' && canTrustToString(obj); }
6088
+ function isDate$1(obj) { return toStr$3(obj) === '[object Date]' && canTrustToString(obj); }
6089
+ function isRegExp(obj) { return toStr$3(obj) === '[object RegExp]' && canTrustToString(obj); }
6090
+ function isError(obj) { return toStr$3(obj) === '[object Error]' && canTrustToString(obj); }
6091
+ function isString$3(obj) { return toStr$3(obj) === '[object String]' && canTrustToString(obj); }
6092
+ function isNumber$1(obj) { return toStr$3(obj) === '[object Number]' && canTrustToString(obj); }
6093
+ function isBoolean$1(obj) { return toStr$3(obj) === '[object Boolean]' && canTrustToString(obj); }
6094
+
6095
+ // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
6096
+ function isSymbol$2(obj) {
6097
+ if (hasShammedSymbols) {
6098
+ return obj && typeof obj === 'object' && obj instanceof Symbol;
6099
+ }
6100
+ if (typeof obj === 'symbol') {
6101
+ return true;
6102
+ }
6103
+ if (!obj || typeof obj !== 'object' || !symToString) {
6104
+ return false;
6105
+ }
6106
+ try {
6107
+ symToString.call(obj);
6108
+ return true;
6109
+ } catch (e) {}
6110
+ return false;
6111
+ }
6112
+
6113
+ function isBigInt$1(obj) {
6114
+ if (!obj || typeof obj !== 'object' || !bigIntValueOf$1) {
6115
+ return false;
6116
+ }
6117
+ try {
6118
+ bigIntValueOf$1.call(obj);
6119
+ return true;
6120
+ } catch (e) {}
6121
+ return false;
6122
+ }
6123
+
6124
+ var hasOwn$2 = Object.prototype.hasOwnProperty || function (key) { return key in this; };
6125
+ function has$1(obj, key) {
6126
+ return hasOwn$2.call(obj, key);
6127
+ }
6128
+
6129
+ function toStr$3(obj) {
6130
+ return objectToString.call(obj);
6131
+ }
6132
+
6133
+ function nameOf(f) {
6134
+ if (f.name) { return f.name; }
6135
+ var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
6136
+ if (m) { return m[1]; }
6137
+ return null;
6138
+ }
6139
+
6140
+ function indexOf(xs, x) {
6141
+ if (xs.indexOf) { return xs.indexOf(x); }
6142
+ for (var i = 0, l = xs.length; i < l; i++) {
6143
+ if (xs[i] === x) { return i; }
6144
+ }
6145
+ return -1;
6146
+ }
6147
+
6148
+ function isMap$3(x) {
6149
+ if (!mapSize || !x || typeof x !== 'object') {
6150
+ return false;
6151
+ }
6152
+ try {
6153
+ mapSize.call(x);
6154
+ try {
6155
+ setSize.call(x);
6156
+ } catch (s) {
6157
+ return true;
6158
+ }
6159
+ return x instanceof Map; // core-js workaround, pre-v2.5.0
6160
+ } catch (e) {}
6161
+ return false;
6162
+ }
6163
+
6164
+ function isWeakMap$1(x) {
6165
+ if (!weakMapHas || !x || typeof x !== 'object') {
6166
+ return false;
6167
+ }
6168
+ try {
6169
+ weakMapHas.call(x, weakMapHas);
6170
+ try {
6171
+ weakSetHas.call(x, weakSetHas);
6172
+ } catch (s) {
6173
+ return true;
6174
+ }
6175
+ return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
6176
+ } catch (e) {}
6177
+ return false;
6178
+ }
6179
+
6180
+ function isWeakRef(x) {
6181
+ if (!weakRefDeref || !x || typeof x !== 'object') {
6182
+ return false;
6183
+ }
6184
+ try {
6185
+ weakRefDeref.call(x);
6186
+ return true;
6187
+ } catch (e) {}
6188
+ return false;
6189
+ }
6190
+
6191
+ function isSet$3(x) {
6192
+ if (!setSize || !x || typeof x !== 'object') {
6193
+ return false;
6194
+ }
6195
+ try {
6196
+ setSize.call(x);
6197
+ try {
6198
+ mapSize.call(x);
6199
+ } catch (m) {
6200
+ return true;
6201
+ }
6202
+ return x instanceof Set; // core-js workaround, pre-v2.5.0
6203
+ } catch (e) {}
6204
+ return false;
6205
+ }
6206
+
6207
+ function isWeakSet$1(x) {
6208
+ if (!weakSetHas || !x || typeof x !== 'object') {
6209
+ return false;
6210
+ }
6211
+ try {
6212
+ weakSetHas.call(x, weakSetHas);
6213
+ try {
6214
+ weakMapHas.call(x, weakMapHas);
6215
+ } catch (s) {
6216
+ return true;
6217
+ }
6218
+ return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
6219
+ } catch (e) {}
6220
+ return false;
6221
+ }
6222
+
6223
+ function isElement(x) {
6224
+ if (!x || typeof x !== 'object') { return false; }
6225
+ if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
6226
+ return true;
6227
+ }
6228
+ return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
6229
+ }
6230
+
6231
+ function inspectString(str, opts) {
6232
+ if (str.length > opts.maxStringLength) {
6233
+ var remaining = str.length - opts.maxStringLength;
6234
+ var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
6235
+ return inspectString($slice$1.call(str, 0, opts.maxStringLength), opts) + trailer;
6236
+ }
6237
+ var quoteRE = quoteREs[opts.quoteStyle || 'single'];
6238
+ quoteRE.lastIndex = 0;
6239
+ // eslint-disable-next-line no-control-regex
6240
+ var s = $replace.call($replace.call(str, quoteRE, '\\$1'), /[\x00-\x1f]/g, lowbyte);
6241
+ return wrapQuotes(s, 'single', opts);
6242
+ }
6243
+
6244
+ function lowbyte(c) {
6245
+ var n = c.charCodeAt(0);
6246
+ var x = {
6247
+ 8: 'b',
6248
+ 9: 't',
6249
+ 10: 'n',
6250
+ 12: 'f',
6251
+ 13: 'r'
6252
+ }[n];
6253
+ if (x) { return '\\' + x; }
6254
+ return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
6255
+ }
6256
+
6257
+ function markBoxed(str) {
6258
+ return 'Object(' + str + ')';
6259
+ }
6260
+
6261
+ function weakCollectionOf(type) {
6262
+ return type + ' { ? }';
6263
+ }
6264
+
6265
+ function collectionOf(type, size, entries, indent) {
6266
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
6267
+ return type + ' (' + size + ') {' + joinedEntries + '}';
6268
+ }
6269
+
6270
+ function singleLineValues(xs) {
6271
+ for (var i = 0; i < xs.length; i++) {
6272
+ if (indexOf(xs[i], '\n') >= 0) {
6273
+ return false;
6274
+ }
6275
+ }
6276
+ return true;
6277
+ }
6278
+
6279
+ function getIndent(opts, depth) {
6280
+ var baseIndent;
6281
+ if (opts.indent === '\t') {
6282
+ baseIndent = '\t';
6283
+ } else if (typeof opts.indent === 'number' && opts.indent > 0) {
6284
+ baseIndent = $join.call(Array(opts.indent + 1), ' ');
6285
+ } else {
6286
+ return null;
6287
+ }
6288
+ return {
6289
+ base: baseIndent,
6290
+ prev: $join.call(Array(depth + 1), baseIndent)
6291
+ };
6292
+ }
6293
+
6294
+ function indentedJoin(xs, indent) {
6295
+ if (xs.length === 0) { return ''; }
6296
+ var lineJoiner = '\n' + indent.prev + indent.base;
6297
+ return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
6298
+ }
6299
+
6300
+ function arrObjKeys(obj, inspect) {
6301
+ var isArr = isArray$3(obj);
6302
+ var xs = [];
6303
+ if (isArr) {
6304
+ xs.length = obj.length;
6305
+ for (var i = 0; i < obj.length; i++) {
6306
+ xs[i] = has$1(obj, i) ? inspect(obj[i], obj) : '';
6307
+ }
6308
+ }
6309
+ var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
6310
+ var symMap;
6311
+ if (hasShammedSymbols) {
6312
+ symMap = {};
6313
+ for (var k = 0; k < syms.length; k++) {
6314
+ symMap['$' + syms[k]] = syms[k];
6315
+ }
6316
+ }
6317
+
6318
+ for (var key in obj) { // eslint-disable-line no-restricted-syntax
6319
+ if (!has$1(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
6320
+ if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
6321
+ if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
6322
+ // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
6323
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
6324
+ } else if ($test.call(/[^\w$]/, key)) {
6325
+ xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
6326
+ } else {
6327
+ xs.push(key + ': ' + inspect(obj[key], obj));
6328
+ }
6329
+ }
6330
+ if (typeof gOPS === 'function') {
6331
+ for (var j = 0; j < syms.length; j++) {
6332
+ if (isEnumerable.call(obj, syms[j])) {
6333
+ xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
6334
+ }
6335
+ }
6336
+ }
6337
+ return xs;
6338
+ }
6339
+
6340
+ var inspect$3 = objectInspect;
6341
+
6342
+ var $TypeError$4 = type;
6343
+
6344
+ /*
6345
+ * This function traverses the list returning the node corresponding to the given key.
6346
+ *
6347
+ * That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list.
6348
+ * By doing so, all the recently used nodes can be accessed relatively quickly.
6349
+ */
6350
+ /** @type {import('./list.d.ts').listGetNode} */
6351
+ // eslint-disable-next-line consistent-return
6352
+ var listGetNode = function (list, key, isDelete) {
6353
+ /** @type {typeof list | NonNullable<(typeof list)['next']>} */
6354
+ var prev = list;
6355
+ /** @type {(typeof list)['next']} */
6356
+ var curr;
6357
+ // eslint-disable-next-line eqeqeq
6358
+ for (; (curr = prev.next) != null; prev = curr) {
6359
+ if (curr.key === key) {
6360
+ prev.next = curr.next;
6361
+ if (!isDelete) {
6362
+ // eslint-disable-next-line no-extra-parens
6363
+ curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
6364
+ list.next = curr; // eslint-disable-line no-param-reassign
6365
+ }
6366
+ return curr;
6367
+ }
6368
+ }
6369
+ };
6370
+
6371
+ /** @type {import('./list.d.ts').listGet} */
6372
+ var listGet = function (objects, key) {
6373
+ if (!objects) {
6374
+ return void undefined;
6375
+ }
6376
+ var node = listGetNode(objects, key);
6377
+ return node && node.value;
6378
+ };
6379
+ /** @type {import('./list.d.ts').listSet} */
6380
+ var listSet = function (objects, key, value) {
6381
+ var node = listGetNode(objects, key);
6382
+ if (node) {
6383
+ node.value = value;
6384
+ } else {
6385
+ // Prepend the new node to the beginning of the list
6386
+ objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
6387
+ key: key,
6388
+ next: objects.next,
6389
+ value: value
6390
+ });
6391
+ }
6392
+ };
6393
+ /** @type {import('./list.d.ts').listHas} */
6394
+ var listHas = function (objects, key) {
6395
+ if (!objects) {
6396
+ return false;
6397
+ }
6398
+ return !!listGetNode(objects, key);
6399
+ };
6400
+ /** @type {import('./list.d.ts').listDelete} */
6401
+ // eslint-disable-next-line consistent-return
6402
+ var listDelete = function (objects, key) {
6403
+ if (objects) {
6404
+ return listGetNode(objects, key, true);
6405
+ }
6406
+ };
6407
+
6408
+ /** @type {import('.')} */
6409
+ var sideChannelList = function getSideChannelList() {
6410
+ /** @typedef {ReturnType<typeof getSideChannelList>} Channel */
6411
+ /** @typedef {Parameters<Channel['get']>[0]} K */
6412
+ /** @typedef {Parameters<Channel['set']>[1]} V */
6413
+
6414
+ /** @type {import('./list.d.ts').RootNode<V, K> | undefined} */ var $o;
6415
+
6416
+ /** @type {Channel} */
6417
+ var channel = {
6418
+ assert: function (key) {
6419
+ if (!channel.has(key)) {
6420
+ throw new $TypeError$4('Side channel does not contain ' + inspect$3(key));
6421
+ }
6422
+ },
6423
+ 'delete': function (key) {
6424
+ var root = $o && $o.next;
6425
+ var deletedNode = listDelete($o, key);
6426
+ if (deletedNode && root && root === deletedNode) {
6427
+ $o = void undefined;
6428
+ }
6429
+ return !!deletedNode;
6430
+ },
6431
+ get: function (key) {
6432
+ return listGet($o, key);
6433
+ },
6434
+ has: function (key) {
6435
+ return listHas($o, key);
6436
+ },
6437
+ set: function (key, value) {
6438
+ if (!$o) {
6439
+ // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
6440
+ $o = {
6441
+ next: void undefined
6442
+ };
6443
+ }
6444
+ // eslint-disable-next-line no-extra-parens
6445
+ listSet(/** @type {NonNullable<typeof $o>} */ ($o), key, value);
6446
+ }
6447
+ };
6448
+ // @ts-expect-error TODO: figure out why this is erroring
6449
+ return channel;
6450
+ };
6451
+
6452
+ var GetIntrinsic$5 = getIntrinsic;
6453
+ var callBound$e = callBound$i;
6454
+ var inspect$2 = objectInspect;
6455
+
6456
+ var $TypeError$3 = type;
6457
+ var $Map$3 = GetIntrinsic$5('%Map%', true);
6458
+
6459
+ /** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */
6460
+ var $mapGet$1 = callBound$e('Map.prototype.get', true);
6461
+ /** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */
6462
+ var $mapSet = callBound$e('Map.prototype.set', true);
6463
+ /** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
6464
+ var $mapHas$5 = callBound$e('Map.prototype.has', true);
6465
+ /** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
6466
+ var $mapDelete = callBound$e('Map.prototype.delete', true);
6467
+ /** @type {<K, V>(thisArg: Map<K, V>) => number} */
6468
+ var $mapSize$1 = callBound$e('Map.prototype.size', true);
6469
+
6470
+ /** @type {import('.')} */
6471
+ var sideChannelMap = !!$Map$3 && /** @type {Exclude<import('.'), false>} */ function getSideChannelMap() {
6472
+ /** @typedef {ReturnType<typeof getSideChannelMap>} Channel */
6473
+ /** @typedef {Parameters<Channel['get']>[0]} K */
6474
+ /** @typedef {Parameters<Channel['set']>[1]} V */
6475
+
6476
+ /** @type {Map<K, V> | undefined} */ var $m;
6477
+
6478
+ /** @type {Channel} */
6479
+ var channel = {
6480
+ assert: function (key) {
6481
+ if (!channel.has(key)) {
6482
+ throw new $TypeError$3('Side channel does not contain ' + inspect$2(key));
6483
+ }
6484
+ },
6485
+ 'delete': function (key) {
6486
+ if ($m) {
6487
+ var result = $mapDelete($m, key);
6488
+ if ($mapSize$1($m) === 0) {
6489
+ $m = void undefined;
6490
+ }
6491
+ return result;
6492
+ }
6493
+ return false;
6494
+ },
6495
+ get: function (key) { // eslint-disable-line consistent-return
6496
+ if ($m) {
6497
+ return $mapGet$1($m, key);
6498
+ }
6499
+ },
6500
+ has: function (key) {
6501
+ if ($m) {
6502
+ return $mapHas$5($m, key);
6503
+ }
6504
+ return false;
6505
+ },
6506
+ set: function (key, value) {
6507
+ if (!$m) {
6508
+ // @ts-expect-error TS can't handle narrowing a variable inside a closure
6509
+ $m = new $Map$3();
6510
+ }
6511
+ $mapSet($m, key, value);
6512
+ }
6513
+ };
6514
+
6515
+ // @ts-expect-error TODO: figure out why TS is erroring here
6516
+ return channel;
6517
+ };
6518
+
6519
+ var GetIntrinsic$4 = getIntrinsic;
6520
+ var callBound$d = callBound$i;
6521
+ var inspect$1 = objectInspect;
6522
+ var getSideChannelMap$1 = sideChannelMap;
6523
+
6524
+ var $TypeError$2 = type;
6525
+ var $WeakMap$1 = GetIntrinsic$4('%WeakMap%', true);
6526
+
6527
+ /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => V} */
6528
+ var $weakMapGet = callBound$d('WeakMap.prototype.get', true);
6529
+ /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K, value: V) => void} */
6530
+ var $weakMapSet = callBound$d('WeakMap.prototype.set', true);
6531
+ /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
6532
+ var $weakMapHas = callBound$d('WeakMap.prototype.has', true);
6533
+ /** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
6534
+ var $weakMapDelete = callBound$d('WeakMap.prototype.delete', true);
6535
+
6536
+ /** @type {import('.')} */
6537
+ var sideChannelWeakmap = $WeakMap$1
6538
+ ? /** @type {Exclude<import('.'), false>} */ function getSideChannelWeakMap() {
6539
+ /** @typedef {ReturnType<typeof getSideChannelWeakMap>} Channel */
6540
+ /** @typedef {Parameters<Channel['get']>[0]} K */
6541
+ /** @typedef {Parameters<Channel['set']>[1]} V */
6542
+
6543
+ /** @type {WeakMap<K & object, V> | undefined} */ var $wm;
6544
+ /** @type {Channel | undefined} */ var $m;
6545
+
6546
+ /** @type {Channel} */
6547
+ var channel = {
6548
+ assert: function (key) {
6549
+ if (!channel.has(key)) {
6550
+ throw new $TypeError$2('Side channel does not contain ' + inspect$1(key));
6551
+ }
6552
+ },
6553
+ 'delete': function (key) {
6554
+ if ($WeakMap$1 && key && (typeof key === 'object' || typeof key === 'function')) {
6555
+ if ($wm) {
6556
+ return $weakMapDelete($wm, key);
6557
+ }
6558
+ } else if (getSideChannelMap$1) {
6559
+ if ($m) {
6560
+ return $m['delete'](key);
6561
+ }
6562
+ }
6563
+ return false;
6564
+ },
6565
+ get: function (key) {
6566
+ if ($WeakMap$1 && key && (typeof key === 'object' || typeof key === 'function')) {
6567
+ if ($wm) {
6568
+ return $weakMapGet($wm, key);
6569
+ }
6570
+ }
6571
+ return $m && $m.get(key);
6572
+ },
6573
+ has: function (key) {
6574
+ if ($WeakMap$1 && key && (typeof key === 'object' || typeof key === 'function')) {
6575
+ if ($wm) {
6576
+ return $weakMapHas($wm, key);
6577
+ }
6578
+ }
6579
+ return !!$m && $m.has(key);
6580
+ },
6581
+ set: function (key, value) {
6582
+ if ($WeakMap$1 && key && (typeof key === 'object' || typeof key === 'function')) {
6583
+ if (!$wm) {
6584
+ $wm = new $WeakMap$1();
6585
+ }
6586
+ $weakMapSet($wm, key, value);
6587
+ } else if (getSideChannelMap$1) {
6588
+ if (!$m) {
6589
+ $m = getSideChannelMap$1();
6590
+ }
6591
+ // eslint-disable-next-line no-extra-parens
6592
+ /** @type {NonNullable<typeof $m>} */ ($m).set(key, value);
6593
+ }
6594
+ }
6595
+ };
6596
+
6597
+ // @ts-expect-error TODO: figure out why this is erroring
6598
+ return channel;
6599
+ }
6600
+ : getSideChannelMap$1;
6601
+
6602
+ var $TypeError$1 = type;
6603
+ var inspect = objectInspect;
6604
+ var getSideChannelList = sideChannelList;
6605
+ var getSideChannelMap = sideChannelMap;
6606
+ var getSideChannelWeakMap = sideChannelWeakmap;
6607
+
6608
+ var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
6609
+
6610
+ /** @type {import('.')} */
6611
+ var sideChannel = function getSideChannel() {
6612
+ /** @typedef {ReturnType<typeof getSideChannel>} Channel */
6613
+
6614
+ /** @type {Channel | undefined} */ var $channelData;
6615
+
6616
+ /** @type {Channel} */
6617
+ var channel = {
6618
+ assert: function (key) {
6619
+ if (!channel.has(key)) {
6620
+ throw new $TypeError$1('Side channel does not contain ' + inspect(key));
6621
+ }
6622
+ },
6623
+ 'delete': function (key) {
6624
+ return !!$channelData && $channelData['delete'](key);
6625
+ },
6626
+ get: function (key) {
6627
+ return $channelData && $channelData.get(key);
6628
+ },
6629
+ has: function (key) {
6630
+ return !!$channelData && $channelData.has(key);
6631
+ },
6632
+ set: function (key, value) {
6633
+ if (!$channelData) {
6634
+ $channelData = makeChannel();
6635
+ }
6636
+
6637
+ $channelData.set(key, value);
6638
+ }
6639
+ };
6640
+ // @ts-expect-error TODO: figure out why this is erroring
6641
+ return channel;
6642
+ };
6643
+
6644
+ /** @typedef {`$${import('.').InternalSlot}`} SaltedInternalSlot */
6645
+ /** @typedef {{ [k in SaltedInternalSlot]?: unknown }} SlotsObject */
6646
+
6647
+ var hasOwn$1 = hasown;
6648
+ /** @type {import('side-channel').Channel<object, SlotsObject>} */
6649
+ var channel = sideChannel();
6650
+
6651
+ var $TypeError = type;
6652
+
6653
+ /** @type {import('.')} */
6654
+ var SLOT$1 = {
6655
+ assert: function (O, slot) {
6656
+ if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
6657
+ throw new $TypeError('`O` is not an object');
6658
+ }
6659
+ if (typeof slot !== 'string') {
6660
+ throw new $TypeError('`slot` must be a string');
6661
+ }
6662
+ channel.assert(O);
6663
+ if (!SLOT$1.has(O, slot)) {
6664
+ throw new $TypeError('`' + slot + '` is not present on `O`');
6665
+ }
6666
+ },
6667
+ get: function (O, slot) {
6668
+ if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
6669
+ throw new $TypeError('`O` is not an object');
6670
+ }
6671
+ if (typeof slot !== 'string') {
6672
+ throw new $TypeError('`slot` must be a string');
6673
+ }
6674
+ var slots = channel.get(O);
6675
+ // eslint-disable-next-line no-extra-parens
6676
+ return slots && slots[/** @type {SaltedInternalSlot} */ ('$' + slot)];
6677
+ },
6678
+ has: function (O, slot) {
6679
+ if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
6680
+ throw new $TypeError('`O` is not an object');
6681
+ }
6682
+ if (typeof slot !== 'string') {
6683
+ throw new $TypeError('`slot` must be a string');
6684
+ }
6685
+ var slots = channel.get(O);
6686
+ // eslint-disable-next-line no-extra-parens
6687
+ return !!slots && hasOwn$1(slots, /** @type {SaltedInternalSlot} */ ('$' + slot));
6688
+ },
6689
+ set: function (O, slot, V) {
6690
+ if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
6691
+ throw new $TypeError('`O` is not an object');
6692
+ }
6693
+ if (typeof slot !== 'string') {
6694
+ throw new $TypeError('`slot` must be a string');
6695
+ }
6696
+ var slots = channel.get(O);
6697
+ if (!slots) {
6698
+ slots = {};
6699
+ channel.set(O, slots);
6700
+ }
6701
+ // eslint-disable-next-line no-extra-parens
6702
+ slots[/** @type {SaltedInternalSlot} */ ('$' + slot)] = V;
6703
+ }
6704
+ };
6705
+
6706
+ if (Object.freeze) {
6707
+ Object.freeze(SLOT$1);
6708
+ }
6709
+
6710
+ var internalSlot = SLOT$1;
6711
+
6712
+ var SLOT = internalSlot;
6713
+ var $SyntaxError = syntax;
6714
+
6715
+ var $StopIteration = typeof StopIteration === 'object' ? StopIteration : null;
6716
+
6717
+ /** @type {import('.')} */
6718
+ var stopIterationIterator = function getStopIterationIterator(origIterator) {
6719
+ if (!$StopIteration) {
6720
+ throw new $SyntaxError('this environment lacks StopIteration');
6721
+ }
6722
+
6723
+ SLOT.set(origIterator, '[[Done]]', false);
6724
+
6725
+ /** @template T @typedef {T extends Iterator<infer U> ? U : never} IteratorType */
6726
+ /** @typedef {IteratorType<ReturnType<typeof getStopIterationIterator>>} T */
6727
+ var siIterator = {
6728
+ next: /** @type {() => IteratorResult<T>} */ function next() {
6729
+ // eslint-disable-next-line no-extra-parens
6730
+ var iterator = /** @type {typeof origIterator} */ (SLOT.get(this, '[[Iterator]]'));
6731
+ var done = !!SLOT.get(iterator, '[[Done]]');
6732
+ try {
6733
+ return {
6734
+ done: done,
6735
+ // eslint-disable-next-line no-extra-parens
6736
+ value: done ? void undefined : /** @type {T} */ (iterator.next())
6737
+ };
6738
+ } catch (e) {
6739
+ SLOT.set(iterator, '[[Done]]', true);
6740
+ if (e !== $StopIteration) {
6741
+ throw e;
6742
+ }
6743
+ return {
6744
+ done: true,
6745
+ value: void undefined
6746
+ };
6747
+ }
6748
+ }
6749
+ };
6750
+
6751
+ SLOT.set(siIterator, '[[Iterator]]', origIterator);
6752
+
6753
+ // @ts-expect-error TODO FIXME
6754
+ return siIterator;
6755
+ };
6756
+
6757
+ var toString = {}.toString;
6758
+
6759
+ var isarray = Array.isArray || function (arr) {
6760
+ return toString.call(arr) == '[object Array]';
6761
+ };
6762
+
6763
+ var callBound$c = callBound$i;
6764
+
6765
+ /** @type {(receiver: ThisParameterType<typeof String.prototype.valueOf>, ...args: Parameters<typeof String.prototype.valueOf>) => ReturnType<typeof String.prototype.valueOf>} */
6766
+ var $strValueOf = callBound$c('String.prototype.valueOf');
6767
+
6768
+ /** @type {import('.')} */
6769
+ var tryStringObject = function tryStringObject(value) {
6770
+ try {
6771
+ $strValueOf(value);
6772
+ return true;
6773
+ } catch (e) {
6774
+ return false;
6775
+ }
6776
+ };
6777
+ /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
6778
+ var $toString$6 = callBound$c('Object.prototype.toString');
6779
+ var strClass = '[object String]';
6780
+ var hasToStringTag$6 = shams();
6781
+
6782
+ /** @type {import('.')} */
6783
+ var isString$2 = function isString(value) {
6784
+ if (typeof value === 'string') {
6785
+ return true;
6786
+ }
6787
+ if (!value || typeof value !== 'object') {
6788
+ return false;
6789
+ }
6790
+ return hasToStringTag$6 ? tryStringObject(value) : $toString$6(value) === strClass;
6791
+ };
6792
+
6793
+ /** @const */
6794
+ var $Map$2 = typeof Map === 'function' && Map.prototype ? Map : null;
6795
+ var $Set$3 = typeof Set === 'function' && Set.prototype ? Set : null;
6796
+
6797
+ var exported$2;
6798
+
6799
+ if (!$Map$2) {
6800
+ /** @type {import('.')} */
6801
+ // eslint-disable-next-line no-unused-vars
6802
+ exported$2 = function isMap(x) {
6803
+ // `Map` is not present in this environment.
6804
+ return false;
6805
+ };
6806
+ }
6807
+
6808
+ var $mapHas$4 = $Map$2 ? Map.prototype.has : null;
6809
+ var $setHas$4 = $Set$3 ? Set.prototype.has : null;
6810
+ if (!exported$2 && !$mapHas$4) {
6811
+ /** @type {import('.')} */
6812
+ // eslint-disable-next-line no-unused-vars
6813
+ exported$2 = function isMap(x) {
6814
+ // `Map` does not have a `has` method
6815
+ return false;
6816
+ };
6817
+ }
6818
+
6819
+ /** @type {import('.')} */
6820
+ var isMap$2 = exported$2 || function isMap(x) {
6821
+ if (!x || typeof x !== 'object') {
6822
+ return false;
6823
+ }
6824
+ try {
6825
+ $mapHas$4.call(x);
6826
+ if ($setHas$4) {
6827
+ try {
6828
+ $setHas$4.call(x);
6829
+ } catch (e) {
6830
+ return true;
6831
+ }
6832
+ }
6833
+ // @ts-expect-error TS can't figure out that $Map is always truthy here
6834
+ return x instanceof $Map$2; // core-js workaround, pre-v2.5.0
6835
+ } catch (e) {}
6836
+ return false;
6837
+ };
6838
+
6839
+ var $Map$1 = typeof Map === 'function' && Map.prototype ? Map : null;
6840
+ var $Set$2 = typeof Set === 'function' && Set.prototype ? Set : null;
6841
+
6842
+ var exported$1;
6843
+
6844
+ if (!$Set$2) {
6845
+ /** @type {import('.')} */
6846
+ // eslint-disable-next-line no-unused-vars
6847
+ exported$1 = function isSet(x) {
6848
+ // `Set` is not present in this environment.
6849
+ return false;
6850
+ };
6851
+ }
6852
+
6853
+ var $mapHas$3 = $Map$1 ? Map.prototype.has : null;
6854
+ var $setHas$3 = $Set$2 ? Set.prototype.has : null;
6855
+ if (!exported$1 && !$setHas$3) {
6856
+ /** @type {import('.')} */
6857
+ // eslint-disable-next-line no-unused-vars
6858
+ exported$1 = function isSet(x) {
6859
+ // `Set` does not have a `has` method
6860
+ return false;
6861
+ };
6862
+ }
6863
+
6864
+ /** @type {import('.')} */
6865
+ var isSet$2 = exported$1 || function isSet(x) {
6866
+ if (!x || typeof x !== 'object') {
6867
+ return false;
6868
+ }
6869
+ try {
6870
+ $setHas$3.call(x);
6871
+ if ($mapHas$3) {
6872
+ try {
6873
+ $mapHas$3.call(x);
6874
+ } catch (e) {
6875
+ return true;
6876
+ }
6877
+ }
6878
+ // @ts-expect-error TS can't figure out that $Set is always truthy here
6879
+ return x instanceof $Set$2; // core-js workaround, pre-v2.5.0
6880
+ } catch (e) {}
6881
+ return false;
6882
+ };
6883
+
6884
+ /* eslint global-require: 0 */
6885
+ // the code is structured this way so that bundlers can
6886
+ // alias out `has-symbols` to `() => true` or `() => false` if your target
6887
+ // environments' Symbol capabilities are known, and then use
6888
+ // dead code elimination on the rest of this module.
6889
+ //
6890
+ // Similarly, `isarray` can be aliased to `Array.isArray` if
6891
+ // available in all target environments.
6892
+
6893
+ var isArguments$1 = isArguments$2;
6894
+ var getStopIterationIterator = stopIterationIterator;
6895
+
6896
+ if (hasSymbols$4() || requireShams()()) {
6897
+ var $iterator = Symbol.iterator;
6898
+ // Symbol is available natively or shammed
6899
+ // natively:
6900
+ // - Chrome >= 38
6901
+ // - Edge 12-14?, Edge >= 15 for sure
6902
+ // - FF >= 36
6903
+ // - Safari >= 9
6904
+ // - node >= 0.12
6905
+ esGetIterator.exports = function getIterator(iterable) {
6906
+ // alternatively, `iterable[$iterator]?.()`
6907
+ if (iterable != null && typeof iterable[$iterator] !== 'undefined') {
6908
+ return iterable[$iterator]();
6909
+ }
6910
+ if (isArguments$1(iterable)) {
6911
+ // arguments objects lack Symbol.iterator
6912
+ // - node 0.12
6913
+ return Array.prototype[$iterator].call(iterable);
6914
+ }
6915
+ };
6916
+ } else {
6917
+ // Symbol is not available, native or shammed
6918
+ var isArray$2 = isarray;
6919
+ var isString$1 = isString$2;
6920
+ var GetIntrinsic$3 = getIntrinsic;
6921
+ var $Map = GetIntrinsic$3('%Map%', true);
6922
+ var $Set$1 = GetIntrinsic$3('%Set%', true);
6923
+ var callBound$b = callBound$g;
6924
+ var $arrayPush = callBound$b('Array.prototype.push');
6925
+ var $charCodeAt = callBound$b('String.prototype.charCodeAt');
6926
+ var $stringSlice = callBound$b('String.prototype.slice');
6927
+
6928
+ var advanceStringIndex = function advanceStringIndex(S, index) {
6929
+ var length = S.length;
6930
+ if ((index + 1) >= length) {
6931
+ return index + 1;
6932
+ }
6933
+
6934
+ var first = $charCodeAt(S, index);
6935
+ if (first < 0xD800 || first > 0xDBFF) {
6936
+ return index + 1;
6937
+ }
6938
+
6939
+ var second = $charCodeAt(S, index + 1);
6940
+ if (second < 0xDC00 || second > 0xDFFF) {
6941
+ return index + 1;
6942
+ }
6943
+
6944
+ return index + 2;
6945
+ };
6946
+
6947
+ var getArrayIterator = function getArrayIterator(arraylike) {
6948
+ var i = 0;
6949
+ return {
6950
+ next: function next() {
6951
+ var done = i >= arraylike.length;
6952
+ var value;
6953
+ if (!done) {
6954
+ value = arraylike[i];
6955
+ i += 1;
6956
+ }
6957
+ return {
6958
+ done: done,
6959
+ value: value
6960
+ };
6961
+ }
6962
+ };
6963
+ };
6964
+
6965
+ var getNonCollectionIterator = function getNonCollectionIterator(iterable, noPrimordialCollections) {
6966
+ if (isArray$2(iterable) || isArguments$1(iterable)) {
6967
+ return getArrayIterator(iterable);
6968
+ }
6969
+ if (isString$1(iterable)) {
6970
+ var i = 0;
6971
+ return {
6972
+ next: function next() {
6973
+ var nextIndex = advanceStringIndex(iterable, i);
6974
+ var value = $stringSlice(iterable, i, nextIndex);
6975
+ i = nextIndex;
6976
+ return {
6977
+ done: nextIndex > iterable.length,
6978
+ value: value
6979
+ };
6980
+ }
6981
+ };
6982
+ }
6983
+
6984
+ // es6-shim and es-shims' es-map use a string "_es6-shim iterator_" property on different iterables, such as MapIterator.
6985
+ if (noPrimordialCollections && typeof iterable['_es6-shim iterator_'] !== 'undefined') {
6986
+ return iterable['_es6-shim iterator_']();
6987
+ }
6988
+ };
6989
+
6990
+ if (!$Map && !$Set$1) {
6991
+ // the only language iterables are Array, String, arguments
6992
+ // - Safari <= 6.0
6993
+ // - Chrome < 38
6994
+ // - node < 0.12
6995
+ // - FF < 13
6996
+ // - IE < 11
6997
+ // - Edge < 11
6998
+
6999
+ esGetIterator.exports = function getIterator(iterable) {
7000
+ if (iterable != null) {
7001
+ return getNonCollectionIterator(iterable, true);
7002
+ }
7003
+ };
7004
+ } else {
7005
+ // either Map or Set are available, but Symbol is not
7006
+ // - es6-shim on an ES5 browser
7007
+ // - Safari 6.2 (maybe 6.1?)
7008
+ // - FF v[13, 36)
7009
+ // - IE 11
7010
+ // - Edge 11
7011
+ // - Safari v[6, 9)
7012
+
7013
+ var isMap$1 = isMap$2;
7014
+ var isSet$1 = isSet$2;
7015
+
7016
+ // Firefox >= 27, IE 11, Safari 6.2 - 9, Edge 11, es6-shim in older envs, all have forEach
7017
+ var $mapForEach = callBound$b('Map.prototype.forEach', true);
7018
+ var $setForEach = callBound$b('Set.prototype.forEach', true);
7019
+ if (typeof process === 'undefined' || !process.versions || !process.versions.node) { // "if is not node"
7020
+
7021
+ // Firefox 17 - 26 has `.iterator()`, whose iterator `.next()` either
7022
+ // returns a value, or throws a StopIteration object. These browsers
7023
+ // do not have any other mechanism for iteration.
7024
+ var $mapIterator = callBound$b('Map.prototype.iterator', true);
7025
+ var $setIterator = callBound$b('Set.prototype.iterator', true);
7026
+ }
7027
+ // Firefox 27-35, and some older es6-shim versions, use a string "@@iterator" property
7028
+ // this returns a proper iterator object, so we should use it instead of forEach.
7029
+ // newer es6-shim versions use a string "_es6-shim iterator_" property.
7030
+ var $mapAtAtIterator = callBound$b('Map.prototype.@@iterator', true) || callBound$b('Map.prototype._es6-shim iterator_', true);
7031
+ var $setAtAtIterator = callBound$b('Set.prototype.@@iterator', true) || callBound$b('Set.prototype._es6-shim iterator_', true);
7032
+
7033
+ var getCollectionIterator = function getCollectionIterator(iterable) {
7034
+ if (isMap$1(iterable)) {
7035
+ if ($mapIterator) {
7036
+ return getStopIterationIterator($mapIterator(iterable));
7037
+ }
7038
+ if ($mapAtAtIterator) {
7039
+ return $mapAtAtIterator(iterable);
7040
+ }
7041
+ if ($mapForEach) {
7042
+ var entries = [];
7043
+ $mapForEach(iterable, function (v, k) {
7044
+ $arrayPush(entries, [k, v]);
7045
+ });
7046
+ return getArrayIterator(entries);
7047
+ }
7048
+ }
7049
+ if (isSet$1(iterable)) {
7050
+ if ($setIterator) {
7051
+ return getStopIterationIterator($setIterator(iterable));
7052
+ }
7053
+ if ($setAtAtIterator) {
7054
+ return $setAtAtIterator(iterable);
7055
+ }
7056
+ if ($setForEach) {
7057
+ var values = [];
7058
+ $setForEach(iterable, function (v) {
7059
+ $arrayPush(values, v);
7060
+ });
7061
+ return getArrayIterator(values);
7062
+ }
7063
+ }
7064
+ };
7065
+
7066
+ esGetIterator.exports = function getIterator(iterable) {
7067
+ return getCollectionIterator(iterable) || getNonCollectionIterator(iterable);
7068
+ };
7069
+ }
7070
+ }
7071
+
7072
+ var esGetIteratorExports = esGetIterator.exports;
7073
+
7074
+ var numberIsNaN = function (value) {
7075
+ return value !== value;
7076
+ };
7077
+
7078
+ var implementation$2 = function is(a, b) {
7079
+ if (a === 0 && b === 0) {
7080
+ return 1 / a === 1 / b;
7081
+ }
7082
+ if (a === b) {
7083
+ return true;
7084
+ }
7085
+ if (numberIsNaN(a) && numberIsNaN(b)) {
7086
+ return true;
7087
+ }
7088
+ return false;
7089
+ };
7090
+
7091
+ var implementation$1 = implementation$2;
7092
+
7093
+ var polyfill$1 = function getPolyfill() {
7094
+ return typeof Object.is === 'function' ? Object.is : implementation$1;
7095
+ };
7096
+
7097
+ var getPolyfill$1 = polyfill$1;
7098
+ var define$1 = defineProperties_1;
7099
+
7100
+ var shim$1 = function shimObjectIs() {
7101
+ var polyfill = getPolyfill$1();
7102
+ define$1(Object, { is: polyfill }, {
7103
+ is: function testObjectIs() {
7104
+ return Object.is !== polyfill;
7105
+ }
7106
+ });
7107
+ return polyfill;
7108
+ };
7109
+
7110
+ var define = defineProperties_1;
7111
+ var callBind$2 = callBindExports;
7112
+
7113
+ var implementation = implementation$2;
7114
+ var getPolyfill = polyfill$1;
7115
+ var shim = shim$1;
7116
+
7117
+ var polyfill = callBind$2(getPolyfill(), Object);
7118
+
7119
+ define(polyfill, {
7120
+ getPolyfill: getPolyfill,
7121
+ implementation: implementation,
7122
+ shim: shim
7123
+ });
7124
+
7125
+ var objectIs = polyfill;
7126
+
7127
+ var callBind$1 = callBindExports;
7128
+ var callBound$a = callBound$i;
7129
+ var GetIntrinsic$2 = getIntrinsic;
7130
+
7131
+ var $ArrayBuffer = GetIntrinsic$2('%ArrayBuffer%', true);
7132
+ /** @type {undefined | ((receiver: ArrayBuffer) => number) | ((receiver: unknown) => never)} */
7133
+ var $byteLength$2 = callBound$a('ArrayBuffer.prototype.byteLength', true);
7134
+ var $toString$5 = callBound$a('Object.prototype.toString');
7135
+
7136
+ // in node 0.10, ArrayBuffers have no prototype methods, but have an own slot-checking `slice` method
7137
+ var abSlice = !!$ArrayBuffer && !$byteLength$2 && new $ArrayBuffer(0).slice;
7138
+ var $abSlice = !!abSlice && callBind$1(abSlice);
7139
+
7140
+ /** @type {import('.')} */
7141
+ var isArrayBuffer$2 = $byteLength$2 || $abSlice
7142
+ ? function isArrayBuffer(obj) {
7143
+ if (!obj || typeof obj !== 'object') {
7144
+ return false;
7145
+ }
7146
+ try {
7147
+ if ($byteLength$2) {
7148
+ // @ts-expect-error no idea why TS can't handle the overload
7149
+ $byteLength$2(obj);
7150
+ } else {
7151
+ // @ts-expect-error TS chooses not to type-narrow inside a closure
7152
+ $abSlice(obj, 0);
7153
+ }
7154
+ return true;
7155
+ } catch (e) {
7156
+ return false;
7157
+ }
7158
+ }
7159
+ : $ArrayBuffer
7160
+ // in node 0.8, ArrayBuffers have no prototype or own methods, but also no Symbol.toStringTag
7161
+ ? function isArrayBuffer(obj) {
7162
+ return $toString$5(obj) === '[object ArrayBuffer]';
7163
+ }
7164
+ // @ts-expect-error
7165
+ : function isArrayBuffer(obj) { // eslint-disable-line no-unused-vars
7166
+ return false;
7167
+ };
7168
+
7169
+ var callBound$9 = callBound$i;
7170
+
7171
+ var getDay = callBound$9('Date.prototype.getDay');
7172
+ /** @type {import('.')} */
7173
+ var tryDateObject = function tryDateGetDayCall(value) {
7174
+ try {
7175
+ getDay(value);
7176
+ return true;
7177
+ } catch (e) {
7178
+ return false;
7179
+ }
7180
+ };
7181
+
7182
+ /** @type {(value: unknown) => string} */
7183
+ var toStr$2 = callBound$9('Object.prototype.toString');
7184
+ var dateClass = '[object Date]';
7185
+ var hasToStringTag$5 = shams();
7186
+
7187
+ /** @type {import('.')} */
7188
+ var isDateObject = function isDateObject(value) {
7189
+ if (typeof value !== 'object' || value === null) {
7190
+ return false;
7191
+ }
7192
+ return hasToStringTag$5 ? tryDateObject(value) : toStr$2(value) === dateClass;
7193
+ };
7194
+
7195
+ var callBound$8 = callBound$i;
7196
+ var hasToStringTag$4 = shams();
7197
+ var hasOwn = hasown;
7198
+ var gOPD$1 = gopd$1;
7199
+
7200
+ /** @type {import('.')} */
7201
+ var fn;
7202
+
7203
+ if (hasToStringTag$4) {
7204
+ /** @type {(receiver: ThisParameterType<typeof RegExp.prototype.exec>, ...args: Parameters<typeof RegExp.prototype.exec>) => ReturnType<typeof RegExp.prototype.exec>} */
7205
+ var $exec = callBound$8('RegExp.prototype.exec');
7206
+ /** @type {object} */
7207
+ var isRegexMarker = {};
7208
+
7209
+ var throwRegexMarker = function () {
7210
+ throw isRegexMarker;
7211
+ };
7212
+ /** @type {{ toString(): never, valueOf(): never, [Symbol.toPrimitive]?(): never }} */
7213
+ var badStringifier = {
7214
+ toString: throwRegexMarker,
7215
+ valueOf: throwRegexMarker
7216
+ };
7217
+
7218
+ if (typeof Symbol.toPrimitive === 'symbol') {
7219
+ badStringifier[Symbol.toPrimitive] = throwRegexMarker;
7220
+ }
7221
+
7222
+ /** @type {import('.')} */
7223
+ // @ts-expect-error TS can't figure out that the $exec call always throws
7224
+ // eslint-disable-next-line consistent-return
7225
+ fn = function isRegex(value) {
7226
+ if (!value || typeof value !== 'object') {
7227
+ return false;
7228
+ }
7229
+
7230
+ // eslint-disable-next-line no-extra-parens
7231
+ var descriptor = /** @type {NonNullable<typeof gOPD>} */ (gOPD$1)(/** @type {{ lastIndex?: unknown }} */ (value), 'lastIndex');
7232
+ var hasLastIndexDataProperty = descriptor && hasOwn(descriptor, 'value');
7233
+ if (!hasLastIndexDataProperty) {
7234
+ return false;
7235
+ }
7236
+
7237
+ try {
7238
+ // eslint-disable-next-line no-extra-parens
7239
+ $exec(value, /** @type {string} */ (/** @type {unknown} */ (badStringifier)));
7240
+ } catch (e) {
7241
+ return e === isRegexMarker;
7242
+ }
7243
+ };
7244
+ } else {
7245
+ /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
7246
+ var $toString$4 = callBound$8('Object.prototype.toString');
7247
+ /** @const @type {'[object RegExp]'} */
7248
+ var regexClass = '[object RegExp]';
7249
+
7250
+ /** @type {import('.')} */
7251
+ fn = function isRegex(value) {
7252
+ // In older browsers, typeof regex incorrectly returns 'function'
7253
+ if (!value || (typeof value !== 'object' && typeof value !== 'function')) {
7254
+ return false;
7255
+ }
7256
+
7257
+ return $toString$4(value) === regexClass;
7258
+ };
7259
+ }
7260
+
7261
+ var isRegex$1 = fn;
7262
+
7263
+ var callBound$7 = callBound$i;
7264
+
7265
+ /** @type {undefined | ((thisArg: SharedArrayBuffer) => number)} */
7266
+ var $byteLength$1 = callBound$7('SharedArrayBuffer.prototype.byteLength', true);
7267
+
7268
+ /** @type {import('.')} */
7269
+ var isSharedArrayBuffer$1 = $byteLength$1
7270
+ ? function isSharedArrayBuffer(obj) {
7271
+ if (!obj || typeof obj !== 'object') {
7272
+ return false;
7273
+ }
7274
+ try {
7275
+ // @ts-expect-error TS can't figure out this closed-over variable is non-nullable, and it's fine that `obj` might not be a SAB
7276
+ $byteLength$1(obj);
7277
+ return true;
7278
+ } catch (e) {
7279
+ return false;
7280
+ }
7281
+ }
7282
+ : function isSharedArrayBuffer(_obj) { // eslint-disable-line no-unused-vars
7283
+ return false;
7284
+ };
7285
+
7286
+ var callBound$6 = callBound$i;
7287
+
7288
+ var $numToStr = callBound$6('Number.prototype.toString');
7289
+
7290
+ /** @type {import('.')} */
7291
+ var tryNumberObject = function tryNumberObject(value) {
7292
+ try {
7293
+ $numToStr(value);
7294
+ return true;
7295
+ } catch (e) {
7296
+ return false;
7297
+ }
7298
+ };
7299
+ var $toString$3 = callBound$6('Object.prototype.toString');
7300
+ var numClass = '[object Number]';
7301
+ var hasToStringTag$3 = shams();
7302
+
7303
+ /** @type {import('.')} */
7304
+ var isNumberObject = function isNumberObject(value) {
7305
+ if (typeof value === 'number') {
7306
+ return true;
7307
+ }
7308
+ if (!value || typeof value !== 'object') {
7309
+ return false;
7310
+ }
7311
+ return hasToStringTag$3 ? tryNumberObject(value) : $toString$3(value) === numClass;
7312
+ };
7313
+
7314
+ var callBound$5 = callBound$i;
7315
+ var $boolToStr = callBound$5('Boolean.prototype.toString');
7316
+ var $toString$2 = callBound$5('Object.prototype.toString');
7317
+
7318
+ /** @type {import('.')} */
7319
+ var tryBooleanObject = function booleanBrandCheck(value) {
7320
+ try {
7321
+ $boolToStr(value);
7322
+ return true;
7323
+ } catch (e) {
7324
+ return false;
7325
+ }
7326
+ };
7327
+ var boolClass = '[object Boolean]';
7328
+ var hasToStringTag$2 = shams();
7329
+
7330
+ /** @type {import('.')} */
7331
+ var isBooleanObject = function isBoolean(value) {
7332
+ if (typeof value === 'boolean') {
7333
+ return true;
7334
+ }
7335
+ if (value === null || typeof value !== 'object') {
7336
+ return false;
7337
+ }
7338
+ return hasToStringTag$2 ? tryBooleanObject(value) : $toString$2(value) === boolClass;
7339
+ };
7340
+
7341
+ var isSymbol$1 = {exports: {}};
7342
+
7343
+ var safeRegexTest$1;
7344
+ var hasRequiredSafeRegexTest;
7345
+
7346
+ function requireSafeRegexTest () {
7347
+ if (hasRequiredSafeRegexTest) return safeRegexTest$1;
7348
+ hasRequiredSafeRegexTest = 1;
7349
+
7350
+ var callBound = callBound$i;
7351
+ var isRegex = isRegex$1;
7352
+
7353
+ var $exec = callBound('RegExp.prototype.exec');
7354
+ var $TypeError = type;
7355
+
7356
+ /** @type {import('.')} */
7357
+ safeRegexTest$1 = function regexTester(regex) {
7358
+ if (!isRegex(regex)) {
7359
+ throw new $TypeError('`regex` must be a RegExp');
7360
+ }
7361
+ return function test(s) {
7362
+ return $exec(regex, s) !== null;
7363
+ };
7364
+ };
7365
+ return safeRegexTest$1;
7366
+ }
7367
+
7368
+ var callBound$4 = callBound$i;
7369
+ var $toString$1 = callBound$4('Object.prototype.toString');
7370
+ var hasSymbols = hasSymbols$4();
7371
+ var safeRegexTest = requireSafeRegexTest();
7372
+
7373
+ if (hasSymbols) {
7374
+ var $symToStr = callBound$4('Symbol.prototype.toString');
7375
+ var isSymString = safeRegexTest(/^Symbol\(.*\)$/);
7376
+
7377
+ /** @type {(value: object) => value is Symbol} */
7378
+ var isSymbolObject = function isRealSymbolObject(value) {
7379
+ if (typeof value.valueOf() !== 'symbol') {
7380
+ return false;
7381
+ }
7382
+ return isSymString($symToStr(value));
7383
+ };
7384
+
7385
+ /** @type {import('.')} */
7386
+ isSymbol$1.exports = function isSymbol(value) {
7387
+ if (typeof value === 'symbol') {
7388
+ return true;
7389
+ }
7390
+ if (!value || typeof value !== 'object' || $toString$1(value) !== '[object Symbol]') {
7391
+ return false;
7392
+ }
7393
+ try {
7394
+ return isSymbolObject(value);
7395
+ } catch (e) {
7396
+ return false;
7397
+ }
7398
+ };
7399
+ } else {
7400
+ /** @type {import('.')} */
7401
+ isSymbol$1.exports = function isSymbol(value) {
7402
+ // this environment does not support Symbols.
7403
+ return false ;
7404
+ };
7405
+ }
7406
+
7407
+ var isSymbolExports = isSymbol$1.exports;
7408
+
7409
+ var isBigint = {exports: {}};
7410
+
7411
+ var $BigInt = typeof BigInt !== 'undefined' && BigInt;
7412
+
7413
+ /** @type {import('.')} */
7414
+ var hasBigints = function hasNativeBigInts() {
7415
+ return typeof $BigInt === 'function'
7416
+ && typeof BigInt === 'function'
7417
+ && typeof $BigInt(42) === 'bigint' // eslint-disable-line no-magic-numbers
7418
+ && typeof BigInt(42) === 'bigint'; // eslint-disable-line no-magic-numbers
7419
+ };
7420
+
7421
+ var hasBigInts = hasBigints();
7422
+
7423
+ if (hasBigInts) {
7424
+ var bigIntValueOf = BigInt.prototype.valueOf;
7425
+ /** @type {(value: object) => value is BigInt} */
7426
+ var tryBigInt = function tryBigIntObject(value) {
7427
+ try {
7428
+ bigIntValueOf.call(value);
7429
+ return true;
7430
+ } catch (e) {
7431
+ }
7432
+ return false;
7433
+ };
7434
+
7435
+ /** @type {import('.')} */
7436
+ isBigint.exports = function isBigInt(value) {
7437
+ if (
7438
+ value === null
7439
+ || typeof value === 'undefined'
7440
+ || typeof value === 'boolean'
7441
+ || typeof value === 'string'
7442
+ || typeof value === 'number'
7443
+ || typeof value === 'symbol'
7444
+ || typeof value === 'function'
7445
+ ) {
7446
+ return false;
7447
+ }
7448
+ if (typeof value === 'bigint') {
7449
+ return true;
7450
+ }
7451
+
7452
+ return tryBigInt(value);
7453
+ };
7454
+ } else {
7455
+ /** @type {import('.')} */
7456
+ isBigint.exports = function isBigInt(value) {
7457
+ return false ;
7458
+ };
7459
+ }
7460
+
7461
+ var isBigintExports = isBigint.exports;
7462
+
7463
+ var isString = isString$2;
7464
+ var isNumber = isNumberObject;
7465
+ var isBoolean = isBooleanObject;
7466
+ var isSymbol = isSymbolExports;
7467
+ var isBigInt = isBigintExports;
7468
+
7469
+ /** @type {import('.')} */
7470
+ // eslint-disable-next-line consistent-return
7471
+ var whichBoxedPrimitive$1 = function whichBoxedPrimitive(value) {
7472
+ // eslint-disable-next-line eqeqeq
7473
+ if (value == null || (typeof value !== 'object' && typeof value !== 'function')) {
7474
+ return null;
7475
+ }
7476
+ if (isString(value)) {
7477
+ return 'String';
7478
+ }
7479
+ if (isNumber(value)) {
7480
+ return 'Number';
7481
+ }
7482
+ if (isBoolean(value)) {
7483
+ return 'Boolean';
7484
+ }
7485
+ if (isSymbol(value)) {
7486
+ return 'Symbol';
7487
+ }
7488
+ if (isBigInt(value)) {
7489
+ return 'BigInt';
7490
+ }
7491
+ };
7492
+
7493
+ var $WeakMap = typeof WeakMap === 'function' && WeakMap.prototype ? WeakMap : null;
7494
+ var $WeakSet$1 = typeof WeakSet === 'function' && WeakSet.prototype ? WeakSet : null;
7495
+
7496
+ var exported;
7497
+
7498
+ if (!$WeakMap) {
7499
+ /** @type {import('.')} */
7500
+ // eslint-disable-next-line no-unused-vars
7501
+ exported = function isWeakMap(x) {
7502
+ // `WeakMap` is not present in this environment.
7503
+ return false;
7504
+ };
7505
+ }
7506
+
7507
+ var $mapHas$2 = $WeakMap ? $WeakMap.prototype.has : null;
7508
+ var $setHas$2 = $WeakSet$1 ? $WeakSet$1.prototype.has : null;
7509
+ if (!exported && !$mapHas$2) {
7510
+ /** @type {import('.')} */
7511
+ // eslint-disable-next-line no-unused-vars
7512
+ exported = function isWeakMap(x) {
7513
+ // `WeakMap` does not have a `has` method
7514
+ return false;
7515
+ };
7516
+ }
7517
+
7518
+ /** @type {import('.')} */
7519
+ var isWeakmap = exported || function isWeakMap(x) {
7520
+ if (!x || typeof x !== 'object') {
7521
+ return false;
7522
+ }
7523
+ try {
7524
+ $mapHas$2.call(x, $mapHas$2);
7525
+ if ($setHas$2) {
7526
+ try {
7527
+ $setHas$2.call(x, $setHas$2);
7528
+ } catch (e) {
7529
+ return true;
7530
+ }
7531
+ }
7532
+ // @ts-expect-error TS can't figure out that $WeakMap is always truthy here
7533
+ return x instanceof $WeakMap; // core-js workaround, pre-v3
7534
+ } catch (e) {}
7535
+ return false;
7536
+ };
7537
+
7538
+ var isWeakset = {exports: {}};
7539
+
7540
+ var GetIntrinsic$1 = getIntrinsic;
7541
+ var callBound$3 = callBound$i;
7542
+
7543
+ var $WeakSet = GetIntrinsic$1('%WeakSet%', true);
7544
+
7545
+ /** @type {undefined | (<V>(thisArg: Set<V>, value: V) => boolean)} */
7546
+ var $setHas$1 = callBound$3('WeakSet.prototype.has', true);
7547
+
7548
+ if ($setHas$1) {
7549
+ /** @type {undefined | (<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean)} */
7550
+ var $mapHas$1 = callBound$3('WeakMap.prototype.has', true);
7551
+
7552
+ /** @type {import('.')} */
7553
+ isWeakset.exports = function isWeakSet(x) {
7554
+ if (!x || typeof x !== 'object') {
7555
+ return false;
7556
+ }
7557
+ try {
7558
+ // @ts-expect-error TS can't figure out that $setHas is always truthy here
7559
+ $setHas$1(x, $setHas$1);
7560
+ if ($mapHas$1) {
7561
+ try {
7562
+ // @ts-expect-error this indeed might not be a weak collection
7563
+ $mapHas$1(x, $mapHas$1);
7564
+ } catch (e) {
7565
+ return true;
7566
+ }
7567
+ }
7568
+ // @ts-expect-error TS can't figure out that $WeakSet is always truthy here
7569
+ return x instanceof $WeakSet; // core-js workaround, pre-v3
7570
+ } catch (e) {}
7571
+ return false;
7572
+ };
7573
+ } else {
7574
+ /** @type {import('.')} */
7575
+ // @ts-expect-error
7576
+ isWeakset.exports = function isWeakSet(x) { // eslint-disable-line no-unused-vars
7577
+ // `WeakSet` does not exist, or does not have a `has` method
7578
+ return false;
7579
+ };
7580
+ }
7581
+
7582
+ var isWeaksetExports = isWeakset.exports;
7583
+
7584
+ var isMap = isMap$2;
7585
+ var isSet = isSet$2;
7586
+ var isWeakMap = isWeakmap;
7587
+ var isWeakSet = isWeaksetExports;
7588
+
7589
+ /** @type {import('.')} */
7590
+ var whichCollection$1 = function whichCollection(/** @type {unknown} */ value) {
7591
+ if (value && typeof value === 'object') {
7592
+ if (isMap(value)) {
7593
+ return 'Map';
7594
+ }
7595
+ if (isSet(value)) {
7596
+ return 'Set';
7597
+ }
7598
+ if (isWeakMap(value)) {
7599
+ return 'WeakMap';
7600
+ }
7601
+ if (isWeakSet(value)) {
7602
+ return 'WeakSet';
7603
+ }
7604
+ }
7605
+ return false;
7606
+ };
7607
+
7608
+ var fnToStr = Function.prototype.toString;
7609
+ var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;
7610
+ var badArrayLike;
7611
+ var isCallableMarker;
7612
+ if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {
7613
+ try {
7614
+ badArrayLike = Object.defineProperty({}, 'length', {
7615
+ get: function () {
7616
+ throw isCallableMarker;
7617
+ }
7618
+ });
7619
+ isCallableMarker = {};
7620
+ // eslint-disable-next-line no-throw-literal
7621
+ reflectApply(function () { throw 42; }, null, badArrayLike);
7622
+ } catch (_) {
7623
+ if (_ !== isCallableMarker) {
7624
+ reflectApply = null;
7625
+ }
7626
+ }
7627
+ } else {
7628
+ reflectApply = null;
7629
+ }
7630
+
7631
+ var constructorRegex = /^\s*class\b/;
7632
+ var isES6ClassFn = function isES6ClassFunction(value) {
7633
+ try {
7634
+ var fnStr = fnToStr.call(value);
7635
+ return constructorRegex.test(fnStr);
7636
+ } catch (e) {
7637
+ return false; // not a function
7638
+ }
7639
+ };
7640
+
7641
+ var tryFunctionObject = function tryFunctionToStr(value) {
7642
+ try {
7643
+ if (isES6ClassFn(value)) { return false; }
7644
+ fnToStr.call(value);
7645
+ return true;
7646
+ } catch (e) {
7647
+ return false;
7648
+ }
7649
+ };
7650
+ var toStr$1 = Object.prototype.toString;
7651
+ var objectClass = '[object Object]';
7652
+ var fnClass = '[object Function]';
7653
+ var genClass = '[object GeneratorFunction]';
7654
+ var ddaClass = '[object HTMLAllCollection]'; // IE 11
7655
+ var ddaClass2 = '[object HTML document.all class]';
7656
+ var ddaClass3 = '[object HTMLCollection]'; // IE 9-10
7657
+ var hasToStringTag$1 = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`
7658
+
7659
+ var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing
7660
+
7661
+ var isDDA = function isDocumentDotAll() { return false; };
7662
+ if (typeof document === 'object') {
7663
+ // Firefox 3 canonicalizes DDA to undefined when it's not accessed directly
7664
+ var all = document.all;
7665
+ if (toStr$1.call(all) === toStr$1.call(document.all)) {
7666
+ isDDA = function isDocumentDotAll(value) {
7667
+ /* globals document: false */
7668
+ // in IE 6-8, typeof document.all is "object" and it's truthy
7669
+ if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {
7670
+ try {
7671
+ var str = toStr$1.call(value);
7672
+ return (
7673
+ str === ddaClass
7674
+ || str === ddaClass2
7675
+ || str === ddaClass3 // opera 12.16
7676
+ || str === objectClass // IE 6-8
7677
+ ) && value('') == null; // eslint-disable-line eqeqeq
7678
+ } catch (e) { /**/ }
7679
+ }
7680
+ return false;
7681
+ };
7682
+ }
7683
+ }
7684
+
7685
+ var isCallable$1 = reflectApply
7686
+ ? function isCallable(value) {
7687
+ if (isDDA(value)) { return true; }
7688
+ if (!value) { return false; }
7689
+ if (typeof value !== 'function' && typeof value !== 'object') { return false; }
7690
+ try {
7691
+ reflectApply(value, null, badArrayLike);
7692
+ } catch (e) {
7693
+ if (e !== isCallableMarker) { return false; }
7694
+ }
7695
+ return !isES6ClassFn(value) && tryFunctionObject(value);
7696
+ }
7697
+ : function isCallable(value) {
7698
+ if (isDDA(value)) { return true; }
7699
+ if (!value) { return false; }
7700
+ if (typeof value !== 'function' && typeof value !== 'object') { return false; }
7701
+ if (hasToStringTag$1) { return tryFunctionObject(value); }
7702
+ if (isES6ClassFn(value)) { return false; }
7703
+ var strClass = toStr$1.call(value);
7704
+ if (strClass !== fnClass && strClass !== genClass && !(/^\[object HTML/).test(strClass)) { return false; }
7705
+ return tryFunctionObject(value);
7706
+ };
7707
+
7708
+ var isCallable = isCallable$1;
7709
+
7710
+ var toStr = Object.prototype.toString;
7711
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
7712
+
7713
+ /** @type {<This, A extends readonly unknown[]>(arr: A, iterator: (this: This | void, value: A[number], index: number, arr: A) => void, receiver: This | undefined) => void} */
7714
+ var forEachArray = function forEachArray(array, iterator, receiver) {
7715
+ for (var i = 0, len = array.length; i < len; i++) {
7716
+ if (hasOwnProperty.call(array, i)) {
7717
+ if (receiver == null) {
7718
+ iterator(array[i], i, array);
7719
+ } else {
7720
+ iterator.call(receiver, array[i], i, array);
7721
+ }
7722
+ }
7723
+ }
7724
+ };
7725
+
7726
+ /** @type {<This, S extends string>(string: S, iterator: (this: This | void, value: S[number], index: number, string: S) => void, receiver: This | undefined) => void} */
7727
+ var forEachString = function forEachString(string, iterator, receiver) {
7728
+ for (var i = 0, len = string.length; i < len; i++) {
7729
+ // no such thing as a sparse string.
7730
+ if (receiver == null) {
7731
+ iterator(string.charAt(i), i, string);
7732
+ } else {
7733
+ iterator.call(receiver, string.charAt(i), i, string);
7734
+ }
7735
+ }
7736
+ };
7737
+
7738
+ /** @type {<This, O>(obj: O, iterator: (this: This | void, value: O[keyof O], index: keyof O, obj: O) => void, receiver: This | undefined) => void} */
7739
+ var forEachObject = function forEachObject(object, iterator, receiver) {
7740
+ for (var k in object) {
7741
+ if (hasOwnProperty.call(object, k)) {
7742
+ if (receiver == null) {
7743
+ iterator(object[k], k, object);
7744
+ } else {
7745
+ iterator.call(receiver, object[k], k, object);
7746
+ }
7747
+ }
7748
+ }
7749
+ };
7750
+
7751
+ /** @type {(x: unknown) => x is readonly unknown[]} */
7752
+ function isArray$1(x) {
7753
+ return toStr.call(x) === '[object Array]';
7754
+ }
7755
+
7756
+ /** @type {import('.')._internal} */
7757
+ var forEach$1 = function forEach(list, iterator, thisArg) {
7758
+ if (!isCallable(iterator)) {
7759
+ throw new TypeError('iterator must be a function');
7760
+ }
7761
+
7762
+ var receiver;
7763
+ if (arguments.length >= 3) {
7764
+ receiver = thisArg;
7765
+ }
7766
+
7767
+ if (isArray$1(list)) {
7768
+ forEachArray(list, iterator, receiver);
7769
+ } else if (typeof list === 'string') {
7770
+ forEachString(list, iterator, receiver);
7771
+ } else {
7772
+ forEachObject(list, iterator, receiver);
7773
+ }
7774
+ };
7775
+
7776
+ /** @type {import('.')} */
7777
+ var possibleTypedArrayNames = [
7778
+ 'Float16Array',
7779
+ 'Float32Array',
7780
+ 'Float64Array',
7781
+ 'Int8Array',
7782
+ 'Int16Array',
7783
+ 'Int32Array',
7784
+ 'Uint8Array',
7785
+ 'Uint8ClampedArray',
7786
+ 'Uint16Array',
7787
+ 'Uint32Array',
7788
+ 'BigInt64Array',
7789
+ 'BigUint64Array'
7790
+ ];
7791
+
7792
+ var possibleNames = possibleTypedArrayNames;
7793
+
7794
+ var g$1 = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
7795
+
7796
+ /** @type {import('.')} */
7797
+ var availableTypedArrays$1 = function availableTypedArrays() {
7798
+ var /** @type {ReturnType<typeof availableTypedArrays>} */ out = [];
7799
+ for (var i = 0; i < possibleNames.length; i++) {
7800
+ if (typeof g$1[possibleNames[i]] === 'function') {
7801
+ // @ts-expect-error
7802
+ out[out.length] = possibleNames[i];
7803
+ }
7804
+ }
7805
+ return out;
7806
+ };
7807
+
7808
+ var forEach = forEach$1;
7809
+ var availableTypedArrays = availableTypedArrays$1;
7810
+ var callBind = callBindExports;
7811
+ var callBound$2 = callBound$i;
7812
+ var gOPD = gopd$1;
7813
+ var getProto = getProto$3;
7814
+
7815
+ var $toString = callBound$2('Object.prototype.toString');
7816
+ var hasToStringTag = shams();
7817
+
7818
+ var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
7819
+ var typedArrays = availableTypedArrays();
7820
+
7821
+ var $slice = callBound$2('String.prototype.slice');
7822
+
7823
+ /** @type {<T = unknown>(array: readonly T[], value: unknown) => number} */
7824
+ var $indexOf = callBound$2('Array.prototype.indexOf', true) || function indexOf(array, value) {
7825
+ for (var i = 0; i < array.length; i += 1) {
7826
+ if (array[i] === value) {
7827
+ return i;
7828
+ }
7829
+ }
7830
+ return -1;
7831
+ };
7832
+
7833
+ /** @typedef {import('./types').Getter} Getter */
7834
+ /** @type {import('./types').Cache} */
7835
+ var cache = { __proto__: null };
7836
+ if (hasToStringTag && gOPD && getProto) {
7837
+ forEach(typedArrays, function (typedArray) {
7838
+ var arr = new g[typedArray]();
7839
+ if (Symbol.toStringTag in arr && getProto) {
7840
+ var proto = getProto(arr);
7841
+ // @ts-expect-error TS won't narrow inside a closure
7842
+ var descriptor = gOPD(proto, Symbol.toStringTag);
7843
+ if (!descriptor && proto) {
7844
+ var superProto = getProto(proto);
7845
+ // @ts-expect-error TS won't narrow inside a closure
7846
+ descriptor = gOPD(superProto, Symbol.toStringTag);
7847
+ }
7848
+ if (descriptor && descriptor.get) {
7849
+ var bound = callBind(descriptor.get);
7850
+ cache[
7851
+ /** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray)
7852
+ ] = bound;
7853
+ }
7854
+ }
7855
+ });
7856
+ } else {
7857
+ forEach(typedArrays, function (typedArray) {
7858
+ var arr = new g[typedArray]();
7859
+ var fn = arr.slice || arr.set;
7860
+ if (fn) {
7861
+ var bound = /** @type {import('./types').BoundSlice | import('./types').BoundSet} */ (
7862
+ // @ts-expect-error TODO FIXME
7863
+ callBind(fn)
7864
+ );
7865
+ cache[
7866
+ /** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray)
7867
+ ] = bound;
7868
+ }
7869
+ });
7870
+ }
7871
+
7872
+ /** @type {(value: object) => false | import('.').TypedArrayName} */
7873
+ var tryTypedArrays = function tryAllTypedArrays(value) {
7874
+ /** @type {ReturnType<typeof tryAllTypedArrays>} */ var found = false;
7875
+ forEach(
7876
+ /** @type {Record<`\$${import('.').TypedArrayName}`, Getter>} */ (cache),
7877
+ /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
7878
+ function (getter, typedArray) {
7879
+ if (!found) {
7880
+ try {
7881
+ // @ts-expect-error a throw is fine here
7882
+ if ('$' + getter(value) === typedArray) {
7883
+ found = /** @type {import('.').TypedArrayName} */ ($slice(typedArray, 1));
7884
+ }
7885
+ } catch (e) { /**/ }
7886
+ }
7887
+ }
7888
+ );
7889
+ return found;
7890
+ };
7891
+
7892
+ /** @type {(value: object) => false | import('.').TypedArrayName} */
7893
+ var trySlices = function tryAllSlices(value) {
7894
+ /** @type {ReturnType<typeof tryAllSlices>} */ var found = false;
7895
+ forEach(
7896
+ /** @type {Record<`\$${import('.').TypedArrayName}`, Getter>} */(cache),
7897
+ /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */ function (getter, name) {
7898
+ if (!found) {
7899
+ try {
7900
+ // @ts-expect-error a throw is fine here
7901
+ getter(value);
7902
+ found = /** @type {import('.').TypedArrayName} */ ($slice(name, 1));
7903
+ } catch (e) { /**/ }
7904
+ }
7905
+ }
7906
+ );
7907
+ return found;
7908
+ };
7909
+
7910
+ /** @type {import('.')} */
7911
+ var whichTypedArray$1 = function whichTypedArray(value) {
7912
+ if (!value || typeof value !== 'object') { return false; }
7913
+ if (!hasToStringTag) {
7914
+ /** @type {string} */
7915
+ var tag = $slice($toString(value), 8, -1);
7916
+ if ($indexOf(typedArrays, tag) > -1) {
7917
+ return tag;
7918
+ }
7919
+ if (tag !== 'Object') {
7920
+ return false;
7921
+ }
7922
+ // node < 0.6 hits here on real Typed Arrays
7923
+ return trySlices(value);
7924
+ }
7925
+ if (!gOPD) { return null; } // unknown engine
7926
+ return tryTypedArrays(value);
7927
+ };
7928
+
7929
+ var callBound$1 = callBound$i;
7930
+ var $byteLength = callBound$1('ArrayBuffer.prototype.byteLength', true);
7931
+
7932
+ var isArrayBuffer$1 = isArrayBuffer$2;
7933
+
7934
+ /** @type {import('.')} */
7935
+ var arrayBufferByteLength = function byteLength(ab) {
7936
+ if (!isArrayBuffer$1(ab)) {
7937
+ return NaN;
7938
+ }
7939
+ return $byteLength ? $byteLength(ab) : ab.byteLength;
7940
+ }; // in node < 0.11, byteLength is an own nonconfigurable property
7941
+
7942
+ var assign = object_assign;
7943
+ var callBound = callBound$g;
7944
+ var flags = regexp_prototype_flags;
7945
+ var GetIntrinsic = getIntrinsic;
7946
+ var getIterator = esGetIteratorExports;
7947
+ var getSideChannel = sideChannel;
7948
+ var is = objectIs;
7949
+ var isArguments = isArguments$2;
7950
+ var isArray = isarray;
7951
+ var isArrayBuffer = isArrayBuffer$2;
7952
+ var isDate = isDateObject;
7953
+ var isRegex = isRegex$1;
7954
+ var isSharedArrayBuffer = isSharedArrayBuffer$1;
7955
+ var objectKeys = objectKeys$2;
7956
+ var whichBoxedPrimitive = whichBoxedPrimitive$1;
7957
+ var whichCollection = whichCollection$1;
7958
+ var whichTypedArray = whichTypedArray$1;
7959
+ var byteLength = arrayBufferByteLength;
7960
+
7961
+ var sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
7962
+
7963
+ var $getTime = callBound('Date.prototype.getTime');
7964
+ var gPO = Object.getPrototypeOf;
7965
+ var $objToString = callBound('Object.prototype.toString');
7966
+
7967
+ var $Set = GetIntrinsic('%Set%', true);
7968
+ var $mapHas = callBound('Map.prototype.has', true);
7969
+ var $mapGet = callBound('Map.prototype.get', true);
7970
+ var $mapSize = callBound('Map.prototype.size', true);
7971
+ var $setAdd = callBound('Set.prototype.add', true);
7972
+ var $setDelete = callBound('Set.prototype.delete', true);
7973
+ var $setHas = callBound('Set.prototype.has', true);
7974
+ var $setSize = callBound('Set.prototype.size', true);
7975
+
7976
+ // taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L401-L414
7977
+ function setHasEqualElement(set, val1, opts, channel) {
7978
+ var i = getIterator(set);
7979
+ var result;
7980
+ while ((result = i.next()) && !result.done) {
7981
+ if (internalDeepEqual(val1, result.value, opts, channel)) { // eslint-disable-line no-use-before-define
7982
+ // Remove the matching element to make sure we do not check that again.
7983
+ $setDelete(set, result.value);
7984
+ return true;
7985
+ }
7986
+ }
7987
+
7988
+ return false;
7989
+ }
7990
+
7991
+ // taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L416-L439
7992
+ function findLooseMatchingPrimitives(prim) {
7993
+ if (typeof prim === 'undefined') {
7994
+ return null;
7995
+ }
7996
+ if (typeof prim === 'object') { // Only pass in null as object!
7997
+ return void 0;
7998
+ }
7999
+ if (typeof prim === 'symbol') {
8000
+ return false;
8001
+ }
8002
+ if (typeof prim === 'string' || typeof prim === 'number') {
8003
+ // Loose equal entries exist only if the string is possible to convert to a regular number and not NaN.
8004
+ return +prim === +prim; // eslint-disable-line no-implicit-coercion
8005
+ }
8006
+ return true;
8007
+ }
8008
+
8009
+ // taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L449-L460
8010
+ function mapMightHaveLoosePrim(a, b, prim, item, opts, channel) {
8011
+ var altValue = findLooseMatchingPrimitives(prim);
8012
+ if (altValue != null) {
8013
+ return altValue;
8014
+ }
8015
+ var curB = $mapGet(b, altValue);
8016
+ var looseOpts = assign({}, opts, { strict: false });
8017
+ if (
8018
+ (typeof curB === 'undefined' && !$mapHas(b, altValue))
8019
+ // eslint-disable-next-line no-use-before-define
8020
+ || !internalDeepEqual(item, curB, looseOpts, channel)
8021
+ ) {
8022
+ return false;
8023
+ }
8024
+ // eslint-disable-next-line no-use-before-define
8025
+ return !$mapHas(a, altValue) && internalDeepEqual(item, curB, looseOpts, channel);
8026
+ }
8027
+
8028
+ // taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L441-L447
8029
+ function setMightHaveLoosePrim(a, b, prim) {
8030
+ var altValue = findLooseMatchingPrimitives(prim);
8031
+ if (altValue != null) {
8032
+ return altValue;
8033
+ }
8034
+
8035
+ return $setHas(b, altValue) && !$setHas(a, altValue);
8036
+ }
8037
+
8038
+ // taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L518-L533
8039
+ function mapHasEqualEntry(set, map, key1, item1, opts, channel) {
8040
+ var i = getIterator(set);
8041
+ var result;
8042
+ var key2;
8043
+ while ((result = i.next()) && !result.done) {
8044
+ key2 = result.value;
8045
+ if (
8046
+ // eslint-disable-next-line no-use-before-define
8047
+ internalDeepEqual(key1, key2, opts, channel)
8048
+ // eslint-disable-next-line no-use-before-define
8049
+ && internalDeepEqual(item1, $mapGet(map, key2), opts, channel)
8050
+ ) {
8051
+ $setDelete(set, key2);
8052
+ return true;
8053
+ }
8054
+ }
8055
+
8056
+ return false;
8057
+ }
8058
+
8059
+ function internalDeepEqual(actual, expected, options, channel) {
8060
+ var opts = options || {};
8061
+
8062
+ // 7.1. All identical values are equivalent, as determined by ===.
8063
+ if (opts.strict ? is(actual, expected) : actual === expected) {
8064
+ return true;
8065
+ }
8066
+
8067
+ var actualBoxed = whichBoxedPrimitive(actual);
8068
+ var expectedBoxed = whichBoxedPrimitive(expected);
8069
+ if (actualBoxed !== expectedBoxed) {
8070
+ return false;
8071
+ }
8072
+
8073
+ // 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.
8074
+ if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) {
8075
+ return opts.strict ? is(actual, expected) : actual == expected; // eslint-disable-line eqeqeq
8076
+ }
8077
+
8078
+ /*
8079
+ * 7.4. For all other Object pairs, including Array objects, equivalence is
8080
+ * determined by having the same number of owned properties (as verified
8081
+ * with Object.prototype.hasOwnProperty.call), the same set of keys
8082
+ * (although not necessarily the same order), equivalent values for every
8083
+ * corresponding key, and an identical 'prototype' property. Note: this
8084
+ * accounts for both named and indexed properties on Arrays.
8085
+ */
8086
+ // see https://github.com/nodejs/node/commit/d3aafd02efd3a403d646a3044adcf14e63a88d32 for memos/channel inspiration
8087
+
8088
+ var hasActual = channel.has(actual);
8089
+ var hasExpected = channel.has(expected);
8090
+ var sentinel;
8091
+ if (hasActual && hasExpected) {
8092
+ if (channel.get(actual) === channel.get(expected)) {
8093
+ return true;
8094
+ }
8095
+ } else {
8096
+ sentinel = {};
8097
+ }
8098
+ if (!hasActual) { channel.set(actual, sentinel); }
8099
+ if (!hasExpected) { channel.set(expected, sentinel); }
8100
+
8101
+ // eslint-disable-next-line no-use-before-define
8102
+ return objEquiv(actual, expected, opts, channel);
8103
+ }
8104
+
8105
+ function isBuffer(x) {
8106
+ if (!x || typeof x !== 'object' || typeof x.length !== 'number') {
8107
+ return false;
8108
+ }
8109
+ if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
8110
+ return false;
8111
+ }
8112
+ if (x.length > 0 && typeof x[0] !== 'number') {
8113
+ return false;
8114
+ }
8115
+
8116
+ return !!(x.constructor && x.constructor.isBuffer && x.constructor.isBuffer(x));
8117
+ }
8118
+
8119
+ function setEquiv(a, b, opts, channel) {
8120
+ if ($setSize(a) !== $setSize(b)) {
8121
+ return false;
8122
+ }
8123
+ var iA = getIterator(a);
8124
+ var iB = getIterator(b);
8125
+ var resultA;
8126
+ var resultB;
8127
+ var set;
8128
+ while ((resultA = iA.next()) && !resultA.done) {
8129
+ if (resultA.value && typeof resultA.value === 'object') {
8130
+ if (!set) { set = new $Set(); }
8131
+ $setAdd(set, resultA.value);
8132
+ } else if (!$setHas(b, resultA.value)) {
8133
+ if (opts.strict) { return false; }
8134
+ if (!setMightHaveLoosePrim(a, b, resultA.value)) {
8135
+ return false;
8136
+ }
8137
+ if (!set) { set = new $Set(); }
8138
+ $setAdd(set, resultA.value);
8139
+ }
8140
+ }
8141
+ if (set) {
8142
+ while ((resultB = iB.next()) && !resultB.done) {
8143
+ // We have to check if a primitive value is already matching and only if it's not, go hunting for it.
8144
+ if (resultB.value && typeof resultB.value === 'object') {
8145
+ if (!setHasEqualElement(set, resultB.value, opts.strict, channel)) {
8146
+ return false;
8147
+ }
8148
+ } else if (
8149
+ !opts.strict
8150
+ && !$setHas(a, resultB.value)
8151
+ && !setHasEqualElement(set, resultB.value, opts.strict, channel)
8152
+ ) {
8153
+ return false;
8154
+ }
8155
+ }
8156
+ return $setSize(set) === 0;
8157
+ }
8158
+ return true;
8159
+ }
8160
+
8161
+ function mapEquiv(a, b, opts, channel) {
8162
+ if ($mapSize(a) !== $mapSize(b)) {
8163
+ return false;
8164
+ }
8165
+ var iA = getIterator(a);
8166
+ var iB = getIterator(b);
8167
+ var resultA;
8168
+ var resultB;
8169
+ var set;
8170
+ var key;
8171
+ var item1;
8172
+ var item2;
8173
+ while ((resultA = iA.next()) && !resultA.done) {
8174
+ key = resultA.value[0];
8175
+ item1 = resultA.value[1];
8176
+ if (key && typeof key === 'object') {
8177
+ if (!set) { set = new $Set(); }
8178
+ $setAdd(set, key);
8179
+ } else {
8180
+ item2 = $mapGet(b, key);
8181
+ if ((typeof item2 === 'undefined' && !$mapHas(b, key)) || !internalDeepEqual(item1, item2, opts, channel)) {
8182
+ if (opts.strict) {
8183
+ return false;
8184
+ }
8185
+ if (!mapMightHaveLoosePrim(a, b, key, item1, opts, channel)) {
8186
+ return false;
8187
+ }
8188
+ if (!set) { set = new $Set(); }
8189
+ $setAdd(set, key);
8190
+ }
8191
+ }
8192
+ }
8193
+
8194
+ if (set) {
8195
+ while ((resultB = iB.next()) && !resultB.done) {
8196
+ key = resultB.value[0];
8197
+ item2 = resultB.value[1];
8198
+ if (key && typeof key === 'object') {
8199
+ if (!mapHasEqualEntry(set, a, key, item2, opts, channel)) {
8200
+ return false;
8201
+ }
8202
+ } else if (
8203
+ !opts.strict
8204
+ && (!a.has(key) || !internalDeepEqual($mapGet(a, key), item2, opts, channel))
8205
+ && !mapHasEqualEntry(set, a, key, item2, assign({}, opts, { strict: false }), channel)
8206
+ ) {
8207
+ return false;
8208
+ }
8209
+ }
8210
+ return $setSize(set) === 0;
8211
+ }
8212
+ return true;
8213
+ }
8214
+
8215
+ function objEquiv(a, b, opts, channel) {
8216
+ /* eslint max-statements: [2, 100], max-lines-per-function: [2, 120], max-depth: [2, 5], max-lines: [2, 400] */
8217
+ var i, key;
8218
+
8219
+ if (typeof a !== typeof b) { return false; }
8220
+ if (a == null || b == null) { return false; }
8221
+
8222
+ if ($objToString(a) !== $objToString(b)) { return false; }
8223
+
8224
+ if (isArguments(a) !== isArguments(b)) { return false; }
8225
+
8226
+ var aIsArray = isArray(a);
8227
+ var bIsArray = isArray(b);
8228
+ if (aIsArray !== bIsArray) { return false; }
8229
+
8230
+ // TODO: replace when a cross-realm brand check is available
8231
+ var aIsError = a instanceof Error;
8232
+ var bIsError = b instanceof Error;
8233
+ if (aIsError !== bIsError) { return false; }
8234
+ if (aIsError || bIsError) {
8235
+ if (a.name !== b.name || a.message !== b.message) { return false; }
8236
+ }
8237
+
8238
+ var aIsRegex = isRegex(a);
8239
+ var bIsRegex = isRegex(b);
8240
+ if (aIsRegex !== bIsRegex) { return false; }
8241
+ if ((aIsRegex || bIsRegex) && (a.source !== b.source || flags(a) !== flags(b))) {
8242
+ return false;
8243
+ }
8244
+
8245
+ var aIsDate = isDate(a);
8246
+ var bIsDate = isDate(b);
8247
+ if (aIsDate !== bIsDate) { return false; }
8248
+ if (aIsDate || bIsDate) { // && would work too, because both are true or both false here
8249
+ if ($getTime(a) !== $getTime(b)) { return false; }
8250
+ }
8251
+ if (opts.strict && gPO && gPO(a) !== gPO(b)) { return false; }
8252
+
8253
+ var aWhich = whichTypedArray(a);
8254
+ var bWhich = whichTypedArray(b);
8255
+ if (aWhich !== bWhich) {
8256
+ return false;
8257
+ }
8258
+ if (aWhich || bWhich) { // && would work too, because both are true or both false here
8259
+ if (a.length !== b.length) { return false; }
8260
+ for (i = 0; i < a.length; i++) {
8261
+ if (a[i] !== b[i]) { return false; }
8262
+ }
8263
+ return true;
8264
+ }
8265
+
8266
+ var aIsBuffer = isBuffer(a);
8267
+ var bIsBuffer = isBuffer(b);
8268
+ if (aIsBuffer !== bIsBuffer) { return false; }
8269
+ if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here
8270
+ if (a.length !== b.length) { return false; }
8271
+ for (i = 0; i < a.length; i++) {
8272
+ if (a[i] !== b[i]) { return false; }
8273
+ }
8274
+ return true;
8275
+ }
8276
+
8277
+ var aIsArrayBuffer = isArrayBuffer(a);
8278
+ var bIsArrayBuffer = isArrayBuffer(b);
8279
+ if (aIsArrayBuffer !== bIsArrayBuffer) { return false; }
8280
+ if (aIsArrayBuffer || bIsArrayBuffer) { // && would work too, because both are true or both false here
8281
+ if (byteLength(a) !== byteLength(b)) { return false; }
8282
+ return typeof Uint8Array === 'function' && internalDeepEqual(new Uint8Array(a), new Uint8Array(b), opts, channel);
8283
+ }
8284
+
8285
+ var aIsSAB = isSharedArrayBuffer(a);
8286
+ var bIsSAB = isSharedArrayBuffer(b);
8287
+ if (aIsSAB !== bIsSAB) { return false; }
8288
+ if (aIsSAB || bIsSAB) { // && would work too, because both are true or both false here
8289
+ if (sabByteLength(a) !== sabByteLength(b)) { return false; }
8290
+ return typeof Uint8Array === 'function' && internalDeepEqual(new Uint8Array(a), new Uint8Array(b), opts, channel);
8291
+ }
8292
+
8293
+ if (typeof a !== typeof b) { return false; }
8294
+
8295
+ var ka = objectKeys(a);
8296
+ var kb = objectKeys(b);
8297
+ // having the same number of owned properties (keys incorporates hasOwnProperty)
8298
+ if (ka.length !== kb.length) { return false; }
8299
+
8300
+ // the same set of keys (although not necessarily the same order),
8301
+ ka.sort();
8302
+ kb.sort();
8303
+ // ~~~cheap key test
8304
+ for (i = ka.length - 1; i >= 0; i--) {
8305
+ if (ka[i] != kb[i]) { return false; } // eslint-disable-line eqeqeq
8306
+ }
8307
+
8308
+ // equivalent values for every corresponding key, and ~~~possibly expensive deep test
8309
+ for (i = ka.length - 1; i >= 0; i--) {
8310
+ key = ka[i];
8311
+ if (!internalDeepEqual(a[key], b[key], opts, channel)) { return false; }
8312
+ }
8313
+
8314
+ var aCollection = whichCollection(a);
8315
+ var bCollection = whichCollection(b);
8316
+ if (aCollection !== bCollection) {
8317
+ return false;
8318
+ }
8319
+ if (aCollection === 'Set' || bCollection === 'Set') { // aCollection === bCollection
8320
+ return setEquiv(a, b, opts, channel);
8321
+ }
8322
+ if (aCollection === 'Map') { // aCollection === bCollection
8323
+ return mapEquiv(a, b, opts, channel);
8324
+ }
8325
+
8326
+ return true;
8327
+ }
8328
+
8329
+ var deepEqual = function deepEqual(a, b, opts) {
8330
+ return internalDeepEqual(a, b, opts, getSideChannel());
8331
+ };
8332
+
8333
+ var deepEqual$1 = /*@__PURE__*/getDefaultExportFromCjs(deepEqual);
8334
+
4218
8335
  function ownKeys$u(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4219
8336
  function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$u(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$u(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4220
8337
  var PanelEditItem = function PanelEditItem(_ref) {
@@ -4243,13 +8360,13 @@ var PanelEditItem = function PanelEditItem(_ref) {
4243
8360
  var providerRequirements = (widgetConfig === null || widgetConfig === void 0 ? void 0 : widgetConfig.providers) || [];
4244
8361
  var selectedProviders = (itemSelected === null || itemSelected === void 0 ? void 0 : itemSelected.selectedProviders) || {};
4245
8362
  useEffect(function () {
4246
- if (deepEqual(item, itemSelected) === false) {
8363
+ if (deepEqual$1(item, itemSelected) === false) {
4247
8364
  setItemSelected(function () {
4248
8365
  return item;
4249
8366
  });
4250
8367
  forceUpdate();
4251
8368
  }
4252
- if (deepEqual(workspace, workspaceSelected) === false) {
8369
+ if (deepEqual$1(workspace, workspaceSelected) === false) {
4253
8370
  setWorkspaceSelected(function () {
4254
8371
  return workspace;
4255
8372
  });
@@ -4906,13 +9023,13 @@ var PanelEditItemGrid = function PanelEditItemGrid(_ref) {
4906
9023
  useEffect(function () {
4907
9024
  //console.log('EFFECT PanelEditItem', workspace, workspaceSelected, item['userPrefs'], itemSelected['userPrefs']);
4908
9025
  //console.log('COMPARE RESULT: ', deepEqual(item, itemSelected));
4909
- if (deepEqual(item, itemSelected) === false) {
9026
+ if (deepEqual$1(item, itemSelected) === false) {
4910
9027
  setItemSelected(function () {
4911
9028
  return item;
4912
9029
  });
4913
9030
  forceUpdate();
4914
9031
  }
4915
- if (deepEqual(workspace, workspaceSelected) === false) {
9032
+ if (deepEqual$1(workspace, workspaceSelected) === false) {
4916
9033
  setWorkspaceSelected(function () {
4917
9034
  return workspace;
4918
9035
  });
@@ -5029,13 +9146,13 @@ var PanelCode = function PanelCode(_ref) {
5029
9146
  return updateState({});
5030
9147
  }, []);
5031
9148
  useEffect(function () {
5032
- if (deepEqual(item, itemSelected) === false) {
9149
+ if (deepEqual$1(item, itemSelected) === false) {
5033
9150
  setItemSelected(function () {
5034
9151
  return item;
5035
9152
  });
5036
9153
  forceUpdate();
5037
9154
  }
5038
- if (deepEqual(workspace, workspaceSelected) === false) {
9155
+ if (deepEqual$1(workspace, workspaceSelected) === false) {
5039
9156
  setWorkspaceSelected(function () {
5040
9157
  return workspace;
5041
9158
  });
@@ -5115,12 +9232,12 @@ var PanelEditItemHandlers = function PanelEditItemHandlers(_ref) {
5115
9232
  eventHandlerSelected = _useState6[0],
5116
9233
  setEventHandlerSelected = _useState6[1];
5117
9234
  useEffect(function () {
5118
- if (deepEqual(item, itemSelected) === false) {
9235
+ if (deepEqual$1(item, itemSelected) === false) {
5119
9236
  setItemSelected(function () {
5120
9237
  return item;
5121
9238
  });
5122
9239
  }
5123
- if (deepEqual(workspace, workspaceSelected) === false) {
9240
+ if (deepEqual$1(workspace, workspaceSelected) === false) {
5124
9241
  setWorkspaceSelected(function () {
5125
9242
  return workspace;
5126
9243
  });
@@ -21952,10 +26069,6 @@ var ColorTile = function ColorTile(_ref) {
21952
26069
  });
21953
26070
  };
21954
26071
 
21955
- function getDefaultExportFromCjs (x) {
21956
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
21957
- }
21958
-
21959
26072
  var propTypes = {exports: {}};
21960
26073
 
21961
26074
  var reactIs = {exports: {}};
@@ -25115,7 +29228,7 @@ var PanelTheme = function PanelTheme(_ref) {
25115
29228
  return updateState({});
25116
29229
  }, []);
25117
29230
  useEffect(function () {
25118
- if (deepEqual(theme, themeSelected) === false) {
29231
+ if (deepEqual$1(theme, themeSelected) === false) {
25119
29232
  setThemeSelected(function () {
25120
29233
  return theme;
25121
29234
  });
@@ -35907,7 +40020,7 @@ var DashboardHeader = function DashboardHeader(_ref) {
35907
40020
  contextThemes = _useContext.themes;
35908
40021
  var resolvedThemes = themes && Object.keys(themes).length > 0 ? themes : contextThemes || {};
35909
40022
  useEffect(function () {
35910
- if (deepEqual(workspace, workspaceSelected) === false) {
40023
+ if (deepEqual$1(workspace, workspaceSelected) === false) {
35911
40024
  setWorkspaceSelected(function () {
35912
40025
  return workspace;
35913
40026
  });