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