@openfeature/flagd-provider 0.3.0 → 0.5.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.
package/index.cjs CHANGED
@@ -2,52 +2,56 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var nodejsSdk = require('@openfeature/nodejs-sdk');
6
- var axios = require('axios');
7
- var grpcTransport = require('@protobuf-ts/grpc-transport');
8
5
  var grpc = require('@grpc/grpc-js');
9
-
10
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
6
+ var jsSdk = require('@openfeature/js-sdk');
7
+ var grpcTransport = require('@protobuf-ts/grpc-transport');
11
8
 
12
9
  function _interopNamespace(e) {
13
- if (e && e.__esModule) return e;
14
- var n = Object.create(null);
15
- if (e) {
16
- Object.keys(e).forEach(function (k) {
17
- if (k !== 'default') {
18
- var d = Object.getOwnPropertyDescriptor(e, k);
19
- Object.defineProperty(n, k, d.get ? d : {
20
- enumerable: true,
21
- get: function () { return e[k]; }
22
- });
23
- }
24
- });
25
- }
26
- n["default"] = e;
27
- return Object.freeze(n);
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n["default"] = e;
24
+ return Object.freeze(n);
28
25
  }
29
26
 
30
- var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
31
27
  var grpc__namespace = /*#__PURE__*/_interopNamespace(grpc);
32
28
 
33
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
34
-
35
- var check = function (it) {
36
- return it && it.Math == Math && it;
37
- };
38
-
39
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
40
- var global$c =
41
- // eslint-disable-next-line es-x/no-global-this -- safe
42
- check(typeof globalThis == 'object' && globalThis) ||
43
- check(typeof window == 'object' && window) ||
44
- // eslint-disable-next-line no-restricted-globals -- safe
45
- check(typeof self == 'object' && self) ||
46
- check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
47
- // eslint-disable-next-line no-new-func -- fallback
48
- (function () { return this; })() || Function('return this')();
29
+ /******************************************************************************
30
+ Copyright (c) Microsoft Corporation.
31
+
32
+ Permission to use, copy, modify, and/or distribute this software for any
33
+ purpose with or without fee is hereby granted.
34
+
35
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
36
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
37
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
38
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
39
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
40
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
41
+ PERFORMANCE OF THIS SOFTWARE.
42
+ ***************************************************************************** */
43
+
44
+ function __awaiter(thisArg, _arguments, P, generator) {
45
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
46
+ return new (P || (P = Promise))(function (resolve, reject) {
47
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
48
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
49
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
50
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
51
+ });
52
+ }
49
53
 
50
- var objectGetOwnPropertyDescriptor = {};
54
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
51
55
 
52
56
  var fails$c = function (exec) {
53
57
  try {
@@ -59,15 +63,7 @@ var fails$c = function (exec) {
59
63
 
60
64
  var fails$b = fails$c;
61
65
 
62
- // Detect IE8's incomplete defineProperty implementation
63
- var descriptors = !fails$b(function () {
64
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
65
- return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
66
- });
67
-
68
- var fails$a = fails$c;
69
-
70
- var functionBindNative = !fails$a(function () {
66
+ var functionBindNative = !fails$b(function () {
71
67
  // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
72
68
  var test = (function () { /* empty */ }).bind();
73
69
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -76,49 +72,16 @@ var functionBindNative = !fails$a(function () {
76
72
 
77
73
  var NATIVE_BIND$1 = functionBindNative;
78
74
 
79
- var call$7 = Function.prototype.call;
80
-
81
- var functionCall = NATIVE_BIND$1 ? call$7.bind(call$7) : function () {
82
- return call$7.apply(call$7, arguments);
83
- };
84
-
85
- var objectPropertyIsEnumerable = {};
86
-
87
- var $propertyIsEnumerable = {}.propertyIsEnumerable;
88
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
89
- var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
90
-
91
- // Nashorn ~ JDK8 bug
92
- var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
93
-
94
- // `Object.prototype.propertyIsEnumerable` method implementation
95
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
96
- objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
97
- var descriptor = getOwnPropertyDescriptor$1(this, V);
98
- return !!descriptor && descriptor.enumerable;
99
- } : $propertyIsEnumerable;
100
-
101
- var createPropertyDescriptor$3 = function (bitmap, value) {
102
- return {
103
- enumerable: !(bitmap & 1),
104
- configurable: !(bitmap & 2),
105
- writable: !(bitmap & 4),
106
- value: value
107
- };
108
- };
109
-
110
- var NATIVE_BIND = functionBindNative;
111
-
112
75
  var FunctionPrototype$1 = Function.prototype;
113
76
  var bind = FunctionPrototype$1.bind;
114
- var call$6 = FunctionPrototype$1.call;
115
- var uncurryThis$b = NATIVE_BIND && bind.bind(call$6, call$6);
77
+ var call$7 = FunctionPrototype$1.call;
78
+ var uncurryThis$b = NATIVE_BIND$1 && bind.bind(call$7, call$7);
116
79
 
117
- var functionUncurryThis = NATIVE_BIND ? function (fn) {
80
+ var functionUncurryThis = NATIVE_BIND$1 ? function (fn) {
118
81
  return fn && uncurryThis$b(fn);
119
82
  } : function (fn) {
120
83
  return fn && function () {
121
- return call$6.apply(fn, arguments);
84
+ return call$7.apply(fn, arguments);
122
85
  };
123
86
  };
124
87
 
@@ -132,14 +95,14 @@ var classofRaw$1 = function (it) {
132
95
  };
133
96
 
134
97
  var uncurryThis$9 = functionUncurryThis;
135
- var fails$9 = fails$c;
98
+ var fails$a = fails$c;
136
99
  var classof$2 = classofRaw$1;
137
100
 
138
101
  var $Object$4 = Object;
139
102
  var split = uncurryThis$9(''.split);
140
103
 
141
104
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
142
- var indexedObject = fails$9(function () {
105
+ var indexedObject = fails$a(function () {
143
106
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
144
107
  // eslint-disable-next-line no-prototype-builtins -- safe
145
108
  return !$Object$4('z').propertyIsEnumerable(0);
@@ -164,43 +127,115 @@ var toIndexedObject$5 = function (it) {
164
127
  return IndexedObject$1(requireObjectCoercible$1(it));
165
128
  };
166
129
 
130
+ var check = function (it) {
131
+ return it && it.Math == Math && it;
132
+ };
133
+
134
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
135
+ var global$c =
136
+ // eslint-disable-next-line es-x/no-global-this -- safe
137
+ check(typeof globalThis == 'object' && globalThis) ||
138
+ check(typeof window == 'object' && window) ||
139
+ // eslint-disable-next-line no-restricted-globals -- safe
140
+ check(typeof self == 'object' && self) ||
141
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
142
+ // eslint-disable-next-line no-new-func -- fallback
143
+ (function () { return this; })() || Function('return this')();
144
+
145
+ var shared$3 = {exports: {}};
146
+
147
+ var global$b = global$c;
148
+
149
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
150
+ var defineProperty$5 = Object.defineProperty;
151
+
152
+ var defineGlobalProperty$3 = function (key, value) {
153
+ try {
154
+ defineProperty$5(global$b, key, { value: value, configurable: true, writable: true });
155
+ } catch (error) {
156
+ global$b[key] = value;
157
+ } return value;
158
+ };
159
+
160
+ var global$a = global$c;
161
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
162
+
163
+ var SHARED = '__core-js_shared__';
164
+ var store$3 = global$a[SHARED] || defineGlobalProperty$2(SHARED, {});
165
+
166
+ var sharedStore = store$3;
167
+
168
+ var store$2 = sharedStore;
169
+
170
+ (shared$3.exports = function (key, value) {
171
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
172
+ })('versions', []).push({
173
+ version: '3.22.8',
174
+ mode: 'global',
175
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
176
+ license: 'https://github.com/zloirock/core-js/blob/v3.22.8/LICENSE',
177
+ source: 'https://github.com/zloirock/core-js'
178
+ });
179
+
180
+ var requireObjectCoercible = requireObjectCoercible$2;
181
+
182
+ var $Object$3 = Object;
183
+
184
+ // `ToObject` abstract operation
185
+ // https://tc39.es/ecma262/#sec-toobject
186
+ var toObject$3 = function (argument) {
187
+ return $Object$3(requireObjectCoercible(argument));
188
+ };
189
+
190
+ var uncurryThis$8 = functionUncurryThis;
191
+ var toObject$2 = toObject$3;
192
+
193
+ var hasOwnProperty = uncurryThis$8({}.hasOwnProperty);
194
+
195
+ // `HasOwnProperty` abstract operation
196
+ // https://tc39.es/ecma262/#sec-hasownproperty
197
+ // eslint-disable-next-line es-x/no-object-hasown -- safe
198
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
199
+ return hasOwnProperty(toObject$2(it), key);
200
+ };
201
+
202
+ var uncurryThis$7 = functionUncurryThis;
203
+
204
+ var id = 0;
205
+ var postfix = Math.random();
206
+ var toString$1 = uncurryThis$7(1.0.toString);
207
+
208
+ var uid$2 = function (key) {
209
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);
210
+ };
211
+
167
212
  // `IsCallable` abstract operation
168
213
  // https://tc39.es/ecma262/#sec-iscallable
169
214
  var isCallable$f = function (argument) {
170
215
  return typeof argument == 'function';
171
216
  };
172
217
 
218
+ var global$9 = global$c;
173
219
  var isCallable$e = isCallable$f;
174
220
 
175
- var isObject$5 = function (it) {
176
- return typeof it == 'object' ? it !== null : isCallable$e(it);
177
- };
178
-
179
- var global$b = global$c;
180
- var isCallable$d = isCallable$f;
181
-
182
221
  var aFunction = function (argument) {
183
- return isCallable$d(argument) ? argument : undefined;
222
+ return isCallable$e(argument) ? argument : undefined;
184
223
  };
185
224
 
186
225
  var getBuiltIn$4 = function (namespace, method) {
187
- return arguments.length < 2 ? aFunction(global$b[namespace]) : global$b[namespace] && global$b[namespace][method];
226
+ return arguments.length < 2 ? aFunction(global$9[namespace]) : global$9[namespace] && global$9[namespace][method];
188
227
  };
189
228
 
190
- var uncurryThis$8 = functionUncurryThis;
191
-
192
- var objectIsPrototypeOf = uncurryThis$8({}.isPrototypeOf);
193
-
194
229
  var getBuiltIn$3 = getBuiltIn$4;
195
230
 
196
231
  var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
197
232
 
198
- var global$a = global$c;
233
+ var global$8 = global$c;
199
234
  var userAgent = engineUserAgent;
200
235
 
201
- var process = global$a.process;
202
- var Deno = global$a.Deno;
203
- var versions = process && process.versions || Deno && Deno.version;
236
+ var process$1 = global$8.process;
237
+ var Deno = global$8.Deno;
238
+ var versions = process$1 && process$1.versions || Deno && Deno.version;
204
239
  var v8 = versions && versions.v8;
205
240
  var match, version;
206
241
 
@@ -226,10 +261,10 @@ var engineV8Version = version;
226
261
  /* eslint-disable es-x/no-symbol -- required for testing */
227
262
 
228
263
  var V8_VERSION = engineV8Version;
229
- var fails$8 = fails$c;
264
+ var fails$9 = fails$c;
230
265
 
231
266
  // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
232
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$8(function () {
267
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$9(function () {
233
268
  var symbol = Symbol();
234
269
  // Chrome 38 Symbol has incorrect toString conversion
235
270
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -246,179 +281,189 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
246
281
  && !Symbol.sham
247
282
  && typeof Symbol.iterator == 'symbol';
248
283
 
249
- var getBuiltIn$2 = getBuiltIn$4;
250
- var isCallable$c = isCallable$f;
251
- var isPrototypeOf$1 = objectIsPrototypeOf;
284
+ var global$7 = global$c;
285
+ var shared$2 = shared$3.exports;
286
+ var hasOwn$9 = hasOwnProperty_1;
287
+ var uid$1 = uid$2;
288
+ var NATIVE_SYMBOL = nativeSymbol;
252
289
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
253
290
 
254
- var $Object$3 = Object;
291
+ var WellKnownSymbolsStore = shared$2('wks');
292
+ var Symbol$1 = global$7.Symbol;
293
+ var symbolFor = Symbol$1 && Symbol$1['for'];
294
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
255
295
 
256
- var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
257
- return typeof it == 'symbol';
258
- } : function (it) {
259
- var $Symbol = getBuiltIn$2('Symbol');
260
- return isCallable$c($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$3(it));
296
+ var wellKnownSymbol$8 = function (name) {
297
+ if (!hasOwn$9(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
298
+ var description = 'Symbol.' + name;
299
+ if (NATIVE_SYMBOL && hasOwn$9(Symbol$1, name)) {
300
+ WellKnownSymbolsStore[name] = Symbol$1[name];
301
+ } else if (USE_SYMBOL_AS_UID$1 && symbolFor) {
302
+ WellKnownSymbolsStore[name] = symbolFor(description);
303
+ } else {
304
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
305
+ }
306
+ } return WellKnownSymbolsStore[name];
261
307
  };
262
308
 
263
- var $String$3 = String;
309
+ var isCallable$d = isCallable$f;
264
310
 
265
- var tryToString$1 = function (argument) {
266
- try {
267
- return $String$3(argument);
268
- } catch (error) {
269
- return 'Object';
270
- }
311
+ var isObject$5 = function (it) {
312
+ return typeof it == 'object' ? it !== null : isCallable$d(it);
271
313
  };
272
314
 
273
- var isCallable$b = isCallable$f;
274
- var tryToString = tryToString$1;
315
+ var isObject$4 = isObject$5;
275
316
 
317
+ var $String$3 = String;
276
318
  var $TypeError$5 = TypeError;
277
319
 
278
- // `Assert: IsCallable(argument) is true`
279
- var aCallable$1 = function (argument) {
280
- if (isCallable$b(argument)) return argument;
281
- throw $TypeError$5(tryToString(argument) + ' is not a function');
320
+ // `Assert: Type(argument) is Object`
321
+ var anObject$7 = function (argument) {
322
+ if (isObject$4(argument)) return argument;
323
+ throw $TypeError$5($String$3(argument) + ' is not an object');
282
324
  };
283
325
 
284
- var aCallable = aCallable$1;
326
+ var objectDefineProperties = {};
285
327
 
286
- // `GetMethod` abstract operation
287
- // https://tc39.es/ecma262/#sec-getmethod
288
- var getMethod$1 = function (V, P) {
289
- var func = V[P];
290
- return func == null ? undefined : aCallable(func);
291
- };
328
+ var fails$8 = fails$c;
292
329
 
293
- var call$5 = functionCall;
294
- var isCallable$a = isCallable$f;
295
- var isObject$4 = isObject$5;
330
+ // Detect IE8's incomplete defineProperty implementation
331
+ var descriptors = !fails$8(function () {
332
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
333
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
334
+ });
296
335
 
297
- var $TypeError$4 = TypeError;
336
+ var DESCRIPTORS$9 = descriptors;
337
+ var fails$7 = fails$c;
298
338
 
299
- // `OrdinaryToPrimitive` abstract operation
300
- // https://tc39.es/ecma262/#sec-ordinarytoprimitive
301
- var ordinaryToPrimitive$1 = function (input, pref) {
302
- var fn, val;
303
- if (pref === 'string' && isCallable$a(fn = input.toString) && !isObject$4(val = call$5(fn, input))) return val;
304
- if (isCallable$a(fn = input.valueOf) && !isObject$4(val = call$5(fn, input))) return val;
305
- if (pref !== 'string' && isCallable$a(fn = input.toString) && !isObject$4(val = call$5(fn, input))) return val;
306
- throw $TypeError$4("Can't convert object to primitive value");
307
- };
339
+ // V8 ~ Chrome 36-
340
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
341
+ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$7(function () {
342
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
343
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
344
+ value: 42,
345
+ writable: false
346
+ }).prototype != 42;
347
+ });
308
348
 
309
- var shared$3 = {exports: {}};
349
+ var objectDefineProperty = {};
310
350
 
311
- var global$9 = global$c;
351
+ var global$6 = global$c;
352
+ var isObject$3 = isObject$5;
312
353
 
313
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
314
- var defineProperty$5 = Object.defineProperty;
354
+ var document$1 = global$6.document;
355
+ // typeof document.createElement is 'object' in old IE
356
+ var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
315
357
 
316
- var defineGlobalProperty$3 = function (key, value) {
317
- try {
318
- defineProperty$5(global$9, key, { value: value, configurable: true, writable: true });
319
- } catch (error) {
320
- global$9[key] = value;
321
- } return value;
358
+ var documentCreateElement$2 = function (it) {
359
+ return EXISTS$1 ? document$1.createElement(it) : {};
322
360
  };
323
361
 
324
- var global$8 = global$c;
325
- var defineGlobalProperty$2 = defineGlobalProperty$3;
362
+ var DESCRIPTORS$8 = descriptors;
363
+ var fails$6 = fails$c;
364
+ var createElement = documentCreateElement$2;
326
365
 
327
- var SHARED = '__core-js_shared__';
328
- var store$3 = global$8[SHARED] || defineGlobalProperty$2(SHARED, {});
366
+ // Thanks to IE8 for its funny defineProperty
367
+ var ie8DomDefine = !DESCRIPTORS$8 && !fails$6(function () {
368
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
369
+ return Object.defineProperty(createElement('div'), 'a', {
370
+ get: function () { return 7; }
371
+ }).a != 7;
372
+ });
329
373
 
330
- var sharedStore = store$3;
374
+ var NATIVE_BIND = functionBindNative;
331
375
 
332
- var store$2 = sharedStore;
376
+ var call$6 = Function.prototype.call;
333
377
 
334
- (shared$3.exports = function (key, value) {
335
- return store$2[key] || (store$2[key] = value !== undefined ? value : {});
336
- })('versions', []).push({
337
- version: '3.22.8',
338
- mode: 'global',
339
- copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
340
- license: 'https://github.com/zloirock/core-js/blob/v3.22.8/LICENSE',
341
- source: 'https://github.com/zloirock/core-js'
342
- });
378
+ var functionCall = NATIVE_BIND ? call$6.bind(call$6) : function () {
379
+ return call$6.apply(call$6, arguments);
380
+ };
343
381
 
344
- var requireObjectCoercible = requireObjectCoercible$2;
382
+ var uncurryThis$6 = functionUncurryThis;
383
+
384
+ var objectIsPrototypeOf = uncurryThis$6({}.isPrototypeOf);
385
+
386
+ var getBuiltIn$2 = getBuiltIn$4;
387
+ var isCallable$c = isCallable$f;
388
+ var isPrototypeOf$1 = objectIsPrototypeOf;
389
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
345
390
 
346
391
  var $Object$2 = Object;
347
392
 
348
- // `ToObject` abstract operation
349
- // https://tc39.es/ecma262/#sec-toobject
350
- var toObject$3 = function (argument) {
351
- return $Object$2(requireObjectCoercible(argument));
393
+ var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
394
+ return typeof it == 'symbol';
395
+ } : function (it) {
396
+ var $Symbol = getBuiltIn$2('Symbol');
397
+ return isCallable$c($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$2(it));
352
398
  };
353
399
 
354
- var uncurryThis$7 = functionUncurryThis;
355
- var toObject$2 = toObject$3;
356
-
357
- var hasOwnProperty = uncurryThis$7({}.hasOwnProperty);
400
+ var $String$2 = String;
358
401
 
359
- // `HasOwnProperty` abstract operation
360
- // https://tc39.es/ecma262/#sec-hasownproperty
361
- // eslint-disable-next-line es-x/no-object-hasown -- safe
362
- var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
363
- return hasOwnProperty(toObject$2(it), key);
402
+ var tryToString$1 = function (argument) {
403
+ try {
404
+ return $String$2(argument);
405
+ } catch (error) {
406
+ return 'Object';
407
+ }
364
408
  };
365
409
 
366
- var uncurryThis$6 = functionUncurryThis;
410
+ var isCallable$b = isCallable$f;
411
+ var tryToString = tryToString$1;
367
412
 
368
- var id = 0;
369
- var postfix = Math.random();
370
- var toString$1 = uncurryThis$6(1.0.toString);
413
+ var $TypeError$4 = TypeError;
371
414
 
372
- var uid$2 = function (key) {
373
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);
415
+ // `Assert: IsCallable(argument) is true`
416
+ var aCallable$1 = function (argument) {
417
+ if (isCallable$b(argument)) return argument;
418
+ throw $TypeError$4(tryToString(argument) + ' is not a function');
374
419
  };
375
420
 
376
- var global$7 = global$c;
377
- var shared$2 = shared$3.exports;
378
- var hasOwn$9 = hasOwnProperty_1;
379
- var uid$1 = uid$2;
380
- var NATIVE_SYMBOL = nativeSymbol;
381
- var USE_SYMBOL_AS_UID = useSymbolAsUid;
421
+ var aCallable = aCallable$1;
382
422
 
383
- var WellKnownSymbolsStore = shared$2('wks');
384
- var Symbol$1 = global$7.Symbol;
385
- var symbolFor = Symbol$1 && Symbol$1['for'];
386
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
423
+ // `GetMethod` abstract operation
424
+ // https://tc39.es/ecma262/#sec-getmethod
425
+ var getMethod$1 = function (V, P) {
426
+ var func = V[P];
427
+ return func == null ? undefined : aCallable(func);
428
+ };
387
429
 
388
- var wellKnownSymbol$8 = function (name) {
389
- if (!hasOwn$9(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
390
- var description = 'Symbol.' + name;
391
- if (NATIVE_SYMBOL && hasOwn$9(Symbol$1, name)) {
392
- WellKnownSymbolsStore[name] = Symbol$1[name];
393
- } else if (USE_SYMBOL_AS_UID && symbolFor) {
394
- WellKnownSymbolsStore[name] = symbolFor(description);
395
- } else {
396
- WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
397
- }
398
- } return WellKnownSymbolsStore[name];
430
+ var call$5 = functionCall;
431
+ var isCallable$a = isCallable$f;
432
+ var isObject$2 = isObject$5;
433
+
434
+ var $TypeError$3 = TypeError;
435
+
436
+ // `OrdinaryToPrimitive` abstract operation
437
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
438
+ var ordinaryToPrimitive$1 = function (input, pref) {
439
+ var fn, val;
440
+ if (pref === 'string' && isCallable$a(fn = input.toString) && !isObject$2(val = call$5(fn, input))) return val;
441
+ if (isCallable$a(fn = input.valueOf) && !isObject$2(val = call$5(fn, input))) return val;
442
+ if (pref !== 'string' && isCallable$a(fn = input.toString) && !isObject$2(val = call$5(fn, input))) return val;
443
+ throw $TypeError$3("Can't convert object to primitive value");
399
444
  };
400
445
 
401
446
  var call$4 = functionCall;
402
- var isObject$3 = isObject$5;
447
+ var isObject$1 = isObject$5;
403
448
  var isSymbol$1 = isSymbol$2;
404
449
  var getMethod = getMethod$1;
405
450
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
406
451
  var wellKnownSymbol$7 = wellKnownSymbol$8;
407
452
 
408
- var $TypeError$3 = TypeError;
453
+ var $TypeError$2 = TypeError;
409
454
  var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
410
455
 
411
456
  // `ToPrimitive` abstract operation
412
457
  // https://tc39.es/ecma262/#sec-toprimitive
413
458
  var toPrimitive$1 = function (input, pref) {
414
- if (!isObject$3(input) || isSymbol$1(input)) return input;
459
+ if (!isObject$1(input) || isSymbol$1(input)) return input;
415
460
  var exoticToPrim = getMethod(input, TO_PRIMITIVE);
416
461
  var result;
417
462
  if (exoticToPrim) {
418
463
  if (pref === undefined) pref = 'default';
419
464
  result = call$4(exoticToPrim, input, pref);
420
- if (!isObject$3(result) || isSymbol$1(result)) return result;
421
- throw $TypeError$3("Can't convert object to primitive value");
465
+ if (!isObject$1(result) || isSymbol$1(result)) return result;
466
+ throw $TypeError$2("Can't convert object to primitive value");
422
467
  }
423
468
  if (pref === undefined) pref = 'number';
424
469
  return ordinaryToPrimitive(input, pref);
@@ -434,101 +479,29 @@ var toPropertyKey$2 = function (argument) {
434
479
  return isSymbol(key) ? key : key + '';
435
480
  };
436
481
 
437
- var global$6 = global$c;
438
- var isObject$2 = isObject$5;
439
-
440
- var document$1 = global$6.document;
441
- // typeof document.createElement is 'object' in old IE
442
- var EXISTS$1 = isObject$2(document$1) && isObject$2(document$1.createElement);
443
-
444
- var documentCreateElement$2 = function (it) {
445
- return EXISTS$1 ? document$1.createElement(it) : {};
446
- };
447
-
448
- var DESCRIPTORS$9 = descriptors;
449
- var fails$7 = fails$c;
450
- var createElement = documentCreateElement$2;
451
-
452
- // Thanks to IE8 for its funny defineProperty
453
- var ie8DomDefine = !DESCRIPTORS$9 && !fails$7(function () {
454
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
455
- return Object.defineProperty(createElement('div'), 'a', {
456
- get: function () { return 7; }
457
- }).a != 7;
458
- });
459
-
460
- var DESCRIPTORS$8 = descriptors;
461
- var call$3 = functionCall;
462
- var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
463
- var createPropertyDescriptor$2 = createPropertyDescriptor$3;
464
- var toIndexedObject$4 = toIndexedObject$5;
465
- var toPropertyKey$1 = toPropertyKey$2;
466
- var hasOwn$8 = hasOwnProperty_1;
467
- var IE8_DOM_DEFINE$1 = ie8DomDefine;
468
-
469
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
470
- var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
471
-
472
- // `Object.getOwnPropertyDescriptor` method
473
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
474
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
475
- O = toIndexedObject$4(O);
476
- P = toPropertyKey$1(P);
477
- if (IE8_DOM_DEFINE$1) try {
478
- return $getOwnPropertyDescriptor$1(O, P);
479
- } catch (error) { /* empty */ }
480
- if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$3(propertyIsEnumerableModule$1.f, O, P), O[P]);
481
- };
482
-
483
- var objectDefineProperty = {};
484
-
485
482
  var DESCRIPTORS$7 = descriptors;
486
- var fails$6 = fails$c;
487
-
488
- // V8 ~ Chrome 36-
489
- // https://bugs.chromium.org/p/v8/issues/detail?id=3334
490
- var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$6(function () {
491
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
492
- return Object.defineProperty(function () { /* empty */ }, 'prototype', {
493
- value: 42,
494
- writable: false
495
- }).prototype != 42;
496
- });
497
-
498
- var isObject$1 = isObject$5;
499
-
500
- var $String$2 = String;
501
- var $TypeError$2 = TypeError;
502
-
503
- // `Assert: Type(argument) is Object`
504
- var anObject$7 = function (argument) {
505
- if (isObject$1(argument)) return argument;
506
- throw $TypeError$2($String$2(argument) + ' is not an object');
507
- };
508
-
509
- var DESCRIPTORS$6 = descriptors;
510
- var IE8_DOM_DEFINE = ie8DomDefine;
483
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
511
484
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
512
485
  var anObject$6 = anObject$7;
513
- var toPropertyKey = toPropertyKey$2;
486
+ var toPropertyKey$1 = toPropertyKey$2;
514
487
 
515
488
  var $TypeError$1 = TypeError;
516
489
  // eslint-disable-next-line es-x/no-object-defineproperty -- safe
517
490
  var $defineProperty = Object.defineProperty;
518
491
  // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
519
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
492
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
520
493
  var ENUMERABLE = 'enumerable';
521
494
  var CONFIGURABLE$1 = 'configurable';
522
495
  var WRITABLE = 'writable';
523
496
 
524
497
  // `Object.defineProperty` method
525
498
  // https://tc39.es/ecma262/#sec-object.defineproperty
526
- objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
499
+ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
527
500
  anObject$6(O);
528
- P = toPropertyKey(P);
501
+ P = toPropertyKey$1(P);
529
502
  anObject$6(Attributes);
530
503
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
531
- var current = $getOwnPropertyDescriptor(O, P);
504
+ var current = $getOwnPropertyDescriptor$1(O, P);
532
505
  if (current && current[WRITABLE]) {
533
506
  O[P] = Attributes.value;
534
507
  Attributes = {
@@ -540,9 +513,9 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
540
513
  } return $defineProperty(O, P, Attributes);
541
514
  } : $defineProperty : function defineProperty(O, P, Attributes) {
542
515
  anObject$6(O);
543
- P = toPropertyKey(P);
516
+ P = toPropertyKey$1(P);
544
517
  anObject$6(Attributes);
545
- if (IE8_DOM_DEFINE) try {
518
+ if (IE8_DOM_DEFINE$1) try {
546
519
  return $defineProperty(O, P, Attributes);
547
520
  } catch (error) { /* empty */ }
548
521
  if ('get' in Attributes || 'set' in Attributes) throw $TypeError$1('Accessors not supported');
@@ -550,258 +523,51 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
550
523
  return O;
551
524
  };
552
525
 
553
- var DESCRIPTORS$5 = descriptors;
554
- var definePropertyModule$2 = objectDefineProperty;
555
- var createPropertyDescriptor$1 = createPropertyDescriptor$3;
526
+ var ceil = Math.ceil;
527
+ var floor = Math.floor;
556
528
 
557
- var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
558
- return definePropertyModule$2.f(object, key, createPropertyDescriptor$1(1, value));
559
- } : function (object, key, value) {
560
- object[key] = value;
561
- return object;
529
+ // `Math.trunc` method
530
+ // https://tc39.es/ecma262/#sec-math.trunc
531
+ // eslint-disable-next-line es-x/no-math-trunc -- safe
532
+ var mathTrunc = Math.trunc || function trunc(x) {
533
+ var n = +x;
534
+ return (n > 0 ? floor : ceil)(n);
562
535
  };
563
536
 
564
- var makeBuiltIn$2 = {exports: {}};
537
+ var trunc = mathTrunc;
565
538
 
566
- var DESCRIPTORS$4 = descriptors;
567
- var hasOwn$7 = hasOwnProperty_1;
539
+ // `ToIntegerOrInfinity` abstract operation
540
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
541
+ var toIntegerOrInfinity$2 = function (argument) {
542
+ var number = +argument;
543
+ // eslint-disable-next-line no-self-compare -- NaN check
544
+ return number !== number || number === 0 ? 0 : trunc(number);
545
+ };
568
546
 
569
- var FunctionPrototype = Function.prototype;
570
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
571
- var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
547
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
572
548
 
573
- var EXISTS = hasOwn$7(FunctionPrototype, 'name');
574
- // additional protection from minified / mangled / dropped function names
575
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
576
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
549
+ var max = Math.max;
550
+ var min$1 = Math.min;
577
551
 
578
- var functionName = {
579
- EXISTS: EXISTS,
580
- PROPER: PROPER,
581
- CONFIGURABLE: CONFIGURABLE
552
+ // Helper for a popular repeating case of the spec:
553
+ // Let integer be ? ToInteger(index).
554
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
555
+ var toAbsoluteIndex$1 = function (index, length) {
556
+ var integer = toIntegerOrInfinity$1(index);
557
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
582
558
  };
583
559
 
584
- var uncurryThis$5 = functionUncurryThis;
585
- var isCallable$9 = isCallable$f;
586
- var store$1 = sharedStore;
587
-
588
- var functionToString = uncurryThis$5(Function.toString);
589
-
590
- // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
591
- if (!isCallable$9(store$1.inspectSource)) {
592
- store$1.inspectSource = function (it) {
593
- return functionToString(it);
594
- };
595
- }
560
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
596
561
 
597
- var inspectSource$2 = store$1.inspectSource;
562
+ var min = Math.min;
598
563
 
599
- var global$5 = global$c;
600
- var isCallable$8 = isCallable$f;
601
- var inspectSource$1 = inspectSource$2;
564
+ // `ToLength` abstract operation
565
+ // https://tc39.es/ecma262/#sec-tolength
566
+ var toLength$1 = function (argument) {
567
+ return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
568
+ };
602
569
 
603
- var WeakMap$1 = global$5.WeakMap;
604
-
605
- var nativeWeakMap = isCallable$8(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
606
-
607
- var shared$1 = shared$3.exports;
608
- var uid = uid$2;
609
-
610
- var keys = shared$1('keys');
611
-
612
- var sharedKey$3 = function (key) {
613
- return keys[key] || (keys[key] = uid(key));
614
- };
615
-
616
- var hiddenKeys$4 = {};
617
-
618
- var NATIVE_WEAK_MAP = nativeWeakMap;
619
- var global$4 = global$c;
620
- var uncurryThis$4 = functionUncurryThis;
621
- var isObject = isObject$5;
622
- var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
623
- var hasOwn$6 = hasOwnProperty_1;
624
- var shared = sharedStore;
625
- var sharedKey$2 = sharedKey$3;
626
- var hiddenKeys$3 = hiddenKeys$4;
627
-
628
- var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
629
- var TypeError$1 = global$4.TypeError;
630
- var WeakMap = global$4.WeakMap;
631
- var set, get, has;
632
-
633
- var enforce = function (it) {
634
- return has(it) ? get(it) : set(it, {});
635
- };
636
-
637
- var getterFor = function (TYPE) {
638
- return function (it) {
639
- var state;
640
- if (!isObject(it) || (state = get(it)).type !== TYPE) {
641
- throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
642
- } return state;
643
- };
644
- };
645
-
646
- if (NATIVE_WEAK_MAP || shared.state) {
647
- var store = shared.state || (shared.state = new WeakMap());
648
- var wmget = uncurryThis$4(store.get);
649
- var wmhas = uncurryThis$4(store.has);
650
- var wmset = uncurryThis$4(store.set);
651
- set = function (it, metadata) {
652
- if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
653
- metadata.facade = it;
654
- wmset(store, it, metadata);
655
- return metadata;
656
- };
657
- get = function (it) {
658
- return wmget(store, it) || {};
659
- };
660
- has = function (it) {
661
- return wmhas(store, it);
662
- };
663
- } else {
664
- var STATE = sharedKey$2('state');
665
- hiddenKeys$3[STATE] = true;
666
- set = function (it, metadata) {
667
- if (hasOwn$6(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
668
- metadata.facade = it;
669
- createNonEnumerableProperty$4(it, STATE, metadata);
670
- return metadata;
671
- };
672
- get = function (it) {
673
- return hasOwn$6(it, STATE) ? it[STATE] : {};
674
- };
675
- has = function (it) {
676
- return hasOwn$6(it, STATE);
677
- };
678
- }
679
-
680
- var internalState = {
681
- set: set,
682
- get: get,
683
- has: has,
684
- enforce: enforce,
685
- getterFor: getterFor
686
- };
687
-
688
- var fails$5 = fails$c;
689
- var isCallable$7 = isCallable$f;
690
- var hasOwn$5 = hasOwnProperty_1;
691
- var DESCRIPTORS$3 = descriptors;
692
- var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
693
- var inspectSource = inspectSource$2;
694
- var InternalStateModule$1 = internalState;
695
-
696
- var enforceInternalState = InternalStateModule$1.enforce;
697
- var getInternalState$1 = InternalStateModule$1.get;
698
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
699
- var defineProperty$4 = Object.defineProperty;
700
-
701
- var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$5(function () {
702
- return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
703
- });
704
-
705
- var TEMPLATE = String(String).split('String');
706
-
707
- var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
708
- if (String(name).slice(0, 7) === 'Symbol(') {
709
- name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
710
- }
711
- if (options && options.getter) name = 'get ' + name;
712
- if (options && options.setter) name = 'set ' + name;
713
- if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
714
- defineProperty$4(value, 'name', { value: name, configurable: true });
715
- }
716
- if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) {
717
- defineProperty$4(value, 'length', { value: options.arity });
718
- }
719
- try {
720
- if (options && hasOwn$5(options, 'constructor') && options.constructor) {
721
- if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
722
- // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
723
- } else if (value.prototype) value.prototype = undefined;
724
- } catch (error) { /* empty */ }
725
- var state = enforceInternalState(value);
726
- if (!hasOwn$5(state, 'source')) {
727
- state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
728
- } return value;
729
- };
730
-
731
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
732
- // eslint-disable-next-line no-extend-native -- required
733
- Function.prototype.toString = makeBuiltIn$1(function toString() {
734
- return isCallable$7(this) && getInternalState$1(this).source || inspectSource(this);
735
- }, 'toString');
736
-
737
- var isCallable$6 = isCallable$f;
738
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
739
- var makeBuiltIn = makeBuiltIn$2.exports;
740
- var defineGlobalProperty$1 = defineGlobalProperty$3;
741
-
742
- var defineBuiltIn$4 = function (O, key, value, options) {
743
- if (!options) options = {};
744
- var simple = options.enumerable;
745
- var name = options.name !== undefined ? options.name : key;
746
- if (isCallable$6(value)) makeBuiltIn(value, name, options);
747
- if (options.global) {
748
- if (simple) O[key] = value;
749
- else defineGlobalProperty$1(key, value);
750
- } else {
751
- if (!options.unsafe) delete O[key];
752
- else if (O[key]) simple = true;
753
- if (simple) O[key] = value;
754
- else createNonEnumerableProperty$3(O, key, value);
755
- } return O;
756
- };
757
-
758
- var objectGetOwnPropertyNames = {};
759
-
760
- var ceil = Math.ceil;
761
- var floor = Math.floor;
762
-
763
- // `Math.trunc` method
764
- // https://tc39.es/ecma262/#sec-math.trunc
765
- // eslint-disable-next-line es-x/no-math-trunc -- safe
766
- var mathTrunc = Math.trunc || function trunc(x) {
767
- var n = +x;
768
- return (n > 0 ? floor : ceil)(n);
769
- };
770
-
771
- var trunc = mathTrunc;
772
-
773
- // `ToIntegerOrInfinity` abstract operation
774
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
775
- var toIntegerOrInfinity$2 = function (argument) {
776
- var number = +argument;
777
- // eslint-disable-next-line no-self-compare -- NaN check
778
- return number !== number || number === 0 ? 0 : trunc(number);
779
- };
780
-
781
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
782
-
783
- var max = Math.max;
784
- var min$1 = Math.min;
785
-
786
- // Helper for a popular repeating case of the spec:
787
- // Let integer be ? ToInteger(index).
788
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
789
- var toAbsoluteIndex$1 = function (index, length) {
790
- var integer = toIntegerOrInfinity$1(index);
791
- return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
792
- };
793
-
794
- var toIntegerOrInfinity = toIntegerOrInfinity$2;
795
-
796
- var min = Math.min;
797
-
798
- // `ToLength` abstract operation
799
- // https://tc39.es/ecma262/#sec-tolength
800
- var toLength$1 = function (argument) {
801
- return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
802
- };
803
-
804
- var toLength = toLength$1;
570
+ var toLength = toLength$1;
805
571
 
806
572
  // `LengthOfArrayLike` abstract operation
807
573
  // https://tc39.es/ecma262/#sec-lengthofarraylike
@@ -809,14 +575,14 @@ var lengthOfArrayLike$1 = function (obj) {
809
575
  return toLength(obj.length);
810
576
  };
811
577
 
812
- var toIndexedObject$3 = toIndexedObject$5;
578
+ var toIndexedObject$4 = toIndexedObject$5;
813
579
  var toAbsoluteIndex = toAbsoluteIndex$1;
814
580
  var lengthOfArrayLike = lengthOfArrayLike$1;
815
581
 
816
582
  // `Array.prototype.{ indexOf, includes }` methods implementation
817
583
  var createMethod = function (IS_INCLUDES) {
818
584
  return function ($this, el, fromIndex) {
819
- var O = toIndexedObject$3($this);
585
+ var O = toIndexedObject$4($this);
820
586
  var length = lengthOfArrayLike(O);
821
587
  var index = toAbsoluteIndex(fromIndex, length);
822
588
  var value;
@@ -842,22 +608,24 @@ var arrayIncludes = {
842
608
  indexOf: createMethod(false)
843
609
  };
844
610
 
845
- var uncurryThis$3 = functionUncurryThis;
846
- var hasOwn$4 = hasOwnProperty_1;
847
- var toIndexedObject$2 = toIndexedObject$5;
611
+ var hiddenKeys$4 = {};
612
+
613
+ var uncurryThis$5 = functionUncurryThis;
614
+ var hasOwn$8 = hasOwnProperty_1;
615
+ var toIndexedObject$3 = toIndexedObject$5;
848
616
  var indexOf = arrayIncludes.indexOf;
849
- var hiddenKeys$2 = hiddenKeys$4;
617
+ var hiddenKeys$3 = hiddenKeys$4;
850
618
 
851
- var push = uncurryThis$3([].push);
619
+ var push = uncurryThis$5([].push);
852
620
 
853
621
  var objectKeysInternal = function (object, names) {
854
- var O = toIndexedObject$2(object);
622
+ var O = toIndexedObject$3(object);
855
623
  var i = 0;
856
624
  var result = [];
857
625
  var key;
858
- for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push(result, key);
626
+ for (key in O) !hasOwn$8(hiddenKeys$3, key) && hasOwn$8(O, key) && push(result, key);
859
627
  // Don't enum bug & hidden keys
860
- while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
628
+ while (names.length > i) if (hasOwn$8(O, key = names[i++])) {
861
629
  ~indexOf(result, key) || push(result, key);
862
630
  }
863
631
  return result;
@@ -877,374 +645,531 @@ var enumBugKeys$3 = [
877
645
  var internalObjectKeys$1 = objectKeysInternal;
878
646
  var enumBugKeys$2 = enumBugKeys$3;
879
647
 
880
- var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
881
-
882
- // `Object.getOwnPropertyNames` method
883
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
884
- // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
885
- objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
886
- return internalObjectKeys$1(O, hiddenKeys$1);
648
+ // `Object.keys` method
649
+ // https://tc39.es/ecma262/#sec-object.keys
650
+ // eslint-disable-next-line es-x/no-object-keys -- safe
651
+ var objectKeys$2 = Object.keys || function keys(O) {
652
+ return internalObjectKeys$1(O, enumBugKeys$2);
887
653
  };
888
654
 
889
- var objectGetOwnPropertySymbols = {};
655
+ var DESCRIPTORS$6 = descriptors;
656
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
657
+ var definePropertyModule$2 = objectDefineProperty;
658
+ var anObject$5 = anObject$7;
659
+ var toIndexedObject$2 = toIndexedObject$5;
660
+ var objectKeys$1 = objectKeys$2;
890
661
 
891
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
892
- objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
662
+ // `Object.defineProperties` method
663
+ // https://tc39.es/ecma262/#sec-object.defineproperties
664
+ // eslint-disable-next-line es-x/no-object-defineproperties -- safe
665
+ objectDefineProperties.f = DESCRIPTORS$6 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
666
+ anObject$5(O);
667
+ var props = toIndexedObject$2(Properties);
668
+ var keys = objectKeys$1(Properties);
669
+ var length = keys.length;
670
+ var index = 0;
671
+ var key;
672
+ while (length > index) definePropertyModule$2.f(O, key = keys[index++], props[key]);
673
+ return O;
674
+ };
893
675
 
894
676
  var getBuiltIn$1 = getBuiltIn$4;
895
- var uncurryThis$2 = functionUncurryThis;
896
- var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
897
- var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
898
- var anObject$5 = anObject$7;
899
677
 
900
- var concat$1 = uncurryThis$2([].concat);
678
+ var html$1 = getBuiltIn$1('document', 'documentElement');
901
679
 
902
- // all object keys, includes non-enumerable and symbols
903
- var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
904
- var keys = getOwnPropertyNamesModule.f(anObject$5(it));
905
- var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
906
- return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
907
- };
680
+ var shared$1 = shared$3.exports;
681
+ var uid = uid$2;
908
682
 
909
- var hasOwn$3 = hasOwnProperty_1;
910
- var ownKeys = ownKeys$1;
911
- var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
912
- var definePropertyModule$1 = objectDefineProperty;
683
+ var keys = shared$1('keys');
913
684
 
914
- var copyConstructorProperties$1 = function (target, source, exceptions) {
915
- var keys = ownKeys(source);
916
- var defineProperty = definePropertyModule$1.f;
917
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
918
- for (var i = 0; i < keys.length; i++) {
919
- var key = keys[i];
920
- if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
921
- defineProperty(target, key, getOwnPropertyDescriptor(source, key));
922
- }
923
- }
685
+ var sharedKey$3 = function (key) {
686
+ return keys[key] || (keys[key] = uid(key));
924
687
  };
925
688
 
926
- var fails$4 = fails$c;
927
- var isCallable$5 = isCallable$f;
928
-
929
- var replacement = /#|\.prototype\./;
689
+ /* global ActiveXObject -- old IE, WSH */
930
690
 
931
- var isForced$1 = function (feature, detection) {
932
- var value = data[normalize(feature)];
933
- return value == POLYFILL ? true
934
- : value == NATIVE ? false
935
- : isCallable$5(detection) ? fails$4(detection)
936
- : !!detection;
691
+ var anObject$4 = anObject$7;
692
+ var definePropertiesModule = objectDefineProperties;
693
+ var enumBugKeys$1 = enumBugKeys$3;
694
+ var hiddenKeys$2 = hiddenKeys$4;
695
+ var html = html$1;
696
+ var documentCreateElement$1 = documentCreateElement$2;
697
+ var sharedKey$2 = sharedKey$3;
698
+
699
+ var GT = '>';
700
+ var LT = '<';
701
+ var PROTOTYPE = 'prototype';
702
+ var SCRIPT = 'script';
703
+ var IE_PROTO$1 = sharedKey$2('IE_PROTO');
704
+
705
+ var EmptyConstructor = function () { /* empty */ };
706
+
707
+ var scriptTag = function (content) {
708
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
937
709
  };
938
710
 
939
- var normalize = isForced$1.normalize = function (string) {
940
- return String(string).replace(replacement, '.').toLowerCase();
711
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
712
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
713
+ activeXDocument.write(scriptTag(''));
714
+ activeXDocument.close();
715
+ var temp = activeXDocument.parentWindow.Object;
716
+ activeXDocument = null; // avoid memory leak
717
+ return temp;
941
718
  };
942
719
 
943
- var data = isForced$1.data = {};
944
- var NATIVE = isForced$1.NATIVE = 'N';
945
- var POLYFILL = isForced$1.POLYFILL = 'P';
720
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
721
+ var NullProtoObjectViaIFrame = function () {
722
+ // Thrash, waste and sodomy: IE GC bug
723
+ var iframe = documentCreateElement$1('iframe');
724
+ var JS = 'java' + SCRIPT + ':';
725
+ var iframeDocument;
726
+ iframe.style.display = 'none';
727
+ html.appendChild(iframe);
728
+ // https://github.com/zloirock/core-js/issues/475
729
+ iframe.src = String(JS);
730
+ iframeDocument = iframe.contentWindow.document;
731
+ iframeDocument.open();
732
+ iframeDocument.write(scriptTag('document.F=Object'));
733
+ iframeDocument.close();
734
+ return iframeDocument.F;
735
+ };
946
736
 
947
- var isForced_1 = isForced$1;
737
+ // Check for document.domain and active x support
738
+ // No need to use active x approach when document.domain is not set
739
+ // see https://github.com/es-shims/es5-shim/issues/150
740
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
741
+ // avoid IE GC bug
742
+ var activeXDocument;
743
+ var NullProtoObject = function () {
744
+ try {
745
+ activeXDocument = new ActiveXObject('htmlfile');
746
+ } catch (error) { /* ignore */ }
747
+ NullProtoObject = typeof document != 'undefined'
748
+ ? document.domain && activeXDocument
749
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
750
+ : NullProtoObjectViaIFrame()
751
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
752
+ var length = enumBugKeys$1.length;
753
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
754
+ return NullProtoObject();
755
+ };
948
756
 
949
- var global$3 = global$c;
950
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
951
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
952
- var defineBuiltIn$3 = defineBuiltIn$4;
953
- var defineGlobalProperty = defineGlobalProperty$3;
954
- var copyConstructorProperties = copyConstructorProperties$1;
955
- var isForced = isForced_1;
757
+ hiddenKeys$2[IE_PROTO$1] = true;
956
758
 
957
- /*
958
- options.target - name of the target object
959
- options.global - target is the global object
960
- options.stat - export as static methods of target
961
- options.proto - export as prototype methods of target
962
- options.real - real prototype method for the `pure` version
963
- options.forced - export even if the native feature is available
964
- options.bind - bind methods to the target, required for the `pure` version
965
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
966
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
967
- options.sham - add a flag to not completely full polyfills
968
- options.enumerable - export as enumerable property
969
- options.dontCallGetSet - prevent calling a getter on target
970
- options.name - the .name of the function if it does not match the key
971
- */
972
- var _export = function (options, source) {
973
- var TARGET = options.target;
974
- var GLOBAL = options.global;
975
- var STATIC = options.stat;
976
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
977
- if (GLOBAL) {
978
- target = global$3;
979
- } else if (STATIC) {
980
- target = global$3[TARGET] || defineGlobalProperty(TARGET, {});
981
- } else {
982
- target = (global$3[TARGET] || {}).prototype;
983
- }
984
- if (target) for (key in source) {
985
- sourceProperty = source[key];
986
- if (options.dontCallGetSet) {
987
- descriptor = getOwnPropertyDescriptor(target, key);
988
- targetProperty = descriptor && descriptor.value;
989
- } else targetProperty = target[key];
990
- FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
991
- // contained in target
992
- if (!FORCED && targetProperty !== undefined) {
993
- if (typeof sourceProperty == typeof targetProperty) continue;
994
- copyConstructorProperties(sourceProperty, targetProperty);
995
- }
996
- // add a flag to not completely full polyfills
997
- if (options.sham || (targetProperty && targetProperty.sham)) {
998
- createNonEnumerableProperty$2(sourceProperty, 'sham', true);
999
- }
1000
- defineBuiltIn$3(target, key, sourceProperty, options);
1001
- }
759
+ // `Object.create` method
760
+ // https://tc39.es/ecma262/#sec-object.create
761
+ // eslint-disable-next-line es-x/no-object-create -- safe
762
+ var objectCreate = Object.create || function create(O, Properties) {
763
+ var result;
764
+ if (O !== null) {
765
+ EmptyConstructor[PROTOTYPE] = anObject$4(O);
766
+ result = new EmptyConstructor();
767
+ EmptyConstructor[PROTOTYPE] = null;
768
+ // add "__proto__" for Object.getPrototypeOf polyfill
769
+ result[IE_PROTO$1] = O;
770
+ } else result = NullProtoObject();
771
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1002
772
  };
1003
773
 
1004
- var internalObjectKeys = objectKeysInternal;
1005
- var enumBugKeys$1 = enumBugKeys$3;
774
+ var wellKnownSymbol$6 = wellKnownSymbol$8;
775
+ var create$1 = objectCreate;
776
+ var defineProperty$4 = objectDefineProperty.f;
1006
777
 
1007
- // `Object.keys` method
1008
- // https://tc39.es/ecma262/#sec-object.keys
1009
- // eslint-disable-next-line es-x/no-object-keys -- safe
1010
- var objectKeys$2 = Object.keys || function keys(O) {
1011
- return internalObjectKeys(O, enumBugKeys$1);
778
+ var UNSCOPABLES = wellKnownSymbol$6('unscopables');
779
+ var ArrayPrototype = Array.prototype;
780
+
781
+ // Array.prototype[@@unscopables]
782
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
783
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
784
+ defineProperty$4(ArrayPrototype, UNSCOPABLES, {
785
+ configurable: true,
786
+ value: create$1(null)
787
+ });
788
+ }
789
+
790
+ // add a key to Array.prototype[@@unscopables]
791
+ var addToUnscopables$1 = function (key) {
792
+ ArrayPrototype[UNSCOPABLES][key] = true;
1012
793
  };
1013
794
 
1014
- var DESCRIPTORS$2 = descriptors;
1015
- var uncurryThis$1 = functionUncurryThis;
1016
- var call$2 = functionCall;
1017
- var fails$3 = fails$c;
1018
- var objectKeys$1 = objectKeys$2;
1019
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1020
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1021
- var toObject$1 = toObject$3;
1022
- var IndexedObject = indexedObject;
795
+ var iterators = {};
1023
796
 
1024
- // eslint-disable-next-line es-x/no-object-assign -- safe
1025
- var $assign = Object.assign;
1026
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
1027
- var defineProperty$3 = Object.defineProperty;
1028
- var concat = uncurryThis$1([].concat);
797
+ var uncurryThis$4 = functionUncurryThis;
798
+ var isCallable$9 = isCallable$f;
799
+ var store$1 = sharedStore;
1029
800
 
1030
- // `Object.assign` method
1031
- // https://tc39.es/ecma262/#sec-object.assign
1032
- var objectAssign = !$assign || fails$3(function () {
1033
- // should have correct order of operations (Edge bug)
1034
- if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
1035
- enumerable: true,
1036
- get: function () {
1037
- defineProperty$3(this, 'b', {
1038
- value: 3,
1039
- enumerable: false
1040
- });
1041
- }
1042
- }), { b: 2 })).b !== 1) return true;
1043
- // should work with symbols and should have deterministic property order (V8 bug)
1044
- var A = {};
1045
- var B = {};
1046
- // eslint-disable-next-line es-x/no-symbol -- safe
1047
- var symbol = Symbol();
1048
- var alphabet = 'abcdefghijklmnopqrst';
1049
- A[symbol] = 7;
1050
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1051
- return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
1052
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1053
- var T = toObject$1(target);
1054
- var argumentsLength = arguments.length;
1055
- var index = 1;
1056
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1057
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
1058
- while (argumentsLength > index) {
1059
- var S = IndexedObject(arguments[index++]);
1060
- var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1061
- var length = keys.length;
1062
- var j = 0;
1063
- var key;
1064
- while (length > j) {
1065
- key = keys[j++];
1066
- if (!DESCRIPTORS$2 || call$2(propertyIsEnumerable, S, key)) T[key] = S[key];
1067
- }
1068
- } return T;
1069
- } : $assign;
801
+ var functionToString = uncurryThis$4(Function.toString);
1070
802
 
1071
- var $$2 = _export;
1072
- var assign = objectAssign;
803
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
804
+ if (!isCallable$9(store$1.inspectSource)) {
805
+ store$1.inspectSource = function (it) {
806
+ return functionToString(it);
807
+ };
808
+ }
1073
809
 
1074
- // `Object.assign` method
1075
- // https://tc39.es/ecma262/#sec-object.assign
1076
- // eslint-disable-next-line es-x/no-object-assign -- required for testing
1077
- $$2({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1078
- assign: assign
1079
- });
810
+ var inspectSource$2 = store$1.inspectSource;
1080
811
 
1081
- /******************************************************************************
1082
- Copyright (c) Microsoft Corporation.
1083
-
1084
- Permission to use, copy, modify, and/or distribute this software for any
1085
- purpose with or without fee is hereby granted.
1086
-
1087
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1088
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1089
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1090
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1091
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1092
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1093
- PERFORMANCE OF THIS SOFTWARE.
1094
- ***************************************************************************** */
1095
-
1096
- function __awaiter(thisArg, _arguments, P, generator) {
1097
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1098
- return new (P || (P = Promise))(function (resolve, reject) {
1099
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1100
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1101
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1102
- step((generator = generator.apply(thisArg, _arguments || [])).next());
1103
- });
812
+ var global$5 = global$c;
813
+ var isCallable$8 = isCallable$f;
814
+ var inspectSource$1 = inspectSource$2;
815
+
816
+ var WeakMap$1 = global$5.WeakMap;
817
+
818
+ var nativeWeakMap = isCallable$8(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
819
+
820
+ var createPropertyDescriptor$3 = function (bitmap, value) {
821
+ return {
822
+ enumerable: !(bitmap & 1),
823
+ configurable: !(bitmap & 2),
824
+ writable: !(bitmap & 4),
825
+ value: value
826
+ };
827
+ };
828
+
829
+ var DESCRIPTORS$5 = descriptors;
830
+ var definePropertyModule$1 = objectDefineProperty;
831
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
832
+
833
+ var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
834
+ return definePropertyModule$1.f(object, key, createPropertyDescriptor$2(1, value));
835
+ } : function (object, key, value) {
836
+ object[key] = value;
837
+ return object;
838
+ };
839
+
840
+ var NATIVE_WEAK_MAP = nativeWeakMap;
841
+ var global$4 = global$c;
842
+ var uncurryThis$3 = functionUncurryThis;
843
+ var isObject = isObject$5;
844
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
845
+ var hasOwn$7 = hasOwnProperty_1;
846
+ var shared = sharedStore;
847
+ var sharedKey$1 = sharedKey$3;
848
+ var hiddenKeys$1 = hiddenKeys$4;
849
+
850
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
851
+ var TypeError$1 = global$4.TypeError;
852
+ var WeakMap = global$4.WeakMap;
853
+ var set, get, has;
854
+
855
+ var enforce = function (it) {
856
+ return has(it) ? get(it) : set(it, {});
857
+ };
858
+
859
+ var getterFor = function (TYPE) {
860
+ return function (it) {
861
+ var state;
862
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
863
+ throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
864
+ } return state;
865
+ };
866
+ };
867
+
868
+ if (NATIVE_WEAK_MAP || shared.state) {
869
+ var store = shared.state || (shared.state = new WeakMap());
870
+ var wmget = uncurryThis$3(store.get);
871
+ var wmhas = uncurryThis$3(store.has);
872
+ var wmset = uncurryThis$3(store.set);
873
+ set = function (it, metadata) {
874
+ if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
875
+ metadata.facade = it;
876
+ wmset(store, it, metadata);
877
+ return metadata;
878
+ };
879
+ get = function (it) {
880
+ return wmget(store, it) || {};
881
+ };
882
+ has = function (it) {
883
+ return wmhas(store, it);
884
+ };
885
+ } else {
886
+ var STATE = sharedKey$1('state');
887
+ hiddenKeys$1[STATE] = true;
888
+ set = function (it, metadata) {
889
+ if (hasOwn$7(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
890
+ metadata.facade = it;
891
+ createNonEnumerableProperty$4(it, STATE, metadata);
892
+ return metadata;
893
+ };
894
+ get = function (it) {
895
+ return hasOwn$7(it, STATE) ? it[STATE] : {};
896
+ };
897
+ has = function (it) {
898
+ return hasOwn$7(it, STATE);
899
+ };
1104
900
  }
1105
901
 
1106
- class HTTPService{constructor(a){this.url=`${a.protocol}://${a.host}:${a.port}`;}resolveBoolean(a,b,c){return __awaiter(this,void 0,void 0,function*(){try{const d=yield axios__default["default"].post(`${this.url}/flags/${encodeURIComponent(a)}/resolve/boolean`,c);return checkResponse(d,"boolean")?{value:d.data.value,reason:d.data.reason,variant:d.data.variant}:{value:b,reason:nodejsSdk.StandardResolutionReasons.ERROR,errorCode:nodejsSdk.ErrorCode.PARSE_ERROR}}catch(a){return {reason:nodejsSdk.StandardResolutionReasons.ERROR,errorCode:getErrorCode(a),value:b}}})}resolveNumber(a,b,c){return __awaiter(this,void 0,void 0,function*(){try{const d=yield axios__default["default"].post(/**
1107
- * JavaScript numbers are always 64-bit floating point
1108
- */`${this.url}/flags/${encodeURIComponent(a)}/resolve/float`,c);return checkResponse(d,"number")?{value:d.data.value,reason:d.data.reason,variant:d.data.variant}:{value:b,reason:nodejsSdk.StandardResolutionReasons.ERROR,errorCode:nodejsSdk.ErrorCode.PARSE_ERROR}}catch(a){return {reason:nodejsSdk.StandardResolutionReasons.ERROR,errorCode:getErrorCode(a),value:b}}})}resolveString(a,b,c){return __awaiter(this,void 0,void 0,function*(){try{const d=yield axios__default["default"].post(`${this.url}/flags/${encodeURIComponent(a)}/resolve/string`,c);return checkResponse(d,"string")?{value:d.data.value,reason:d.data.reason,variant:d.data.variant}:{value:b,reason:nodejsSdk.StandardResolutionReasons.ERROR,errorCode:nodejsSdk.ErrorCode.PARSE_ERROR}}catch(a){return {reason:nodejsSdk.StandardResolutionReasons.ERROR,errorCode:getErrorCode(a),value:b}}})}resolveObject(a,b,c){return __awaiter(this,void 0,void 0,function*(){try{const d=yield axios__default["default"].post(`${this.url}/flags/${encodeURIComponent(a)}/resolve/object`,c);return checkResponse(d,"object")?{value:d.data.value,reason:d.data.reason,variant:d.data.variant}:{value:b,reason:nodejsSdk.StandardResolutionReasons.ERROR,errorCode:nodejsSdk.ErrorCode.PARSE_ERROR}}catch(a){return {reason:nodejsSdk.StandardResolutionReasons.ERROR,errorCode:getErrorCode(a),value:b}}})}}function getErrorCode(a){var b;const c=null===(b=null===a||void 0===a?void 0:a.response)||void 0===b?void 0:b.status;let d=nodejsSdk.StandardResolutionReasons.UNKNOWN;return null!=c&&(404==c?d=nodejsSdk.ErrorCode.FLAG_NOT_FOUND:400==c&&(d=nodejsSdk.ErrorCode.TYPE_MISMATCH)),d}function checkResponse(a,b){return !!(a.data&&typeof a.data.value===b&&"string"==typeof a.data.variant&&"string"==typeof a.data.reason)}
902
+ var internalState = {
903
+ set: set,
904
+ get: get,
905
+ has: has,
906
+ enforce: enforce,
907
+ getterFor: getterFor
908
+ };
1109
909
 
1110
- var objectDefineProperties = {};
910
+ var objectGetOwnPropertyDescriptor = {};
1111
911
 
1112
- var DESCRIPTORS$1 = descriptors;
1113
- var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1114
- var definePropertyModule = objectDefineProperty;
1115
- var anObject$4 = anObject$7;
912
+ var objectPropertyIsEnumerable = {};
913
+
914
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
915
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
916
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
917
+
918
+ // Nashorn ~ JDK8 bug
919
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
920
+
921
+ // `Object.prototype.propertyIsEnumerable` method implementation
922
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
923
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
924
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
925
+ return !!descriptor && descriptor.enumerable;
926
+ } : $propertyIsEnumerable;
927
+
928
+ var DESCRIPTORS$4 = descriptors;
929
+ var call$3 = functionCall;
930
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
931
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
1116
932
  var toIndexedObject$1 = toIndexedObject$5;
1117
- var objectKeys = objectKeys$2;
933
+ var toPropertyKey = toPropertyKey$2;
934
+ var hasOwn$6 = hasOwnProperty_1;
935
+ var IE8_DOM_DEFINE = ie8DomDefine;
1118
936
 
1119
- // `Object.defineProperties` method
1120
- // https://tc39.es/ecma262/#sec-object.defineproperties
1121
- // eslint-disable-next-line es-x/no-object-defineproperties -- safe
1122
- objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1123
- anObject$4(O);
1124
- var props = toIndexedObject$1(Properties);
1125
- var keys = objectKeys(Properties);
1126
- var length = keys.length;
1127
- var index = 0;
1128
- var key;
1129
- while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1130
- return O;
937
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
938
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
939
+
940
+ // `Object.getOwnPropertyDescriptor` method
941
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
942
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$4 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
943
+ O = toIndexedObject$1(O);
944
+ P = toPropertyKey(P);
945
+ if (IE8_DOM_DEFINE) try {
946
+ return $getOwnPropertyDescriptor(O, P);
947
+ } catch (error) { /* empty */ }
948
+ if (hasOwn$6(O, P)) return createPropertyDescriptor$1(!call$3(propertyIsEnumerableModule$1.f, O, P), O[P]);
1131
949
  };
1132
950
 
1133
- var getBuiltIn = getBuiltIn$4;
951
+ var makeBuiltIn$2 = {exports: {}};
952
+
953
+ var DESCRIPTORS$3 = descriptors;
954
+ var hasOwn$5 = hasOwnProperty_1;
955
+
956
+ var FunctionPrototype = Function.prototype;
957
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
958
+ var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
959
+
960
+ var EXISTS = hasOwn$5(FunctionPrototype, 'name');
961
+ // additional protection from minified / mangled / dropped function names
962
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
963
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype, 'name').configurable));
964
+
965
+ var functionName = {
966
+ EXISTS: EXISTS,
967
+ PROPER: PROPER,
968
+ CONFIGURABLE: CONFIGURABLE
969
+ };
970
+
971
+ var fails$5 = fails$c;
972
+ var isCallable$7 = isCallable$f;
973
+ var hasOwn$4 = hasOwnProperty_1;
974
+ var DESCRIPTORS$2 = descriptors;
975
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
976
+ var inspectSource = inspectSource$2;
977
+ var InternalStateModule$1 = internalState;
978
+
979
+ var enforceInternalState = InternalStateModule$1.enforce;
980
+ var getInternalState$1 = InternalStateModule$1.get;
981
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
982
+ var defineProperty$3 = Object.defineProperty;
983
+
984
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$5(function () {
985
+ return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
986
+ });
987
+
988
+ var TEMPLATE = String(String).split('String');
1134
989
 
1135
- var html$1 = getBuiltIn('document', 'documentElement');
990
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
991
+ if (String(name).slice(0, 7) === 'Symbol(') {
992
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
993
+ }
994
+ if (options && options.getter) name = 'get ' + name;
995
+ if (options && options.setter) name = 'set ' + name;
996
+ if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
997
+ defineProperty$3(value, 'name', { value: name, configurable: true });
998
+ }
999
+ if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
1000
+ defineProperty$3(value, 'length', { value: options.arity });
1001
+ }
1002
+ try {
1003
+ if (options && hasOwn$4(options, 'constructor') && options.constructor) {
1004
+ if (DESCRIPTORS$2) defineProperty$3(value, 'prototype', { writable: false });
1005
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
1006
+ } else if (value.prototype) value.prototype = undefined;
1007
+ } catch (error) { /* empty */ }
1008
+ var state = enforceInternalState(value);
1009
+ if (!hasOwn$4(state, 'source')) {
1010
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
1011
+ } return value;
1012
+ };
1013
+
1014
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
1015
+ // eslint-disable-next-line no-extend-native -- required
1016
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
1017
+ return isCallable$7(this) && getInternalState$1(this).source || inspectSource(this);
1018
+ }, 'toString');
1019
+
1020
+ var isCallable$6 = isCallable$f;
1021
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
1022
+ var makeBuiltIn = makeBuiltIn$2.exports;
1023
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
1024
+
1025
+ var defineBuiltIn$4 = function (O, key, value, options) {
1026
+ if (!options) options = {};
1027
+ var simple = options.enumerable;
1028
+ var name = options.name !== undefined ? options.name : key;
1029
+ if (isCallable$6(value)) makeBuiltIn(value, name, options);
1030
+ if (options.global) {
1031
+ if (simple) O[key] = value;
1032
+ else defineGlobalProperty$1(key, value);
1033
+ } else {
1034
+ if (!options.unsafe) delete O[key];
1035
+ else if (O[key]) simple = true;
1036
+ if (simple) O[key] = value;
1037
+ else createNonEnumerableProperty$3(O, key, value);
1038
+ } return O;
1039
+ };
1040
+
1041
+ var objectGetOwnPropertyNames = {};
1042
+
1043
+ var internalObjectKeys = objectKeysInternal;
1044
+ var enumBugKeys = enumBugKeys$3;
1045
+
1046
+ var hiddenKeys = enumBugKeys.concat('length', 'prototype');
1047
+
1048
+ // `Object.getOwnPropertyNames` method
1049
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
1050
+ // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
1051
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1052
+ return internalObjectKeys(O, hiddenKeys);
1053
+ };
1054
+
1055
+ var objectGetOwnPropertySymbols = {};
1136
1056
 
1137
- /* global ActiveXObject -- old IE, WSH */
1057
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
1058
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1138
1059
 
1060
+ var getBuiltIn = getBuiltIn$4;
1061
+ var uncurryThis$2 = functionUncurryThis;
1062
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1063
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
1139
1064
  var anObject$3 = anObject$7;
1140
- var definePropertiesModule = objectDefineProperties;
1141
- var enumBugKeys = enumBugKeys$3;
1142
- var hiddenKeys = hiddenKeys$4;
1143
- var html = html$1;
1144
- var documentCreateElement$1 = documentCreateElement$2;
1145
- var sharedKey$1 = sharedKey$3;
1146
-
1147
- var GT = '>';
1148
- var LT = '<';
1149
- var PROTOTYPE = 'prototype';
1150
- var SCRIPT = 'script';
1151
- var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1152
1065
 
1153
- var EmptyConstructor = function () { /* empty */ };
1066
+ var concat$1 = uncurryThis$2([].concat);
1154
1067
 
1155
- var scriptTag = function (content) {
1156
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1068
+ // all object keys, includes non-enumerable and symbols
1069
+ var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
1070
+ var keys = getOwnPropertyNamesModule.f(anObject$3(it));
1071
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
1072
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
1157
1073
  };
1158
1074
 
1159
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1160
- var NullProtoObjectViaActiveX = function (activeXDocument) {
1161
- activeXDocument.write(scriptTag(''));
1162
- activeXDocument.close();
1163
- var temp = activeXDocument.parentWindow.Object;
1164
- activeXDocument = null; // avoid memory leak
1165
- return temp;
1166
- };
1075
+ var hasOwn$3 = hasOwnProperty_1;
1076
+ var ownKeys = ownKeys$1;
1077
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1078
+ var definePropertyModule = objectDefineProperty;
1167
1079
 
1168
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
1169
- var NullProtoObjectViaIFrame = function () {
1170
- // Thrash, waste and sodomy: IE GC bug
1171
- var iframe = documentCreateElement$1('iframe');
1172
- var JS = 'java' + SCRIPT + ':';
1173
- var iframeDocument;
1174
- iframe.style.display = 'none';
1175
- html.appendChild(iframe);
1176
- // https://github.com/zloirock/core-js/issues/475
1177
- iframe.src = String(JS);
1178
- iframeDocument = iframe.contentWindow.document;
1179
- iframeDocument.open();
1180
- iframeDocument.write(scriptTag('document.F=Object'));
1181
- iframeDocument.close();
1182
- return iframeDocument.F;
1080
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
1081
+ var keys = ownKeys(source);
1082
+ var defineProperty = definePropertyModule.f;
1083
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1084
+ for (var i = 0; i < keys.length; i++) {
1085
+ var key = keys[i];
1086
+ if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
1087
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1088
+ }
1089
+ }
1183
1090
  };
1184
1091
 
1185
- // Check for document.domain and active x support
1186
- // No need to use active x approach when document.domain is not set
1187
- // see https://github.com/es-shims/es5-shim/issues/150
1188
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1189
- // avoid IE GC bug
1190
- var activeXDocument;
1191
- var NullProtoObject = function () {
1192
- try {
1193
- activeXDocument = new ActiveXObject('htmlfile');
1194
- } catch (error) { /* ignore */ }
1195
- NullProtoObject = typeof document != 'undefined'
1196
- ? document.domain && activeXDocument
1197
- ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1198
- : NullProtoObjectViaIFrame()
1199
- : NullProtoObjectViaActiveX(activeXDocument); // WSH
1200
- var length = enumBugKeys.length;
1201
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1202
- return NullProtoObject();
1203
- };
1092
+ var fails$4 = fails$c;
1093
+ var isCallable$5 = isCallable$f;
1204
1094
 
1205
- hiddenKeys[IE_PROTO$1] = true;
1095
+ var replacement = /#|\.prototype\./;
1206
1096
 
1207
- // `Object.create` method
1208
- // https://tc39.es/ecma262/#sec-object.create
1209
- // eslint-disable-next-line es-x/no-object-create -- safe
1210
- var objectCreate = Object.create || function create(O, Properties) {
1211
- var result;
1212
- if (O !== null) {
1213
- EmptyConstructor[PROTOTYPE] = anObject$3(O);
1214
- result = new EmptyConstructor();
1215
- EmptyConstructor[PROTOTYPE] = null;
1216
- // add "__proto__" for Object.getPrototypeOf polyfill
1217
- result[IE_PROTO$1] = O;
1218
- } else result = NullProtoObject();
1219
- return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1097
+ var isForced$1 = function (feature, detection) {
1098
+ var value = data[normalize(feature)];
1099
+ return value == POLYFILL ? true
1100
+ : value == NATIVE ? false
1101
+ : isCallable$5(detection) ? fails$4(detection)
1102
+ : !!detection;
1220
1103
  };
1221
1104
 
1222
- var wellKnownSymbol$6 = wellKnownSymbol$8;
1223
- var create$1 = objectCreate;
1224
- var defineProperty$2 = objectDefineProperty.f;
1105
+ var normalize = isForced$1.normalize = function (string) {
1106
+ return String(string).replace(replacement, '.').toLowerCase();
1107
+ };
1225
1108
 
1226
- var UNSCOPABLES = wellKnownSymbol$6('unscopables');
1227
- var ArrayPrototype = Array.prototype;
1109
+ var data = isForced$1.data = {};
1110
+ var NATIVE = isForced$1.NATIVE = 'N';
1111
+ var POLYFILL = isForced$1.POLYFILL = 'P';
1228
1112
 
1229
- // Array.prototype[@@unscopables]
1230
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1231
- if (ArrayPrototype[UNSCOPABLES] == undefined) {
1232
- defineProperty$2(ArrayPrototype, UNSCOPABLES, {
1233
- configurable: true,
1234
- value: create$1(null)
1235
- });
1236
- }
1113
+ var isForced_1 = isForced$1;
1237
1114
 
1238
- // add a key to Array.prototype[@@unscopables]
1239
- var addToUnscopables$1 = function (key) {
1240
- ArrayPrototype[UNSCOPABLES][key] = true;
1241
- };
1115
+ var global$3 = global$c;
1116
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1117
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
1118
+ var defineBuiltIn$3 = defineBuiltIn$4;
1119
+ var defineGlobalProperty = defineGlobalProperty$3;
1120
+ var copyConstructorProperties = copyConstructorProperties$1;
1121
+ var isForced = isForced_1;
1242
1122
 
1243
- var iterators = {};
1123
+ /*
1124
+ options.target - name of the target object
1125
+ options.global - target is the global object
1126
+ options.stat - export as static methods of target
1127
+ options.proto - export as prototype methods of target
1128
+ options.real - real prototype method for the `pure` version
1129
+ options.forced - export even if the native feature is available
1130
+ options.bind - bind methods to the target, required for the `pure` version
1131
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1132
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
1133
+ options.sham - add a flag to not completely full polyfills
1134
+ options.enumerable - export as enumerable property
1135
+ options.dontCallGetSet - prevent calling a getter on target
1136
+ options.name - the .name of the function if it does not match the key
1137
+ */
1138
+ var _export = function (options, source) {
1139
+ var TARGET = options.target;
1140
+ var GLOBAL = options.global;
1141
+ var STATIC = options.stat;
1142
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1143
+ if (GLOBAL) {
1144
+ target = global$3;
1145
+ } else if (STATIC) {
1146
+ target = global$3[TARGET] || defineGlobalProperty(TARGET, {});
1147
+ } else {
1148
+ target = (global$3[TARGET] || {}).prototype;
1149
+ }
1150
+ if (target) for (key in source) {
1151
+ sourceProperty = source[key];
1152
+ if (options.dontCallGetSet) {
1153
+ descriptor = getOwnPropertyDescriptor(target, key);
1154
+ targetProperty = descriptor && descriptor.value;
1155
+ } else targetProperty = target[key];
1156
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1157
+ // contained in target
1158
+ if (!FORCED && targetProperty !== undefined) {
1159
+ if (typeof sourceProperty == typeof targetProperty) continue;
1160
+ copyConstructorProperties(sourceProperty, targetProperty);
1161
+ }
1162
+ // add a flag to not completely full polyfills
1163
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1164
+ createNonEnumerableProperty$2(sourceProperty, 'sham', true);
1165
+ }
1166
+ defineBuiltIn$3(target, key, sourceProperty, options);
1167
+ }
1168
+ };
1244
1169
 
1245
- var fails$2 = fails$c;
1170
+ var fails$3 = fails$c;
1246
1171
 
1247
- var correctPrototypeGetter = !fails$2(function () {
1172
+ var correctPrototypeGetter = !fails$3(function () {
1248
1173
  function F() { /* empty */ }
1249
1174
  F.prototype.constructor = null;
1250
1175
  // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
@@ -1253,7 +1178,7 @@ var correctPrototypeGetter = !fails$2(function () {
1253
1178
 
1254
1179
  var hasOwn$2 = hasOwnProperty_1;
1255
1180
  var isCallable$4 = isCallable$f;
1256
- var toObject = toObject$3;
1181
+ var toObject$1 = toObject$3;
1257
1182
  var sharedKey = sharedKey$3;
1258
1183
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1259
1184
 
@@ -1265,7 +1190,7 @@ var ObjectPrototype = $Object$1.prototype;
1265
1190
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1266
1191
  // eslint-disable-next-line es-x/no-object-getprototypeof -- safe
1267
1192
  var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1268
- var object = toObject(O);
1193
+ var object = toObject$1(O);
1269
1194
  if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
1270
1195
  var constructor = object.constructor;
1271
1196
  if (isCallable$4(constructor) && object instanceof constructor) {
@@ -1273,7 +1198,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
1273
1198
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1274
1199
  };
1275
1200
 
1276
- var fails$1 = fails$c;
1201
+ var fails$2 = fails$c;
1277
1202
  var isCallable$3 = isCallable$f;
1278
1203
  var getPrototypeOf$1 = objectGetPrototypeOf;
1279
1204
  var defineBuiltIn$2 = defineBuiltIn$4;
@@ -1297,7 +1222,7 @@ if ([].keys) {
1297
1222
  }
1298
1223
  }
1299
1224
 
1300
- var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$1(function () {
1225
+ var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$2(function () {
1301
1226
  var test = {};
1302
1227
  // FF44- legacy iterators case
1303
1228
  return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
@@ -1318,7 +1243,7 @@ var iteratorsCore = {
1318
1243
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1319
1244
  };
1320
1245
 
1321
- var defineProperty$1 = objectDefineProperty.f;
1246
+ var defineProperty$2 = objectDefineProperty.f;
1322
1247
  var hasOwn$1 = hasOwnProperty_1;
1323
1248
  var wellKnownSymbol$4 = wellKnownSymbol$8;
1324
1249
 
@@ -1327,7 +1252,7 @@ var TO_STRING_TAG$3 = wellKnownSymbol$4('toStringTag');
1327
1252
  var setToStringTag$2 = function (target, TAG, STATIC) {
1328
1253
  if (target && !STATIC) target = target.prototype;
1329
1254
  if (target && !hasOwn$1(target, TO_STRING_TAG$3)) {
1330
- defineProperty$1(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1255
+ defineProperty$2(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1331
1256
  }
1332
1257
  };
1333
1258
 
@@ -1359,7 +1284,7 @@ var aPossiblePrototype$1 = function (argument) {
1359
1284
 
1360
1285
  /* eslint-disable no-proto -- safe */
1361
1286
 
1362
- var uncurryThis = functionUncurryThis;
1287
+ var uncurryThis$1 = functionUncurryThis;
1363
1288
  var anObject$2 = anObject$7;
1364
1289
  var aPossiblePrototype = aPossiblePrototype$1;
1365
1290
 
@@ -1373,7 +1298,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1373
1298
  var setter;
1374
1299
  try {
1375
1300
  // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
1376
- setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1301
+ setter = uncurryThis$1(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1377
1302
  setter(test, []);
1378
1303
  CORRECT_SETTER = test instanceof Array;
1379
1304
  } catch (error) { /* empty */ }
@@ -1386,8 +1311,8 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1386
1311
  };
1387
1312
  }() : undefined);
1388
1313
 
1389
- var $$1 = _export;
1390
- var call$1 = functionCall;
1314
+ var $$2 = _export;
1315
+ var call$2 = functionCall;
1391
1316
  var FunctionName = functionName;
1392
1317
  var isCallable$1 = isCallable$f;
1393
1318
  var createIteratorConstructor = createIteratorConstructor$1;
@@ -1456,7 +1381,7 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
1456
1381
  createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1457
1382
  } else {
1458
1383
  INCORRECT_VALUES_NAME = true;
1459
- defaultIterator = function values() { return call$1(nativeIterator, this); };
1384
+ defaultIterator = function values() { return call$2(nativeIterator, this); };
1460
1385
  }
1461
1386
  }
1462
1387
 
@@ -1471,7 +1396,7 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
1471
1396
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1472
1397
  defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
1473
1398
  }
1474
- } else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1399
+ } else $$2({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1475
1400
  }
1476
1401
 
1477
1402
  // define iterator
@@ -1487,9 +1412,9 @@ var toIndexedObject = toIndexedObject$5;
1487
1412
  var addToUnscopables = addToUnscopables$1;
1488
1413
  var Iterators = iterators;
1489
1414
  var InternalStateModule = internalState;
1490
- var defineProperty = objectDefineProperty.f;
1415
+ var defineProperty$1 = objectDefineProperty.f;
1491
1416
  var defineIterator = defineIterator$1;
1492
- var DESCRIPTORS = descriptors;
1417
+ var DESCRIPTORS$1 = descriptors;
1493
1418
 
1494
1419
  var ARRAY_ITERATOR = 'Array Iterator';
1495
1420
  var setInternalState = InternalStateModule.set;
@@ -1539,8 +1464,8 @@ addToUnscopables('values');
1539
1464
  addToUnscopables('entries');
1540
1465
 
1541
1466
  // V8 ~ Chrome 45- bug
1542
- if (DESCRIPTORS && values.name !== 'values') try {
1543
- defineProperty(values, 'name', { value: 'values' });
1467
+ if (DESCRIPTORS$1 && values.name !== 'values') try {
1468
+ defineProperty$1(values, 'name', { value: 'values' });
1544
1469
  } catch (error) { /* empty */ }
1545
1470
 
1546
1471
  // iterable DOM collections
@@ -1626,12 +1551,12 @@ for (var COLLECTION_NAME in DOMIterables) {
1626
1551
 
1627
1552
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1628
1553
 
1629
- var $ = _export;
1554
+ var $$1 = _export;
1630
1555
  var global$1 = global$c;
1631
1556
 
1632
1557
  // `globalThis` object
1633
1558
  // https://tc39.es/ecma262/#sec-globalthis
1634
- $({ global: true }, {
1559
+ $$1({ global: true }, {
1635
1560
  globalThis: global$1
1636
1561
  });
1637
1562
 
@@ -4650,7 +4575,7 @@ var regexpFlags = function () {
4650
4575
  return result;
4651
4576
  };
4652
4577
 
4653
- var call = functionCall;
4578
+ var call$1 = functionCall;
4654
4579
  var hasOwn = hasOwnProperty_1;
4655
4580
  var isPrototypeOf = objectIsPrototypeOf;
4656
4581
  var regExpFlags = regexpFlags;
@@ -4660,21 +4585,21 @@ var RegExpPrototype$1 = RegExp.prototype;
4660
4585
  var regexpGetFlags = function (R) {
4661
4586
  var flags = R.flags;
4662
4587
  return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
4663
- ? call(regExpFlags, R) : flags;
4588
+ ? call$1(regExpFlags, R) : flags;
4664
4589
  };
4665
4590
 
4666
4591
  var PROPER_FUNCTION_NAME = functionName.PROPER;
4667
4592
  var defineBuiltIn = defineBuiltIn$4;
4668
4593
  var anObject = anObject$7;
4669
4594
  var $toString = toString;
4670
- var fails = fails$c;
4595
+ var fails$1 = fails$c;
4671
4596
  var getRegExpFlags = regexpGetFlags;
4672
4597
 
4673
4598
  var TO_STRING = 'toString';
4674
4599
  var RegExpPrototype = RegExp.prototype;
4675
4600
  var n$ToString = RegExpPrototype[TO_STRING];
4676
4601
 
4677
- var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
4602
+ var NOT_GENERIC = fails$1(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
4678
4603
  // FF44- RegExp#toString has a wrong name
4679
4604
  var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;
4680
4605
 
@@ -4806,8 +4731,78 @@ class ResolveObjectResponse$Type extends MessageType{constructor(){super("schema
4806
4731
  * @generated from protobuf rpc: ResolveObject(schema.v1.ResolveObjectRequest) returns (schema.v1.ResolveObjectResponse);
4807
4732
  */resolveObject(a,b){const c=this.methods[4],d=this._transport.mergeOptions(b);return stackIntercept("unary",this._transport,c,d,a)}}
4808
4733
 
4809
- class GRPCService{constructor(a){const{host:b,port:c}=a;this.client=new ServiceClient(new grpcTransport.GrpcTransport({host:`${b}:${c}`,channelCredentials:grpc__namespace.credentials.createInsecure()}));}resolveBoolean(a,b,c){var d;return __awaiter(this,void 0,void 0,function*(){try{const{response:b}=yield this.client.resolveBoolean({flagKey:a,context:Struct.fromJsonString(JSON.stringify(c))});return {value:b.value,reason:b.reason,variant:b.variant}}catch(a){return {reason:nodejsSdk.StandardResolutionReasons.ERROR,errorCode:null!==(d=null===a||void 0===a?void 0:a.code)&&void 0!==d?d:nodejsSdk.StandardResolutionReasons.UNKNOWN,value:b}}})}resolveString(a,b,c){var d;return __awaiter(this,void 0,void 0,function*(){try{const{response:b}=yield this.client.resolveString({flagKey:a,context:Struct.fromJsonString(JSON.stringify(c))});return {value:b.value,reason:b.reason,variant:b.variant}}catch(a){return {reason:nodejsSdk.StandardResolutionReasons.ERROR,errorCode:null!==(d=null===a||void 0===a?void 0:a.code)&&void 0!==d?d:nodejsSdk.StandardResolutionReasons.UNKNOWN,value:b}}})}resolveNumber(a,b,c){var d;return __awaiter(this,void 0,void 0,function*(){try{const{response:b}=yield this.client.resolveFloat({flagKey:a,context:Struct.fromJsonString(JSON.stringify(c))});return {value:b.value,reason:b.reason,variant:b.variant}}catch(a){return {reason:nodejsSdk.StandardResolutionReasons.ERROR,errorCode:null!==(d=null===a||void 0===a?void 0:a.code)&&void 0!==d?d:nodejsSdk.StandardResolutionReasons.UNKNOWN,value:b}}})}resolveObject(a,b,c){var d;return __awaiter(this,void 0,void 0,function*(){try{const{response:b}=yield this.client.resolveObject({flagKey:a,context:Struct.fromJsonString(JSON.stringify(c))});return {value:b.value,reason:b.reason,variant:b.variant}}catch(a){return {reason:nodejsSdk.StandardResolutionReasons.ERROR,errorCode:null!==(d=null===a||void 0===a?void 0:a.code)&&void 0!==d?d:nodejsSdk.StandardResolutionReasons.UNKNOWN,value:b}}})}}
4734
+ class GRPCService{constructor(a,b){const{host:c,port:d,tls:e,socketPath:f}=a;this.client=b?b:new ServiceClient(new grpcTransport.GrpcTransport({host:f?`unix://${f}`:`${c}:${d}`,channelCredentials:e?grpc__namespace.credentials.createSsl():grpc__namespace.credentials.createInsecure()}));}resolveBoolean(a,b){return __awaiter(this,void 0,void 0,function*(){const{response:c}=yield this.client.resolveBoolean({flagKey:a,context:this.convertContext(b)});return {value:c.value,reason:c.reason,variant:c.variant}})}resolveString(a,b){return __awaiter(this,void 0,void 0,function*(){const{response:c}=yield this.client.resolveString({flagKey:a,context:this.convertContext(b)});return {value:c.value,reason:c.reason,variant:c.variant}})}resolveNumber(a,b){return __awaiter(this,void 0,void 0,function*(){const{response:c}=yield this.client.resolveFloat({flagKey:a,context:this.convertContext(b)});return {value:c.value,reason:c.reason,variant:c.variant}})}resolveObject(a,b){return __awaiter(this,void 0,void 0,function*(){const{response:c}=yield this.client.resolveObject({flagKey:a,context:this.convertContext(b)});if(c.value!==void 0)return {value:Struct.toJson(c.value),reason:c.reason,variant:c.variant};throw new jsSdk.ParseError("Object value undefined or missing.")})}convertContext(a){// JsonObject closely matches EvaluationContext, this is a safe cast.
4735
+ try{return Struct.fromJson(a)}catch(a){throw new jsSdk.ParseError(`Error serializing context.`)}}}
4736
+
4737
+ var DESCRIPTORS = descriptors;
4738
+ var uncurryThis = functionUncurryThis;
4739
+ var call = functionCall;
4740
+ var fails = fails$c;
4741
+ var objectKeys = objectKeys$2;
4742
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
4743
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
4744
+ var toObject = toObject$3;
4745
+ var IndexedObject = indexedObject;
4746
+
4747
+ // eslint-disable-next-line es-x/no-object-assign -- safe
4748
+ var $assign = Object.assign;
4749
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
4750
+ var defineProperty = Object.defineProperty;
4751
+ var concat = uncurryThis([].concat);
4752
+
4753
+ // `Object.assign` method
4754
+ // https://tc39.es/ecma262/#sec-object.assign
4755
+ var objectAssign = !$assign || fails(function () {
4756
+ // should have correct order of operations (Edge bug)
4757
+ if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
4758
+ enumerable: true,
4759
+ get: function () {
4760
+ defineProperty(this, 'b', {
4761
+ value: 3,
4762
+ enumerable: false
4763
+ });
4764
+ }
4765
+ }), { b: 2 })).b !== 1) return true;
4766
+ // should work with symbols and should have deterministic property order (V8 bug)
4767
+ var A = {};
4768
+ var B = {};
4769
+ // eslint-disable-next-line es-x/no-symbol -- safe
4770
+ var symbol = Symbol();
4771
+ var alphabet = 'abcdefghijklmnopqrst';
4772
+ A[symbol] = 7;
4773
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
4774
+ return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
4775
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
4776
+ var T = toObject(target);
4777
+ var argumentsLength = arguments.length;
4778
+ var index = 1;
4779
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
4780
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
4781
+ while (argumentsLength > index) {
4782
+ var S = IndexedObject(arguments[index++]);
4783
+ var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
4784
+ var length = keys.length;
4785
+ var j = 0;
4786
+ var key;
4787
+ while (length > j) {
4788
+ key = keys[j++];
4789
+ if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
4790
+ }
4791
+ } return T;
4792
+ } : $assign;
4793
+
4794
+ var $ = _export;
4795
+ var assign = objectAssign;
4796
+
4797
+ // `Object.assign` method
4798
+ // https://tc39.es/ecma262/#sec-object.assign
4799
+ // eslint-disable-next-line es-x/no-object-assign -- required for testing
4800
+ $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
4801
+ assign: assign
4802
+ });
4803
+
4804
+ const DEFAULT_CONFIG={host:"localhost",port:8013,tls:!1};var ENV_VAR;(function(a){a.FLAGD_HOST="FLAGD_HOST",a.FLAGD_PORT="FLAGD_PORT",a.FLAGD_TLS="FLAGD_TLS",a.FLAGD_SOCKET_PATH="FLAGD_SOCKET_PATH";})(ENV_VAR||(ENV_VAR={}));const getEnvVarConfig=()=>{var a;return Object.assign(Object.assign(Object.assign(Object.assign({},process.env[ENV_VAR.FLAGD_HOST]&&{host:process.env[ENV_VAR.FLAGD_HOST]}),+process.env[ENV_VAR.FLAGD_PORT]&&{port:+process.env[ENV_VAR.FLAGD_PORT]}),process.env[ENV_VAR.FLAGD_TLS]&&{tls:"true"===(null===(a=process.env[ENV_VAR.FLAGD_TLS])||void 0===a?void 0:a.toLowerCase())}),process.env[ENV_VAR.FLAGD_SOCKET_PATH]&&{socketPath:process.env[ENV_VAR.FLAGD_SOCKET_PATH]})};function getConfig(a={}){return Object.assign(Object.assign(Object.assign({},DEFAULT_CONFIG),getEnvVarConfig()),a)}
4810
4805
 
4811
- class FlagdProvider{constructor(a){this.metadata={name:"flagD Provider"};const{service:b,host:c,port:d,protocol:e}=Object.assign({service:"http",host:"localhost",port:8013,protocol:"http"},a);this.service="http"===b?new HTTPService({host:c,port:d,protocol:e}):new GRPCService({host:c,port:d});}resolveBooleanEvaluation(a,b,c){return this.service.resolveBoolean(a,b,c)}resolveStringEvaluation(a,b,c){return this.service.resolveString(a,b,c)}resolveNumberEvaluation(a,b,c){return this.service.resolveNumber(a,b,c)}resolveObjectEvaluation(a,b,c){return this.service.resolveObject(a,b,c)}}
4806
+ class FlagdProvider{constructor(a,b){this.metadata={name:"flagd Provider"},this._service=b?b:new GRPCService(getConfig(a));}resolveBooleanEvaluation(a,b,c){return this._service.resolveBoolean(a,c)}resolveStringEvaluation(a,b,c){return this._service.resolveString(a,c)}resolveNumberEvaluation(a,b,c){return this._service.resolveNumber(a,c)}resolveObjectEvaluation(a,b,c){return this._service.resolveObject(a,c)}}
4812
4807
 
4813
4808
  exports.FlagdProvider = FlagdProvider;