@openfeature/flagd-provider 0.2.1 → 0.3.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/README.md +2 -2
- package/index.cjs +285 -171
- package/index.js +285 -171
- package/lib/flagd-provider.d.ts +2 -2
- package/lib/service/http/service.d.ts +2 -2
- package/package.json +1 -1
- package/proto/ts/schema/v1/schema.client.d.ts +16 -6
- package/proto/ts/schema/v1/schema.d.ts +67 -17
package/index.js
CHANGED
|
@@ -22,7 +22,7 @@ var global$c =
|
|
|
22
22
|
|
|
23
23
|
var objectGetOwnPropertyDescriptor = {};
|
|
24
24
|
|
|
25
|
-
var fails$
|
|
25
|
+
var fails$c = function (exec) {
|
|
26
26
|
try {
|
|
27
27
|
return !!exec();
|
|
28
28
|
} catch (error) {
|
|
@@ -30,17 +30,17 @@ var fails$b = function (exec) {
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
var fails$
|
|
33
|
+
var fails$b = fails$c;
|
|
34
34
|
|
|
35
35
|
// Detect IE8's incomplete defineProperty implementation
|
|
36
|
-
var descriptors = !fails$
|
|
36
|
+
var descriptors = !fails$b(function () {
|
|
37
37
|
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
38
38
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
var fails$
|
|
41
|
+
var fails$a = fails$c;
|
|
42
42
|
|
|
43
|
-
var functionBindNative = !fails$
|
|
43
|
+
var functionBindNative = !fails$a(function () {
|
|
44
44
|
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
|
45
45
|
var test = (function () { /* empty */ }).bind();
|
|
46
46
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
@@ -49,10 +49,10 @@ var functionBindNative = !fails$9(function () {
|
|
|
49
49
|
|
|
50
50
|
var NATIVE_BIND$1 = functionBindNative;
|
|
51
51
|
|
|
52
|
-
var call$
|
|
52
|
+
var call$7 = Function.prototype.call;
|
|
53
53
|
|
|
54
|
-
var functionCall = NATIVE_BIND$1 ? call$
|
|
55
|
-
return call$
|
|
54
|
+
var functionCall = NATIVE_BIND$1 ? call$7.bind(call$7) : function () {
|
|
55
|
+
return call$7.apply(call$7, arguments);
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
var objectPropertyIsEnumerable = {};
|
|
@@ -84,41 +84,41 @@ var NATIVE_BIND = functionBindNative;
|
|
|
84
84
|
|
|
85
85
|
var FunctionPrototype$1 = Function.prototype;
|
|
86
86
|
var bind = FunctionPrototype$1.bind;
|
|
87
|
-
var call$
|
|
88
|
-
var uncurryThis$b = NATIVE_BIND && bind.bind(call$
|
|
87
|
+
var call$6 = FunctionPrototype$1.call;
|
|
88
|
+
var uncurryThis$b = NATIVE_BIND && bind.bind(call$6, call$6);
|
|
89
89
|
|
|
90
90
|
var functionUncurryThis = NATIVE_BIND ? function (fn) {
|
|
91
91
|
return fn && uncurryThis$b(fn);
|
|
92
92
|
} : function (fn) {
|
|
93
93
|
return fn && function () {
|
|
94
|
-
return call$
|
|
94
|
+
return call$6.apply(fn, arguments);
|
|
95
95
|
};
|
|
96
96
|
};
|
|
97
97
|
|
|
98
98
|
var uncurryThis$a = functionUncurryThis;
|
|
99
99
|
|
|
100
|
-
var toString$
|
|
100
|
+
var toString$2 = uncurryThis$a({}.toString);
|
|
101
101
|
var stringSlice = uncurryThis$a(''.slice);
|
|
102
102
|
|
|
103
|
-
var classofRaw = function (it) {
|
|
104
|
-
return stringSlice(toString$
|
|
103
|
+
var classofRaw$1 = function (it) {
|
|
104
|
+
return stringSlice(toString$2(it), 8, -1);
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
var uncurryThis$9 = functionUncurryThis;
|
|
108
|
-
var fails$
|
|
109
|
-
var classof = classofRaw;
|
|
108
|
+
var fails$9 = fails$c;
|
|
109
|
+
var classof$2 = classofRaw$1;
|
|
110
110
|
|
|
111
|
-
var $Object$
|
|
111
|
+
var $Object$4 = Object;
|
|
112
112
|
var split = uncurryThis$9(''.split);
|
|
113
113
|
|
|
114
114
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
115
|
-
var indexedObject = fails$
|
|
115
|
+
var indexedObject = fails$9(function () {
|
|
116
116
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
117
117
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
118
|
-
return !$Object$
|
|
118
|
+
return !$Object$4('z').propertyIsEnumerable(0);
|
|
119
119
|
}) ? function (it) {
|
|
120
|
-
return classof(it) == 'String' ? split(it, '') : $Object$
|
|
121
|
-
} : $Object$
|
|
120
|
+
return classof$2(it) == 'String' ? split(it, '') : $Object$4(it);
|
|
121
|
+
} : $Object$4;
|
|
122
122
|
|
|
123
123
|
var $TypeError$6 = TypeError;
|
|
124
124
|
|
|
@@ -139,21 +139,21 @@ var toIndexedObject$5 = function (it) {
|
|
|
139
139
|
|
|
140
140
|
// `IsCallable` abstract operation
|
|
141
141
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
142
|
-
var isCallable$
|
|
142
|
+
var isCallable$f = function (argument) {
|
|
143
143
|
return typeof argument == 'function';
|
|
144
144
|
};
|
|
145
145
|
|
|
146
|
-
var isCallable$
|
|
146
|
+
var isCallable$e = isCallable$f;
|
|
147
147
|
|
|
148
148
|
var isObject$5 = function (it) {
|
|
149
|
-
return typeof it == 'object' ? it !== null : isCallable$
|
|
149
|
+
return typeof it == 'object' ? it !== null : isCallable$e(it);
|
|
150
150
|
};
|
|
151
151
|
|
|
152
152
|
var global$b = global$c;
|
|
153
|
-
var isCallable$
|
|
153
|
+
var isCallable$d = isCallable$f;
|
|
154
154
|
|
|
155
155
|
var aFunction = function (argument) {
|
|
156
|
-
return isCallable$
|
|
156
|
+
return isCallable$d(argument) ? argument : undefined;
|
|
157
157
|
};
|
|
158
158
|
|
|
159
159
|
var getBuiltIn$4 = function (namespace, method) {
|
|
@@ -199,10 +199,10 @@ var engineV8Version = version;
|
|
|
199
199
|
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
200
200
|
|
|
201
201
|
var V8_VERSION = engineV8Version;
|
|
202
|
-
var fails$
|
|
202
|
+
var fails$8 = fails$c;
|
|
203
203
|
|
|
204
204
|
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
|
205
|
-
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$
|
|
205
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$8(function () {
|
|
206
206
|
var symbol = Symbol();
|
|
207
207
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
208
208
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -220,37 +220,37 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
|
220
220
|
&& typeof Symbol.iterator == 'symbol';
|
|
221
221
|
|
|
222
222
|
var getBuiltIn$2 = getBuiltIn$4;
|
|
223
|
-
var isCallable$
|
|
224
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
223
|
+
var isCallable$c = isCallable$f;
|
|
224
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
225
225
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
226
226
|
|
|
227
|
-
var $Object$
|
|
227
|
+
var $Object$3 = Object;
|
|
228
228
|
|
|
229
229
|
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
230
230
|
return typeof it == 'symbol';
|
|
231
231
|
} : function (it) {
|
|
232
232
|
var $Symbol = getBuiltIn$2('Symbol');
|
|
233
|
-
return isCallable$
|
|
233
|
+
return isCallable$c($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$3(it));
|
|
234
234
|
};
|
|
235
235
|
|
|
236
|
-
var $String$
|
|
236
|
+
var $String$3 = String;
|
|
237
237
|
|
|
238
238
|
var tryToString$1 = function (argument) {
|
|
239
239
|
try {
|
|
240
|
-
return $String$
|
|
240
|
+
return $String$3(argument);
|
|
241
241
|
} catch (error) {
|
|
242
242
|
return 'Object';
|
|
243
243
|
}
|
|
244
244
|
};
|
|
245
245
|
|
|
246
|
-
var isCallable$
|
|
246
|
+
var isCallable$b = isCallable$f;
|
|
247
247
|
var tryToString = tryToString$1;
|
|
248
248
|
|
|
249
249
|
var $TypeError$5 = TypeError;
|
|
250
250
|
|
|
251
251
|
// `Assert: IsCallable(argument) is true`
|
|
252
252
|
var aCallable$1 = function (argument) {
|
|
253
|
-
if (isCallable$
|
|
253
|
+
if (isCallable$b(argument)) return argument;
|
|
254
254
|
throw $TypeError$5(tryToString(argument) + ' is not a function');
|
|
255
255
|
};
|
|
256
256
|
|
|
@@ -263,8 +263,8 @@ var getMethod$1 = function (V, P) {
|
|
|
263
263
|
return func == null ? undefined : aCallable(func);
|
|
264
264
|
};
|
|
265
265
|
|
|
266
|
-
var call$
|
|
267
|
-
var isCallable$
|
|
266
|
+
var call$5 = functionCall;
|
|
267
|
+
var isCallable$a = isCallable$f;
|
|
268
268
|
var isObject$4 = isObject$5;
|
|
269
269
|
|
|
270
270
|
var $TypeError$4 = TypeError;
|
|
@@ -273,9 +273,9 @@ var $TypeError$4 = TypeError;
|
|
|
273
273
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
274
274
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
275
275
|
var fn, val;
|
|
276
|
-
if (pref === 'string' && isCallable$
|
|
277
|
-
if (isCallable$
|
|
278
|
-
if (pref !== 'string' && isCallable$
|
|
276
|
+
if (pref === 'string' && isCallable$a(fn = input.toString) && !isObject$4(val = call$5(fn, input))) return val;
|
|
277
|
+
if (isCallable$a(fn = input.valueOf) && !isObject$4(val = call$5(fn, input))) return val;
|
|
278
|
+
if (pref !== 'string' && isCallable$a(fn = input.toString) && !isObject$4(val = call$5(fn, input))) return val;
|
|
279
279
|
throw $TypeError$4("Can't convert object to primitive value");
|
|
280
280
|
};
|
|
281
281
|
|
|
@@ -316,12 +316,12 @@ var store$2 = sharedStore;
|
|
|
316
316
|
|
|
317
317
|
var requireObjectCoercible = requireObjectCoercible$2;
|
|
318
318
|
|
|
319
|
-
var $Object$
|
|
319
|
+
var $Object$2 = Object;
|
|
320
320
|
|
|
321
321
|
// `ToObject` abstract operation
|
|
322
322
|
// https://tc39.es/ecma262/#sec-toobject
|
|
323
323
|
var toObject$3 = function (argument) {
|
|
324
|
-
return $Object$
|
|
324
|
+
return $Object$2(requireObjectCoercible(argument));
|
|
325
325
|
};
|
|
326
326
|
|
|
327
327
|
var uncurryThis$7 = functionUncurryThis;
|
|
@@ -340,15 +340,15 @@ var uncurryThis$6 = functionUncurryThis;
|
|
|
340
340
|
|
|
341
341
|
var id = 0;
|
|
342
342
|
var postfix = Math.random();
|
|
343
|
-
var toString = uncurryThis$6(1.0.toString);
|
|
343
|
+
var toString$1 = uncurryThis$6(1.0.toString);
|
|
344
344
|
|
|
345
345
|
var uid$2 = function (key) {
|
|
346
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
346
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);
|
|
347
347
|
};
|
|
348
348
|
|
|
349
349
|
var global$7 = global$c;
|
|
350
350
|
var shared$2 = shared$3.exports;
|
|
351
|
-
var hasOwn$
|
|
351
|
+
var hasOwn$9 = hasOwnProperty_1;
|
|
352
352
|
var uid$1 = uid$2;
|
|
353
353
|
var NATIVE_SYMBOL = nativeSymbol;
|
|
354
354
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
@@ -358,10 +358,10 @@ var Symbol$1 = global$7.Symbol;
|
|
|
358
358
|
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
359
359
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
360
360
|
|
|
361
|
-
var wellKnownSymbol$
|
|
362
|
-
if (!hasOwn$
|
|
361
|
+
var wellKnownSymbol$8 = function (name) {
|
|
362
|
+
if (!hasOwn$9(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
363
363
|
var description = 'Symbol.' + name;
|
|
364
|
-
if (NATIVE_SYMBOL && hasOwn$
|
|
364
|
+
if (NATIVE_SYMBOL && hasOwn$9(Symbol$1, name)) {
|
|
365
365
|
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
366
366
|
} else if (USE_SYMBOL_AS_UID && symbolFor) {
|
|
367
367
|
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
@@ -371,15 +371,15 @@ var wellKnownSymbol$6 = function (name) {
|
|
|
371
371
|
} return WellKnownSymbolsStore[name];
|
|
372
372
|
};
|
|
373
373
|
|
|
374
|
-
var call$
|
|
374
|
+
var call$4 = functionCall;
|
|
375
375
|
var isObject$3 = isObject$5;
|
|
376
376
|
var isSymbol$1 = isSymbol$2;
|
|
377
377
|
var getMethod = getMethod$1;
|
|
378
378
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
379
|
-
var wellKnownSymbol$
|
|
379
|
+
var wellKnownSymbol$7 = wellKnownSymbol$8;
|
|
380
380
|
|
|
381
381
|
var $TypeError$3 = TypeError;
|
|
382
|
-
var TO_PRIMITIVE = wellKnownSymbol$
|
|
382
|
+
var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
|
|
383
383
|
|
|
384
384
|
// `ToPrimitive` abstract operation
|
|
385
385
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
@@ -389,7 +389,7 @@ var toPrimitive$1 = function (input, pref) {
|
|
|
389
389
|
var result;
|
|
390
390
|
if (exoticToPrim) {
|
|
391
391
|
if (pref === undefined) pref = 'default';
|
|
392
|
-
result = call$
|
|
392
|
+
result = call$4(exoticToPrim, input, pref);
|
|
393
393
|
if (!isObject$3(result) || isSymbol$1(result)) return result;
|
|
394
394
|
throw $TypeError$3("Can't convert object to primitive value");
|
|
395
395
|
}
|
|
@@ -419,11 +419,11 @@ var documentCreateElement$2 = function (it) {
|
|
|
419
419
|
};
|
|
420
420
|
|
|
421
421
|
var DESCRIPTORS$9 = descriptors;
|
|
422
|
-
var fails$
|
|
422
|
+
var fails$7 = fails$c;
|
|
423
423
|
var createElement = documentCreateElement$2;
|
|
424
424
|
|
|
425
425
|
// Thanks to IE8 for its funny defineProperty
|
|
426
|
-
var ie8DomDefine = !DESCRIPTORS$9 && !fails$
|
|
426
|
+
var ie8DomDefine = !DESCRIPTORS$9 && !fails$7(function () {
|
|
427
427
|
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
428
428
|
return Object.defineProperty(createElement('div'), 'a', {
|
|
429
429
|
get: function () { return 7; }
|
|
@@ -431,12 +431,12 @@ var ie8DomDefine = !DESCRIPTORS$9 && !fails$6(function () {
|
|
|
431
431
|
});
|
|
432
432
|
|
|
433
433
|
var DESCRIPTORS$8 = descriptors;
|
|
434
|
-
var call$
|
|
434
|
+
var call$3 = functionCall;
|
|
435
435
|
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
436
436
|
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
437
437
|
var toIndexedObject$4 = toIndexedObject$5;
|
|
438
438
|
var toPropertyKey$1 = toPropertyKey$2;
|
|
439
|
-
var hasOwn$
|
|
439
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
440
440
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
441
441
|
|
|
442
442
|
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
@@ -450,17 +450,17 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 :
|
|
|
450
450
|
if (IE8_DOM_DEFINE$1) try {
|
|
451
451
|
return $getOwnPropertyDescriptor$1(O, P);
|
|
452
452
|
} catch (error) { /* empty */ }
|
|
453
|
-
if (hasOwn$
|
|
453
|
+
if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$3(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
454
454
|
};
|
|
455
455
|
|
|
456
456
|
var objectDefineProperty = {};
|
|
457
457
|
|
|
458
458
|
var DESCRIPTORS$7 = descriptors;
|
|
459
|
-
var fails$
|
|
459
|
+
var fails$6 = fails$c;
|
|
460
460
|
|
|
461
461
|
// V8 ~ Chrome 36-
|
|
462
462
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
463
|
-
var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$
|
|
463
|
+
var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$6(function () {
|
|
464
464
|
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
465
465
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
466
466
|
value: 42,
|
|
@@ -470,19 +470,19 @@ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$5(function () {
|
|
|
470
470
|
|
|
471
471
|
var isObject$1 = isObject$5;
|
|
472
472
|
|
|
473
|
-
var $String$
|
|
473
|
+
var $String$2 = String;
|
|
474
474
|
var $TypeError$2 = TypeError;
|
|
475
475
|
|
|
476
476
|
// `Assert: Type(argument) is Object`
|
|
477
|
-
var anObject$
|
|
477
|
+
var anObject$7 = function (argument) {
|
|
478
478
|
if (isObject$1(argument)) return argument;
|
|
479
|
-
throw $TypeError$2($String$
|
|
479
|
+
throw $TypeError$2($String$2(argument) + ' is not an object');
|
|
480
480
|
};
|
|
481
481
|
|
|
482
482
|
var DESCRIPTORS$6 = descriptors;
|
|
483
483
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
484
484
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
485
|
-
var anObject$
|
|
485
|
+
var anObject$6 = anObject$7;
|
|
486
486
|
var toPropertyKey = toPropertyKey$2;
|
|
487
487
|
|
|
488
488
|
var $TypeError$1 = TypeError;
|
|
@@ -497,9 +497,9 @@ var WRITABLE = 'writable';
|
|
|
497
497
|
// `Object.defineProperty` method
|
|
498
498
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
499
499
|
objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
500
|
-
anObject$
|
|
500
|
+
anObject$6(O);
|
|
501
501
|
P = toPropertyKey(P);
|
|
502
|
-
anObject$
|
|
502
|
+
anObject$6(Attributes);
|
|
503
503
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
504
504
|
var current = $getOwnPropertyDescriptor(O, P);
|
|
505
505
|
if (current && current[WRITABLE]) {
|
|
@@ -512,9 +512,9 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
512
512
|
}
|
|
513
513
|
} return $defineProperty(O, P, Attributes);
|
|
514
514
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
515
|
-
anObject$
|
|
515
|
+
anObject$6(O);
|
|
516
516
|
P = toPropertyKey(P);
|
|
517
|
-
anObject$
|
|
517
|
+
anObject$6(Attributes);
|
|
518
518
|
if (IE8_DOM_DEFINE) try {
|
|
519
519
|
return $defineProperty(O, P, Attributes);
|
|
520
520
|
} catch (error) { /* empty */ }
|
|
@@ -537,13 +537,13 @@ var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value
|
|
|
537
537
|
var makeBuiltIn$2 = {exports: {}};
|
|
538
538
|
|
|
539
539
|
var DESCRIPTORS$4 = descriptors;
|
|
540
|
-
var hasOwn$
|
|
540
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
541
541
|
|
|
542
542
|
var FunctionPrototype = Function.prototype;
|
|
543
543
|
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
544
544
|
var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
|
|
545
545
|
|
|
546
|
-
var EXISTS = hasOwn$
|
|
546
|
+
var EXISTS = hasOwn$7(FunctionPrototype, 'name');
|
|
547
547
|
// additional protection from minified / mangled / dropped function names
|
|
548
548
|
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
549
549
|
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
@@ -555,13 +555,13 @@ var functionName = {
|
|
|
555
555
|
};
|
|
556
556
|
|
|
557
557
|
var uncurryThis$5 = functionUncurryThis;
|
|
558
|
-
var isCallable$
|
|
558
|
+
var isCallable$9 = isCallable$f;
|
|
559
559
|
var store$1 = sharedStore;
|
|
560
560
|
|
|
561
561
|
var functionToString = uncurryThis$5(Function.toString);
|
|
562
562
|
|
|
563
563
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
564
|
-
if (!isCallable$
|
|
564
|
+
if (!isCallable$9(store$1.inspectSource)) {
|
|
565
565
|
store$1.inspectSource = function (it) {
|
|
566
566
|
return functionToString(it);
|
|
567
567
|
};
|
|
@@ -570,12 +570,12 @@ if (!isCallable$8(store$1.inspectSource)) {
|
|
|
570
570
|
var inspectSource$2 = store$1.inspectSource;
|
|
571
571
|
|
|
572
572
|
var global$5 = global$c;
|
|
573
|
-
var isCallable$
|
|
573
|
+
var isCallable$8 = isCallable$f;
|
|
574
574
|
var inspectSource$1 = inspectSource$2;
|
|
575
575
|
|
|
576
576
|
var WeakMap$1 = global$5.WeakMap;
|
|
577
577
|
|
|
578
|
-
var nativeWeakMap = isCallable$
|
|
578
|
+
var nativeWeakMap = isCallable$8(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
|
|
579
579
|
|
|
580
580
|
var shared$1 = shared$3.exports;
|
|
581
581
|
var uid = uid$2;
|
|
@@ -593,7 +593,7 @@ var global$4 = global$c;
|
|
|
593
593
|
var uncurryThis$4 = functionUncurryThis;
|
|
594
594
|
var isObject = isObject$5;
|
|
595
595
|
var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
|
|
596
|
-
var hasOwn$
|
|
596
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
597
597
|
var shared = sharedStore;
|
|
598
598
|
var sharedKey$2 = sharedKey$3;
|
|
599
599
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
@@ -637,16 +637,16 @@ if (NATIVE_WEAK_MAP || shared.state) {
|
|
|
637
637
|
var STATE = sharedKey$2('state');
|
|
638
638
|
hiddenKeys$3[STATE] = true;
|
|
639
639
|
set = function (it, metadata) {
|
|
640
|
-
if (hasOwn$
|
|
640
|
+
if (hasOwn$6(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
641
641
|
metadata.facade = it;
|
|
642
642
|
createNonEnumerableProperty$4(it, STATE, metadata);
|
|
643
643
|
return metadata;
|
|
644
644
|
};
|
|
645
645
|
get = function (it) {
|
|
646
|
-
return hasOwn$
|
|
646
|
+
return hasOwn$6(it, STATE) ? it[STATE] : {};
|
|
647
647
|
};
|
|
648
648
|
has = function (it) {
|
|
649
|
-
return hasOwn$
|
|
649
|
+
return hasOwn$6(it, STATE);
|
|
650
650
|
};
|
|
651
651
|
}
|
|
652
652
|
|
|
@@ -658,9 +658,9 @@ var internalState = {
|
|
|
658
658
|
getterFor: getterFor
|
|
659
659
|
};
|
|
660
660
|
|
|
661
|
-
var fails$
|
|
662
|
-
var isCallable$
|
|
663
|
-
var hasOwn$
|
|
661
|
+
var fails$5 = fails$c;
|
|
662
|
+
var isCallable$7 = isCallable$f;
|
|
663
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
664
664
|
var DESCRIPTORS$3 = descriptors;
|
|
665
665
|
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
666
666
|
var inspectSource = inspectSource$2;
|
|
@@ -671,7 +671,7 @@ var getInternalState$1 = InternalStateModule$1.get;
|
|
|
671
671
|
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
672
672
|
var defineProperty$4 = Object.defineProperty;
|
|
673
673
|
|
|
674
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$
|
|
674
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$5(function () {
|
|
675
675
|
return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
676
676
|
});
|
|
677
677
|
|
|
@@ -683,20 +683,20 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
|
683
683
|
}
|
|
684
684
|
if (options && options.getter) name = 'get ' + name;
|
|
685
685
|
if (options && options.setter) name = 'set ' + name;
|
|
686
|
-
if (!hasOwn$
|
|
686
|
+
if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
687
687
|
defineProperty$4(value, 'name', { value: name, configurable: true });
|
|
688
688
|
}
|
|
689
|
-
if (CONFIGURABLE_LENGTH && options && hasOwn$
|
|
689
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) {
|
|
690
690
|
defineProperty$4(value, 'length', { value: options.arity });
|
|
691
691
|
}
|
|
692
692
|
try {
|
|
693
|
-
if (options && hasOwn$
|
|
693
|
+
if (options && hasOwn$5(options, 'constructor') && options.constructor) {
|
|
694
694
|
if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
|
|
695
695
|
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
696
696
|
} else if (value.prototype) value.prototype = undefined;
|
|
697
697
|
} catch (error) { /* empty */ }
|
|
698
698
|
var state = enforceInternalState(value);
|
|
699
|
-
if (!hasOwn$
|
|
699
|
+
if (!hasOwn$5(state, 'source')) {
|
|
700
700
|
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
701
701
|
} return value;
|
|
702
702
|
};
|
|
@@ -704,19 +704,19 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
|
704
704
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
705
705
|
// eslint-disable-next-line no-extend-native -- required
|
|
706
706
|
Function.prototype.toString = makeBuiltIn$1(function toString() {
|
|
707
|
-
return isCallable$
|
|
707
|
+
return isCallable$7(this) && getInternalState$1(this).source || inspectSource(this);
|
|
708
708
|
}, 'toString');
|
|
709
709
|
|
|
710
|
-
var isCallable$
|
|
710
|
+
var isCallable$6 = isCallable$f;
|
|
711
711
|
var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
|
|
712
712
|
var makeBuiltIn = makeBuiltIn$2.exports;
|
|
713
713
|
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
714
714
|
|
|
715
|
-
var defineBuiltIn$
|
|
715
|
+
var defineBuiltIn$4 = function (O, key, value, options) {
|
|
716
716
|
if (!options) options = {};
|
|
717
717
|
var simple = options.enumerable;
|
|
718
718
|
var name = options.name !== undefined ? options.name : key;
|
|
719
|
-
if (isCallable$
|
|
719
|
+
if (isCallable$6(value)) makeBuiltIn(value, name, options);
|
|
720
720
|
if (options.global) {
|
|
721
721
|
if (simple) O[key] = value;
|
|
722
722
|
else defineGlobalProperty$1(key, value);
|
|
@@ -816,7 +816,7 @@ var arrayIncludes = {
|
|
|
816
816
|
};
|
|
817
817
|
|
|
818
818
|
var uncurryThis$3 = functionUncurryThis;
|
|
819
|
-
var hasOwn$
|
|
819
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
820
820
|
var toIndexedObject$2 = toIndexedObject$5;
|
|
821
821
|
var indexOf = arrayIncludes.indexOf;
|
|
822
822
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
@@ -828,9 +828,9 @@ var objectKeysInternal = function (object, names) {
|
|
|
828
828
|
var i = 0;
|
|
829
829
|
var result = [];
|
|
830
830
|
var key;
|
|
831
|
-
for (key in O) !hasOwn$
|
|
831
|
+
for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push(result, key);
|
|
832
832
|
// Don't enum bug & hidden keys
|
|
833
|
-
while (names.length > i) if (hasOwn$
|
|
833
|
+
while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
|
|
834
834
|
~indexOf(result, key) || push(result, key);
|
|
835
835
|
}
|
|
836
836
|
return result;
|
|
@@ -868,18 +868,18 @@ var getBuiltIn$1 = getBuiltIn$4;
|
|
|
868
868
|
var uncurryThis$2 = functionUncurryThis;
|
|
869
869
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
870
870
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
871
|
-
var anObject$
|
|
871
|
+
var anObject$5 = anObject$7;
|
|
872
872
|
|
|
873
873
|
var concat$1 = uncurryThis$2([].concat);
|
|
874
874
|
|
|
875
875
|
// all object keys, includes non-enumerable and symbols
|
|
876
876
|
var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
877
|
-
var keys = getOwnPropertyNamesModule.f(anObject$
|
|
877
|
+
var keys = getOwnPropertyNamesModule.f(anObject$5(it));
|
|
878
878
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
879
879
|
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
880
880
|
};
|
|
881
881
|
|
|
882
|
-
var hasOwn$
|
|
882
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
883
883
|
var ownKeys = ownKeys$1;
|
|
884
884
|
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
885
885
|
var definePropertyModule$1 = objectDefineProperty;
|
|
@@ -890,14 +890,14 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
|
890
890
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
891
891
|
for (var i = 0; i < keys.length; i++) {
|
|
892
892
|
var key = keys[i];
|
|
893
|
-
if (!hasOwn$
|
|
893
|
+
if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
|
|
894
894
|
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
895
895
|
}
|
|
896
896
|
}
|
|
897
897
|
};
|
|
898
898
|
|
|
899
|
-
var fails$
|
|
900
|
-
var isCallable$
|
|
899
|
+
var fails$4 = fails$c;
|
|
900
|
+
var isCallable$5 = isCallable$f;
|
|
901
901
|
|
|
902
902
|
var replacement = /#|\.prototype\./;
|
|
903
903
|
|
|
@@ -905,7 +905,7 @@ var isForced$1 = function (feature, detection) {
|
|
|
905
905
|
var value = data[normalize(feature)];
|
|
906
906
|
return value == POLYFILL ? true
|
|
907
907
|
: value == NATIVE ? false
|
|
908
|
-
: isCallable$
|
|
908
|
+
: isCallable$5(detection) ? fails$4(detection)
|
|
909
909
|
: !!detection;
|
|
910
910
|
};
|
|
911
911
|
|
|
@@ -922,7 +922,7 @@ var isForced_1 = isForced$1;
|
|
|
922
922
|
var global$3 = global$c;
|
|
923
923
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
924
924
|
var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
|
|
925
|
-
var defineBuiltIn$
|
|
925
|
+
var defineBuiltIn$3 = defineBuiltIn$4;
|
|
926
926
|
var defineGlobalProperty = defineGlobalProperty$3;
|
|
927
927
|
var copyConstructorProperties = copyConstructorProperties$1;
|
|
928
928
|
var isForced = isForced_1;
|
|
@@ -970,7 +970,7 @@ var _export = function (options, source) {
|
|
|
970
970
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
971
971
|
createNonEnumerableProperty$2(sourceProperty, 'sham', true);
|
|
972
972
|
}
|
|
973
|
-
defineBuiltIn$
|
|
973
|
+
defineBuiltIn$3(target, key, sourceProperty, options);
|
|
974
974
|
}
|
|
975
975
|
};
|
|
976
976
|
|
|
@@ -986,8 +986,8 @@ var objectKeys$2 = Object.keys || function keys(O) {
|
|
|
986
986
|
|
|
987
987
|
var DESCRIPTORS$2 = descriptors;
|
|
988
988
|
var uncurryThis$1 = functionUncurryThis;
|
|
989
|
-
var call$
|
|
990
|
-
var fails$
|
|
989
|
+
var call$2 = functionCall;
|
|
990
|
+
var fails$3 = fails$c;
|
|
991
991
|
var objectKeys$1 = objectKeys$2;
|
|
992
992
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
993
993
|
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
@@ -1002,7 +1002,7 @@ var concat = uncurryThis$1([].concat);
|
|
|
1002
1002
|
|
|
1003
1003
|
// `Object.assign` method
|
|
1004
1004
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
1005
|
-
var objectAssign = !$assign || fails$
|
|
1005
|
+
var objectAssign = !$assign || fails$3(function () {
|
|
1006
1006
|
// should have correct order of operations (Edge bug)
|
|
1007
1007
|
if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
|
|
1008
1008
|
enumerable: true,
|
|
@@ -1036,7 +1036,7 @@ var objectAssign = !$assign || fails$2(function () {
|
|
|
1036
1036
|
var key;
|
|
1037
1037
|
while (length > j) {
|
|
1038
1038
|
key = keys[j++];
|
|
1039
|
-
if (!DESCRIPTORS$2 || call$
|
|
1039
|
+
if (!DESCRIPTORS$2 || call$2(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1040
1040
|
}
|
|
1041
1041
|
} return T;
|
|
1042
1042
|
} : $assign;
|
|
@@ -1076,14 +1076,16 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
1076
1076
|
});
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
|
-
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.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:StandardResolutionReasons.ERROR,errorCode:ErrorCode.PARSE_ERROR}}catch(a){return {reason:StandardResolutionReasons.ERROR,errorCode:getErrorCode(a),value:b}}})}resolveNumber(a,b,c){return __awaiter(this,void 0,void 0,function*(){try{const d=yield axios.post(
|
|
1079
|
+
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.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:StandardResolutionReasons.ERROR,errorCode:ErrorCode.PARSE_ERROR}}catch(a){return {reason:StandardResolutionReasons.ERROR,errorCode:getErrorCode(a),value:b}}})}resolveNumber(a,b,c){return __awaiter(this,void 0,void 0,function*(){try{const d=yield axios.post(/**
|
|
1080
|
+
* JavaScript numbers are always 64-bit floating point
|
|
1081
|
+
*/`${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:StandardResolutionReasons.ERROR,errorCode:ErrorCode.PARSE_ERROR}}catch(a){return {reason:StandardResolutionReasons.ERROR,errorCode:getErrorCode(a),value:b}}})}resolveString(a,b,c){return __awaiter(this,void 0,void 0,function*(){try{const d=yield axios.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:StandardResolutionReasons.ERROR,errorCode:ErrorCode.PARSE_ERROR}}catch(a){return {reason:StandardResolutionReasons.ERROR,errorCode:getErrorCode(a),value:b}}})}resolveObject(a,b,c){return __awaiter(this,void 0,void 0,function*(){try{const d=yield axios.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:StandardResolutionReasons.ERROR,errorCode:ErrorCode.PARSE_ERROR}}catch(a){return {reason: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=StandardResolutionReasons.UNKNOWN;return null!=c&&(404==c?d=ErrorCode.FLAG_NOT_FOUND:400==c&&(d=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)}
|
|
1080
1082
|
|
|
1081
1083
|
var objectDefineProperties = {};
|
|
1082
1084
|
|
|
1083
1085
|
var DESCRIPTORS$1 = descriptors;
|
|
1084
1086
|
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1085
1087
|
var definePropertyModule = objectDefineProperty;
|
|
1086
|
-
var anObject$
|
|
1088
|
+
var anObject$4 = anObject$7;
|
|
1087
1089
|
var toIndexedObject$1 = toIndexedObject$5;
|
|
1088
1090
|
var objectKeys = objectKeys$2;
|
|
1089
1091
|
|
|
@@ -1091,7 +1093,7 @@ var objectKeys = objectKeys$2;
|
|
|
1091
1093
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1092
1094
|
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
|
1093
1095
|
objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1094
|
-
anObject$
|
|
1096
|
+
anObject$4(O);
|
|
1095
1097
|
var props = toIndexedObject$1(Properties);
|
|
1096
1098
|
var keys = objectKeys(Properties);
|
|
1097
1099
|
var length = keys.length;
|
|
@@ -1107,7 +1109,7 @@ var html$1 = getBuiltIn('document', 'documentElement');
|
|
|
1107
1109
|
|
|
1108
1110
|
/* global ActiveXObject -- old IE, WSH */
|
|
1109
1111
|
|
|
1110
|
-
var anObject$
|
|
1112
|
+
var anObject$3 = anObject$7;
|
|
1111
1113
|
var definePropertiesModule = objectDefineProperties;
|
|
1112
1114
|
var enumBugKeys = enumBugKeys$3;
|
|
1113
1115
|
var hiddenKeys = hiddenKeys$4;
|
|
@@ -1181,7 +1183,7 @@ hiddenKeys[IE_PROTO$1] = true;
|
|
|
1181
1183
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
1182
1184
|
var result;
|
|
1183
1185
|
if (O !== null) {
|
|
1184
|
-
EmptyConstructor[PROTOTYPE] = anObject$
|
|
1186
|
+
EmptyConstructor[PROTOTYPE] = anObject$3(O);
|
|
1185
1187
|
result = new EmptyConstructor();
|
|
1186
1188
|
EmptyConstructor[PROTOTYPE] = null;
|
|
1187
1189
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
@@ -1190,11 +1192,11 @@ var objectCreate = Object.create || function create(O, Properties) {
|
|
|
1190
1192
|
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1191
1193
|
};
|
|
1192
1194
|
|
|
1193
|
-
var wellKnownSymbol$
|
|
1195
|
+
var wellKnownSymbol$6 = wellKnownSymbol$8;
|
|
1194
1196
|
var create$1 = objectCreate;
|
|
1195
1197
|
var defineProperty$2 = objectDefineProperty.f;
|
|
1196
1198
|
|
|
1197
|
-
var UNSCOPABLES = wellKnownSymbol$
|
|
1199
|
+
var UNSCOPABLES = wellKnownSymbol$6('unscopables');
|
|
1198
1200
|
var ArrayPrototype = Array.prototype;
|
|
1199
1201
|
|
|
1200
1202
|
// Array.prototype[@@unscopables]
|
|
@@ -1213,44 +1215,44 @@ var addToUnscopables$1 = function (key) {
|
|
|
1213
1215
|
|
|
1214
1216
|
var iterators = {};
|
|
1215
1217
|
|
|
1216
|
-
var fails$
|
|
1218
|
+
var fails$2 = fails$c;
|
|
1217
1219
|
|
|
1218
|
-
var correctPrototypeGetter = !fails$
|
|
1220
|
+
var correctPrototypeGetter = !fails$2(function () {
|
|
1219
1221
|
function F() { /* empty */ }
|
|
1220
1222
|
F.prototype.constructor = null;
|
|
1221
1223
|
// eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
|
|
1222
1224
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
1223
1225
|
});
|
|
1224
1226
|
|
|
1225
|
-
var hasOwn$
|
|
1226
|
-
var isCallable$
|
|
1227
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
1228
|
+
var isCallable$4 = isCallable$f;
|
|
1227
1229
|
var toObject = toObject$3;
|
|
1228
1230
|
var sharedKey = sharedKey$3;
|
|
1229
1231
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1230
1232
|
|
|
1231
1233
|
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1232
|
-
var $Object = Object;
|
|
1233
|
-
var ObjectPrototype = $Object.prototype;
|
|
1234
|
+
var $Object$1 = Object;
|
|
1235
|
+
var ObjectPrototype = $Object$1.prototype;
|
|
1234
1236
|
|
|
1235
1237
|
// `Object.getPrototypeOf` method
|
|
1236
1238
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1237
1239
|
// eslint-disable-next-line es-x/no-object-getprototypeof -- safe
|
|
1238
|
-
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
|
1240
|
+
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
|
|
1239
1241
|
var object = toObject(O);
|
|
1240
|
-
if (hasOwn$
|
|
1242
|
+
if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
|
|
1241
1243
|
var constructor = object.constructor;
|
|
1242
|
-
if (isCallable$
|
|
1244
|
+
if (isCallable$4(constructor) && object instanceof constructor) {
|
|
1243
1245
|
return constructor.prototype;
|
|
1244
|
-
} return object instanceof $Object ? ObjectPrototype : null;
|
|
1246
|
+
} return object instanceof $Object$1 ? ObjectPrototype : null;
|
|
1245
1247
|
};
|
|
1246
1248
|
|
|
1247
|
-
var fails = fails$
|
|
1248
|
-
var isCallable$
|
|
1249
|
+
var fails$1 = fails$c;
|
|
1250
|
+
var isCallable$3 = isCallable$f;
|
|
1249
1251
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1250
|
-
var defineBuiltIn$
|
|
1251
|
-
var wellKnownSymbol$
|
|
1252
|
+
var defineBuiltIn$2 = defineBuiltIn$4;
|
|
1253
|
+
var wellKnownSymbol$5 = wellKnownSymbol$8;
|
|
1252
1254
|
|
|
1253
|
-
var ITERATOR$2 = wellKnownSymbol$
|
|
1255
|
+
var ITERATOR$2 = wellKnownSymbol$5('iterator');
|
|
1254
1256
|
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
1255
1257
|
|
|
1256
1258
|
// `%IteratorPrototype%` object
|
|
@@ -1268,7 +1270,7 @@ if ([].keys) {
|
|
|
1268
1270
|
}
|
|
1269
1271
|
}
|
|
1270
1272
|
|
|
1271
|
-
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails(function () {
|
|
1273
|
+
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$1(function () {
|
|
1272
1274
|
var test = {};
|
|
1273
1275
|
// FF44- legacy iterators case
|
|
1274
1276
|
return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
|
|
@@ -1278,8 +1280,8 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
|
|
|
1278
1280
|
|
|
1279
1281
|
// `%IteratorPrototype%[@@iterator]()` method
|
|
1280
1282
|
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1281
|
-
if (!isCallable$
|
|
1282
|
-
defineBuiltIn$
|
|
1283
|
+
if (!isCallable$3(IteratorPrototype$2[ITERATOR$2])) {
|
|
1284
|
+
defineBuiltIn$2(IteratorPrototype$2, ITERATOR$2, function () {
|
|
1283
1285
|
return this;
|
|
1284
1286
|
});
|
|
1285
1287
|
}
|
|
@@ -1290,15 +1292,15 @@ var iteratorsCore = {
|
|
|
1290
1292
|
};
|
|
1291
1293
|
|
|
1292
1294
|
var defineProperty$1 = objectDefineProperty.f;
|
|
1293
|
-
var hasOwn = hasOwnProperty_1;
|
|
1294
|
-
var wellKnownSymbol$
|
|
1295
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
1296
|
+
var wellKnownSymbol$4 = wellKnownSymbol$8;
|
|
1295
1297
|
|
|
1296
|
-
var TO_STRING_TAG$
|
|
1298
|
+
var TO_STRING_TAG$3 = wellKnownSymbol$4('toStringTag');
|
|
1297
1299
|
|
|
1298
1300
|
var setToStringTag$2 = function (target, TAG, STATIC) {
|
|
1299
1301
|
if (target && !STATIC) target = target.prototype;
|
|
1300
|
-
if (target && !hasOwn(target, TO_STRING_TAG$
|
|
1301
|
-
defineProperty$1(target, TO_STRING_TAG$
|
|
1302
|
+
if (target && !hasOwn$1(target, TO_STRING_TAG$3)) {
|
|
1303
|
+
defineProperty$1(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
|
|
1302
1304
|
}
|
|
1303
1305
|
};
|
|
1304
1306
|
|
|
@@ -1318,20 +1320,20 @@ var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENU
|
|
|
1318
1320
|
return IteratorConstructor;
|
|
1319
1321
|
};
|
|
1320
1322
|
|
|
1321
|
-
var isCallable$
|
|
1323
|
+
var isCallable$2 = isCallable$f;
|
|
1322
1324
|
|
|
1323
|
-
var $String = String;
|
|
1325
|
+
var $String$1 = String;
|
|
1324
1326
|
var $TypeError = TypeError;
|
|
1325
1327
|
|
|
1326
1328
|
var aPossiblePrototype$1 = function (argument) {
|
|
1327
|
-
if (typeof argument == 'object' || isCallable$
|
|
1328
|
-
throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
|
|
1329
|
+
if (typeof argument == 'object' || isCallable$2(argument)) return argument;
|
|
1330
|
+
throw $TypeError("Can't set " + $String$1(argument) + ' as a prototype');
|
|
1329
1331
|
};
|
|
1330
1332
|
|
|
1331
1333
|
/* eslint-disable no-proto -- safe */
|
|
1332
1334
|
|
|
1333
1335
|
var uncurryThis = functionUncurryThis;
|
|
1334
|
-
var anObject = anObject$
|
|
1336
|
+
var anObject$2 = anObject$7;
|
|
1335
1337
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1336
1338
|
|
|
1337
1339
|
// `Object.setPrototypeOf` method
|
|
@@ -1349,7 +1351,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1349
1351
|
CORRECT_SETTER = test instanceof Array;
|
|
1350
1352
|
} catch (error) { /* empty */ }
|
|
1351
1353
|
return function setPrototypeOf(O, proto) {
|
|
1352
|
-
anObject(O);
|
|
1354
|
+
anObject$2(O);
|
|
1353
1355
|
aPossiblePrototype(proto);
|
|
1354
1356
|
if (CORRECT_SETTER) setter(O, proto);
|
|
1355
1357
|
else O.__proto__ = proto;
|
|
@@ -1358,24 +1360,24 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1358
1360
|
}() : undefined);
|
|
1359
1361
|
|
|
1360
1362
|
var $$1 = _export;
|
|
1361
|
-
var call = functionCall;
|
|
1363
|
+
var call$1 = functionCall;
|
|
1362
1364
|
var FunctionName = functionName;
|
|
1363
|
-
var isCallable = isCallable$
|
|
1365
|
+
var isCallable$1 = isCallable$f;
|
|
1364
1366
|
var createIteratorConstructor = createIteratorConstructor$1;
|
|
1365
1367
|
var getPrototypeOf = objectGetPrototypeOf;
|
|
1366
1368
|
var setPrototypeOf = objectSetPrototypeOf;
|
|
1367
1369
|
var setToStringTag = setToStringTag$2;
|
|
1368
1370
|
var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
|
|
1369
|
-
var defineBuiltIn = defineBuiltIn$
|
|
1370
|
-
var wellKnownSymbol$
|
|
1371
|
+
var defineBuiltIn$1 = defineBuiltIn$4;
|
|
1372
|
+
var wellKnownSymbol$3 = wellKnownSymbol$8;
|
|
1371
1373
|
var Iterators$1 = iterators;
|
|
1372
1374
|
var IteratorsCore = iteratorsCore;
|
|
1373
1375
|
|
|
1374
|
-
var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
|
1376
|
+
var PROPER_FUNCTION_NAME$1 = FunctionName.PROPER;
|
|
1375
1377
|
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
1376
1378
|
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
1377
1379
|
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
1378
|
-
var ITERATOR$1 = wellKnownSymbol$
|
|
1380
|
+
var ITERATOR$1 = wellKnownSymbol$3('iterator');
|
|
1379
1381
|
var KEYS = 'keys';
|
|
1380
1382
|
var VALUES = 'values';
|
|
1381
1383
|
var ENTRIES = 'entries';
|
|
@@ -1412,8 +1414,8 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
|
|
|
1412
1414
|
if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
|
|
1413
1415
|
if (setPrototypeOf) {
|
|
1414
1416
|
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
|
|
1415
|
-
} else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
|
|
1416
|
-
defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
|
|
1417
|
+
} else if (!isCallable$1(CurrentIteratorPrototype[ITERATOR$1])) {
|
|
1418
|
+
defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$1, returnThis);
|
|
1417
1419
|
}
|
|
1418
1420
|
}
|
|
1419
1421
|
// Set @@toStringTag to native iterators
|
|
@@ -1422,12 +1424,12 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
|
|
|
1422
1424
|
}
|
|
1423
1425
|
|
|
1424
1426
|
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
1425
|
-
if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
1427
|
+
if (PROPER_FUNCTION_NAME$1 && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
1426
1428
|
if (CONFIGURABLE_FUNCTION_NAME) {
|
|
1427
1429
|
createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
|
|
1428
1430
|
} else {
|
|
1429
1431
|
INCORRECT_VALUES_NAME = true;
|
|
1430
|
-
defaultIterator = function values() { return call(nativeIterator, this); };
|
|
1432
|
+
defaultIterator = function values() { return call$1(nativeIterator, this); };
|
|
1431
1433
|
}
|
|
1432
1434
|
}
|
|
1433
1435
|
|
|
@@ -1440,14 +1442,14 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
|
|
|
1440
1442
|
};
|
|
1441
1443
|
if (FORCED) for (KEY in methods) {
|
|
1442
1444
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1443
|
-
defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
|
|
1445
|
+
defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
|
|
1444
1446
|
}
|
|
1445
1447
|
} else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1446
1448
|
}
|
|
1447
1449
|
|
|
1448
1450
|
// define iterator
|
|
1449
1451
|
if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
|
|
1450
|
-
defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
|
|
1452
|
+
defineBuiltIn$1(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
|
|
1451
1453
|
}
|
|
1452
1454
|
Iterators$1[NAME] = defaultIterator;
|
|
1453
1455
|
|
|
@@ -1563,10 +1565,10 @@ var DOMIterables = domIterables;
|
|
|
1563
1565
|
var DOMTokenListPrototype = domTokenListPrototype;
|
|
1564
1566
|
var ArrayIteratorMethods = es_array_iterator;
|
|
1565
1567
|
var createNonEnumerableProperty = createNonEnumerableProperty$5;
|
|
1566
|
-
var wellKnownSymbol = wellKnownSymbol$
|
|
1568
|
+
var wellKnownSymbol$2 = wellKnownSymbol$8;
|
|
1567
1569
|
|
|
1568
|
-
var ITERATOR = wellKnownSymbol('iterator');
|
|
1569
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
1570
|
+
var ITERATOR = wellKnownSymbol$2('iterator');
|
|
1571
|
+
var TO_STRING_TAG$2 = wellKnownSymbol$2('toStringTag');
|
|
1570
1572
|
var ArrayValues = ArrayIteratorMethods.values;
|
|
1571
1573
|
|
|
1572
1574
|
var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
@@ -1577,8 +1579,8 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
|
1577
1579
|
} catch (error) {
|
|
1578
1580
|
CollectionPrototype[ITERATOR] = ArrayValues;
|
|
1579
1581
|
}
|
|
1580
|
-
if (!CollectionPrototype[TO_STRING_TAG]) {
|
|
1581
|
-
createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
|
|
1582
|
+
if (!CollectionPrototype[TO_STRING_TAG$2]) {
|
|
1583
|
+
createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
|
|
1582
1584
|
}
|
|
1583
1585
|
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
|
|
1584
1586
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
@@ -4556,6 +4558,110 @@ class ListValue$Type extends MessageType{constructor(){super("google.protobuf.Li
|
|
|
4556
4558
|
* @generated MessageType for protobuf message google.protobuf.ListValue
|
|
4557
4559
|
*/const ListValue=new ListValue$Type;
|
|
4558
4560
|
|
|
4561
|
+
var wellKnownSymbol$1 = wellKnownSymbol$8;
|
|
4562
|
+
|
|
4563
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
|
|
4564
|
+
var test = {};
|
|
4565
|
+
|
|
4566
|
+
test[TO_STRING_TAG$1] = 'z';
|
|
4567
|
+
|
|
4568
|
+
var toStringTagSupport = String(test) === '[object z]';
|
|
4569
|
+
|
|
4570
|
+
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
4571
|
+
var isCallable = isCallable$f;
|
|
4572
|
+
var classofRaw = classofRaw$1;
|
|
4573
|
+
var wellKnownSymbol = wellKnownSymbol$8;
|
|
4574
|
+
|
|
4575
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
4576
|
+
var $Object = Object;
|
|
4577
|
+
|
|
4578
|
+
// ES3 wrong here
|
|
4579
|
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
4580
|
+
|
|
4581
|
+
// fallback for IE11 Script Access Denied error
|
|
4582
|
+
var tryGet = function (it, key) {
|
|
4583
|
+
try {
|
|
4584
|
+
return it[key];
|
|
4585
|
+
} catch (error) { /* empty */ }
|
|
4586
|
+
};
|
|
4587
|
+
|
|
4588
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
|
4589
|
+
var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
4590
|
+
var O, tag, result;
|
|
4591
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
4592
|
+
// @@toStringTag case
|
|
4593
|
+
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
|
|
4594
|
+
// builtinTag case
|
|
4595
|
+
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
4596
|
+
// ES3 arguments fallback
|
|
4597
|
+
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
4598
|
+
};
|
|
4599
|
+
|
|
4600
|
+
var classof = classof$1;
|
|
4601
|
+
|
|
4602
|
+
var $String = String;
|
|
4603
|
+
|
|
4604
|
+
var toString = function (argument) {
|
|
4605
|
+
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
4606
|
+
return $String(argument);
|
|
4607
|
+
};
|
|
4608
|
+
|
|
4609
|
+
var anObject$1 = anObject$7;
|
|
4610
|
+
|
|
4611
|
+
// `RegExp.prototype.flags` getter implementation
|
|
4612
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
4613
|
+
var regexpFlags = function () {
|
|
4614
|
+
var that = anObject$1(this);
|
|
4615
|
+
var result = '';
|
|
4616
|
+
if (that.hasIndices) result += 'd';
|
|
4617
|
+
if (that.global) result += 'g';
|
|
4618
|
+
if (that.ignoreCase) result += 'i';
|
|
4619
|
+
if (that.multiline) result += 'm';
|
|
4620
|
+
if (that.dotAll) result += 's';
|
|
4621
|
+
if (that.unicode) result += 'u';
|
|
4622
|
+
if (that.sticky) result += 'y';
|
|
4623
|
+
return result;
|
|
4624
|
+
};
|
|
4625
|
+
|
|
4626
|
+
var call = functionCall;
|
|
4627
|
+
var hasOwn = hasOwnProperty_1;
|
|
4628
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
4629
|
+
var regExpFlags = regexpFlags;
|
|
4630
|
+
|
|
4631
|
+
var RegExpPrototype$1 = RegExp.prototype;
|
|
4632
|
+
|
|
4633
|
+
var regexpGetFlags = function (R) {
|
|
4634
|
+
var flags = R.flags;
|
|
4635
|
+
return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
|
|
4636
|
+
? call(regExpFlags, R) : flags;
|
|
4637
|
+
};
|
|
4638
|
+
|
|
4639
|
+
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
|
4640
|
+
var defineBuiltIn = defineBuiltIn$4;
|
|
4641
|
+
var anObject = anObject$7;
|
|
4642
|
+
var $toString = toString;
|
|
4643
|
+
var fails = fails$c;
|
|
4644
|
+
var getRegExpFlags = regexpGetFlags;
|
|
4645
|
+
|
|
4646
|
+
var TO_STRING = 'toString';
|
|
4647
|
+
var RegExpPrototype = RegExp.prototype;
|
|
4648
|
+
var n$ToString = RegExpPrototype[TO_STRING];
|
|
4649
|
+
|
|
4650
|
+
var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
|
|
4651
|
+
// FF44- RegExp#toString has a wrong name
|
|
4652
|
+
var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;
|
|
4653
|
+
|
|
4654
|
+
// `RegExp.prototype.toString` method
|
|
4655
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
|
4656
|
+
if (NOT_GENERIC || INCORRECT_NAME) {
|
|
4657
|
+
defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
|
|
4658
|
+
var R = anObject(this);
|
|
4659
|
+
var pattern = $toString(R.source);
|
|
4660
|
+
var flags = $toString(getRegExpFlags(R));
|
|
4661
|
+
return '/' + pattern + '/' + flags;
|
|
4662
|
+
}, { unsafe: true });
|
|
4663
|
+
}
|
|
4664
|
+
|
|
4559
4665
|
/**
|
|
4560
4666
|
* Turns PartialMethodInfo into MethodInfo.
|
|
4561
4667
|
*/
|
|
@@ -4638,12 +4744,18 @@ class ResolveStringRequest$Type extends MessageType{constructor(){super("schema.
|
|
|
4638
4744
|
class ResolveStringResponse$Type extends MessageType{constructor(){super("schema.v1.ResolveStringResponse",[{no:1,name:"value",kind:"scalar",T:9/*ScalarType.STRING*/},{no:2,name:"reason",kind:"scalar",T:9/*ScalarType.STRING*/},{no:3,name:"variant",kind:"scalar",T:9/*ScalarType.STRING*/}]);}create(a){const b={value:"",reason:"",variant:""};return globalThis.Object.defineProperty(b,MESSAGE_TYPE,{enumerable:!1,value:this}),void 0!==a&&reflectionMergePartial(this,b,a),b}internalBinaryRead(a,b,c,d){let e=null!==d&&void 0!==d?d:this.create(),f=a.pos+b;for(;a.pos<f;){let[b,f]=a.tag();switch(b){case/* string value */1:e.value=a.string();break;case/* string reason */2:e.reason=a.string();break;case/* string variant */3:e.variant=a.string();break;default:let g=c.readUnknownField;if("throw"===g)throw new globalThis.Error(`Unknown field ${b} (wire type ${f}) for ${this.typeName}`);let h=a.skip(f);!1!==g&&(!0===g?UnknownFieldHandler.onRead:g)(this.typeName,e,b,f,h);}}return e}internalBinaryWrite(a,b,c){""!==a.value&&b.tag(1,WireType.LengthDelimited).string(a.value),""!==a.reason&&b.tag(2,WireType.LengthDelimited).string(a.reason),""!==a.variant&&b.tag(3,WireType.LengthDelimited).string(a.variant);let d=c.writeUnknownFields;return !1!==d&&(!0==d?UnknownFieldHandler.onWrite:d)(this.typeName,a,b),b}}/**
|
|
4639
4745
|
* @generated MessageType for protobuf message schema.v1.ResolveStringResponse
|
|
4640
4746
|
*/const ResolveStringResponse=new ResolveStringResponse$Type;// @generated message type with reflection information, may provide speed optimized methods
|
|
4641
|
-
class
|
|
4642
|
-
* @generated MessageType for protobuf message schema.v1.
|
|
4643
|
-
*/const
|
|
4644
|
-
class
|
|
4645
|
-
* @generated MessageType for protobuf message schema.v1.
|
|
4646
|
-
*/const
|
|
4747
|
+
class ResolveFloatRequest$Type extends MessageType{constructor(){super("schema.v1.ResolveFloatRequest",[{no:1,name:"flag_key",kind:"scalar",T:9/*ScalarType.STRING*/},{no:2,name:"context",kind:"message",T:()=>Struct}]);}create(a){const b={flagKey:""};return globalThis.Object.defineProperty(b,MESSAGE_TYPE,{enumerable:!1,value:this}),void 0!==a&&reflectionMergePartial(this,b,a),b}internalBinaryRead(a,b,c,d){let e=null!==d&&void 0!==d?d:this.create(),f=a.pos+b;for(;a.pos<f;){let[b,f]=a.tag();switch(b){case/* string flag_key */1:e.flagKey=a.string();break;case/* google.protobuf.Struct context */2:e.context=Struct.internalBinaryRead(a,a.uint32(),c,e.context);break;default:let g=c.readUnknownField;if("throw"===g)throw new globalThis.Error(`Unknown field ${b} (wire type ${f}) for ${this.typeName}`);let h=a.skip(f);!1!==g&&(!0===g?UnknownFieldHandler.onRead:g)(this.typeName,e,b,f,h);}}return e}internalBinaryWrite(a,b,c){""!==a.flagKey&&b.tag(1,WireType.LengthDelimited).string(a.flagKey),a.context&&Struct.internalBinaryWrite(a.context,b.tag(2,WireType.LengthDelimited).fork(),c).join();let d=c.writeUnknownFields;return !1!==d&&(!0==d?UnknownFieldHandler.onWrite:d)(this.typeName,a,b),b}}/**
|
|
4748
|
+
* @generated MessageType for protobuf message schema.v1.ResolveFloatRequest
|
|
4749
|
+
*/const ResolveFloatRequest=new ResolveFloatRequest$Type;// @generated message type with reflection information, may provide speed optimized methods
|
|
4750
|
+
class ResolveFloatResponse$Type extends MessageType{constructor(){super("schema.v1.ResolveFloatResponse",[{no:1,name:"value",kind:"scalar",T:1/*ScalarType.DOUBLE*/},{no:2,name:"reason",kind:"scalar",T:9/*ScalarType.STRING*/},{no:3,name:"variant",kind:"scalar",T:9/*ScalarType.STRING*/}]);}create(a){const b={value:0,reason:"",variant:""};return globalThis.Object.defineProperty(b,MESSAGE_TYPE,{enumerable:!1,value:this}),void 0!==a&&reflectionMergePartial(this,b,a),b}internalBinaryRead(a,b,c,d){let e=null!==d&&void 0!==d?d:this.create(),f=a.pos+b;for(;a.pos<f;){let[b,f]=a.tag();switch(b){case/* double value */1:e.value=a.double();break;case/* string reason */2:e.reason=a.string();break;case/* string variant */3:e.variant=a.string();break;default:let g=c.readUnknownField;if("throw"===g)throw new globalThis.Error(`Unknown field ${b} (wire type ${f}) for ${this.typeName}`);let h=a.skip(f);!1!==g&&(!0===g?UnknownFieldHandler.onRead:g)(this.typeName,e,b,f,h);}}return e}internalBinaryWrite(a,b,c){0!==a.value&&b.tag(1,WireType.Bit64).double(a.value),""!==a.reason&&b.tag(2,WireType.LengthDelimited).string(a.reason),""!==a.variant&&b.tag(3,WireType.LengthDelimited).string(a.variant);let d=c.writeUnknownFields;return !1!==d&&(!0==d?UnknownFieldHandler.onWrite:d)(this.typeName,a,b),b}}/**
|
|
4751
|
+
* @generated MessageType for protobuf message schema.v1.ResolveFloatResponse
|
|
4752
|
+
*/const ResolveFloatResponse=new ResolveFloatResponse$Type;// @generated message type with reflection information, may provide speed optimized methods
|
|
4753
|
+
class ResolveIntRequest$Type extends MessageType{constructor(){super("schema.v1.ResolveIntRequest",[{no:1,name:"flag_key",kind:"scalar",T:9/*ScalarType.STRING*/},{no:2,name:"context",kind:"message",T:()=>Struct}]);}create(a){const b={flagKey:""};return globalThis.Object.defineProperty(b,MESSAGE_TYPE,{enumerable:!1,value:this}),void 0!==a&&reflectionMergePartial(this,b,a),b}internalBinaryRead(a,b,c,d){let e=null!==d&&void 0!==d?d:this.create(),f=a.pos+b;for(;a.pos<f;){let[b,f]=a.tag();switch(b){case/* string flag_key */1:e.flagKey=a.string();break;case/* google.protobuf.Struct context */2:e.context=Struct.internalBinaryRead(a,a.uint32(),c,e.context);break;default:let g=c.readUnknownField;if("throw"===g)throw new globalThis.Error(`Unknown field ${b} (wire type ${f}) for ${this.typeName}`);let h=a.skip(f);!1!==g&&(!0===g?UnknownFieldHandler.onRead:g)(this.typeName,e,b,f,h);}}return e}internalBinaryWrite(a,b,c){""!==a.flagKey&&b.tag(1,WireType.LengthDelimited).string(a.flagKey),a.context&&Struct.internalBinaryWrite(a.context,b.tag(2,WireType.LengthDelimited).fork(),c).join();let d=c.writeUnknownFields;return !1!==d&&(!0==d?UnknownFieldHandler.onWrite:d)(this.typeName,a,b),b}}/**
|
|
4754
|
+
* @generated MessageType for protobuf message schema.v1.ResolveIntRequest
|
|
4755
|
+
*/const ResolveIntRequest=new ResolveIntRequest$Type;// @generated message type with reflection information, may provide speed optimized methods
|
|
4756
|
+
class ResolveIntResponse$Type extends MessageType{constructor(){super("schema.v1.ResolveIntResponse",[{no:1,name:"value",kind:"scalar",T:3/*ScalarType.INT64*/},{no:2,name:"reason",kind:"scalar",T:9/*ScalarType.STRING*/},{no:3,name:"variant",kind:"scalar",T:9/*ScalarType.STRING*/}]);}create(a){const b={value:"0",reason:"",variant:""};return globalThis.Object.defineProperty(b,MESSAGE_TYPE,{enumerable:!1,value:this}),void 0!==a&&reflectionMergePartial(this,b,a),b}internalBinaryRead(a,b,c,d){let e=null!==d&&void 0!==d?d:this.create(),f=a.pos+b;for(;a.pos<f;){let[b,f]=a.tag();switch(b){case/* int64 value */1:e.value=a.int64().toString();break;case/* string reason */2:e.reason=a.string();break;case/* string variant */3:e.variant=a.string();break;default:let g=c.readUnknownField;if("throw"===g)throw new globalThis.Error(`Unknown field ${b} (wire type ${f}) for ${this.typeName}`);let h=a.skip(f);!1!==g&&(!0===g?UnknownFieldHandler.onRead:g)(this.typeName,e,b,f,h);}}return e}internalBinaryWrite(a,b,c){"0"!==a.value&&b.tag(1,WireType.Varint).int64(a.value),""!==a.reason&&b.tag(2,WireType.LengthDelimited).string(a.reason),""!==a.variant&&b.tag(3,WireType.LengthDelimited).string(a.variant);let d=c.writeUnknownFields;return !1!==d&&(!0==d?UnknownFieldHandler.onWrite:d)(this.typeName,a,b),b}}/**
|
|
4757
|
+
* @generated MessageType for protobuf message schema.v1.ResolveIntResponse
|
|
4758
|
+
*/const ResolveIntResponse=new ResolveIntResponse$Type;// @generated message type with reflection information, may provide speed optimized methods
|
|
4647
4759
|
class ResolveObjectRequest$Type extends MessageType{constructor(){super("schema.v1.ResolveObjectRequest",[{no:1,name:"flag_key",kind:"scalar",T:9/*ScalarType.STRING*/},{no:2,name:"context",kind:"message",T:()=>Struct}]);}create(a){const b={flagKey:""};return globalThis.Object.defineProperty(b,MESSAGE_TYPE,{enumerable:!1,value:this}),void 0!==a&&reflectionMergePartial(this,b,a),b}internalBinaryRead(a,b,c,d){let e=null!==d&&void 0!==d?d:this.create(),f=a.pos+b;for(;a.pos<f;){let[b,f]=a.tag();switch(b){case/* string flag_key */1:e.flagKey=a.string();break;case/* google.protobuf.Struct context */2:e.context=Struct.internalBinaryRead(a,a.uint32(),c,e.context);break;default:let g=c.readUnknownField;if("throw"===g)throw new globalThis.Error(`Unknown field ${b} (wire type ${f}) for ${this.typeName}`);let h=a.skip(f);!1!==g&&(!0===g?UnknownFieldHandler.onRead:g)(this.typeName,e,b,f,h);}}return e}internalBinaryWrite(a,b,c){""!==a.flagKey&&b.tag(1,WireType.LengthDelimited).string(a.flagKey),a.context&&Struct.internalBinaryWrite(a.context,b.tag(2,WireType.LengthDelimited).fork(),c).join();let d=c.writeUnknownFields;return !1!==d&&(!0==d?UnknownFieldHandler.onWrite:d)(this.typeName,a,b),b}}/**
|
|
4648
4760
|
* @generated MessageType for protobuf message schema.v1.ResolveObjectRequest
|
|
4649
4761
|
*/const ResolveObjectRequest=new ResolveObjectRequest$Type;// @generated message type with reflection information, may provide speed optimized methods
|
|
@@ -4651,7 +4763,7 @@ class ResolveObjectResponse$Type extends MessageType{constructor(){super("schema
|
|
|
4651
4763
|
* @generated MessageType for protobuf message schema.v1.ResolveObjectResponse
|
|
4652
4764
|
*/const ResolveObjectResponse=new ResolveObjectResponse$Type;/**
|
|
4653
4765
|
* @generated ServiceType for protobuf service schema.v1.Service
|
|
4654
|
-
*/const Service=new ServiceType("schema.v1.Service",[{name:"ResolveBoolean",options:{"google.api.http":{post:"/flags/{flag_key}/resolve/boolean",body:"context"}},I:ResolveBooleanRequest,O:ResolveBooleanResponse},{name:"ResolveString",options:{"google.api.http":{post:"/flags/{flag_key}/resolve/string",body:"context"}},I:ResolveStringRequest,O:ResolveStringResponse},{name:"
|
|
4766
|
+
*/const Service=new ServiceType("schema.v1.Service",[{name:"ResolveBoolean",options:{"google.api.http":{post:"/flags/{flag_key}/resolve/boolean",body:"context"}},I:ResolveBooleanRequest,O:ResolveBooleanResponse},{name:"ResolveString",options:{"google.api.http":{post:"/flags/{flag_key}/resolve/string",body:"context"}},I:ResolveStringRequest,O:ResolveStringResponse},{name:"ResolveFloat",options:{"google.api.http":{post:"/flags/{flag_key}/resolve/float",body:"context"}},I:ResolveFloatRequest,O:ResolveFloatResponse},{name:"ResolveInt",options:{"google.api.http":{post:"/flags/{flag_key}/resolve/int",body:"context"}},I:ResolveIntRequest,O:ResolveIntResponse},{name:"ResolveObject",options:{"google.api.http":{post:"/flags/{flag_key}/resolve/object",body:"context"}},I:ResolveObjectRequest,O:ResolveObjectResponse}]);
|
|
4655
4767
|
|
|
4656
4768
|
/**
|
|
4657
4769
|
* @generated from protobuf service schema.v1.Service
|
|
@@ -4660,13 +4772,15 @@ class ResolveObjectResponse$Type extends MessageType{constructor(){super("schema
|
|
|
4660
4772
|
*/resolveBoolean(a,b){const c=this.methods[0],d=this._transport.mergeOptions(b);return stackIntercept("unary",this._transport,c,d,a)}/**
|
|
4661
4773
|
* @generated from protobuf rpc: ResolveString(schema.v1.ResolveStringRequest) returns (schema.v1.ResolveStringResponse);
|
|
4662
4774
|
*/resolveString(a,b){const c=this.methods[1],d=this._transport.mergeOptions(b);return stackIntercept("unary",this._transport,c,d,a)}/**
|
|
4663
|
-
* @generated from protobuf rpc:
|
|
4664
|
-
*/
|
|
4775
|
+
* @generated from protobuf rpc: ResolveFloat(schema.v1.ResolveFloatRequest) returns (schema.v1.ResolveFloatResponse);
|
|
4776
|
+
*/resolveFloat(a,b){const c=this.methods[2],d=this._transport.mergeOptions(b);return stackIntercept("unary",this._transport,c,d,a)}/**
|
|
4777
|
+
* @generated from protobuf rpc: ResolveInt(schema.v1.ResolveIntRequest) returns (schema.v1.ResolveIntResponse);
|
|
4778
|
+
*/resolveInt(a,b){const c=this.methods[3],d=this._transport.mergeOptions(b);return stackIntercept("unary",this._transport,c,d,a)}/**
|
|
4665
4779
|
* @generated from protobuf rpc: ResolveObject(schema.v1.ResolveObjectRequest) returns (schema.v1.ResolveObjectResponse);
|
|
4666
|
-
*/resolveObject(a,b){const c=this.methods[
|
|
4780
|
+
*/resolveObject(a,b){const c=this.methods[4],d=this._transport.mergeOptions(b);return stackIntercept("unary",this._transport,c,d,a)}}
|
|
4667
4781
|
|
|
4668
|
-
class GRPCService{constructor(a){const{host:b,port:c}=a;this.client=new ServiceClient(new GrpcTransport({host:`${b}:${c}`,channelCredentials:grpc.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:StandardResolutionReasons.ERROR,errorCode:null!==(d=null===a||void 0===a?void 0:a.code)&&void 0!==d?d: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:StandardResolutionReasons.ERROR,errorCode:null!==(d=null===a||void 0===a?void 0:a.code)&&void 0!==d?d: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.
|
|
4782
|
+
class GRPCService{constructor(a){const{host:b,port:c}=a;this.client=new ServiceClient(new GrpcTransport({host:`${b}:${c}`,channelCredentials:grpc.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:StandardResolutionReasons.ERROR,errorCode:null!==(d=null===a||void 0===a?void 0:a.code)&&void 0!==d?d: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:StandardResolutionReasons.ERROR,errorCode:null!==(d=null===a||void 0===a?void 0:a.code)&&void 0!==d?d: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:StandardResolutionReasons.ERROR,errorCode:null!==(d=null===a||void 0===a?void 0:a.code)&&void 0!==d?d: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:StandardResolutionReasons.ERROR,errorCode:null!==(d=null===a||void 0===a?void 0:a.code)&&void 0!==d?d:StandardResolutionReasons.UNKNOWN,value:b}}})}}
|
|
4669
4783
|
|
|
4670
|
-
class FlagdProvider{constructor(a){this.metadata={name:
|
|
4784
|
+
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)}}
|
|
4671
4785
|
|
|
4672
4786
|
export { FlagdProvider };
|