@bigbinary/neeto-github-frontend 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2348 @@
1
+ import { useRef } from 'react';
2
+ import { findBy, isPresent, noop } from '@bigbinary/neeto-cist';
3
+ import Pane from '@bigbinary/neetoui/Pane';
4
+ import Typography from '@bigbinary/neetoui/Typography';
5
+ import { useTranslation } from 'react-i18next';
6
+ import { n, u as useFetchGithubRepositories, N as NeetoGithubNanoContainer } from './index-af6329fc.js';
7
+ import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
8
+ import require$$0 from 'util';
9
+ import { jsxs, jsx } from 'react/jsx-runtime';
10
+ import 'classnames';
11
+ import '@bigbinary/neeto-molecules/PageLoader';
12
+ import '@tanstack/react-query';
13
+ import 'ramda';
14
+ import 'axios';
15
+ import '@bigbinary/neeto-commons-frontend/constants';
16
+ import '@bigbinary/neeto-commons-frontend/react-utils';
17
+ import '@bigbinary/neeto-icons/misc/Github';
18
+ import '@bigbinary/neeto-icons/Building';
19
+ import '@bigbinary/neetoui/Avatar';
20
+ import '@bigbinary/neetoui/Button';
21
+ import '@bigbinary/neeto-icons/Plus';
22
+ import '@bigbinary/neeto-icons/Settings';
23
+ import '@bigbinary/neeto-molecules/Search';
24
+ import '@bigbinary/neeto-icons/Lock';
25
+ import '@bigbinary/neeto-molecules/DateFormat';
26
+
27
+ var css = ".neeto-github-modal-pane-wrapper{width:min(100%,1280px)}@media (min-width:768px){.neeto-github-modal-pane-wrapper{width:min(90%,1280px)}}@media (min-width:1024px){.neeto-github-modal-pane-wrapper{width:min(60%,1280px)}}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvcGFuZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGlDQUNFLHNCQUNGLENBQ0UseUJBSEYsaUNBSUkscUJBRUYsQ0FDRixDQUFFLDBCQVBGLGlDQVFJLHFCQUdGLENBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyIubmVldG8tZ2l0aHViLW1vZGFsLXBhbmUtd3JhcHBlciB7XG4gIHdpZHRoOiBtaW4oMTAwJSwgMTI4MHB4KTtcblxuICBAc2NyZWVuIG1kIHtcbiAgICB3aWR0aDogbWluKDkwJSwgMTI4MHB4KTtcbiAgfVxuXG4gIEBzY3JlZW4gbGcge1xuICAgIHdpZHRoOiBtaW4oNjAlLCAxMjgwcHgpO1xuICB9XG59XG4iXX0= */";
28
+ n(css,{});
29
+
30
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
31
+
32
+ /* eslint complexity: [2, 18], max-statements: [2, 33] */
33
+ var shams = function hasSymbols() {
34
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
35
+ if (typeof Symbol.iterator === 'symbol') { return true; }
36
+
37
+ var obj = {};
38
+ var sym = Symbol('test');
39
+ var symObj = Object(sym);
40
+ if (typeof sym === 'string') { return false; }
41
+
42
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
43
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
44
+
45
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
46
+ // if (sym instanceof Symbol) { return false; }
47
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
48
+ // if (!(symObj instanceof Symbol)) { return false; }
49
+
50
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
51
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
52
+
53
+ var symVal = 42;
54
+ obj[sym] = symVal;
55
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
56
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
57
+
58
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
59
+
60
+ var syms = Object.getOwnPropertySymbols(obj);
61
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
62
+
63
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
64
+
65
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
66
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
67
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
68
+ }
69
+
70
+ return true;
71
+ };
72
+
73
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
74
+ var hasSymbolSham = shams;
75
+
76
+ var hasSymbols$1 = function hasNativeSymbols() {
77
+ if (typeof origSymbol !== 'function') { return false; }
78
+ if (typeof Symbol !== 'function') { return false; }
79
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
80
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
81
+
82
+ return hasSymbolSham();
83
+ };
84
+
85
+ var test = {
86
+ foo: {}
87
+ };
88
+
89
+ var $Object = Object;
90
+
91
+ var hasProto$1 = function hasProto() {
92
+ return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
93
+ };
94
+
95
+ /* eslint no-invalid-this: 1 */
96
+
97
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
98
+ var toStr$1 = Object.prototype.toString;
99
+ var max = Math.max;
100
+ var funcType = '[object Function]';
101
+
102
+ var concatty = function concatty(a, b) {
103
+ var arr = [];
104
+
105
+ for (var i = 0; i < a.length; i += 1) {
106
+ arr[i] = a[i];
107
+ }
108
+ for (var j = 0; j < b.length; j += 1) {
109
+ arr[j + a.length] = b[j];
110
+ }
111
+
112
+ return arr;
113
+ };
114
+
115
+ var slicy = function slicy(arrLike, offset) {
116
+ var arr = [];
117
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
118
+ arr[j] = arrLike[i];
119
+ }
120
+ return arr;
121
+ };
122
+
123
+ var joiny = function (arr, joiner) {
124
+ var str = '';
125
+ for (var i = 0; i < arr.length; i += 1) {
126
+ str += arr[i];
127
+ if (i + 1 < arr.length) {
128
+ str += joiner;
129
+ }
130
+ }
131
+ return str;
132
+ };
133
+
134
+ var implementation$1 = function bind(that) {
135
+ var target = this;
136
+ if (typeof target !== 'function' || toStr$1.apply(target) !== funcType) {
137
+ throw new TypeError(ERROR_MESSAGE + target);
138
+ }
139
+ var args = slicy(arguments, 1);
140
+
141
+ var bound;
142
+ var binder = function () {
143
+ if (this instanceof bound) {
144
+ var result = target.apply(
145
+ this,
146
+ concatty(args, arguments)
147
+ );
148
+ if (Object(result) === result) {
149
+ return result;
150
+ }
151
+ return this;
152
+ }
153
+ return target.apply(
154
+ that,
155
+ concatty(args, arguments)
156
+ );
157
+
158
+ };
159
+
160
+ var boundLength = max(0, target.length - args.length);
161
+ var boundArgs = [];
162
+ for (var i = 0; i < boundLength; i++) {
163
+ boundArgs[i] = '$' + i;
164
+ }
165
+
166
+ bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
167
+
168
+ if (target.prototype) {
169
+ var Empty = function Empty() {};
170
+ Empty.prototype = target.prototype;
171
+ bound.prototype = new Empty();
172
+ Empty.prototype = null;
173
+ }
174
+
175
+ return bound;
176
+ };
177
+
178
+ var implementation = implementation$1;
179
+
180
+ var functionBind = Function.prototype.bind || implementation;
181
+
182
+ var call = Function.prototype.call;
183
+ var $hasOwn = Object.prototype.hasOwnProperty;
184
+ var bind$1 = functionBind;
185
+
186
+ /** @type {(o: {}, p: PropertyKey) => p is keyof o} */
187
+ var hasown = bind$1.call(call, $hasOwn);
188
+
189
+ var undefined$1;
190
+
191
+ var $SyntaxError$1 = SyntaxError;
192
+ var $Function = Function;
193
+ var $TypeError$3 = TypeError;
194
+
195
+ // eslint-disable-next-line consistent-return
196
+ var getEvalledConstructor = function (expressionSyntax) {
197
+ try {
198
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
199
+ } catch (e) {}
200
+ };
201
+
202
+ var $gOPD$1 = Object.getOwnPropertyDescriptor;
203
+ if ($gOPD$1) {
204
+ try {
205
+ $gOPD$1({}, '');
206
+ } catch (e) {
207
+ $gOPD$1 = null; // this is IE 8, which has a broken gOPD
208
+ }
209
+ }
210
+
211
+ var throwTypeError = function () {
212
+ throw new $TypeError$3();
213
+ };
214
+ var ThrowTypeError = $gOPD$1
215
+ ? (function () {
216
+ try {
217
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
218
+ arguments.callee; // IE 8 does not throw here
219
+ return throwTypeError;
220
+ } catch (calleeThrows) {
221
+ try {
222
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
223
+ return $gOPD$1(arguments, 'callee').get;
224
+ } catch (gOPDthrows) {
225
+ return throwTypeError;
226
+ }
227
+ }
228
+ }())
229
+ : throwTypeError;
230
+
231
+ var hasSymbols = hasSymbols$1();
232
+ var hasProto = hasProto$1();
233
+
234
+ var getProto = Object.getPrototypeOf || (
235
+ hasProto
236
+ ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
237
+ : null
238
+ );
239
+
240
+ var needsEval = {};
241
+
242
+ var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
243
+
244
+ var INTRINSICS = {
245
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
246
+ '%Array%': Array,
247
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
248
+ '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
249
+ '%AsyncFromSyncIteratorPrototype%': undefined$1,
250
+ '%AsyncFunction%': needsEval,
251
+ '%AsyncGenerator%': needsEval,
252
+ '%AsyncGeneratorFunction%': needsEval,
253
+ '%AsyncIteratorPrototype%': needsEval,
254
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
255
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
256
+ '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
257
+ '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
258
+ '%Boolean%': Boolean,
259
+ '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
260
+ '%Date%': Date,
261
+ '%decodeURI%': decodeURI,
262
+ '%decodeURIComponent%': decodeURIComponent,
263
+ '%encodeURI%': encodeURI,
264
+ '%encodeURIComponent%': encodeURIComponent,
265
+ '%Error%': Error,
266
+ '%eval%': eval, // eslint-disable-line no-eval
267
+ '%EvalError%': EvalError,
268
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
269
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
270
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
271
+ '%Function%': $Function,
272
+ '%GeneratorFunction%': needsEval,
273
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
274
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
275
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
276
+ '%isFinite%': isFinite,
277
+ '%isNaN%': isNaN,
278
+ '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
279
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
280
+ '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
281
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
282
+ '%Math%': Math,
283
+ '%Number%': Number,
284
+ '%Object%': Object,
285
+ '%parseFloat%': parseFloat,
286
+ '%parseInt%': parseInt,
287
+ '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
288
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
289
+ '%RangeError%': RangeError,
290
+ '%ReferenceError%': ReferenceError,
291
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
292
+ '%RegExp%': RegExp,
293
+ '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
294
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
295
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
296
+ '%String%': String,
297
+ '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
298
+ '%Symbol%': hasSymbols ? Symbol : undefined$1,
299
+ '%SyntaxError%': $SyntaxError$1,
300
+ '%ThrowTypeError%': ThrowTypeError,
301
+ '%TypedArray%': TypedArray,
302
+ '%TypeError%': $TypeError$3,
303
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
304
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
305
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
306
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
307
+ '%URIError%': URIError,
308
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
309
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
310
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
311
+ };
312
+
313
+ if (getProto) {
314
+ try {
315
+ null.error; // eslint-disable-line no-unused-expressions
316
+ } catch (e) {
317
+ // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
318
+ var errorProto = getProto(getProto(e));
319
+ INTRINSICS['%Error.prototype%'] = errorProto;
320
+ }
321
+ }
322
+
323
+ var doEval = function doEval(name) {
324
+ var value;
325
+ if (name === '%AsyncFunction%') {
326
+ value = getEvalledConstructor('async function () {}');
327
+ } else if (name === '%GeneratorFunction%') {
328
+ value = getEvalledConstructor('function* () {}');
329
+ } else if (name === '%AsyncGeneratorFunction%') {
330
+ value = getEvalledConstructor('async function* () {}');
331
+ } else if (name === '%AsyncGenerator%') {
332
+ var fn = doEval('%AsyncGeneratorFunction%');
333
+ if (fn) {
334
+ value = fn.prototype;
335
+ }
336
+ } else if (name === '%AsyncIteratorPrototype%') {
337
+ var gen = doEval('%AsyncGenerator%');
338
+ if (gen && getProto) {
339
+ value = getProto(gen.prototype);
340
+ }
341
+ }
342
+
343
+ INTRINSICS[name] = value;
344
+
345
+ return value;
346
+ };
347
+
348
+ var LEGACY_ALIASES = {
349
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
350
+ '%ArrayPrototype%': ['Array', 'prototype'],
351
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
352
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
353
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
354
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
355
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
356
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
357
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
358
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
359
+ '%DataViewPrototype%': ['DataView', 'prototype'],
360
+ '%DatePrototype%': ['Date', 'prototype'],
361
+ '%ErrorPrototype%': ['Error', 'prototype'],
362
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
363
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
364
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
365
+ '%FunctionPrototype%': ['Function', 'prototype'],
366
+ '%Generator%': ['GeneratorFunction', 'prototype'],
367
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
368
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
369
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
370
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
371
+ '%JSONParse%': ['JSON', 'parse'],
372
+ '%JSONStringify%': ['JSON', 'stringify'],
373
+ '%MapPrototype%': ['Map', 'prototype'],
374
+ '%NumberPrototype%': ['Number', 'prototype'],
375
+ '%ObjectPrototype%': ['Object', 'prototype'],
376
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
377
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
378
+ '%PromisePrototype%': ['Promise', 'prototype'],
379
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
380
+ '%Promise_all%': ['Promise', 'all'],
381
+ '%Promise_reject%': ['Promise', 'reject'],
382
+ '%Promise_resolve%': ['Promise', 'resolve'],
383
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
384
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
385
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
386
+ '%SetPrototype%': ['Set', 'prototype'],
387
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
388
+ '%StringPrototype%': ['String', 'prototype'],
389
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
390
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
391
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
392
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
393
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
394
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
395
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
396
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
397
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
398
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
399
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
400
+ };
401
+
402
+ var bind = functionBind;
403
+ var hasOwn$1 = hasown;
404
+ var $concat$1 = bind.call(Function.call, Array.prototype.concat);
405
+ var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
406
+ var $replace$1 = bind.call(Function.call, String.prototype.replace);
407
+ var $strSlice = bind.call(Function.call, String.prototype.slice);
408
+ var $exec = bind.call(Function.call, RegExp.prototype.exec);
409
+
410
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
411
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
412
+ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
413
+ var stringToPath = function stringToPath(string) {
414
+ var first = $strSlice(string, 0, 1);
415
+ var last = $strSlice(string, -1);
416
+ if (first === '%' && last !== '%') {
417
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
418
+ } else if (last === '%' && first !== '%') {
419
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
420
+ }
421
+ var result = [];
422
+ $replace$1(string, rePropName, function (match, number, quote, subString) {
423
+ result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
424
+ });
425
+ return result;
426
+ };
427
+ /* end adaptation */
428
+
429
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
430
+ var intrinsicName = name;
431
+ var alias;
432
+ if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
433
+ alias = LEGACY_ALIASES[intrinsicName];
434
+ intrinsicName = '%' + alias[0] + '%';
435
+ }
436
+
437
+ if (hasOwn$1(INTRINSICS, intrinsicName)) {
438
+ var value = INTRINSICS[intrinsicName];
439
+ if (value === needsEval) {
440
+ value = doEval(intrinsicName);
441
+ }
442
+ if (typeof value === 'undefined' && !allowMissing) {
443
+ throw new $TypeError$3('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
444
+ }
445
+
446
+ return {
447
+ alias: alias,
448
+ name: intrinsicName,
449
+ value: value
450
+ };
451
+ }
452
+
453
+ throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
454
+ };
455
+
456
+ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
457
+ if (typeof name !== 'string' || name.length === 0) {
458
+ throw new $TypeError$3('intrinsic name must be a non-empty string');
459
+ }
460
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
461
+ throw new $TypeError$3('"allowMissing" argument must be a boolean');
462
+ }
463
+
464
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
465
+ throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
466
+ }
467
+ var parts = stringToPath(name);
468
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
469
+
470
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
471
+ var intrinsicRealName = intrinsic.name;
472
+ var value = intrinsic.value;
473
+ var skipFurtherCaching = false;
474
+
475
+ var alias = intrinsic.alias;
476
+ if (alias) {
477
+ intrinsicBaseName = alias[0];
478
+ $spliceApply(parts, $concat$1([0, 1], alias));
479
+ }
480
+
481
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
482
+ var part = parts[i];
483
+ var first = $strSlice(part, 0, 1);
484
+ var last = $strSlice(part, -1);
485
+ if (
486
+ (
487
+ (first === '"' || first === "'" || first === '`')
488
+ || (last === '"' || last === "'" || last === '`')
489
+ )
490
+ && first !== last
491
+ ) {
492
+ throw new $SyntaxError$1('property names with quotes must have matching quotes');
493
+ }
494
+ if (part === 'constructor' || !isOwn) {
495
+ skipFurtherCaching = true;
496
+ }
497
+
498
+ intrinsicBaseName += '.' + part;
499
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
500
+
501
+ if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
502
+ value = INTRINSICS[intrinsicRealName];
503
+ } else if (value != null) {
504
+ if (!(part in value)) {
505
+ if (!allowMissing) {
506
+ throw new $TypeError$3('base intrinsic for ' + name + ' exists, but the property is not available.');
507
+ }
508
+ return void undefined$1;
509
+ }
510
+ if ($gOPD$1 && (i + 1) >= parts.length) {
511
+ var desc = $gOPD$1(value, part);
512
+ isOwn = !!desc;
513
+
514
+ // By convention, when a data property is converted to an accessor
515
+ // property to emulate a data property that does not suffer from
516
+ // the override mistake, that accessor's getter is marked with
517
+ // an `originalValue` property. Here, when we detect this, we
518
+ // uphold the illusion by pretending to see that original data
519
+ // property, i.e., returning the value rather than the getter
520
+ // itself.
521
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
522
+ value = desc.get;
523
+ } else {
524
+ value = value[part];
525
+ }
526
+ } else {
527
+ isOwn = hasOwn$1(value, part);
528
+ value = value[part];
529
+ }
530
+
531
+ if (isOwn && !skipFurtherCaching) {
532
+ INTRINSICS[intrinsicRealName] = value;
533
+ }
534
+ }
535
+ }
536
+ return value;
537
+ };
538
+
539
+ var callBind$1 = {exports: {}};
540
+
541
+ var GetIntrinsic$5 = getIntrinsic;
542
+
543
+ var $defineProperty$1 = GetIntrinsic$5('%Object.defineProperty%', true);
544
+
545
+ var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
546
+ if ($defineProperty$1) {
547
+ try {
548
+ $defineProperty$1({}, 'a', { value: 1 });
549
+ return true;
550
+ } catch (e) {
551
+ // IE 8 has a broken defineProperty
552
+ return false;
553
+ }
554
+ }
555
+ return false;
556
+ };
557
+
558
+ hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
559
+ // node v0.6 has a bug where array lengths can be Set but not Defined
560
+ if (!hasPropertyDescriptors$1()) {
561
+ return null;
562
+ }
563
+ try {
564
+ return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
565
+ } catch (e) {
566
+ // In Firefox 4-22, defining length on an array throws an exception.
567
+ return true;
568
+ }
569
+ };
570
+
571
+ var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
572
+
573
+ var GetIntrinsic$4 = getIntrinsic;
574
+
575
+ var $gOPD = GetIntrinsic$4('%Object.getOwnPropertyDescriptor%', true);
576
+
577
+ if ($gOPD) {
578
+ try {
579
+ $gOPD([], 'length');
580
+ } catch (e) {
581
+ // IE 8 has a broken gOPD
582
+ $gOPD = null;
583
+ }
584
+ }
585
+
586
+ var gopd$1 = $gOPD;
587
+
588
+ var hasPropertyDescriptors = hasPropertyDescriptors_1();
589
+
590
+ var GetIntrinsic$3 = getIntrinsic;
591
+
592
+ var $defineProperty = hasPropertyDescriptors && GetIntrinsic$3('%Object.defineProperty%', true);
593
+ if ($defineProperty) {
594
+ try {
595
+ $defineProperty({}, 'a', { value: 1 });
596
+ } catch (e) {
597
+ // IE 8 has a broken defineProperty
598
+ $defineProperty = false;
599
+ }
600
+ }
601
+
602
+ var $SyntaxError = GetIntrinsic$3('%SyntaxError%');
603
+ var $TypeError$2 = GetIntrinsic$3('%TypeError%');
604
+
605
+ var gopd = gopd$1;
606
+
607
+ /** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
608
+ var defineDataProperty = function defineDataProperty(
609
+ obj,
610
+ property,
611
+ value
612
+ ) {
613
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
614
+ throw new $TypeError$2('`obj` must be an object or a function`');
615
+ }
616
+ if (typeof property !== 'string' && typeof property !== 'symbol') {
617
+ throw new $TypeError$2('`property` must be a string or a symbol`');
618
+ }
619
+ if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
620
+ throw new $TypeError$2('`nonEnumerable`, if provided, must be a boolean or null');
621
+ }
622
+ if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
623
+ throw new $TypeError$2('`nonWritable`, if provided, must be a boolean or null');
624
+ }
625
+ if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
626
+ throw new $TypeError$2('`nonConfigurable`, if provided, must be a boolean or null');
627
+ }
628
+ if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
629
+ throw new $TypeError$2('`loose`, if provided, must be a boolean');
630
+ }
631
+
632
+ var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
633
+ var nonWritable = arguments.length > 4 ? arguments[4] : null;
634
+ var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
635
+ var loose = arguments.length > 6 ? arguments[6] : false;
636
+
637
+ /* @type {false | TypedPropertyDescriptor<unknown>} */
638
+ var desc = !!gopd && gopd(obj, property);
639
+
640
+ if ($defineProperty) {
641
+ $defineProperty(obj, property, {
642
+ configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
643
+ enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
644
+ value: value,
645
+ writable: nonWritable === null && desc ? desc.writable : !nonWritable
646
+ });
647
+ } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
648
+ // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
649
+ obj[property] = value; // eslint-disable-line no-param-reassign
650
+ } else {
651
+ throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
652
+ }
653
+ };
654
+
655
+ var GetIntrinsic$2 = getIntrinsic;
656
+ var define = defineDataProperty;
657
+ var hasDescriptors = hasPropertyDescriptors_1();
658
+ var gOPD = gopd$1;
659
+
660
+ var $TypeError$1 = GetIntrinsic$2('%TypeError%');
661
+ var $floor$1 = GetIntrinsic$2('%Math.floor%');
662
+
663
+ var setFunctionLength = function setFunctionLength(fn, length) {
664
+ if (typeof fn !== 'function') {
665
+ throw new $TypeError$1('`fn` is not a function');
666
+ }
667
+ if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor$1(length) !== length) {
668
+ throw new $TypeError$1('`length` must be a positive 32-bit integer');
669
+ }
670
+
671
+ var loose = arguments.length > 2 && !!arguments[2];
672
+
673
+ var functionLengthIsConfigurable = true;
674
+ var functionLengthIsWritable = true;
675
+ if ('length' in fn && gOPD) {
676
+ var desc = gOPD(fn, 'length');
677
+ if (desc && !desc.configurable) {
678
+ functionLengthIsConfigurable = false;
679
+ }
680
+ if (desc && !desc.writable) {
681
+ functionLengthIsWritable = false;
682
+ }
683
+ }
684
+
685
+ if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
686
+ if (hasDescriptors) {
687
+ define(fn, 'length', length, true, true);
688
+ } else {
689
+ define(fn, 'length', length);
690
+ }
691
+ }
692
+ return fn;
693
+ };
694
+
695
+ callBind$1.exports;
696
+
697
+ (function (module) {
698
+
699
+ var bind = functionBind;
700
+ var GetIntrinsic = getIntrinsic;
701
+ var setFunctionLength$1 = setFunctionLength;
702
+
703
+ var $TypeError = GetIntrinsic('%TypeError%');
704
+ var $apply = GetIntrinsic('%Function.prototype.apply%');
705
+ var $call = GetIntrinsic('%Function.prototype.call%');
706
+ var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
707
+
708
+ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
709
+ var $max = GetIntrinsic('%Math.max%');
710
+
711
+ if ($defineProperty) {
712
+ try {
713
+ $defineProperty({}, 'a', { value: 1 });
714
+ } catch (e) {
715
+ // IE 8 has a broken defineProperty
716
+ $defineProperty = null;
717
+ }
718
+ }
719
+
720
+ module.exports = function callBind(originalFunction) {
721
+ if (typeof originalFunction !== 'function') {
722
+ throw new $TypeError('a function is required');
723
+ }
724
+ var func = $reflectApply(bind, $call, arguments);
725
+ return setFunctionLength$1(
726
+ func,
727
+ 1 + $max(0, originalFunction.length - (arguments.length - 1)),
728
+ true
729
+ );
730
+ };
731
+
732
+ var applyBind = function applyBind() {
733
+ return $reflectApply(bind, $apply, arguments);
734
+ };
735
+
736
+ if ($defineProperty) {
737
+ $defineProperty(module.exports, 'apply', { value: applyBind });
738
+ } else {
739
+ module.exports.apply = applyBind;
740
+ }
741
+ } (callBind$1));
742
+
743
+ var callBindExports = callBind$1.exports;
744
+
745
+ var GetIntrinsic$1 = getIntrinsic;
746
+
747
+ var callBind = callBindExports;
748
+
749
+ var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
750
+
751
+ var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
752
+ var intrinsic = GetIntrinsic$1(name, !!allowMissing);
753
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
754
+ return callBind(intrinsic);
755
+ }
756
+ return intrinsic;
757
+ };
758
+
759
+ var util_inspect = require$$0.inspect;
760
+
761
+ var hasMap = typeof Map === 'function' && Map.prototype;
762
+ var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
763
+ var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
764
+ var mapForEach = hasMap && Map.prototype.forEach;
765
+ var hasSet = typeof Set === 'function' && Set.prototype;
766
+ var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
767
+ var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
768
+ var setForEach = hasSet && Set.prototype.forEach;
769
+ var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
770
+ var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
771
+ var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
772
+ var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
773
+ var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
774
+ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
775
+ var booleanValueOf = Boolean.prototype.valueOf;
776
+ var objectToString = Object.prototype.toString;
777
+ var functionToString = Function.prototype.toString;
778
+ var $match = String.prototype.match;
779
+ var $slice = String.prototype.slice;
780
+ var $replace = String.prototype.replace;
781
+ var $toUpperCase = String.prototype.toUpperCase;
782
+ var $toLowerCase = String.prototype.toLowerCase;
783
+ var $test = RegExp.prototype.test;
784
+ var $concat = Array.prototype.concat;
785
+ var $join = Array.prototype.join;
786
+ var $arrSlice = Array.prototype.slice;
787
+ var $floor = Math.floor;
788
+ var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
789
+ var gOPS = Object.getOwnPropertySymbols;
790
+ var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
791
+ var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
792
+ // ie, `has-tostringtag/shams
793
+ var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
794
+ ? Symbol.toStringTag
795
+ : null;
796
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
797
+
798
+ var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
799
+ [].__proto__ === Array.prototype // eslint-disable-line no-proto
800
+ ? function (O) {
801
+ return O.__proto__; // eslint-disable-line no-proto
802
+ }
803
+ : null
804
+ );
805
+
806
+ function addNumericSeparator(num, str) {
807
+ if (
808
+ num === Infinity
809
+ || num === -Infinity
810
+ || num !== num
811
+ || (num && num > -1000 && num < 1000)
812
+ || $test.call(/e/, str)
813
+ ) {
814
+ return str;
815
+ }
816
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
817
+ if (typeof num === 'number') {
818
+ var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
819
+ if (int !== num) {
820
+ var intStr = String(int);
821
+ var dec = $slice.call(str, intStr.length + 1);
822
+ return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
823
+ }
824
+ }
825
+ return $replace.call(str, sepRegex, '$&_');
826
+ }
827
+
828
+ var utilInspect = util_inspect;
829
+ var inspectCustom = utilInspect.custom;
830
+ var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
831
+
832
+ var objectInspect = function inspect_(obj, options, depth, seen) {
833
+ var opts = options || {};
834
+
835
+ if (has$3(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
836
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
837
+ }
838
+ if (
839
+ has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
840
+ ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
841
+ : opts.maxStringLength !== null
842
+ )
843
+ ) {
844
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
845
+ }
846
+ var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
847
+ if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
848
+ throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
849
+ }
850
+
851
+ if (
852
+ has$3(opts, 'indent')
853
+ && opts.indent !== null
854
+ && opts.indent !== '\t'
855
+ && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
856
+ ) {
857
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
858
+ }
859
+ if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
860
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
861
+ }
862
+ var numericSeparator = opts.numericSeparator;
863
+
864
+ if (typeof obj === 'undefined') {
865
+ return 'undefined';
866
+ }
867
+ if (obj === null) {
868
+ return 'null';
869
+ }
870
+ if (typeof obj === 'boolean') {
871
+ return obj ? 'true' : 'false';
872
+ }
873
+
874
+ if (typeof obj === 'string') {
875
+ return inspectString(obj, opts);
876
+ }
877
+ if (typeof obj === 'number') {
878
+ if (obj === 0) {
879
+ return Infinity / obj > 0 ? '0' : '-0';
880
+ }
881
+ var str = String(obj);
882
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
883
+ }
884
+ if (typeof obj === 'bigint') {
885
+ var bigIntStr = String(obj) + 'n';
886
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
887
+ }
888
+
889
+ var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
890
+ if (typeof depth === 'undefined') { depth = 0; }
891
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
892
+ return isArray$3(obj) ? '[Array]' : '[Object]';
893
+ }
894
+
895
+ var indent = getIndent(opts, depth);
896
+
897
+ if (typeof seen === 'undefined') {
898
+ seen = [];
899
+ } else if (indexOf(seen, obj) >= 0) {
900
+ return '[Circular]';
901
+ }
902
+
903
+ function inspect(value, from, noIndent) {
904
+ if (from) {
905
+ seen = $arrSlice.call(seen);
906
+ seen.push(from);
907
+ }
908
+ if (noIndent) {
909
+ var newOpts = {
910
+ depth: opts.depth
911
+ };
912
+ if (has$3(opts, 'quoteStyle')) {
913
+ newOpts.quoteStyle = opts.quoteStyle;
914
+ }
915
+ return inspect_(value, newOpts, depth + 1, seen);
916
+ }
917
+ return inspect_(value, opts, depth + 1, seen);
918
+ }
919
+
920
+ if (typeof obj === 'function' && !isRegExp$1(obj)) { // in older engines, regexes are callable
921
+ var name = nameOf(obj);
922
+ var keys = arrObjKeys(obj, inspect);
923
+ return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
924
+ }
925
+ if (isSymbol(obj)) {
926
+ var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
927
+ return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
928
+ }
929
+ if (isElement(obj)) {
930
+ var s = '<' + $toLowerCase.call(String(obj.nodeName));
931
+ var attrs = obj.attributes || [];
932
+ for (var i = 0; i < attrs.length; i++) {
933
+ s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
934
+ }
935
+ s += '>';
936
+ if (obj.childNodes && obj.childNodes.length) { s += '...'; }
937
+ s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
938
+ return s;
939
+ }
940
+ if (isArray$3(obj)) {
941
+ if (obj.length === 0) { return '[]'; }
942
+ var xs = arrObjKeys(obj, inspect);
943
+ if (indent && !singleLineValues(xs)) {
944
+ return '[' + indentedJoin(xs, indent) + ']';
945
+ }
946
+ return '[ ' + $join.call(xs, ', ') + ' ]';
947
+ }
948
+ if (isError(obj)) {
949
+ var parts = arrObjKeys(obj, inspect);
950
+ if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
951
+ return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
952
+ }
953
+ if (parts.length === 0) { return '[' + String(obj) + ']'; }
954
+ return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
955
+ }
956
+ if (typeof obj === 'object' && customInspect) {
957
+ if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
958
+ return utilInspect(obj, { depth: maxDepth - depth });
959
+ } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
960
+ return obj.inspect();
961
+ }
962
+ }
963
+ if (isMap(obj)) {
964
+ var mapParts = [];
965
+ if (mapForEach) {
966
+ mapForEach.call(obj, function (value, key) {
967
+ mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
968
+ });
969
+ }
970
+ return collectionOf('Map', mapSize.call(obj), mapParts, indent);
971
+ }
972
+ if (isSet(obj)) {
973
+ var setParts = [];
974
+ if (setForEach) {
975
+ setForEach.call(obj, function (value) {
976
+ setParts.push(inspect(value, obj));
977
+ });
978
+ }
979
+ return collectionOf('Set', setSize.call(obj), setParts, indent);
980
+ }
981
+ if (isWeakMap(obj)) {
982
+ return weakCollectionOf('WeakMap');
983
+ }
984
+ if (isWeakSet(obj)) {
985
+ return weakCollectionOf('WeakSet');
986
+ }
987
+ if (isWeakRef(obj)) {
988
+ return weakCollectionOf('WeakRef');
989
+ }
990
+ if (isNumber(obj)) {
991
+ return markBoxed(inspect(Number(obj)));
992
+ }
993
+ if (isBigInt(obj)) {
994
+ return markBoxed(inspect(bigIntValueOf.call(obj)));
995
+ }
996
+ if (isBoolean(obj)) {
997
+ return markBoxed(booleanValueOf.call(obj));
998
+ }
999
+ if (isString(obj)) {
1000
+ return markBoxed(inspect(String(obj)));
1001
+ }
1002
+ // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
1003
+ /* eslint-env browser */
1004
+ if (typeof window !== 'undefined' && obj === window) {
1005
+ return '{ [object Window] }';
1006
+ }
1007
+ if (obj === commonjsGlobal) {
1008
+ return '{ [object globalThis] }';
1009
+ }
1010
+ if (!isDate(obj) && !isRegExp$1(obj)) {
1011
+ var ys = arrObjKeys(obj, inspect);
1012
+ var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
1013
+ var protoTag = obj instanceof Object ? '' : 'null prototype';
1014
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
1015
+ var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
1016
+ var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
1017
+ if (ys.length === 0) { return tag + '{}'; }
1018
+ if (indent) {
1019
+ return tag + '{' + indentedJoin(ys, indent) + '}';
1020
+ }
1021
+ return tag + '{ ' + $join.call(ys, ', ') + ' }';
1022
+ }
1023
+ return String(obj);
1024
+ };
1025
+
1026
+ function wrapQuotes(s, defaultStyle, opts) {
1027
+ var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
1028
+ return quoteChar + s + quoteChar;
1029
+ }
1030
+
1031
+ function quote(s) {
1032
+ return $replace.call(String(s), /"/g, '&quot;');
1033
+ }
1034
+
1035
+ function isArray$3(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1036
+ function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1037
+ function isRegExp$1(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1038
+ function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1039
+ function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1040
+ function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1041
+ function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1042
+
1043
+ // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
1044
+ function isSymbol(obj) {
1045
+ if (hasShammedSymbols) {
1046
+ return obj && typeof obj === 'object' && obj instanceof Symbol;
1047
+ }
1048
+ if (typeof obj === 'symbol') {
1049
+ return true;
1050
+ }
1051
+ if (!obj || typeof obj !== 'object' || !symToString) {
1052
+ return false;
1053
+ }
1054
+ try {
1055
+ symToString.call(obj);
1056
+ return true;
1057
+ } catch (e) {}
1058
+ return false;
1059
+ }
1060
+
1061
+ function isBigInt(obj) {
1062
+ if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
1063
+ return false;
1064
+ }
1065
+ try {
1066
+ bigIntValueOf.call(obj);
1067
+ return true;
1068
+ } catch (e) {}
1069
+ return false;
1070
+ }
1071
+
1072
+ var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
1073
+ function has$3(obj, key) {
1074
+ return hasOwn.call(obj, key);
1075
+ }
1076
+
1077
+ function toStr(obj) {
1078
+ return objectToString.call(obj);
1079
+ }
1080
+
1081
+ function nameOf(f) {
1082
+ if (f.name) { return f.name; }
1083
+ var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
1084
+ if (m) { return m[1]; }
1085
+ return null;
1086
+ }
1087
+
1088
+ function indexOf(xs, x) {
1089
+ if (xs.indexOf) { return xs.indexOf(x); }
1090
+ for (var i = 0, l = xs.length; i < l; i++) {
1091
+ if (xs[i] === x) { return i; }
1092
+ }
1093
+ return -1;
1094
+ }
1095
+
1096
+ function isMap(x) {
1097
+ if (!mapSize || !x || typeof x !== 'object') {
1098
+ return false;
1099
+ }
1100
+ try {
1101
+ mapSize.call(x);
1102
+ try {
1103
+ setSize.call(x);
1104
+ } catch (s) {
1105
+ return true;
1106
+ }
1107
+ return x instanceof Map; // core-js workaround, pre-v2.5.0
1108
+ } catch (e) {}
1109
+ return false;
1110
+ }
1111
+
1112
+ function isWeakMap(x) {
1113
+ if (!weakMapHas || !x || typeof x !== 'object') {
1114
+ return false;
1115
+ }
1116
+ try {
1117
+ weakMapHas.call(x, weakMapHas);
1118
+ try {
1119
+ weakSetHas.call(x, weakSetHas);
1120
+ } catch (s) {
1121
+ return true;
1122
+ }
1123
+ return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
1124
+ } catch (e) {}
1125
+ return false;
1126
+ }
1127
+
1128
+ function isWeakRef(x) {
1129
+ if (!weakRefDeref || !x || typeof x !== 'object') {
1130
+ return false;
1131
+ }
1132
+ try {
1133
+ weakRefDeref.call(x);
1134
+ return true;
1135
+ } catch (e) {}
1136
+ return false;
1137
+ }
1138
+
1139
+ function isSet(x) {
1140
+ if (!setSize || !x || typeof x !== 'object') {
1141
+ return false;
1142
+ }
1143
+ try {
1144
+ setSize.call(x);
1145
+ try {
1146
+ mapSize.call(x);
1147
+ } catch (m) {
1148
+ return true;
1149
+ }
1150
+ return x instanceof Set; // core-js workaround, pre-v2.5.0
1151
+ } catch (e) {}
1152
+ return false;
1153
+ }
1154
+
1155
+ function isWeakSet(x) {
1156
+ if (!weakSetHas || !x || typeof x !== 'object') {
1157
+ return false;
1158
+ }
1159
+ try {
1160
+ weakSetHas.call(x, weakSetHas);
1161
+ try {
1162
+ weakMapHas.call(x, weakMapHas);
1163
+ } catch (s) {
1164
+ return true;
1165
+ }
1166
+ return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
1167
+ } catch (e) {}
1168
+ return false;
1169
+ }
1170
+
1171
+ function isElement(x) {
1172
+ if (!x || typeof x !== 'object') { return false; }
1173
+ if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
1174
+ return true;
1175
+ }
1176
+ return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
1177
+ }
1178
+
1179
+ function inspectString(str, opts) {
1180
+ if (str.length > opts.maxStringLength) {
1181
+ var remaining = str.length - opts.maxStringLength;
1182
+ var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
1183
+ return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
1184
+ }
1185
+ // eslint-disable-next-line no-control-regex
1186
+ var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
1187
+ return wrapQuotes(s, 'single', opts);
1188
+ }
1189
+
1190
+ function lowbyte(c) {
1191
+ var n = c.charCodeAt(0);
1192
+ var x = {
1193
+ 8: 'b',
1194
+ 9: 't',
1195
+ 10: 'n',
1196
+ 12: 'f',
1197
+ 13: 'r'
1198
+ }[n];
1199
+ if (x) { return '\\' + x; }
1200
+ return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
1201
+ }
1202
+
1203
+ function markBoxed(str) {
1204
+ return 'Object(' + str + ')';
1205
+ }
1206
+
1207
+ function weakCollectionOf(type) {
1208
+ return type + ' { ? }';
1209
+ }
1210
+
1211
+ function collectionOf(type, size, entries, indent) {
1212
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
1213
+ return type + ' (' + size + ') {' + joinedEntries + '}';
1214
+ }
1215
+
1216
+ function singleLineValues(xs) {
1217
+ for (var i = 0; i < xs.length; i++) {
1218
+ if (indexOf(xs[i], '\n') >= 0) {
1219
+ return false;
1220
+ }
1221
+ }
1222
+ return true;
1223
+ }
1224
+
1225
+ function getIndent(opts, depth) {
1226
+ var baseIndent;
1227
+ if (opts.indent === '\t') {
1228
+ baseIndent = '\t';
1229
+ } else if (typeof opts.indent === 'number' && opts.indent > 0) {
1230
+ baseIndent = $join.call(Array(opts.indent + 1), ' ');
1231
+ } else {
1232
+ return null;
1233
+ }
1234
+ return {
1235
+ base: baseIndent,
1236
+ prev: $join.call(Array(depth + 1), baseIndent)
1237
+ };
1238
+ }
1239
+
1240
+ function indentedJoin(xs, indent) {
1241
+ if (xs.length === 0) { return ''; }
1242
+ var lineJoiner = '\n' + indent.prev + indent.base;
1243
+ return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
1244
+ }
1245
+
1246
+ function arrObjKeys(obj, inspect) {
1247
+ var isArr = isArray$3(obj);
1248
+ var xs = [];
1249
+ if (isArr) {
1250
+ xs.length = obj.length;
1251
+ for (var i = 0; i < obj.length; i++) {
1252
+ xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
1253
+ }
1254
+ }
1255
+ var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
1256
+ var symMap;
1257
+ if (hasShammedSymbols) {
1258
+ symMap = {};
1259
+ for (var k = 0; k < syms.length; k++) {
1260
+ symMap['$' + syms[k]] = syms[k];
1261
+ }
1262
+ }
1263
+
1264
+ for (var key in obj) { // eslint-disable-line no-restricted-syntax
1265
+ if (!has$3(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1266
+ if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1267
+ if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
1268
+ // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
1269
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
1270
+ } else if ($test.call(/[^\w$]/, key)) {
1271
+ xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
1272
+ } else {
1273
+ xs.push(key + ': ' + inspect(obj[key], obj));
1274
+ }
1275
+ }
1276
+ if (typeof gOPS === 'function') {
1277
+ for (var j = 0; j < syms.length; j++) {
1278
+ if (isEnumerable.call(obj, syms[j])) {
1279
+ xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
1280
+ }
1281
+ }
1282
+ }
1283
+ return xs;
1284
+ }
1285
+
1286
+ var GetIntrinsic = getIntrinsic;
1287
+ var callBound = callBound$1;
1288
+ var inspect = objectInspect;
1289
+
1290
+ var $TypeError = GetIntrinsic('%TypeError%');
1291
+ var $WeakMap = GetIntrinsic('%WeakMap%', true);
1292
+ var $Map = GetIntrinsic('%Map%', true);
1293
+
1294
+ var $weakMapGet = callBound('WeakMap.prototype.get', true);
1295
+ var $weakMapSet = callBound('WeakMap.prototype.set', true);
1296
+ var $weakMapHas = callBound('WeakMap.prototype.has', true);
1297
+ var $mapGet = callBound('Map.prototype.get', true);
1298
+ var $mapSet = callBound('Map.prototype.set', true);
1299
+ var $mapHas = callBound('Map.prototype.has', true);
1300
+
1301
+ /*
1302
+ * This function traverses the list returning the node corresponding to the
1303
+ * given key.
1304
+ *
1305
+ * That node is also moved to the head of the list, so that if it's accessed
1306
+ * again we don't need to traverse the whole list. By doing so, all the recently
1307
+ * used nodes can be accessed relatively quickly.
1308
+ */
1309
+ var listGetNode = function (list, key) { // eslint-disable-line consistent-return
1310
+ for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
1311
+ if (curr.key === key) {
1312
+ prev.next = curr.next;
1313
+ curr.next = list.next;
1314
+ list.next = curr; // eslint-disable-line no-param-reassign
1315
+ return curr;
1316
+ }
1317
+ }
1318
+ };
1319
+
1320
+ var listGet = function (objects, key) {
1321
+ var node = listGetNode(objects, key);
1322
+ return node && node.value;
1323
+ };
1324
+ var listSet = function (objects, key, value) {
1325
+ var node = listGetNode(objects, key);
1326
+ if (node) {
1327
+ node.value = value;
1328
+ } else {
1329
+ // Prepend the new node to the beginning of the list
1330
+ objects.next = { // eslint-disable-line no-param-reassign
1331
+ key: key,
1332
+ next: objects.next,
1333
+ value: value
1334
+ };
1335
+ }
1336
+ };
1337
+ var listHas = function (objects, key) {
1338
+ return !!listGetNode(objects, key);
1339
+ };
1340
+
1341
+ var sideChannel = function getSideChannel() {
1342
+ var $wm;
1343
+ var $m;
1344
+ var $o;
1345
+ var channel = {
1346
+ assert: function (key) {
1347
+ if (!channel.has(key)) {
1348
+ throw new $TypeError('Side channel does not contain ' + inspect(key));
1349
+ }
1350
+ },
1351
+ get: function (key) { // eslint-disable-line consistent-return
1352
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1353
+ if ($wm) {
1354
+ return $weakMapGet($wm, key);
1355
+ }
1356
+ } else if ($Map) {
1357
+ if ($m) {
1358
+ return $mapGet($m, key);
1359
+ }
1360
+ } else {
1361
+ if ($o) { // eslint-disable-line no-lonely-if
1362
+ return listGet($o, key);
1363
+ }
1364
+ }
1365
+ },
1366
+ has: function (key) {
1367
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1368
+ if ($wm) {
1369
+ return $weakMapHas($wm, key);
1370
+ }
1371
+ } else if ($Map) {
1372
+ if ($m) {
1373
+ return $mapHas($m, key);
1374
+ }
1375
+ } else {
1376
+ if ($o) { // eslint-disable-line no-lonely-if
1377
+ return listHas($o, key);
1378
+ }
1379
+ }
1380
+ return false;
1381
+ },
1382
+ set: function (key, value) {
1383
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1384
+ if (!$wm) {
1385
+ $wm = new $WeakMap();
1386
+ }
1387
+ $weakMapSet($wm, key, value);
1388
+ } else if ($Map) {
1389
+ if (!$m) {
1390
+ $m = new $Map();
1391
+ }
1392
+ $mapSet($m, key, value);
1393
+ } else {
1394
+ if (!$o) {
1395
+ /*
1396
+ * Initialize the linked list as an empty node, so that we don't have
1397
+ * to special-case handling of the first node: we can always refer to
1398
+ * it as (previous node).next, instead of something like (list).head
1399
+ */
1400
+ $o = { key: {}, next: null };
1401
+ }
1402
+ listSet($o, key, value);
1403
+ }
1404
+ }
1405
+ };
1406
+ return channel;
1407
+ };
1408
+
1409
+ var replace = String.prototype.replace;
1410
+ var percentTwenties = /%20/g;
1411
+
1412
+ var Format = {
1413
+ RFC1738: 'RFC1738',
1414
+ RFC3986: 'RFC3986'
1415
+ };
1416
+
1417
+ var formats$3 = {
1418
+ 'default': Format.RFC3986,
1419
+ formatters: {
1420
+ RFC1738: function (value) {
1421
+ return replace.call(value, percentTwenties, '+');
1422
+ },
1423
+ RFC3986: function (value) {
1424
+ return String(value);
1425
+ }
1426
+ },
1427
+ RFC1738: Format.RFC1738,
1428
+ RFC3986: Format.RFC3986
1429
+ };
1430
+
1431
+ var formats$2 = formats$3;
1432
+
1433
+ var has$2 = Object.prototype.hasOwnProperty;
1434
+ var isArray$2 = Array.isArray;
1435
+
1436
+ var hexTable = (function () {
1437
+ var array = [];
1438
+ for (var i = 0; i < 256; ++i) {
1439
+ array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
1440
+ }
1441
+
1442
+ return array;
1443
+ }());
1444
+
1445
+ var compactQueue = function compactQueue(queue) {
1446
+ while (queue.length > 1) {
1447
+ var item = queue.pop();
1448
+ var obj = item.obj[item.prop];
1449
+
1450
+ if (isArray$2(obj)) {
1451
+ var compacted = [];
1452
+
1453
+ for (var j = 0; j < obj.length; ++j) {
1454
+ if (typeof obj[j] !== 'undefined') {
1455
+ compacted.push(obj[j]);
1456
+ }
1457
+ }
1458
+
1459
+ item.obj[item.prop] = compacted;
1460
+ }
1461
+ }
1462
+ };
1463
+
1464
+ var arrayToObject = function arrayToObject(source, options) {
1465
+ var obj = options && options.plainObjects ? Object.create(null) : {};
1466
+ for (var i = 0; i < source.length; ++i) {
1467
+ if (typeof source[i] !== 'undefined') {
1468
+ obj[i] = source[i];
1469
+ }
1470
+ }
1471
+
1472
+ return obj;
1473
+ };
1474
+
1475
+ var merge = function merge(target, source, options) {
1476
+ /* eslint no-param-reassign: 0 */
1477
+ if (!source) {
1478
+ return target;
1479
+ }
1480
+
1481
+ if (typeof source !== 'object') {
1482
+ if (isArray$2(target)) {
1483
+ target.push(source);
1484
+ } else if (target && typeof target === 'object') {
1485
+ if ((options && (options.plainObjects || options.allowPrototypes)) || !has$2.call(Object.prototype, source)) {
1486
+ target[source] = true;
1487
+ }
1488
+ } else {
1489
+ return [target, source];
1490
+ }
1491
+
1492
+ return target;
1493
+ }
1494
+
1495
+ if (!target || typeof target !== 'object') {
1496
+ return [target].concat(source);
1497
+ }
1498
+
1499
+ var mergeTarget = target;
1500
+ if (isArray$2(target) && !isArray$2(source)) {
1501
+ mergeTarget = arrayToObject(target, options);
1502
+ }
1503
+
1504
+ if (isArray$2(target) && isArray$2(source)) {
1505
+ source.forEach(function (item, i) {
1506
+ if (has$2.call(target, i)) {
1507
+ var targetItem = target[i];
1508
+ if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
1509
+ target[i] = merge(targetItem, item, options);
1510
+ } else {
1511
+ target.push(item);
1512
+ }
1513
+ } else {
1514
+ target[i] = item;
1515
+ }
1516
+ });
1517
+ return target;
1518
+ }
1519
+
1520
+ return Object.keys(source).reduce(function (acc, key) {
1521
+ var value = source[key];
1522
+
1523
+ if (has$2.call(acc, key)) {
1524
+ acc[key] = merge(acc[key], value, options);
1525
+ } else {
1526
+ acc[key] = value;
1527
+ }
1528
+ return acc;
1529
+ }, mergeTarget);
1530
+ };
1531
+
1532
+ var assign = function assignSingleSource(target, source) {
1533
+ return Object.keys(source).reduce(function (acc, key) {
1534
+ acc[key] = source[key];
1535
+ return acc;
1536
+ }, target);
1537
+ };
1538
+
1539
+ var decode = function (str, decoder, charset) {
1540
+ var strWithoutPlus = str.replace(/\+/g, ' ');
1541
+ if (charset === 'iso-8859-1') {
1542
+ // unescape never throws, no try...catch needed:
1543
+ return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
1544
+ }
1545
+ // utf-8
1546
+ try {
1547
+ return decodeURIComponent(strWithoutPlus);
1548
+ } catch (e) {
1549
+ return strWithoutPlus;
1550
+ }
1551
+ };
1552
+
1553
+ var encode = function encode(str, defaultEncoder, charset, kind, format) {
1554
+ // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
1555
+ // It has been adapted here for stricter adherence to RFC 3986
1556
+ if (str.length === 0) {
1557
+ return str;
1558
+ }
1559
+
1560
+ var string = str;
1561
+ if (typeof str === 'symbol') {
1562
+ string = Symbol.prototype.toString.call(str);
1563
+ } else if (typeof str !== 'string') {
1564
+ string = String(str);
1565
+ }
1566
+
1567
+ if (charset === 'iso-8859-1') {
1568
+ return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
1569
+ return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
1570
+ });
1571
+ }
1572
+
1573
+ var out = '';
1574
+ for (var i = 0; i < string.length; ++i) {
1575
+ var c = string.charCodeAt(i);
1576
+
1577
+ if (
1578
+ c === 0x2D // -
1579
+ || c === 0x2E // .
1580
+ || c === 0x5F // _
1581
+ || c === 0x7E // ~
1582
+ || (c >= 0x30 && c <= 0x39) // 0-9
1583
+ || (c >= 0x41 && c <= 0x5A) // a-z
1584
+ || (c >= 0x61 && c <= 0x7A) // A-Z
1585
+ || (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
1586
+ ) {
1587
+ out += string.charAt(i);
1588
+ continue;
1589
+ }
1590
+
1591
+ if (c < 0x80) {
1592
+ out = out + hexTable[c];
1593
+ continue;
1594
+ }
1595
+
1596
+ if (c < 0x800) {
1597
+ out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
1598
+ continue;
1599
+ }
1600
+
1601
+ if (c < 0xD800 || c >= 0xE000) {
1602
+ out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
1603
+ continue;
1604
+ }
1605
+
1606
+ i += 1;
1607
+ c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
1608
+ /* eslint operator-linebreak: [2, "before"] */
1609
+ out += hexTable[0xF0 | (c >> 18)]
1610
+ + hexTable[0x80 | ((c >> 12) & 0x3F)]
1611
+ + hexTable[0x80 | ((c >> 6) & 0x3F)]
1612
+ + hexTable[0x80 | (c & 0x3F)];
1613
+ }
1614
+
1615
+ return out;
1616
+ };
1617
+
1618
+ var compact = function compact(value) {
1619
+ var queue = [{ obj: { o: value }, prop: 'o' }];
1620
+ var refs = [];
1621
+
1622
+ for (var i = 0; i < queue.length; ++i) {
1623
+ var item = queue[i];
1624
+ var obj = item.obj[item.prop];
1625
+
1626
+ var keys = Object.keys(obj);
1627
+ for (var j = 0; j < keys.length; ++j) {
1628
+ var key = keys[j];
1629
+ var val = obj[key];
1630
+ if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
1631
+ queue.push({ obj: obj, prop: key });
1632
+ refs.push(val);
1633
+ }
1634
+ }
1635
+ }
1636
+
1637
+ compactQueue(queue);
1638
+
1639
+ return value;
1640
+ };
1641
+
1642
+ var isRegExp = function isRegExp(obj) {
1643
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
1644
+ };
1645
+
1646
+ var isBuffer = function isBuffer(obj) {
1647
+ if (!obj || typeof obj !== 'object') {
1648
+ return false;
1649
+ }
1650
+
1651
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
1652
+ };
1653
+
1654
+ var combine = function combine(a, b) {
1655
+ return [].concat(a, b);
1656
+ };
1657
+
1658
+ var maybeMap = function maybeMap(val, fn) {
1659
+ if (isArray$2(val)) {
1660
+ var mapped = [];
1661
+ for (var i = 0; i < val.length; i += 1) {
1662
+ mapped.push(fn(val[i]));
1663
+ }
1664
+ return mapped;
1665
+ }
1666
+ return fn(val);
1667
+ };
1668
+
1669
+ var utils$2 = {
1670
+ arrayToObject: arrayToObject,
1671
+ assign: assign,
1672
+ combine: combine,
1673
+ compact: compact,
1674
+ decode: decode,
1675
+ encode: encode,
1676
+ isBuffer: isBuffer,
1677
+ isRegExp: isRegExp,
1678
+ maybeMap: maybeMap,
1679
+ merge: merge
1680
+ };
1681
+
1682
+ var getSideChannel = sideChannel;
1683
+ var utils$1 = utils$2;
1684
+ var formats$1 = formats$3;
1685
+ var has$1 = Object.prototype.hasOwnProperty;
1686
+
1687
+ var arrayPrefixGenerators = {
1688
+ brackets: function brackets(prefix) {
1689
+ return prefix + '[]';
1690
+ },
1691
+ comma: 'comma',
1692
+ indices: function indices(prefix, key) {
1693
+ return prefix + '[' + key + ']';
1694
+ },
1695
+ repeat: function repeat(prefix) {
1696
+ return prefix;
1697
+ }
1698
+ };
1699
+
1700
+ var isArray$1 = Array.isArray;
1701
+ var push = Array.prototype.push;
1702
+ var pushToArray = function (arr, valueOrArray) {
1703
+ push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
1704
+ };
1705
+
1706
+ var toISO = Date.prototype.toISOString;
1707
+
1708
+ var defaultFormat = formats$1['default'];
1709
+ var defaults$1 = {
1710
+ addQueryPrefix: false,
1711
+ allowDots: false,
1712
+ charset: 'utf-8',
1713
+ charsetSentinel: false,
1714
+ delimiter: '&',
1715
+ encode: true,
1716
+ encoder: utils$1.encode,
1717
+ encodeValuesOnly: false,
1718
+ format: defaultFormat,
1719
+ formatter: formats$1.formatters[defaultFormat],
1720
+ // deprecated
1721
+ indices: false,
1722
+ serializeDate: function serializeDate(date) {
1723
+ return toISO.call(date);
1724
+ },
1725
+ skipNulls: false,
1726
+ strictNullHandling: false
1727
+ };
1728
+
1729
+ var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
1730
+ return typeof v === 'string'
1731
+ || typeof v === 'number'
1732
+ || typeof v === 'boolean'
1733
+ || typeof v === 'symbol'
1734
+ || typeof v === 'bigint';
1735
+ };
1736
+
1737
+ var sentinel = {};
1738
+
1739
+ var stringify$1 = function stringify(
1740
+ object,
1741
+ prefix,
1742
+ generateArrayPrefix,
1743
+ commaRoundTrip,
1744
+ strictNullHandling,
1745
+ skipNulls,
1746
+ encoder,
1747
+ filter,
1748
+ sort,
1749
+ allowDots,
1750
+ serializeDate,
1751
+ format,
1752
+ formatter,
1753
+ encodeValuesOnly,
1754
+ charset,
1755
+ sideChannel
1756
+ ) {
1757
+ var obj = object;
1758
+
1759
+ var tmpSc = sideChannel;
1760
+ var step = 0;
1761
+ var findFlag = false;
1762
+ while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
1763
+ // Where object last appeared in the ref tree
1764
+ var pos = tmpSc.get(object);
1765
+ step += 1;
1766
+ if (typeof pos !== 'undefined') {
1767
+ if (pos === step) {
1768
+ throw new RangeError('Cyclic object value');
1769
+ } else {
1770
+ findFlag = true; // Break while
1771
+ }
1772
+ }
1773
+ if (typeof tmpSc.get(sentinel) === 'undefined') {
1774
+ step = 0;
1775
+ }
1776
+ }
1777
+
1778
+ if (typeof filter === 'function') {
1779
+ obj = filter(prefix, obj);
1780
+ } else if (obj instanceof Date) {
1781
+ obj = serializeDate(obj);
1782
+ } else if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
1783
+ obj = utils$1.maybeMap(obj, function (value) {
1784
+ if (value instanceof Date) {
1785
+ return serializeDate(value);
1786
+ }
1787
+ return value;
1788
+ });
1789
+ }
1790
+
1791
+ if (obj === null) {
1792
+ if (strictNullHandling) {
1793
+ return encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix;
1794
+ }
1795
+
1796
+ obj = '';
1797
+ }
1798
+
1799
+ if (isNonNullishPrimitive(obj) || utils$1.isBuffer(obj)) {
1800
+ if (encoder) {
1801
+ var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset, 'key', format);
1802
+ return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset, 'value', format))];
1803
+ }
1804
+ return [formatter(prefix) + '=' + formatter(String(obj))];
1805
+ }
1806
+
1807
+ var values = [];
1808
+
1809
+ if (typeof obj === 'undefined') {
1810
+ return values;
1811
+ }
1812
+
1813
+ var objKeys;
1814
+ if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
1815
+ // we need to join elements in
1816
+ if (encodeValuesOnly && encoder) {
1817
+ obj = utils$1.maybeMap(obj, encoder);
1818
+ }
1819
+ objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
1820
+ } else if (isArray$1(filter)) {
1821
+ objKeys = filter;
1822
+ } else {
1823
+ var keys = Object.keys(obj);
1824
+ objKeys = sort ? keys.sort(sort) : keys;
1825
+ }
1826
+
1827
+ var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix + '[]' : prefix;
1828
+
1829
+ for (var j = 0; j < objKeys.length; ++j) {
1830
+ var key = objKeys[j];
1831
+ var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
1832
+
1833
+ if (skipNulls && value === null) {
1834
+ continue;
1835
+ }
1836
+
1837
+ var keyPrefix = isArray$1(obj)
1838
+ ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
1839
+ : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
1840
+
1841
+ sideChannel.set(object, step);
1842
+ var valueSideChannel = getSideChannel();
1843
+ valueSideChannel.set(sentinel, sideChannel);
1844
+ pushToArray(values, stringify(
1845
+ value,
1846
+ keyPrefix,
1847
+ generateArrayPrefix,
1848
+ commaRoundTrip,
1849
+ strictNullHandling,
1850
+ skipNulls,
1851
+ generateArrayPrefix === 'comma' && encodeValuesOnly && isArray$1(obj) ? null : encoder,
1852
+ filter,
1853
+ sort,
1854
+ allowDots,
1855
+ serializeDate,
1856
+ format,
1857
+ formatter,
1858
+ encodeValuesOnly,
1859
+ charset,
1860
+ valueSideChannel
1861
+ ));
1862
+ }
1863
+
1864
+ return values;
1865
+ };
1866
+
1867
+ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
1868
+ if (!opts) {
1869
+ return defaults$1;
1870
+ }
1871
+
1872
+ if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
1873
+ throw new TypeError('Encoder has to be a function.');
1874
+ }
1875
+
1876
+ var charset = opts.charset || defaults$1.charset;
1877
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
1878
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
1879
+ }
1880
+
1881
+ var format = formats$1['default'];
1882
+ if (typeof opts.format !== 'undefined') {
1883
+ if (!has$1.call(formats$1.formatters, opts.format)) {
1884
+ throw new TypeError('Unknown format option provided.');
1885
+ }
1886
+ format = opts.format;
1887
+ }
1888
+ var formatter = formats$1.formatters[format];
1889
+
1890
+ var filter = defaults$1.filter;
1891
+ if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
1892
+ filter = opts.filter;
1893
+ }
1894
+
1895
+ return {
1896
+ addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
1897
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
1898
+ charset: charset,
1899
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
1900
+ delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
1901
+ encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
1902
+ encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$1.encoder,
1903
+ encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
1904
+ filter: filter,
1905
+ format: format,
1906
+ formatter: formatter,
1907
+ serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$1.serializeDate,
1908
+ skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$1.skipNulls,
1909
+ sort: typeof opts.sort === 'function' ? opts.sort : null,
1910
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$1.strictNullHandling
1911
+ };
1912
+ };
1913
+
1914
+ var stringify_1 = function (object, opts) {
1915
+ var obj = object;
1916
+ var options = normalizeStringifyOptions(opts);
1917
+
1918
+ var objKeys;
1919
+ var filter;
1920
+
1921
+ if (typeof options.filter === 'function') {
1922
+ filter = options.filter;
1923
+ obj = filter('', obj);
1924
+ } else if (isArray$1(options.filter)) {
1925
+ filter = options.filter;
1926
+ objKeys = filter;
1927
+ }
1928
+
1929
+ var keys = [];
1930
+
1931
+ if (typeof obj !== 'object' || obj === null) {
1932
+ return '';
1933
+ }
1934
+
1935
+ var arrayFormat;
1936
+ if (opts && opts.arrayFormat in arrayPrefixGenerators) {
1937
+ arrayFormat = opts.arrayFormat;
1938
+ } else if (opts && 'indices' in opts) {
1939
+ arrayFormat = opts.indices ? 'indices' : 'repeat';
1940
+ } else {
1941
+ arrayFormat = 'indices';
1942
+ }
1943
+
1944
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
1945
+ if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
1946
+ throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
1947
+ }
1948
+ var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
1949
+
1950
+ if (!objKeys) {
1951
+ objKeys = Object.keys(obj);
1952
+ }
1953
+
1954
+ if (options.sort) {
1955
+ objKeys.sort(options.sort);
1956
+ }
1957
+
1958
+ var sideChannel = getSideChannel();
1959
+ for (var i = 0; i < objKeys.length; ++i) {
1960
+ var key = objKeys[i];
1961
+
1962
+ if (options.skipNulls && obj[key] === null) {
1963
+ continue;
1964
+ }
1965
+ pushToArray(keys, stringify$1(
1966
+ obj[key],
1967
+ key,
1968
+ generateArrayPrefix,
1969
+ commaRoundTrip,
1970
+ options.strictNullHandling,
1971
+ options.skipNulls,
1972
+ options.encode ? options.encoder : null,
1973
+ options.filter,
1974
+ options.sort,
1975
+ options.allowDots,
1976
+ options.serializeDate,
1977
+ options.format,
1978
+ options.formatter,
1979
+ options.encodeValuesOnly,
1980
+ options.charset,
1981
+ sideChannel
1982
+ ));
1983
+ }
1984
+
1985
+ var joined = keys.join(options.delimiter);
1986
+ var prefix = options.addQueryPrefix === true ? '?' : '';
1987
+
1988
+ if (options.charsetSentinel) {
1989
+ if (options.charset === 'iso-8859-1') {
1990
+ // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
1991
+ prefix += 'utf8=%26%2310003%3B&';
1992
+ } else {
1993
+ // encodeURIComponent('✓')
1994
+ prefix += 'utf8=%E2%9C%93&';
1995
+ }
1996
+ }
1997
+
1998
+ return joined.length > 0 ? prefix + joined : '';
1999
+ };
2000
+
2001
+ var utils = utils$2;
2002
+
2003
+ var has = Object.prototype.hasOwnProperty;
2004
+ var isArray = Array.isArray;
2005
+
2006
+ var defaults = {
2007
+ allowDots: false,
2008
+ allowPrototypes: false,
2009
+ allowSparse: false,
2010
+ arrayLimit: 20,
2011
+ charset: 'utf-8',
2012
+ charsetSentinel: false,
2013
+ comma: false,
2014
+ decoder: utils.decode,
2015
+ delimiter: '&',
2016
+ depth: 5,
2017
+ ignoreQueryPrefix: false,
2018
+ interpretNumericEntities: false,
2019
+ parameterLimit: 1000,
2020
+ parseArrays: true,
2021
+ plainObjects: false,
2022
+ strictNullHandling: false
2023
+ };
2024
+
2025
+ var interpretNumericEntities = function (str) {
2026
+ return str.replace(/&#(\d+);/g, function ($0, numberStr) {
2027
+ return String.fromCharCode(parseInt(numberStr, 10));
2028
+ });
2029
+ };
2030
+
2031
+ var parseArrayValue = function (val, options) {
2032
+ if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
2033
+ return val.split(',');
2034
+ }
2035
+
2036
+ return val;
2037
+ };
2038
+
2039
+ // This is what browsers will submit when the ✓ character occurs in an
2040
+ // application/x-www-form-urlencoded body and the encoding of the page containing
2041
+ // the form is iso-8859-1, or when the submitted form has an accept-charset
2042
+ // attribute of iso-8859-1. Presumably also with other charsets that do not contain
2043
+ // the ✓ character, such as us-ascii.
2044
+ var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
2045
+
2046
+ // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
2047
+ var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
2048
+
2049
+ var parseValues = function parseQueryStringValues(str, options) {
2050
+ var obj = { __proto__: null };
2051
+
2052
+ var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
2053
+ var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
2054
+ var parts = cleanStr.split(options.delimiter, limit);
2055
+ var skipIndex = -1; // Keep track of where the utf8 sentinel was found
2056
+ var i;
2057
+
2058
+ var charset = options.charset;
2059
+ if (options.charsetSentinel) {
2060
+ for (i = 0; i < parts.length; ++i) {
2061
+ if (parts[i].indexOf('utf8=') === 0) {
2062
+ if (parts[i] === charsetSentinel) {
2063
+ charset = 'utf-8';
2064
+ } else if (parts[i] === isoSentinel) {
2065
+ charset = 'iso-8859-1';
2066
+ }
2067
+ skipIndex = i;
2068
+ i = parts.length; // The eslint settings do not allow break;
2069
+ }
2070
+ }
2071
+ }
2072
+
2073
+ for (i = 0; i < parts.length; ++i) {
2074
+ if (i === skipIndex) {
2075
+ continue;
2076
+ }
2077
+ var part = parts[i];
2078
+
2079
+ var bracketEqualsPos = part.indexOf(']=');
2080
+ var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
2081
+
2082
+ var key, val;
2083
+ if (pos === -1) {
2084
+ key = options.decoder(part, defaults.decoder, charset, 'key');
2085
+ val = options.strictNullHandling ? null : '';
2086
+ } else {
2087
+ key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
2088
+ val = utils.maybeMap(
2089
+ parseArrayValue(part.slice(pos + 1), options),
2090
+ function (encodedVal) {
2091
+ return options.decoder(encodedVal, defaults.decoder, charset, 'value');
2092
+ }
2093
+ );
2094
+ }
2095
+
2096
+ if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
2097
+ val = interpretNumericEntities(val);
2098
+ }
2099
+
2100
+ if (part.indexOf('[]=') > -1) {
2101
+ val = isArray(val) ? [val] : val;
2102
+ }
2103
+
2104
+ if (has.call(obj, key)) {
2105
+ obj[key] = utils.combine(obj[key], val);
2106
+ } else {
2107
+ obj[key] = val;
2108
+ }
2109
+ }
2110
+
2111
+ return obj;
2112
+ };
2113
+
2114
+ var parseObject = function (chain, val, options, valuesParsed) {
2115
+ var leaf = valuesParsed ? val : parseArrayValue(val, options);
2116
+
2117
+ for (var i = chain.length - 1; i >= 0; --i) {
2118
+ var obj;
2119
+ var root = chain[i];
2120
+
2121
+ if (root === '[]' && options.parseArrays) {
2122
+ obj = [].concat(leaf);
2123
+ } else {
2124
+ obj = options.plainObjects ? Object.create(null) : {};
2125
+ var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
2126
+ var index = parseInt(cleanRoot, 10);
2127
+ if (!options.parseArrays && cleanRoot === '') {
2128
+ obj = { 0: leaf };
2129
+ } else if (
2130
+ !isNaN(index)
2131
+ && root !== cleanRoot
2132
+ && String(index) === cleanRoot
2133
+ && index >= 0
2134
+ && (options.parseArrays && index <= options.arrayLimit)
2135
+ ) {
2136
+ obj = [];
2137
+ obj[index] = leaf;
2138
+ } else if (cleanRoot !== '__proto__') {
2139
+ obj[cleanRoot] = leaf;
2140
+ }
2141
+ }
2142
+
2143
+ leaf = obj;
2144
+ }
2145
+
2146
+ return leaf;
2147
+ };
2148
+
2149
+ var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
2150
+ if (!givenKey) {
2151
+ return;
2152
+ }
2153
+
2154
+ // Transform dot notation to bracket notation
2155
+ var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
2156
+
2157
+ // The regex chunks
2158
+
2159
+ var brackets = /(\[[^[\]]*])/;
2160
+ var child = /(\[[^[\]]*])/g;
2161
+
2162
+ // Get the parent
2163
+
2164
+ var segment = options.depth > 0 && brackets.exec(key);
2165
+ var parent = segment ? key.slice(0, segment.index) : key;
2166
+
2167
+ // Stash the parent if it exists
2168
+
2169
+ var keys = [];
2170
+ if (parent) {
2171
+ // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
2172
+ if (!options.plainObjects && has.call(Object.prototype, parent)) {
2173
+ if (!options.allowPrototypes) {
2174
+ return;
2175
+ }
2176
+ }
2177
+
2178
+ keys.push(parent);
2179
+ }
2180
+
2181
+ // Loop through children appending to the array until we hit depth
2182
+
2183
+ var i = 0;
2184
+ while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
2185
+ i += 1;
2186
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
2187
+ if (!options.allowPrototypes) {
2188
+ return;
2189
+ }
2190
+ }
2191
+ keys.push(segment[1]);
2192
+ }
2193
+
2194
+ // If there's a remainder, just add whatever is left
2195
+
2196
+ if (segment) {
2197
+ keys.push('[' + key.slice(segment.index) + ']');
2198
+ }
2199
+
2200
+ return parseObject(keys, val, options, valuesParsed);
2201
+ };
2202
+
2203
+ var normalizeParseOptions = function normalizeParseOptions(opts) {
2204
+ if (!opts) {
2205
+ return defaults;
2206
+ }
2207
+
2208
+ if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
2209
+ throw new TypeError('Decoder has to be a function.');
2210
+ }
2211
+
2212
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
2213
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
2214
+ }
2215
+ var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
2216
+
2217
+ return {
2218
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
2219
+ allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
2220
+ allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
2221
+ arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
2222
+ charset: charset,
2223
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
2224
+ comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
2225
+ decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
2226
+ delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
2227
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
2228
+ depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
2229
+ ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
2230
+ interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
2231
+ parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
2232
+ parseArrays: opts.parseArrays !== false,
2233
+ plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
2234
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
2235
+ };
2236
+ };
2237
+
2238
+ var parse$1 = function (str, opts) {
2239
+ var options = normalizeParseOptions(opts);
2240
+
2241
+ if (str === '' || str === null || typeof str === 'undefined') {
2242
+ return options.plainObjects ? Object.create(null) : {};
2243
+ }
2244
+
2245
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
2246
+ var obj = options.plainObjects ? Object.create(null) : {};
2247
+
2248
+ // Iterate over the keys and setup the new object
2249
+
2250
+ var keys = Object.keys(tempObj);
2251
+ for (var i = 0; i < keys.length; ++i) {
2252
+ var key = keys[i];
2253
+ var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
2254
+ obj = utils.merge(obj, newObj, options);
2255
+ }
2256
+
2257
+ if (options.allowSparse === true) {
2258
+ return obj;
2259
+ }
2260
+
2261
+ return utils.compact(obj);
2262
+ };
2263
+
2264
+ var stringify = stringify_1;
2265
+ var parse = parse$1;
2266
+ var formats = formats$3;
2267
+
2268
+ var lib = {
2269
+ formats: formats,
2270
+ parse: parse,
2271
+ stringify: stringify
2272
+ };
2273
+
2274
+ var _globalProps$organiza;
2275
+ var newInstallationParams = lib.stringify({
2276
+ integrator_id: globalProps === null || globalProps === void 0 || (_globalProps$organiza = globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.id,
2277
+ integrator_type: "Organization",
2278
+ redirect_path: "/projects/new"
2279
+ });
2280
+ var NEW_INSTALLATION_URL = "/github_integrations/app_installations/new?".concat(newInstallationParams);
2281
+ var TROUBLESHOOT_URL = "https://render.com/docs/github#troubleshooting";
2282
+
2283
+ var NeetoGithubNanoPane = function NeetoGithubNanoPane(_ref) {
2284
+ var isOpen = _ref.isOpen,
2285
+ onClose = _ref.onClose,
2286
+ _ref$isConnecting = _ref.isConnecting,
2287
+ isConnecting = _ref$isConnecting === void 0 ? false : _ref$isConnecting,
2288
+ _ref$isConnected = _ref.isConnected,
2289
+ isConnected = _ref$isConnected === void 0 ? false : _ref$isConnected,
2290
+ _ref$installationUrl = _ref.installationUrl,
2291
+ installationUrl = _ref$installationUrl === void 0 ? NEW_INSTALLATION_URL : _ref$installationUrl,
2292
+ _ref$troubleshootUrl = _ref.troubleshootUrl,
2293
+ troubleshootUrl = _ref$troubleshootUrl === void 0 ? TROUBLESHOOT_URL : _ref$troubleshootUrl,
2294
+ _ref$onConnect = _ref.onConnect,
2295
+ onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect,
2296
+ _ref$projects = _ref.projects,
2297
+ projects = _ref$projects === void 0 ? [] : _ref$projects,
2298
+ _ref$title = _ref.title,
2299
+ title = _ref$title === void 0 ? "" : _ref$title;
2300
+ var _useTranslation = useTranslation(),
2301
+ t = _useTranslation.t;
2302
+ var initialFocusRef = useRef(null);
2303
+ var _useFetchGithubReposi = useFetchGithubRepositories({
2304
+ isConnected: isOpen && isConnected
2305
+ }),
2306
+ _useFetchGithubReposi2 = _useFetchGithubReposi.data,
2307
+ _useFetchGithubReposi3 = _useFetchGithubReposi2 === void 0 ? {} : _useFetchGithubReposi2,
2308
+ _useFetchGithubReposi4 = _useFetchGithubReposi3.repositories,
2309
+ repositories = _useFetchGithubReposi4 === void 0 ? [] : _useFetchGithubReposi4,
2310
+ _useFetchGithubReposi5 = _useFetchGithubReposi3.accounts,
2311
+ accounts = _useFetchGithubReposi5 === void 0 ? [] : _useFetchGithubReposi5,
2312
+ isPaneLoading = _useFetchGithubReposi.isLoading;
2313
+ var paneRepositories = repositories.filter(function (repository) {
2314
+ return !findBy({
2315
+ repository: repository.fullName
2316
+ }, projects);
2317
+ });
2318
+ var paneAccounts = isConnected ? accounts : [];
2319
+ return /*#__PURE__*/jsxs(Pane, {
2320
+ initialFocusRef: initialFocusRef,
2321
+ isOpen: isOpen,
2322
+ onClose: onClose,
2323
+ className: "neeto-github-modal-pane-wrapper",
2324
+ size: "large",
2325
+ children: [/*#__PURE__*/jsx(Pane.Header, {
2326
+ children: /*#__PURE__*/jsx(Typography, {
2327
+ style: "h2",
2328
+ children: isPresent(title) ? title : t("neetoGithub.modal.title")
2329
+ })
2330
+ }), /*#__PURE__*/jsx(Pane.Body, {
2331
+ children: /*#__PURE__*/jsx(NeetoGithubNanoContainer, {
2332
+ installationUrl: installationUrl,
2333
+ isConnected: isConnected,
2334
+ isConnecting: isConnecting,
2335
+ isPaneLoading: isPaneLoading,
2336
+ onConnect: onConnect,
2337
+ paneAccounts: paneAccounts,
2338
+ paneRepositories: paneRepositories,
2339
+ troubleshootUrl: troubleshootUrl,
2340
+ isPane: true,
2341
+ shouldFetchRepositories: false
2342
+ })
2343
+ })]
2344
+ });
2345
+ };
2346
+
2347
+ export { NeetoGithubNanoPane as default };
2348
+ //# sourceMappingURL=NeetoGithubNanoPane.js.map