@leapdev/auth-agent 2.0.0-beta.1 → 2.0.0-beta.3
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/package.json +1 -1
- package/src/index.umd.js +294 -271
- package/src/lib/authentication.js +2 -1
- package/src/lib/authentication.js.map +1 -1
- package/src/lib/redirections.js +28 -9
- package/src/lib/redirections.js.map +1 -1
- package/src/lib/types.d.ts +19 -1
- package/src/lib/utils.d.ts +1 -0
- package/src/lib/utils.js +17 -0
- package/src/lib/utils.js.map +1 -1
package/package.json
CHANGED
package/src/index.umd.js
CHANGED
|
@@ -4442,12 +4442,193 @@
|
|
|
4442
4442
|
}
|
|
4443
4443
|
_Notification_pubnubKeys = new WeakMap(), _Notification_pubnub = new WeakMap(), _Notification_eventListeners = new WeakMap(), _Notification_initFirmChannel = new WeakMap(), _Notification_initUserChannel = new WeakMap(), _Notification_initUniqueSessionChannel = new WeakMap();
|
|
4444
4444
|
|
|
4445
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
4446
|
+
var toObject$3 = toObject$7;
|
|
4447
|
+
|
|
4448
|
+
var floor$2 = Math.floor;
|
|
4449
|
+
var charAt = uncurryThis$7(''.charAt);
|
|
4450
|
+
var replace = uncurryThis$7(''.replace);
|
|
4451
|
+
var stringSlice$2 = uncurryThis$7(''.slice);
|
|
4452
|
+
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
|
4453
|
+
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
|
4454
|
+
|
|
4455
|
+
// `GetSubstitution` abstract operation
|
|
4456
|
+
// https://tc39.es/ecma262/#sec-getsubstitution
|
|
4457
|
+
var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
|
|
4458
|
+
var tailPos = position + matched.length;
|
|
4459
|
+
var m = captures.length;
|
|
4460
|
+
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
4461
|
+
if (namedCaptures !== undefined) {
|
|
4462
|
+
namedCaptures = toObject$3(namedCaptures);
|
|
4463
|
+
symbols = SUBSTITUTION_SYMBOLS;
|
|
4464
|
+
}
|
|
4465
|
+
return replace(replacement, symbols, function (match, ch) {
|
|
4466
|
+
var capture;
|
|
4467
|
+
switch (charAt(ch, 0)) {
|
|
4468
|
+
case '$': return '$';
|
|
4469
|
+
case '&': return matched;
|
|
4470
|
+
case '`': return stringSlice$2(str, 0, position);
|
|
4471
|
+
case "'": return stringSlice$2(str, tailPos);
|
|
4472
|
+
case '<':
|
|
4473
|
+
capture = namedCaptures[stringSlice$2(ch, 1, -1)];
|
|
4474
|
+
break;
|
|
4475
|
+
default: // \d\d?
|
|
4476
|
+
var n = +ch;
|
|
4477
|
+
if (n === 0) return match;
|
|
4478
|
+
if (n > m) {
|
|
4479
|
+
var f = floor$2(n / 10);
|
|
4480
|
+
if (f === 0) return match;
|
|
4481
|
+
if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
|
|
4482
|
+
return match;
|
|
4483
|
+
}
|
|
4484
|
+
capture = captures[n - 1];
|
|
4485
|
+
}
|
|
4486
|
+
return capture === undefined ? '' : capture;
|
|
4487
|
+
});
|
|
4488
|
+
};
|
|
4489
|
+
|
|
4490
|
+
var apply$1 = functionApply;
|
|
4491
|
+
var call$3 = functionCall;
|
|
4492
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
4493
|
+
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
4494
|
+
var fails$6 = fails$r;
|
|
4495
|
+
var anObject$1 = anObject$i;
|
|
4496
|
+
var isCallable$2 = isCallable$p;
|
|
4497
|
+
var toIntegerOrInfinity$3 = toIntegerOrInfinity$7;
|
|
4498
|
+
var toLength$6 = toLength$9;
|
|
4499
|
+
var toString$2 = toString$7;
|
|
4500
|
+
var requireObjectCoercible$2 = requireObjectCoercible$8;
|
|
4501
|
+
var advanceStringIndex = advanceStringIndex$2;
|
|
4502
|
+
var getMethod = getMethod$6;
|
|
4503
|
+
var getSubstitution = getSubstitution$1;
|
|
4504
|
+
var regExpExec = regexpExecAbstract;
|
|
4505
|
+
var wellKnownSymbol$3 = wellKnownSymbol$m;
|
|
4506
|
+
|
|
4507
|
+
var REPLACE = wellKnownSymbol$3('replace');
|
|
4508
|
+
var max = Math.max;
|
|
4509
|
+
var min$2 = Math.min;
|
|
4510
|
+
var concat = uncurryThis$6([].concat);
|
|
4511
|
+
var push$1 = uncurryThis$6([].push);
|
|
4512
|
+
var stringIndexOf = uncurryThis$6(''.indexOf);
|
|
4513
|
+
var stringSlice$1 = uncurryThis$6(''.slice);
|
|
4514
|
+
|
|
4515
|
+
var maybeToString = function (it) {
|
|
4516
|
+
return it === undefined ? it : String(it);
|
|
4517
|
+
};
|
|
4518
|
+
|
|
4519
|
+
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
|
4520
|
+
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
|
4521
|
+
var REPLACE_KEEPS_$0 = (function () {
|
|
4522
|
+
// eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
|
|
4523
|
+
return 'a'.replace(/./, '$0') === '$0';
|
|
4524
|
+
})();
|
|
4525
|
+
|
|
4526
|
+
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
|
4527
|
+
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
|
4528
|
+
if (/./[REPLACE]) {
|
|
4529
|
+
return /./[REPLACE]('a', '$0') === '';
|
|
4530
|
+
}
|
|
4531
|
+
return false;
|
|
4532
|
+
})();
|
|
4533
|
+
|
|
4534
|
+
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$6(function () {
|
|
4535
|
+
var re = /./;
|
|
4536
|
+
re.exec = function () {
|
|
4537
|
+
var result = [];
|
|
4538
|
+
result.groups = { a: '7' };
|
|
4539
|
+
return result;
|
|
4540
|
+
};
|
|
4541
|
+
// eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
|
|
4542
|
+
return ''.replace(re, '$<a>') !== '7';
|
|
4543
|
+
});
|
|
4544
|
+
|
|
4545
|
+
// @@replace logic
|
|
4546
|
+
fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
|
|
4547
|
+
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
|
|
4548
|
+
|
|
4549
|
+
return [
|
|
4550
|
+
// `String.prototype.replace` method
|
|
4551
|
+
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
|
4552
|
+
function replace(searchValue, replaceValue) {
|
|
4553
|
+
var O = requireObjectCoercible$2(this);
|
|
4554
|
+
var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
|
|
4555
|
+
return replacer
|
|
4556
|
+
? call$3(replacer, searchValue, O, replaceValue)
|
|
4557
|
+
: call$3(nativeReplace, toString$2(O), searchValue, replaceValue);
|
|
4558
|
+
},
|
|
4559
|
+
// `RegExp.prototype[@@replace]` method
|
|
4560
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
4561
|
+
function (string, replaceValue) {
|
|
4562
|
+
var rx = anObject$1(this);
|
|
4563
|
+
var S = toString$2(string);
|
|
4564
|
+
|
|
4565
|
+
if (
|
|
4566
|
+
typeof replaceValue == 'string' &&
|
|
4567
|
+
stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
|
|
4568
|
+
stringIndexOf(replaceValue, '$<') === -1
|
|
4569
|
+
) {
|
|
4570
|
+
var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
|
|
4571
|
+
if (res.done) return res.value;
|
|
4572
|
+
}
|
|
4573
|
+
|
|
4574
|
+
var functionalReplace = isCallable$2(replaceValue);
|
|
4575
|
+
if (!functionalReplace) replaceValue = toString$2(replaceValue);
|
|
4576
|
+
|
|
4577
|
+
var global = rx.global;
|
|
4578
|
+
if (global) {
|
|
4579
|
+
var fullUnicode = rx.unicode;
|
|
4580
|
+
rx.lastIndex = 0;
|
|
4581
|
+
}
|
|
4582
|
+
var results = [];
|
|
4583
|
+
while (true) {
|
|
4584
|
+
var result = regExpExec(rx, S);
|
|
4585
|
+
if (result === null) break;
|
|
4586
|
+
|
|
4587
|
+
push$1(results, result);
|
|
4588
|
+
if (!global) break;
|
|
4589
|
+
|
|
4590
|
+
var matchStr = toString$2(result[0]);
|
|
4591
|
+
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength$6(rx.lastIndex), fullUnicode);
|
|
4592
|
+
}
|
|
4593
|
+
|
|
4594
|
+
var accumulatedResult = '';
|
|
4595
|
+
var nextSourcePosition = 0;
|
|
4596
|
+
for (var i = 0; i < results.length; i++) {
|
|
4597
|
+
result = results[i];
|
|
4598
|
+
|
|
4599
|
+
var matched = toString$2(result[0]);
|
|
4600
|
+
var position = max(min$2(toIntegerOrInfinity$3(result.index), S.length), 0);
|
|
4601
|
+
var captures = [];
|
|
4602
|
+
// NOTE: This is equivalent to
|
|
4603
|
+
// captures = result.slice(1).map(maybeToString)
|
|
4604
|
+
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
4605
|
+
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
4606
|
+
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
4607
|
+
for (var j = 1; j < result.length; j++) push$1(captures, maybeToString(result[j]));
|
|
4608
|
+
var namedCaptures = result.groups;
|
|
4609
|
+
if (functionalReplace) {
|
|
4610
|
+
var replacerArgs = concat([matched], captures, position, S);
|
|
4611
|
+
if (namedCaptures !== undefined) push$1(replacerArgs, namedCaptures);
|
|
4612
|
+
var replacement = toString$2(apply$1(replaceValue, undefined, replacerArgs));
|
|
4613
|
+
} else {
|
|
4614
|
+
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
4615
|
+
}
|
|
4616
|
+
if (position >= nextSourcePosition) {
|
|
4617
|
+
accumulatedResult += stringSlice$1(S, nextSourcePosition, position) + replacement;
|
|
4618
|
+
nextSourcePosition = position + matched.length;
|
|
4619
|
+
}
|
|
4620
|
+
}
|
|
4621
|
+
return accumulatedResult + stringSlice$1(S, nextSourcePosition);
|
|
4622
|
+
}
|
|
4623
|
+
];
|
|
4624
|
+
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
4625
|
+
|
|
4445
4626
|
// eslint-disable-next-line es-x/no-typed-arrays -- safe
|
|
4446
4627
|
var arrayBufferNative = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
|
|
4447
4628
|
|
|
4448
4629
|
var global$d = global$V;
|
|
4449
|
-
var toIntegerOrInfinity$
|
|
4450
|
-
var toLength$
|
|
4630
|
+
var toIntegerOrInfinity$2 = toIntegerOrInfinity$7;
|
|
4631
|
+
var toLength$5 = toLength$9;
|
|
4451
4632
|
|
|
4452
4633
|
var RangeError$5 = global$d.RangeError;
|
|
4453
4634
|
|
|
@@ -4455,8 +4636,8 @@
|
|
|
4455
4636
|
// https://tc39.es/ecma262/#sec-toindex
|
|
4456
4637
|
var toIndex$2 = function (it) {
|
|
4457
4638
|
if (it === undefined) return 0;
|
|
4458
|
-
var number = toIntegerOrInfinity$
|
|
4459
|
-
var length = toLength$
|
|
4639
|
+
var number = toIntegerOrInfinity$2(it);
|
|
4640
|
+
var length = toLength$5(number);
|
|
4460
4641
|
if (number !== length) throw RangeError$5('Wrong length or index');
|
|
4461
4642
|
return length;
|
|
4462
4643
|
};
|
|
@@ -4467,7 +4648,7 @@
|
|
|
4467
4648
|
var Array$3 = global$c.Array;
|
|
4468
4649
|
var abs = Math.abs;
|
|
4469
4650
|
var pow = Math.pow;
|
|
4470
|
-
var floor$
|
|
4651
|
+
var floor$1 = Math.floor;
|
|
4471
4652
|
var log = Math.log;
|
|
4472
4653
|
var LN2 = Math.LN2;
|
|
4473
4654
|
|
|
@@ -4487,7 +4668,7 @@
|
|
|
4487
4668
|
mantissa = number != number ? 1 : 0;
|
|
4488
4669
|
exponent = eMax;
|
|
4489
4670
|
} else {
|
|
4490
|
-
exponent = floor$
|
|
4671
|
+
exponent = floor$1(log(number) / LN2);
|
|
4491
4672
|
c = pow(2, -exponent);
|
|
4492
4673
|
if (number * c < 1) {
|
|
4493
4674
|
exponent--;
|
|
@@ -4566,14 +4747,14 @@
|
|
|
4566
4747
|
unpack: unpack
|
|
4567
4748
|
};
|
|
4568
4749
|
|
|
4569
|
-
var toObject$
|
|
4750
|
+
var toObject$2 = toObject$7;
|
|
4570
4751
|
var toAbsoluteIndex$1 = toAbsoluteIndex$4;
|
|
4571
4752
|
var lengthOfArrayLike$3 = lengthOfArrayLike$7;
|
|
4572
4753
|
|
|
4573
4754
|
// `Array.prototype.fill` method implementation
|
|
4574
4755
|
// https://tc39.es/ecma262/#sec-array.prototype.fill
|
|
4575
4756
|
var arrayFill$1 = function fill(value /* , start = 0, end = @length */) {
|
|
4576
|
-
var O = toObject$
|
|
4757
|
+
var O = toObject$2(this);
|
|
4577
4758
|
var length = lengthOfArrayLike$3(O);
|
|
4578
4759
|
var argumentsLength = arguments.length;
|
|
4579
4760
|
var index = toAbsoluteIndex$1(argumentsLength > 1 ? arguments[1] : undefined, length);
|
|
@@ -4584,16 +4765,16 @@
|
|
|
4584
4765
|
};
|
|
4585
4766
|
|
|
4586
4767
|
var global$b = global$V;
|
|
4587
|
-
var uncurryThis$
|
|
4768
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
4588
4769
|
var DESCRIPTORS$2 = descriptors;
|
|
4589
4770
|
var NATIVE_ARRAY_BUFFER$1 = arrayBufferNative;
|
|
4590
4771
|
var FunctionName = functionName;
|
|
4591
4772
|
var createNonEnumerableProperty$2 = createNonEnumerableProperty$9;
|
|
4592
4773
|
var defineBuiltIns = defineBuiltIns$2;
|
|
4593
|
-
var fails$
|
|
4774
|
+
var fails$5 = fails$r;
|
|
4594
4775
|
var anInstance$1 = anInstance$4;
|
|
4595
|
-
var toIntegerOrInfinity$
|
|
4596
|
-
var toLength$
|
|
4776
|
+
var toIntegerOrInfinity$1 = toIntegerOrInfinity$7;
|
|
4777
|
+
var toLength$4 = toLength$9;
|
|
4597
4778
|
var toIndex$1 = toIndex$2;
|
|
4598
4779
|
var IEEE754 = ieee754;
|
|
4599
4780
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
@@ -4622,8 +4803,8 @@
|
|
|
4622
4803
|
var ObjectPrototype$1 = Object.prototype;
|
|
4623
4804
|
var Array$2 = global$b.Array;
|
|
4624
4805
|
var RangeError$4 = global$b.RangeError;
|
|
4625
|
-
var fill = uncurryThis$
|
|
4626
|
-
var reverse = uncurryThis$
|
|
4806
|
+
var fill = uncurryThis$5(arrayFill);
|
|
4807
|
+
var reverse = uncurryThis$5([].reverse);
|
|
4627
4808
|
|
|
4628
4809
|
var packIEEE754 = IEEE754.pack;
|
|
4629
4810
|
var unpackIEEE754 = IEEE754.unpack;
|
|
@@ -4693,9 +4874,9 @@
|
|
|
4693
4874
|
anInstance$1(this, DataViewPrototype$1);
|
|
4694
4875
|
anInstance$1(buffer, ArrayBufferPrototype$1);
|
|
4695
4876
|
var bufferLength = getInternalState$1(buffer).byteLength;
|
|
4696
|
-
var offset = toIntegerOrInfinity$
|
|
4877
|
+
var offset = toIntegerOrInfinity$1(byteOffset);
|
|
4697
4878
|
if (offset < 0 || offset > bufferLength) throw RangeError$4('Wrong offset');
|
|
4698
|
-
byteLength = byteLength === undefined ? bufferLength - offset : toLength$
|
|
4879
|
+
byteLength = byteLength === undefined ? bufferLength - offset : toLength$4(byteLength);
|
|
4699
4880
|
if (offset + byteLength > bufferLength) throw RangeError$4(WRONG_LENGTH$1);
|
|
4700
4881
|
setInternalState$1(this, {
|
|
4701
4882
|
buffer: buffer,
|
|
@@ -4773,11 +4954,11 @@
|
|
|
4773
4954
|
} else {
|
|
4774
4955
|
var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME && NativeArrayBuffer.name !== ARRAY_BUFFER;
|
|
4775
4956
|
/* eslint-disable no-new -- required for testing */
|
|
4776
|
-
if (!fails$
|
|
4957
|
+
if (!fails$5(function () {
|
|
4777
4958
|
NativeArrayBuffer(1);
|
|
4778
|
-
}) || !fails$
|
|
4959
|
+
}) || !fails$5(function () {
|
|
4779
4960
|
new NativeArrayBuffer(-1);
|
|
4780
|
-
}) || fails$
|
|
4961
|
+
}) || fails$5(function () {
|
|
4781
4962
|
new NativeArrayBuffer();
|
|
4782
4963
|
new NativeArrayBuffer(1.5);
|
|
4783
4964
|
new NativeArrayBuffer(NaN);
|
|
@@ -4809,7 +4990,7 @@
|
|
|
4809
4990
|
|
|
4810
4991
|
// iOS Safari 7.x bug
|
|
4811
4992
|
var testView = new $DataView(new $ArrayBuffer(2));
|
|
4812
|
-
var $setInt8 = uncurryThis$
|
|
4993
|
+
var $setInt8 = uncurryThis$5(DataViewPrototype$1.setInt8);
|
|
4813
4994
|
testView.setInt8(0, 2147483648);
|
|
4814
4995
|
testView.setInt8(1, 2147483649);
|
|
4815
4996
|
if (testView.getInt8(0) || !testView.getInt8(1)) defineBuiltIns(DataViewPrototype$1, {
|
|
@@ -4831,22 +5012,22 @@
|
|
|
4831
5012
|
};
|
|
4832
5013
|
|
|
4833
5014
|
var $$3 = _export;
|
|
4834
|
-
var uncurryThis$
|
|
4835
|
-
var fails$
|
|
5015
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
5016
|
+
var fails$4 = fails$r;
|
|
4836
5017
|
var ArrayBufferModule$1 = arrayBuffer;
|
|
4837
|
-
var anObject
|
|
5018
|
+
var anObject = anObject$i;
|
|
4838
5019
|
var toAbsoluteIndex = toAbsoluteIndex$4;
|
|
4839
|
-
var toLength$
|
|
5020
|
+
var toLength$3 = toLength$9;
|
|
4840
5021
|
var speciesConstructor = speciesConstructor$3;
|
|
4841
5022
|
|
|
4842
5023
|
var ArrayBuffer$3 = ArrayBufferModule$1.ArrayBuffer;
|
|
4843
5024
|
var DataView$2 = ArrayBufferModule$1.DataView;
|
|
4844
5025
|
var DataViewPrototype = DataView$2.prototype;
|
|
4845
|
-
var un$ArrayBufferSlice = uncurryThis$
|
|
4846
|
-
var getUint8 = uncurryThis$
|
|
4847
|
-
var setUint8 = uncurryThis$
|
|
5026
|
+
var un$ArrayBufferSlice = uncurryThis$4(ArrayBuffer$3.prototype.slice);
|
|
5027
|
+
var getUint8 = uncurryThis$4(DataViewPrototype.getUint8);
|
|
5028
|
+
var setUint8 = uncurryThis$4(DataViewPrototype.setUint8);
|
|
4848
5029
|
|
|
4849
|
-
var INCORRECT_SLICE = fails$
|
|
5030
|
+
var INCORRECT_SLICE = fails$4(function () {
|
|
4850
5031
|
return !new ArrayBuffer$3(2).slice(1, undefined).byteLength;
|
|
4851
5032
|
});
|
|
4852
5033
|
|
|
@@ -4855,12 +5036,12 @@
|
|
|
4855
5036
|
$$3({ target: 'ArrayBuffer', proto: true, unsafe: true, forced: INCORRECT_SLICE }, {
|
|
4856
5037
|
slice: function slice(start, end) {
|
|
4857
5038
|
if (un$ArrayBufferSlice && end === undefined) {
|
|
4858
|
-
return un$ArrayBufferSlice(anObject
|
|
5039
|
+
return un$ArrayBufferSlice(anObject(this), start); // FF fix
|
|
4859
5040
|
}
|
|
4860
|
-
var length = anObject
|
|
5041
|
+
var length = anObject(this).byteLength;
|
|
4861
5042
|
var first = toAbsoluteIndex(start, length);
|
|
4862
5043
|
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
|
4863
|
-
var result = new (speciesConstructor(this, ArrayBuffer$3))(toLength$
|
|
5044
|
+
var result = new (speciesConstructor(this, ArrayBuffer$3))(toLength$3(fin - first));
|
|
4864
5045
|
var viewSource = new DataView$2(this);
|
|
4865
5046
|
var viewTarget = new DataView$2(result);
|
|
4866
5047
|
var index = 0;
|
|
@@ -4875,7 +5056,7 @@
|
|
|
4875
5056
|
var NATIVE_ARRAY_BUFFER = arrayBufferNative;
|
|
4876
5057
|
var DESCRIPTORS$1 = descriptors;
|
|
4877
5058
|
var global$a = global$V;
|
|
4878
|
-
var isCallable$
|
|
5059
|
+
var isCallable$1 = isCallable$p;
|
|
4879
5060
|
var isObject$4 = isObject$e;
|
|
4880
5061
|
var hasOwn$1 = hasOwnProperty_1;
|
|
4881
5062
|
var classof$2 = classof$9;
|
|
@@ -4886,7 +5067,7 @@
|
|
|
4886
5067
|
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
4887
5068
|
var getPrototypeOf = objectGetPrototypeOf;
|
|
4888
5069
|
var setPrototypeOf$2 = objectSetPrototypeOf;
|
|
4889
|
-
var wellKnownSymbol$
|
|
5070
|
+
var wellKnownSymbol$2 = wellKnownSymbol$m;
|
|
4890
5071
|
var uid = uid$3;
|
|
4891
5072
|
|
|
4892
5073
|
var Int8Array$3 = global$a.Int8Array;
|
|
@@ -4898,7 +5079,7 @@
|
|
|
4898
5079
|
var ObjectPrototype = Object.prototype;
|
|
4899
5080
|
var TypeError$2 = global$a.TypeError;
|
|
4900
5081
|
|
|
4901
|
-
var TO_STRING_TAG = wellKnownSymbol$
|
|
5082
|
+
var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
|
|
4902
5083
|
var TYPED_ARRAY_TAG$1 = uid('TYPED_ARRAY_TAG');
|
|
4903
5084
|
var TYPED_ARRAY_CONSTRUCTOR$1 = uid('TYPED_ARRAY_CONSTRUCTOR');
|
|
4904
5085
|
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
|
|
@@ -4944,7 +5125,7 @@
|
|
|
4944
5125
|
};
|
|
4945
5126
|
|
|
4946
5127
|
var aTypedArrayConstructor$2 = function (C) {
|
|
4947
|
-
if (isCallable$
|
|
5128
|
+
if (isCallable$1(C) && (!setPrototypeOf$2 || isPrototypeOf$1(TypedArray$1, C))) return C;
|
|
4948
5129
|
throw TypeError$2(tryToString(C) + ' is not a typed array constructor');
|
|
4949
5130
|
};
|
|
4950
5131
|
|
|
@@ -5006,7 +5187,7 @@
|
|
|
5006
5187
|
}
|
|
5007
5188
|
|
|
5008
5189
|
// WebKit bug - typed arrays constructors prototype is Object.prototype
|
|
5009
|
-
if (!NATIVE_ARRAY_BUFFER_VIEWS$2 || !isCallable$
|
|
5190
|
+
if (!NATIVE_ARRAY_BUFFER_VIEWS$2 || !isCallable$1(TypedArray$1) || TypedArray$1 === Function.prototype) {
|
|
5010
5191
|
// eslint-disable-next-line no-shadow -- safe
|
|
5011
5192
|
TypedArray$1 = function TypedArray() {
|
|
5012
5193
|
throw TypeError$2('Incorrect invocation');
|
|
@@ -5055,45 +5236,45 @@
|
|
|
5055
5236
|
/* eslint-disable no-new -- required for testing */
|
|
5056
5237
|
|
|
5057
5238
|
var global$9 = global$V;
|
|
5058
|
-
var fails$
|
|
5239
|
+
var fails$3 = fails$r;
|
|
5059
5240
|
var checkCorrectnessOfIteration = checkCorrectnessOfIteration$2;
|
|
5060
5241
|
var NATIVE_ARRAY_BUFFER_VIEWS$1 = arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
|
|
5061
5242
|
|
|
5062
5243
|
var ArrayBuffer$2 = global$9.ArrayBuffer;
|
|
5063
5244
|
var Int8Array$2 = global$9.Int8Array;
|
|
5064
5245
|
|
|
5065
|
-
var typedArrayConstructorsRequireWrappers = !NATIVE_ARRAY_BUFFER_VIEWS$1 || !fails$
|
|
5246
|
+
var typedArrayConstructorsRequireWrappers = !NATIVE_ARRAY_BUFFER_VIEWS$1 || !fails$3(function () {
|
|
5066
5247
|
Int8Array$2(1);
|
|
5067
|
-
}) || !fails$
|
|
5248
|
+
}) || !fails$3(function () {
|
|
5068
5249
|
new Int8Array$2(-1);
|
|
5069
5250
|
}) || !checkCorrectnessOfIteration(function (iterable) {
|
|
5070
5251
|
new Int8Array$2();
|
|
5071
5252
|
new Int8Array$2(null);
|
|
5072
5253
|
new Int8Array$2(1.5);
|
|
5073
5254
|
new Int8Array$2(iterable);
|
|
5074
|
-
}, true) || fails$
|
|
5255
|
+
}, true) || fails$3(function () {
|
|
5075
5256
|
// Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill
|
|
5076
5257
|
return new Int8Array$2(new ArrayBuffer$2(2), 1, undefined).length !== 1;
|
|
5077
5258
|
});
|
|
5078
5259
|
|
|
5079
5260
|
var isObject$3 = isObject$e;
|
|
5080
5261
|
|
|
5081
|
-
var floor
|
|
5262
|
+
var floor = Math.floor;
|
|
5082
5263
|
|
|
5083
5264
|
// `IsIntegralNumber` abstract operation
|
|
5084
5265
|
// https://tc39.es/ecma262/#sec-isintegralnumber
|
|
5085
5266
|
// eslint-disable-next-line es-x/no-number-isinteger -- safe
|
|
5086
5267
|
var isIntegralNumber$1 = Number.isInteger || function isInteger(it) {
|
|
5087
|
-
return !isObject$3(it) && isFinite(it) && floor
|
|
5268
|
+
return !isObject$3(it) && isFinite(it) && floor(it) === it;
|
|
5088
5269
|
};
|
|
5089
5270
|
|
|
5090
5271
|
var global$8 = global$V;
|
|
5091
|
-
var toIntegerOrInfinity
|
|
5272
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$7;
|
|
5092
5273
|
|
|
5093
5274
|
var RangeError$3 = global$8.RangeError;
|
|
5094
5275
|
|
|
5095
5276
|
var toPositiveInteger$1 = function (it) {
|
|
5096
|
-
var result = toIntegerOrInfinity
|
|
5277
|
+
var result = toIntegerOrInfinity(it);
|
|
5097
5278
|
if (result < 0) throw RangeError$3("The argument can't be less than 0");
|
|
5098
5279
|
return result;
|
|
5099
5280
|
};
|
|
@@ -5110,9 +5291,9 @@
|
|
|
5110
5291
|
};
|
|
5111
5292
|
|
|
5112
5293
|
var bind$1 = functionBindContext;
|
|
5113
|
-
var call$
|
|
5294
|
+
var call$2 = functionCall;
|
|
5114
5295
|
var aConstructor = aConstructor$2;
|
|
5115
|
-
var toObject$
|
|
5296
|
+
var toObject$1 = toObject$7;
|
|
5116
5297
|
var lengthOfArrayLike$2 = lengthOfArrayLike$7;
|
|
5117
5298
|
var getIterator = getIterator$3;
|
|
5118
5299
|
var getIteratorMethod = getIteratorMethod$4;
|
|
@@ -5121,7 +5302,7 @@
|
|
|
5121
5302
|
|
|
5122
5303
|
var typedArrayFrom$1 = function from(source /* , mapfn, thisArg */) {
|
|
5123
5304
|
var C = aConstructor(this);
|
|
5124
|
-
var O = toObject$
|
|
5305
|
+
var O = toObject$1(source);
|
|
5125
5306
|
var argumentsLength = arguments.length;
|
|
5126
5307
|
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
|
|
5127
5308
|
var mapping = mapfn !== undefined;
|
|
@@ -5131,7 +5312,7 @@
|
|
|
5131
5312
|
iterator = getIterator(O, iteratorMethod);
|
|
5132
5313
|
next = iterator.next;
|
|
5133
5314
|
O = [];
|
|
5134
|
-
while (!(step = call$
|
|
5315
|
+
while (!(step = call$2(next, iterator)).done) {
|
|
5135
5316
|
O.push(step.value);
|
|
5136
5317
|
}
|
|
5137
5318
|
}
|
|
@@ -5159,9 +5340,9 @@
|
|
|
5159
5340
|
var isArray = isArray$1;
|
|
5160
5341
|
var isConstructor = isConstructor$2;
|
|
5161
5342
|
var isObject$2 = isObject$e;
|
|
5162
|
-
var wellKnownSymbol$
|
|
5343
|
+
var wellKnownSymbol$1 = wellKnownSymbol$m;
|
|
5163
5344
|
|
|
5164
|
-
var SPECIES = wellKnownSymbol$
|
|
5345
|
+
var SPECIES = wellKnownSymbol$1('species');
|
|
5165
5346
|
var Array$1 = global$6.Array;
|
|
5166
5347
|
|
|
5167
5348
|
// a part of `ArraySpeciesCreate` abstract operation
|
|
@@ -5188,13 +5369,13 @@
|
|
|
5188
5369
|
};
|
|
5189
5370
|
|
|
5190
5371
|
var bind = functionBindContext;
|
|
5191
|
-
var uncurryThis$
|
|
5372
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
5192
5373
|
var IndexedObject = indexedObject;
|
|
5193
|
-
var toObject
|
|
5374
|
+
var toObject = toObject$7;
|
|
5194
5375
|
var lengthOfArrayLike$1 = lengthOfArrayLike$7;
|
|
5195
5376
|
var arraySpeciesCreate = arraySpeciesCreate$1;
|
|
5196
5377
|
|
|
5197
|
-
var push
|
|
5378
|
+
var push = uncurryThis$3([].push);
|
|
5198
5379
|
|
|
5199
5380
|
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
|
|
5200
5381
|
var createMethod = function (TYPE) {
|
|
@@ -5206,7 +5387,7 @@
|
|
|
5206
5387
|
var IS_FILTER_REJECT = TYPE == 7;
|
|
5207
5388
|
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
|
5208
5389
|
return function ($this, callbackfn, that, specificCreate) {
|
|
5209
|
-
var O = toObject
|
|
5390
|
+
var O = toObject($this);
|
|
5210
5391
|
var self = IndexedObject(O);
|
|
5211
5392
|
var boundFunction = bind(callbackfn, that);
|
|
5212
5393
|
var length = lengthOfArrayLike$1(self);
|
|
@@ -5223,10 +5404,10 @@
|
|
|
5223
5404
|
case 3: return true; // some
|
|
5224
5405
|
case 5: return value; // find
|
|
5225
5406
|
case 6: return index; // findIndex
|
|
5226
|
-
case 2: push
|
|
5407
|
+
case 2: push(target, value); // filter
|
|
5227
5408
|
} else switch (TYPE) {
|
|
5228
5409
|
case 4: return false; // every
|
|
5229
|
-
case 7: push
|
|
5410
|
+
case 7: push(target, value); // filterReject
|
|
5230
5411
|
}
|
|
5231
5412
|
}
|
|
5232
5413
|
}
|
|
@@ -5261,7 +5442,7 @@
|
|
|
5261
5442
|
filterReject: createMethod(7)
|
|
5262
5443
|
};
|
|
5263
5444
|
|
|
5264
|
-
var isCallable
|
|
5445
|
+
var isCallable = isCallable$p;
|
|
5265
5446
|
var isObject$1 = isObject$e;
|
|
5266
5447
|
var setPrototypeOf$1 = objectSetPrototypeOf;
|
|
5267
5448
|
|
|
@@ -5272,7 +5453,7 @@
|
|
|
5272
5453
|
// it can work only with native `setPrototypeOf`
|
|
5273
5454
|
setPrototypeOf$1 &&
|
|
5274
5455
|
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
|
5275
|
-
isCallable
|
|
5456
|
+
isCallable(NewTarget = dummy.constructor) &&
|
|
5276
5457
|
NewTarget !== Wrapper &&
|
|
5277
5458
|
isObject$1(NewTargetPrototype = NewTarget.prototype) &&
|
|
5278
5459
|
NewTargetPrototype !== Wrapper.prototype
|
|
@@ -5282,7 +5463,7 @@
|
|
|
5282
5463
|
|
|
5283
5464
|
var $$2 = _export;
|
|
5284
5465
|
var global$5 = global$V;
|
|
5285
|
-
var call$
|
|
5466
|
+
var call$1 = functionCall;
|
|
5286
5467
|
var DESCRIPTORS = descriptors;
|
|
5287
5468
|
var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = typedArrayConstructorsRequireWrappers;
|
|
5288
5469
|
var ArrayBufferViewCore$3 = arrayBufferViewCore;
|
|
@@ -5291,7 +5472,7 @@
|
|
|
5291
5472
|
var createPropertyDescriptor = createPropertyDescriptor$6;
|
|
5292
5473
|
var createNonEnumerableProperty = createNonEnumerableProperty$9;
|
|
5293
5474
|
var isIntegralNumber = isIntegralNumber$1;
|
|
5294
|
-
var toLength$
|
|
5475
|
+
var toLength$2 = toLength$9;
|
|
5295
5476
|
var toIndex = toIndex$2;
|
|
5296
5477
|
var toOffset$1 = toOffset$2;
|
|
5297
5478
|
var toPropertyKey = toPropertyKey$4;
|
|
@@ -5449,14 +5630,14 @@
|
|
|
5449
5630
|
byteLength = $len - byteOffset;
|
|
5450
5631
|
if (byteLength < 0) throw RangeError$1(WRONG_LENGTH);
|
|
5451
5632
|
} else {
|
|
5452
|
-
byteLength = toLength$
|
|
5633
|
+
byteLength = toLength$2($length) * BYTES;
|
|
5453
5634
|
if (byteLength + byteOffset > $len) throw RangeError$1(WRONG_LENGTH);
|
|
5454
5635
|
}
|
|
5455
5636
|
length = byteLength / BYTES;
|
|
5456
5637
|
} else if (isTypedArray(data)) {
|
|
5457
5638
|
return fromList(TypedArrayConstructor, data);
|
|
5458
5639
|
} else {
|
|
5459
|
-
return call$
|
|
5640
|
+
return call$1(typedArrayFrom, TypedArrayConstructor, data);
|
|
5460
5641
|
}
|
|
5461
5642
|
setInternalState(that, {
|
|
5462
5643
|
buffer: buffer,
|
|
@@ -5481,7 +5662,7 @@
|
|
|
5481
5662
|
? new NativeTypedArrayConstructor(data, toOffset$1(typedArrayOffset, BYTES))
|
|
5482
5663
|
: new NativeTypedArrayConstructor(data);
|
|
5483
5664
|
if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);
|
|
5484
|
-
return call$
|
|
5665
|
+
return call$1(typedArrayFrom, TypedArrayConstructor, data);
|
|
5485
5666
|
}(), dummy, TypedArrayConstructor);
|
|
5486
5667
|
});
|
|
5487
5668
|
|
|
@@ -5533,12 +5714,12 @@
|
|
|
5533
5714
|
});
|
|
5534
5715
|
|
|
5535
5716
|
var global$4 = global$V;
|
|
5536
|
-
var call
|
|
5717
|
+
var call = functionCall;
|
|
5537
5718
|
var ArrayBufferViewCore$2 = arrayBufferViewCore;
|
|
5538
5719
|
var lengthOfArrayLike = lengthOfArrayLike$7;
|
|
5539
5720
|
var toOffset = toOffset$2;
|
|
5540
5721
|
var toIndexedObject = toObject$7;
|
|
5541
|
-
var fails$
|
|
5722
|
+
var fails$2 = fails$r;
|
|
5542
5723
|
|
|
5543
5724
|
var RangeError = global$4.RangeError;
|
|
5544
5725
|
var Int8Array$1 = global$4.Int8Array;
|
|
@@ -5547,15 +5728,15 @@
|
|
|
5547
5728
|
var aTypedArray$2 = ArrayBufferViewCore$2.aTypedArray;
|
|
5548
5729
|
var exportTypedArrayMethod$2 = ArrayBufferViewCore$2.exportTypedArrayMethod;
|
|
5549
5730
|
|
|
5550
|
-
var WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS = !fails$
|
|
5731
|
+
var WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS = !fails$2(function () {
|
|
5551
5732
|
// eslint-disable-next-line es-x/no-typed-arrays -- required for testing
|
|
5552
5733
|
var array = new Uint8ClampedArray(2);
|
|
5553
|
-
call
|
|
5734
|
+
call($set, array, { length: 1, 0: 3 }, 1);
|
|
5554
5735
|
return array[1] !== 3;
|
|
5555
5736
|
});
|
|
5556
5737
|
|
|
5557
5738
|
// https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other
|
|
5558
|
-
var TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore$2.NATIVE_ARRAY_BUFFER_VIEWS && fails$
|
|
5739
|
+
var TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore$2.NATIVE_ARRAY_BUFFER_VIEWS && fails$2(function () {
|
|
5559
5740
|
var array = new Int8Array$1(2);
|
|
5560
5741
|
array.set(1);
|
|
5561
5742
|
array.set('2', 1);
|
|
@@ -5568,7 +5749,7 @@
|
|
|
5568
5749
|
aTypedArray$2(this);
|
|
5569
5750
|
var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
|
|
5570
5751
|
var src = toIndexedObject(arrayLike);
|
|
5571
|
-
if (WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS) return call
|
|
5752
|
+
if (WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);
|
|
5572
5753
|
var length = this.length;
|
|
5573
5754
|
var len = lengthOfArrayLike(src);
|
|
5574
5755
|
var index = 0;
|
|
@@ -5593,8 +5774,8 @@
|
|
|
5593
5774
|
var engineWebkitVersion = !!webkit && +webkit[1];
|
|
5594
5775
|
|
|
5595
5776
|
var global$3 = global$V;
|
|
5596
|
-
var uncurryThis$
|
|
5597
|
-
var fails$
|
|
5777
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
5778
|
+
var fails$1 = fails$r;
|
|
5598
5779
|
var aCallable = aCallable$8;
|
|
5599
5780
|
var internalSort = arraySort$1;
|
|
5600
5781
|
var ArrayBufferViewCore$1 = arrayBufferViewCore;
|
|
@@ -5606,16 +5787,16 @@
|
|
|
5606
5787
|
var aTypedArray$1 = ArrayBufferViewCore$1.aTypedArray;
|
|
5607
5788
|
var exportTypedArrayMethod$1 = ArrayBufferViewCore$1.exportTypedArrayMethod;
|
|
5608
5789
|
var Uint16Array = global$3.Uint16Array;
|
|
5609
|
-
var un$Sort = Uint16Array && uncurryThis$
|
|
5790
|
+
var un$Sort = Uint16Array && uncurryThis$2(Uint16Array.prototype.sort);
|
|
5610
5791
|
|
|
5611
5792
|
// WebKit
|
|
5612
|
-
var ACCEPT_INCORRECT_ARGUMENTS = !!un$Sort && !(fails$
|
|
5793
|
+
var ACCEPT_INCORRECT_ARGUMENTS = !!un$Sort && !(fails$1(function () {
|
|
5613
5794
|
un$Sort(new Uint16Array(2), null);
|
|
5614
|
-
}) && fails$
|
|
5795
|
+
}) && fails$1(function () {
|
|
5615
5796
|
un$Sort(new Uint16Array(2), {});
|
|
5616
5797
|
}));
|
|
5617
5798
|
|
|
5618
|
-
var STABLE_SORT = !!un$Sort && !fails$
|
|
5799
|
+
var STABLE_SORT = !!un$Sort && !fails$1(function () {
|
|
5619
5800
|
// feature detection can be too slow, so check engines versions
|
|
5620
5801
|
if (V8) return V8 < 74;
|
|
5621
5802
|
if (FF) return FF < 67;
|
|
@@ -5663,9 +5844,9 @@
|
|
|
5663
5844
|
}, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS);
|
|
5664
5845
|
|
|
5665
5846
|
var global$2 = global$V;
|
|
5666
|
-
var apply
|
|
5847
|
+
var apply = functionApply;
|
|
5667
5848
|
var ArrayBufferViewCore = arrayBufferViewCore;
|
|
5668
|
-
var fails
|
|
5849
|
+
var fails = fails$r;
|
|
5669
5850
|
var arraySlice = arraySlice$5;
|
|
5670
5851
|
|
|
5671
5852
|
var Int8Array = global$2.Int8Array;
|
|
@@ -5674,207 +5855,26 @@
|
|
|
5674
5855
|
var $toLocaleString = [].toLocaleString;
|
|
5675
5856
|
|
|
5676
5857
|
// iOS Safari 6.x fails here
|
|
5677
|
-
var TO_LOCALE_STRING_BUG = !!Int8Array && fails
|
|
5858
|
+
var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {
|
|
5678
5859
|
$toLocaleString.call(new Int8Array(1));
|
|
5679
5860
|
});
|
|
5680
5861
|
|
|
5681
|
-
var FORCED = fails
|
|
5862
|
+
var FORCED = fails(function () {
|
|
5682
5863
|
return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();
|
|
5683
|
-
}) || !fails
|
|
5864
|
+
}) || !fails(function () {
|
|
5684
5865
|
Int8Array.prototype.toLocaleString.call([1, 2]);
|
|
5685
5866
|
});
|
|
5686
5867
|
|
|
5687
5868
|
// `%TypedArray%.prototype.toLocaleString` method
|
|
5688
5869
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
|
|
5689
5870
|
exportTypedArrayMethod('toLocaleString', function toLocaleString() {
|
|
5690
|
-
return apply
|
|
5871
|
+
return apply(
|
|
5691
5872
|
$toLocaleString,
|
|
5692
5873
|
TO_LOCALE_STRING_BUG ? arraySlice(aTypedArray(this)) : aTypedArray(this),
|
|
5693
5874
|
arraySlice(arguments)
|
|
5694
5875
|
);
|
|
5695
5876
|
}, FORCED);
|
|
5696
5877
|
|
|
5697
|
-
var uncurryThis$3 = functionUncurryThis;
|
|
5698
|
-
var toObject = toObject$7;
|
|
5699
|
-
|
|
5700
|
-
var floor = Math.floor;
|
|
5701
|
-
var charAt = uncurryThis$3(''.charAt);
|
|
5702
|
-
var replace = uncurryThis$3(''.replace);
|
|
5703
|
-
var stringSlice$2 = uncurryThis$3(''.slice);
|
|
5704
|
-
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
|
5705
|
-
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
|
5706
|
-
|
|
5707
|
-
// `GetSubstitution` abstract operation
|
|
5708
|
-
// https://tc39.es/ecma262/#sec-getsubstitution
|
|
5709
|
-
var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
|
|
5710
|
-
var tailPos = position + matched.length;
|
|
5711
|
-
var m = captures.length;
|
|
5712
|
-
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
5713
|
-
if (namedCaptures !== undefined) {
|
|
5714
|
-
namedCaptures = toObject(namedCaptures);
|
|
5715
|
-
symbols = SUBSTITUTION_SYMBOLS;
|
|
5716
|
-
}
|
|
5717
|
-
return replace(replacement, symbols, function (match, ch) {
|
|
5718
|
-
var capture;
|
|
5719
|
-
switch (charAt(ch, 0)) {
|
|
5720
|
-
case '$': return '$';
|
|
5721
|
-
case '&': return matched;
|
|
5722
|
-
case '`': return stringSlice$2(str, 0, position);
|
|
5723
|
-
case "'": return stringSlice$2(str, tailPos);
|
|
5724
|
-
case '<':
|
|
5725
|
-
capture = namedCaptures[stringSlice$2(ch, 1, -1)];
|
|
5726
|
-
break;
|
|
5727
|
-
default: // \d\d?
|
|
5728
|
-
var n = +ch;
|
|
5729
|
-
if (n === 0) return match;
|
|
5730
|
-
if (n > m) {
|
|
5731
|
-
var f = floor(n / 10);
|
|
5732
|
-
if (f === 0) return match;
|
|
5733
|
-
if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
|
|
5734
|
-
return match;
|
|
5735
|
-
}
|
|
5736
|
-
capture = captures[n - 1];
|
|
5737
|
-
}
|
|
5738
|
-
return capture === undefined ? '' : capture;
|
|
5739
|
-
});
|
|
5740
|
-
};
|
|
5741
|
-
|
|
5742
|
-
var apply = functionApply;
|
|
5743
|
-
var call = functionCall;
|
|
5744
|
-
var uncurryThis$2 = functionUncurryThis;
|
|
5745
|
-
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
5746
|
-
var fails = fails$r;
|
|
5747
|
-
var anObject = anObject$i;
|
|
5748
|
-
var isCallable = isCallable$p;
|
|
5749
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$7;
|
|
5750
|
-
var toLength$2 = toLength$9;
|
|
5751
|
-
var toString$2 = toString$7;
|
|
5752
|
-
var requireObjectCoercible$2 = requireObjectCoercible$8;
|
|
5753
|
-
var advanceStringIndex = advanceStringIndex$2;
|
|
5754
|
-
var getMethod = getMethod$6;
|
|
5755
|
-
var getSubstitution = getSubstitution$1;
|
|
5756
|
-
var regExpExec = regexpExecAbstract;
|
|
5757
|
-
var wellKnownSymbol$1 = wellKnownSymbol$m;
|
|
5758
|
-
|
|
5759
|
-
var REPLACE = wellKnownSymbol$1('replace');
|
|
5760
|
-
var max = Math.max;
|
|
5761
|
-
var min$2 = Math.min;
|
|
5762
|
-
var concat = uncurryThis$2([].concat);
|
|
5763
|
-
var push = uncurryThis$2([].push);
|
|
5764
|
-
var stringIndexOf = uncurryThis$2(''.indexOf);
|
|
5765
|
-
var stringSlice$1 = uncurryThis$2(''.slice);
|
|
5766
|
-
|
|
5767
|
-
var maybeToString = function (it) {
|
|
5768
|
-
return it === undefined ? it : String(it);
|
|
5769
|
-
};
|
|
5770
|
-
|
|
5771
|
-
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
|
5772
|
-
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
|
5773
|
-
var REPLACE_KEEPS_$0 = (function () {
|
|
5774
|
-
// eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
|
|
5775
|
-
return 'a'.replace(/./, '$0') === '$0';
|
|
5776
|
-
})();
|
|
5777
|
-
|
|
5778
|
-
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
|
5779
|
-
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
|
5780
|
-
if (/./[REPLACE]) {
|
|
5781
|
-
return /./[REPLACE]('a', '$0') === '';
|
|
5782
|
-
}
|
|
5783
|
-
return false;
|
|
5784
|
-
})();
|
|
5785
|
-
|
|
5786
|
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
|
5787
|
-
var re = /./;
|
|
5788
|
-
re.exec = function () {
|
|
5789
|
-
var result = [];
|
|
5790
|
-
result.groups = { a: '7' };
|
|
5791
|
-
return result;
|
|
5792
|
-
};
|
|
5793
|
-
// eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
|
|
5794
|
-
return ''.replace(re, '$<a>') !== '7';
|
|
5795
|
-
});
|
|
5796
|
-
|
|
5797
|
-
// @@replace logic
|
|
5798
|
-
fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
|
|
5799
|
-
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
|
|
5800
|
-
|
|
5801
|
-
return [
|
|
5802
|
-
// `String.prototype.replace` method
|
|
5803
|
-
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
|
5804
|
-
function replace(searchValue, replaceValue) {
|
|
5805
|
-
var O = requireObjectCoercible$2(this);
|
|
5806
|
-
var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
|
|
5807
|
-
return replacer
|
|
5808
|
-
? call(replacer, searchValue, O, replaceValue)
|
|
5809
|
-
: call(nativeReplace, toString$2(O), searchValue, replaceValue);
|
|
5810
|
-
},
|
|
5811
|
-
// `RegExp.prototype[@@replace]` method
|
|
5812
|
-
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
5813
|
-
function (string, replaceValue) {
|
|
5814
|
-
var rx = anObject(this);
|
|
5815
|
-
var S = toString$2(string);
|
|
5816
|
-
|
|
5817
|
-
if (
|
|
5818
|
-
typeof replaceValue == 'string' &&
|
|
5819
|
-
stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
|
|
5820
|
-
stringIndexOf(replaceValue, '$<') === -1
|
|
5821
|
-
) {
|
|
5822
|
-
var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
|
|
5823
|
-
if (res.done) return res.value;
|
|
5824
|
-
}
|
|
5825
|
-
|
|
5826
|
-
var functionalReplace = isCallable(replaceValue);
|
|
5827
|
-
if (!functionalReplace) replaceValue = toString$2(replaceValue);
|
|
5828
|
-
|
|
5829
|
-
var global = rx.global;
|
|
5830
|
-
if (global) {
|
|
5831
|
-
var fullUnicode = rx.unicode;
|
|
5832
|
-
rx.lastIndex = 0;
|
|
5833
|
-
}
|
|
5834
|
-
var results = [];
|
|
5835
|
-
while (true) {
|
|
5836
|
-
var result = regExpExec(rx, S);
|
|
5837
|
-
if (result === null) break;
|
|
5838
|
-
|
|
5839
|
-
push(results, result);
|
|
5840
|
-
if (!global) break;
|
|
5841
|
-
|
|
5842
|
-
var matchStr = toString$2(result[0]);
|
|
5843
|
-
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength$2(rx.lastIndex), fullUnicode);
|
|
5844
|
-
}
|
|
5845
|
-
|
|
5846
|
-
var accumulatedResult = '';
|
|
5847
|
-
var nextSourcePosition = 0;
|
|
5848
|
-
for (var i = 0; i < results.length; i++) {
|
|
5849
|
-
result = results[i];
|
|
5850
|
-
|
|
5851
|
-
var matched = toString$2(result[0]);
|
|
5852
|
-
var position = max(min$2(toIntegerOrInfinity(result.index), S.length), 0);
|
|
5853
|
-
var captures = [];
|
|
5854
|
-
// NOTE: This is equivalent to
|
|
5855
|
-
// captures = result.slice(1).map(maybeToString)
|
|
5856
|
-
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
5857
|
-
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
5858
|
-
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
5859
|
-
for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
|
|
5860
|
-
var namedCaptures = result.groups;
|
|
5861
|
-
if (functionalReplace) {
|
|
5862
|
-
var replacerArgs = concat([matched], captures, position, S);
|
|
5863
|
-
if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
|
|
5864
|
-
var replacement = toString$2(apply(replaceValue, undefined, replacerArgs));
|
|
5865
|
-
} else {
|
|
5866
|
-
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
5867
|
-
}
|
|
5868
|
-
if (position >= nextSourcePosition) {
|
|
5869
|
-
accumulatedResult += stringSlice$1(S, nextSourcePosition, position) + replacement;
|
|
5870
|
-
nextSourcePosition = position + matched.length;
|
|
5871
|
-
}
|
|
5872
|
-
}
|
|
5873
|
-
return accumulatedResult + stringSlice$1(S, nextSourcePosition);
|
|
5874
|
-
}
|
|
5875
|
-
];
|
|
5876
|
-
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
5877
|
-
|
|
5878
5878
|
const createCodeChallenge = verifier => __awaiter(void 0, void 0, void 0, function* () {
|
|
5879
5879
|
const code_challengeBuffer = yield sha256(verifier);
|
|
5880
5880
|
const code_challenge = bufferToBase64UrlEncoded(code_challengeBuffer);
|
|
@@ -6044,23 +6044,46 @@
|
|
|
6044
6044
|
const getRedirectUri = (origin, decodedToken, redirectionConfig) => {
|
|
6045
6045
|
let result;
|
|
6046
6046
|
let redirection;
|
|
6047
|
+
let redirectUrl;
|
|
6047
6048
|
const topLevelDomains = redirectionConfig.topLevelDomains;
|
|
6048
6049
|
const redirections = redirectionConfig.environments;
|
|
6049
6050
|
const suffix = topLevelDomains.find(suffix => origin.endsWith(suffix));
|
|
6051
|
+
const environmentVariables = redirectionConfig.environmentVariables;
|
|
6050
6052
|
|
|
6051
6053
|
if (suffix) {
|
|
6052
6054
|
for (let i = 0; i < redirections.length; i++) {
|
|
6053
|
-
|
|
6054
|
-
const tokenCriteriaMatched = containsKeys(decodedToken,
|
|
6055
|
+
redirection = redirections[i];
|
|
6056
|
+
const tokenCriteriaMatched = containsKeys(decodedToken, redirection.criteria);
|
|
6057
|
+
|
|
6058
|
+
if (tokenCriteriaMatched && !!containsApplication(redirection.applications, origin)) {
|
|
6059
|
+
//* check whether suffix needed to change
|
|
6060
|
+
if (redirection.topLevelDomain !== suffix) {
|
|
6061
|
+
//* we need to change the suffix of the origin
|
|
6062
|
+
//* we gonna use `redirection.topLevelDomain` to replace the origin's suffix
|
|
6063
|
+
redirectUrl = origin.replace(suffix, redirection.topLevelDomain);
|
|
6064
|
+
} //* check whether prefix needed to change
|
|
6065
|
+
|
|
6066
|
+
|
|
6067
|
+
const envVariables = environmentVariables[redirection.criteria.environment];
|
|
6068
|
+
|
|
6069
|
+
if (envVariables) {
|
|
6070
|
+
const prefixMappings = envVariables['prefixMappings'];
|
|
6071
|
+
const keys = Object.keys(prefixMappings); //* check whether the current origin with anything inside the prefixMappings
|
|
6072
|
+
|
|
6073
|
+
const needToUpdatePrefixKey = containsApplication(keys, origin);
|
|
6074
|
+
|
|
6075
|
+
if (needToUpdatePrefixKey) {
|
|
6076
|
+
const prefixValue = prefixMappings[needToUpdatePrefixKey];
|
|
6077
|
+
redirectUrl = redirectUrl ? redirectUrl.replace(needToUpdatePrefixKey, prefixValue) : origin.replace(needToUpdatePrefixKey, prefixValue);
|
|
6078
|
+
}
|
|
6079
|
+
}
|
|
6055
6080
|
|
|
6056
|
-
if (tokenCriteriaMatched && redir.topLevelDomain !== suffix && containsApplication(redir.applications, origin)) {
|
|
6057
|
-
redirection = redir;
|
|
6058
6081
|
break;
|
|
6059
6082
|
}
|
|
6060
6083
|
}
|
|
6061
6084
|
|
|
6062
|
-
if (redirection) {
|
|
6063
|
-
result = `${redirection.authHost}/oauth/passthrough?jti=${decodedToken.jti}&redirect=${encodeURIComponent(
|
|
6085
|
+
if (!!redirection && !!redirectUrl) {
|
|
6086
|
+
result = `${redirection.authHost}/oauth/passthrough?jti=${decodedToken.jti}&redirect=${encodeURIComponent(redirectUrl)}`;
|
|
6064
6087
|
}
|
|
6065
6088
|
}
|
|
6066
6089
|
|
|
@@ -6078,8 +6101,7 @@
|
|
|
6078
6101
|
};
|
|
6079
6102
|
|
|
6080
6103
|
const containsApplication = (list, app) => {
|
|
6081
|
-
|
|
6082
|
-
return index >= 0;
|
|
6104
|
+
return list.find(appName => app.startsWith(`http://${appName}`) || app.startsWith(`https://${appName}`));
|
|
6083
6105
|
};
|
|
6084
6106
|
|
|
6085
6107
|
var _Authentication_accessToken, _Authentication_config, _Authentication_leapAuthService, _Authentication_notification, _Authentication_refreshInfo, _Authentication_exchangeAuthCodeForAccessToken, _Authentication_verifyAndPerformRedirections, _Authentication_startRefreshAccessTokenProcess, _Authentication_destroyRefreshAccessTokenProcess, _Authentication_decodeAccessToken;
|
|
@@ -6231,7 +6253,8 @@
|
|
|
6231
6253
|
queryParams.delete('code');
|
|
6232
6254
|
queryParams.delete('state');
|
|
6233
6255
|
const newUrl = window.location.origin + window.location.pathname + queryParams.toString();
|
|
6234
|
-
|
|
6256
|
+
console.log('===========================Dan=============================', newUrl);
|
|
6257
|
+
window.history.pushState(null, '', newUrl); //* use the Verifier and AuthCode to exchange for AccessToken
|
|
6235
6258
|
|
|
6236
6259
|
if (verifier) {
|
|
6237
6260
|
const data = yield __classPrivateFieldGet(this, _Authentication_exchangeAuthCodeForAccessToken, "f").call(this, {
|
|
@@ -117,7 +117,8 @@ export class Authentication {
|
|
|
117
117
|
queryParams.delete('code');
|
|
118
118
|
queryParams.delete('state');
|
|
119
119
|
const newUrl = window.location.origin + window.location.pathname + queryParams.toString();
|
|
120
|
-
|
|
120
|
+
console.log('===========================Dan=============================', newUrl);
|
|
121
|
+
window.history.pushState(null, '', newUrl);
|
|
121
122
|
//* use the Verifier and AuthCode to exchange for AccessToken
|
|
122
123
|
if (verifier) {
|
|
123
124
|
const data = yield __classPrivateFieldGet(this, _Authentication_exchangeAuthCodeForAccessToken, "f").call(this, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../../../../packages/auth-agent/src/l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2DAAoC,GAAG,EAAE;YACvC,IAAI,CAAC,uBAAA,IAAI,mCAAa,EAAE;gBACtB,OAAO;aACR;YAED,IAAI,uBAAA,IAAI,mCAAa,CAAC,KAAK,EAAE;gBAC3B,YAAY,CAAC,uBAAA,IAAI,mCAAa,CAAC,KAAK,CAAC,CAAC;aACvC;YAED,uBAAA,IAAI,+BAAgB,SAAS,MAAA,CAAC;QAChC,CAAC,EAAC;QAEF,4CAAqB,CAAC,WAAmB,EAAO,EAAE;YAChD,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1C,IAAI,OAAO,EAAE;gBACX,IAAI;oBACF,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBACpC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;iBAC3B;gBAAC,OAAO,CAAC,EAAE;oBACV,MAAM,KAAK,CAAC,8BAA8B,CAAC,CAAC;iBAC7C;aACF;YAED,OAAO,SAAS,CAAC;QACnB,CAAC,EAAA;QA7dC,uBAAA,IAAI,+BAAgB,SAAS,MAAA,CAAC;QAC9B,uBAAA,IAAI,0BAAW,IAAI,CAAC,OAAO,CAAC,MAAA,CAAC;QAC7B,uBAAA,IAAI,mCAAoB,IAAI,eAAe,CACzC,uBAAA,IAAI,8BAAQ,CAAC,QAAQ,EACrB,uBAAA,IAAI,8BAAQ,CAAC,QAAQ,CACtB,MAAA,CAAC;QACF,uBAAA,IAAI,gCAAiB,IAAI,YAAY,EAAE,MAAA,CAAC;IAC1C,CAAC;CAudF"}
|
package/src/lib/redirections.js
CHANGED
|
@@ -1,22 +1,42 @@
|
|
|
1
1
|
export const getRedirectUri = (origin, decodedToken, redirectionConfig) => {
|
|
2
2
|
let result;
|
|
3
3
|
let redirection;
|
|
4
|
+
let redirectUrl;
|
|
4
5
|
const topLevelDomains = redirectionConfig.topLevelDomains;
|
|
5
6
|
const redirections = redirectionConfig.environments;
|
|
6
7
|
const suffix = topLevelDomains.find((suffix) => origin.endsWith(suffix));
|
|
8
|
+
const environmentVariables = redirectionConfig.environmentVariables;
|
|
7
9
|
if (suffix) {
|
|
8
10
|
for (let i = 0; i < redirections.length; i++) {
|
|
9
|
-
|
|
10
|
-
const tokenCriteriaMatched = containsKeys(decodedToken,
|
|
11
|
+
redirection = redirections[i];
|
|
12
|
+
const tokenCriteriaMatched = containsKeys(decodedToken, redirection.criteria);
|
|
11
13
|
if (tokenCriteriaMatched &&
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
redirection
|
|
14
|
+
!!containsApplication(redirection.applications, origin)) {
|
|
15
|
+
//* check whether suffix needed to change
|
|
16
|
+
if (redirection.topLevelDomain !== suffix) {
|
|
17
|
+
//* we need to change the suffix of the origin
|
|
18
|
+
//* we gonna use `redirection.topLevelDomain` to replace the origin's suffix
|
|
19
|
+
redirectUrl = origin.replace(suffix, redirection.topLevelDomain);
|
|
20
|
+
}
|
|
21
|
+
//* check whether prefix needed to change
|
|
22
|
+
const envVariables = environmentVariables[redirection.criteria.environment];
|
|
23
|
+
if (envVariables) {
|
|
24
|
+
const prefixMappings = envVariables['prefixMappings'];
|
|
25
|
+
const keys = Object.keys(prefixMappings);
|
|
26
|
+
//* check whether the current origin with anything inside the prefixMappings
|
|
27
|
+
const needToUpdatePrefixKey = containsApplication(keys, origin);
|
|
28
|
+
if (needToUpdatePrefixKey) {
|
|
29
|
+
const prefixValue = prefixMappings[needToUpdatePrefixKey];
|
|
30
|
+
redirectUrl = redirectUrl
|
|
31
|
+
? redirectUrl.replace(needToUpdatePrefixKey, prefixValue)
|
|
32
|
+
: origin.replace(needToUpdatePrefixKey, prefixValue);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
15
35
|
break;
|
|
16
36
|
}
|
|
17
37
|
}
|
|
18
|
-
if (redirection) {
|
|
19
|
-
result = `${redirection.authHost}/oauth/passthrough?jti=${decodedToken.jti}&redirect=${encodeURIComponent(
|
|
38
|
+
if (!!redirection && !!redirectUrl) {
|
|
39
|
+
result = `${redirection.authHost}/oauth/passthrough?jti=${decodedToken.jti}&redirect=${encodeURIComponent(redirectUrl)}`;
|
|
20
40
|
}
|
|
21
41
|
}
|
|
22
42
|
return result;
|
|
@@ -31,8 +51,7 @@ const containsKeys = (obj1, obj2) => {
|
|
|
31
51
|
return result;
|
|
32
52
|
};
|
|
33
53
|
const containsApplication = (list, app) => {
|
|
34
|
-
|
|
54
|
+
return list.find((appName) => app.startsWith(`http://${appName}`) ||
|
|
35
55
|
app.startsWith(`https://${appName}`));
|
|
36
|
-
return index >= 0;
|
|
37
56
|
};
|
|
38
57
|
//# sourceMappingURL=redirections.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redirections.js","sourceRoot":"","sources":["../../../../../packages/auth-agent/src/lib/redirections.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,MAAc,EACd,YAAiB,EACjB,iBAA+B,EACX,EAAE;IACtB,IAAI,MAAM,CAAC;IACX,IAAI,WAAW,CAAC;IAChB,MAAM,eAAe,GAAG,iBAAiB,CAAC,eAAe,CAAC;IAC1D,MAAM,YAAY,GAAG,iBAAiB,CAAC,YAAY,CAAC;IACpD,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"redirections.js","sourceRoot":"","sources":["../../../../../packages/auth-agent/src/lib/redirections.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,MAAc,EACd,YAAiB,EACjB,iBAA+B,EACX,EAAE;IACtB,IAAI,MAAM,CAAC;IACX,IAAI,WAAW,CAAC;IAChB,IAAI,WAAW,CAAC;IAChB,MAAM,eAAe,GAAG,iBAAiB,CAAC,eAAe,CAAC;IAC1D,MAAM,YA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AAO,CACf,qBAAqB,EACrB,WAAW,CACd;4BACH,CAAC,CAAC,MAAM,CAAC,OAAO,CACV,qBAAqB,EACrB,WAAW,CACd,CAAC;qBACX;iBACJ;gBACD,MAAM;aACT;SACJ;QAED,IAAI,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,WAAW,EAAE;YAChC,MAAM,GAAG,GAAG,WAAW,CAAC,QAAQ,0BAC5B,YAAY,CAAC,GACjB,aAAa,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAAC;SAClD;KACJ;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,IAAS,EAAE,IAAS,EAAW,EAAE;IACrD,IAAI,MAAM,GAAG,IAAI,CAAC;IAClB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAChC,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE;YAC3B,MAAM,GAAG,KAAK,CAAC;SAChB;IACH,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,IAAc,EAAE,GAAW,EAAsB,EAAE;IAC9E,OAAO,IAAI,CAAC,IAAI,CACd,CAAC,OAAO,EAAE,EAAE,CACV,GAAG,CAAC,UAAU,CAAC,UAAU,OAAO,EAAE,CAAC;QACnC,GAAG,CAAC,UAAU,CAAC,WAAW,OAAO,EAAE,CAAC,CACvC,CAAC;AACJ,CAAC,CAAC"}
|
package/src/lib/types.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export declare type UserInfo = {
|
|
|
26
26
|
lastName: string;
|
|
27
27
|
firmId: string;
|
|
28
28
|
firmName: string;
|
|
29
|
+
firmType: number;
|
|
29
30
|
staffId: string;
|
|
30
31
|
evn: string;
|
|
31
32
|
region: string;
|
|
@@ -64,10 +65,27 @@ export declare type Redirections = {
|
|
|
64
65
|
environments: Array<{
|
|
65
66
|
criteria: {
|
|
66
67
|
region: string;
|
|
67
|
-
environment:
|
|
68
|
+
environment: 'test' | 'live' | 'liveb';
|
|
68
69
|
};
|
|
69
70
|
topLevelDomain: string;
|
|
70
71
|
authHost: string;
|
|
71
72
|
applications: Array<string>;
|
|
72
73
|
}>;
|
|
74
|
+
environmentVariables: {
|
|
75
|
+
live: {
|
|
76
|
+
prefixMappings: {
|
|
77
|
+
[key: string]: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
liveb: {
|
|
81
|
+
prefixMappings: {
|
|
82
|
+
[key: string]: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
test: {
|
|
86
|
+
prefixMappings: {
|
|
87
|
+
[key: string]: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
73
91
|
};
|
package/src/lib/utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const deleteQueryParameter: (name: string, value: string) => string;
|
|
1
2
|
export declare const createCodeChallenge: (verifier: string) => Promise<string>;
|
|
2
3
|
export declare const getCrypto: () => Crypto;
|
|
3
4
|
export declare const createRandomString: (size: number) => string;
|
package/src/lib/utils.js
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
+
export const deleteQueryParameter = (name, value) => {
|
|
3
|
+
const nameValue = name + '=' + value;
|
|
4
|
+
let toReplace = nameValue;
|
|
5
|
+
if (window.location.href.indexOf('?' + nameValue) >= 0) {
|
|
6
|
+
if (window.location.href.indexOf('?' + nameValue + '&') >= 0) { // first param
|
|
7
|
+
toReplace += '&';
|
|
8
|
+
}
|
|
9
|
+
else { // first and unique param
|
|
10
|
+
toReplace = '?' + toReplace;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
else if (window.location.href.indexOf('&' + nameValue) >= 0) { // not first param (maybe last)
|
|
14
|
+
toReplace = '&' + toReplace;
|
|
15
|
+
}
|
|
16
|
+
console.log('=================toReplace', toReplace);
|
|
17
|
+
return window.location.href.replace(toReplace, '');
|
|
18
|
+
};
|
|
2
19
|
export const createCodeChallenge = (verifier) => __awaiter(void 0, void 0, void 0, function* () {
|
|
3
20
|
const code_challengeBuffer = yield sha256(verifier);
|
|
4
21
|
const code_challenge = bufferToBase64UrlEncoded(code_challengeBuffer);
|
package/src/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../packages/auth-agent/src/lib/utils.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../packages/auth-agent/src/lib/utils.ts"],"names":[],"mappings":";AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,EAAE;IAClE,MAAM,SAAS,GAAG,IAAI,GAAG,GAAG,GAAG,KAAK,CAAC;IACrC,IAAI,SAAS,GAAG,SAAS,CAAC;IAC1B,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE;QACpD,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,cAAc;YAC1E,SAAS,IAAI,GAAG,CAAC;SACpB;aAAM,EAAE,yBAAyB;YAC9B,SAAS,GAAG,GAAG,GAAG,SAAS,CAAC;SAC/B;KACJ;SAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,+BAA+B;QAC5F,SAAS,GAAG,GAAG,GAAG,SAAS,CAAC;KAC/B;IACD,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,SAAS,CAAC,CAAC;IACrD,OAAO,MA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