@fileverse-dev/formulajs 4.4.11-mod-93 → 4.4.11-mod-89-tally-1

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.
@@ -1,4 +1,4 @@
1
- /* @fileverse-dev/formulajs v4.4.11-mod-93 */
1
+ /* @fileverse-dev/formulajs v4.4.11-mod-89-tally-1 */
2
2
  var _excluded = [ "confirmations", "dataDecoded" ];
3
3
 
4
4
  function _objectWithoutProperties(e, t) {
@@ -18275,219 +18275,15 @@ function _typeof(o) {
18275
18275
  })));
18276
18276
  return _SMARTCONTRACT.apply(this, arguments);
18277
18277
  }
18278
- var src = {};
18279
- var lib = {
18280
- exports: {}
18281
- };
18282
- var atob$1;
18283
- var hasRequiredAtob;
18284
- function requireAtob() {
18285
- if (hasRequiredAtob) return atob$1;
18286
- hasRequiredAtob = 1;
18287
- var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
18288
- function InvalidCharacterError(message) {
18289
- this.message = message;
18290
- }
18291
- InvalidCharacterError.prototype = new Error;
18292
- InvalidCharacterError.prototype.name = "InvalidCharacterError";
18293
- function polyfill(input) {
18294
- var str = String(input).replace(/=+$/, "");
18295
- if (str.length % 4 == 1) {
18296
- throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded.");
18297
- }
18298
- for (var bc = 0, bs, buffer, idx = 0, output = ""; buffer = str.charAt(idx++); ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,
18299
- bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0) {
18300
- buffer = chars.indexOf(buffer);
18301
- }
18302
- return output;
18303
- }
18304
- atob$1 = typeof window !== "undefined" && window.atob && window.atob.bind(window) || polyfill;
18305
- return atob$1;
18306
- }
18307
- var base64_url_decode;
18308
- var hasRequiredBase64_url_decode;
18309
- function requireBase64_url_decode() {
18310
- if (hasRequiredBase64_url_decode) return base64_url_decode;
18311
- hasRequiredBase64_url_decode = 1;
18312
- var atob = requireAtob();
18313
- function b64DecodeUnicode(str) {
18314
- return decodeURIComponent(atob(str).replace(/(.)/g, (function(m, p) {
18315
- var code = p.charCodeAt(0).toString(16).toUpperCase();
18316
- if (code.length < 2) {
18317
- code = "0" + code;
18318
- }
18319
- return "%" + code;
18320
- })));
18321
- }
18322
- base64_url_decode = function base64_url_decode(str) {
18323
- var output = str.replace(/-/g, "+").replace(/_/g, "/");
18324
- switch (output.length % 4) {
18325
- case 0:
18326
- break;
18327
-
18328
- case 2:
18329
- output += "==";
18330
- break;
18331
-
18332
- case 3:
18333
- output += "=";
18334
- break;
18335
-
18336
- default:
18337
- throw "Illegal base64url string!";
18338
- }
18339
- try {
18340
- return b64DecodeUnicode(output);
18341
- } catch (err) {
18342
- return atob(output);
18343
- }
18344
- };
18345
- return base64_url_decode;
18346
- }
18347
- var hasRequiredLib;
18348
- function requireLib() {
18349
- if (hasRequiredLib) return lib.exports;
18350
- hasRequiredLib = 1;
18351
- var base64_url_decode = requireBase64_url_decode();
18352
- function InvalidTokenError(message) {
18353
- this.message = message;
18354
- }
18355
- InvalidTokenError.prototype = new Error;
18356
- InvalidTokenError.prototype.name = "InvalidTokenError";
18357
- lib.exports = function(token, options) {
18358
- if (typeof token !== "string") {
18359
- throw new InvalidTokenError("Invalid token specified");
18360
- }
18361
- options = options || {};
18362
- var pos = options.header === true ? 0 : 1;
18363
- try {
18364
- return JSON.parse(base64_url_decode(token.split(".")[pos]));
18365
- } catch (e) {
18366
- throw new InvalidTokenError("Invalid token specified: " + e.message);
18367
- }
18368
- };
18369
- lib.exports.InvalidTokenError = InvalidTokenError;
18370
- return lib.exports;
18371
- }
18372
- var hasRequiredSrc;
18373
- function requireSrc() {
18374
- if (hasRequiredSrc) return src;
18375
- hasRequiredSrc = 1;
18376
- var jwtDecode = requireLib();
18377
- var isJwtExpired = function isJwtExpired(token) {
18378
- if (typeof token !== "string" || !token) throw new Error("Invalid token provided");
18379
- var isJwtExpired = false;
18380
- var _jwtDecode = jwtDecode(token), exp = _jwtDecode.exp;
18381
- var currentTime = (new Date).getTime() / 1e3;
18382
- if (currentTime > exp) isJwtExpired = true;
18383
- return isJwtExpired;
18384
- };
18385
- src.isJwtExpired = isJwtExpired;
18386
- return src;
18387
- }
18388
- var srcExports = requireSrc();
18389
- function isExpired(access) {
18390
- return srcExports.isJwtExpired(access);
18391
- }
18392
- function GNOSISPAY() {
18393
- return _GNOSISPAY.apply(this, arguments);
18394
- }
18395
- function _GNOSISPAY() {
18396
- _GNOSISPAY = _asyncToGenerator(_regeneratorRuntime().mark((function _callee28() {
18397
- var access, url, res, json, result;
18398
- return _regeneratorRuntime().wrap((function _callee28$(_context31) {
18399
- while (1) switch (_context31.prev = _context31.next) {
18400
- case 0:
18401
- _context31.prev = 0;
18402
- access = window.localStorage.getItem("GNOSIS_PAY_ACCESS");
18403
- if (access) {
18404
- _context31.next = 4;
18405
- break;
18406
- }
18407
- throw new ValidationError("Gnosispay access is required. Grant access to query your account");
18408
-
18409
- case 4:
18410
- if (!(!access || isExpired(access))) {
18411
- _context31.next = 6;
18412
- break;
18413
- }
18414
- throw new ValidationError("Expired or invalid access token");
18415
-
18416
- case 6:
18417
- url = new URL("https://api.gnosispay.com/api/v1/transactions");
18418
- _context31.next = 9;
18419
- return fetch(url.toString(), {
18420
- headers: {
18421
- Authorization: "Bearer ".concat(access.token),
18422
- "Content-Type": "application/json"
18423
- }
18424
- });
18425
-
18426
- case 9:
18427
- res = _context31.sent;
18428
- if (res.ok) {
18429
- _context31.next = 12;
18430
- break;
18431
- }
18432
- throw new NetworkError("GNOSIS_PAY", res.status);
18433
-
18434
- case 12:
18435
- _context31.next = 14;
18436
- return res.json();
18437
-
18438
- case 14:
18439
- json = _context31.sent;
18440
- if (Array.isArray(json)) {
18441
- _context31.next = 17;
18442
- break;
18443
- }
18444
- return _context31.abrupt("return", [ {
18445
- message: "Unexpected response"
18446
- } ]);
18447
-
18448
- case 17:
18449
- result = json.map((function(transactions) {
18450
- var _transactions$country, _transactions$merchan;
18451
- return {
18452
- createdAt: transactions.createdAt,
18453
- clearedAt: transactions.clearedAt,
18454
- country: ((_transactions$country = transactions.country) === null || _transactions$country === void 0 ? void 0 : _transactions$country.name) || "",
18455
- isPending: transactions.isPending,
18456
- mcc: transactions.mcc,
18457
- merchant: ((_transactions$merchan = transactions.merchant) === null || _transactions$merchan === void 0 ? void 0 : _transactions$merchan.name) || "",
18458
- billingAmount: transactions.billingAmount,
18459
- billingCurrency: transactions.billingCurrency,
18460
- transactionAmount: transactions.transactionAmount,
18461
- transactionCurrency: transactions.transactionCurrency,
18462
- transactionType: transactions.transactionType,
18463
- kind: transactions.kind,
18464
- status: transactions.status
18465
- };
18466
- }));
18467
- return _context31.abrupt("return", result);
18468
-
18469
- case 21:
18470
- _context31.prev = 21;
18471
- _context31.t0 = _context31["catch"](0);
18472
- return _context31.abrupt("return", errorMessageHandler(_context31.t0, "GNOSISPAY"));
18473
-
18474
- case 24:
18475
- case "end":
18476
- return _context31.stop();
18477
- }
18478
- }), _callee28, null, [ [ 0, 21 ] ]);
18479
- })));
18480
- return _GNOSISPAY.apply(this, arguments);
18481
- }
18482
18278
  function FLVURL() {
18483
18279
  return _FLVURL.apply(this, arguments);
18484
18280
  }
18485
18281
  function _FLVURL() {
18486
- _FLVURL = _asyncToGenerator(_regeneratorRuntime().mark((function _callee29() {
18487
- return _regeneratorRuntime().wrap((function _callee29$(_context32) {
18488
- while (1) switch (_context32.prev = _context32.next) {
18282
+ _FLVURL = _asyncToGenerator(_regeneratorRuntime().mark((function _callee28() {
18283
+ return _regeneratorRuntime().wrap((function _callee28$(_context31) {
18284
+ while (1) switch (_context31.prev = _context31.next) {
18489
18285
  case 0:
18490
- return _context32.abrupt("return", new Promise((function(resolve) {
18286
+ return _context31.abrupt("return", new Promise((function(resolve) {
18491
18287
  setTimeout((function() {
18492
18288
  resolve([ {
18493
18289
  Yoo: "gotcha"
@@ -18497,9 +18293,9 @@ function _typeof(o) {
18497
18293
 
18498
18294
  case 1:
18499
18295
  case "end":
18500
- return _context32.stop();
18296
+ return _context31.stop();
18501
18297
  }
18502
- }), _callee29);
18298
+ }), _callee28);
18503
18299
  })));
18504
18300
  return _FLVURL.apply(this, arguments);
18505
18301
  }
@@ -18692,7 +18488,6 @@ function _typeof(o) {
18692
18488
  exports.GEOMEAN = GEOMEAN;
18693
18489
  exports.GESTEP = GESTEP;
18694
18490
  exports.GNOSIS = GNOSIS;
18695
- exports.GNOSISPAY = GNOSISPAY;
18696
18491
  exports.GROWTH = GROWTH;
18697
18492
  exports.HARMEAN = HARMEAN;
18698
18493
  exports.HEX2BIN = HEX2BIN;