@eluvio/elv-client-js 3.1.95 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ElvClient-min.js +11 -15
- package/dist/ElvClient-node-min.js +13 -17
- package/dist/ElvFrameClient-min.js +9 -13
- package/dist/ElvPermissionsClient-min.js +9 -13
- package/dist/src/AuthorizationClient.js +1980 -2238
- package/dist/src/ContentObjectVerification.js +173 -164
- package/dist/src/Crypto.js +324 -376
- package/dist/src/ElvClient.js +1022 -1182
- package/dist/src/ElvWallet.js +95 -119
- package/dist/src/EthClient.js +896 -1040
- package/dist/src/FrameClient.js +300 -331
- package/dist/src/HttpClient.js +147 -153
- package/dist/src/Id.js +3 -1
- package/dist/src/PermissionsClient.js +1168 -1294
- package/dist/src/RemoteSigner.js +211 -263
- package/dist/src/UserProfileClient.js +1023 -1164
- package/dist/src/Utils.js +217 -212
- package/dist/src/client/ABRPublishing.js +858 -895
- package/dist/src/client/AccessGroups.js +959 -1102
- package/dist/src/client/ContentAccess.js +3433 -3717
- package/dist/src/client/ContentManagement.js +2068 -2252
- package/dist/src/client/Contracts.js +563 -647
- package/dist/src/client/Files.js +1757 -1886
- package/dist/src/client/NFT.js +112 -126
- package/dist/src/client/NTP.js +422 -478
- package/dist/src/index.js +11 -0
- package/dist/src/marketplaceClient/ClientMethods.js +1918 -0
- package/dist/src/marketplaceClient/Configuration.js +29 -0
- package/dist/src/marketplaceClient/Utils.js +304 -0
- package/dist/src/marketplaceClient/index.js +1553 -0
- package/dist/src/walletClient/ClientMethods.js +1828 -0
- package/dist/src/walletClient/Configuration.js +29 -0
- package/dist/src/walletClient/Utils.js +290 -0
- package/dist/src/walletClient/index.js +1459 -0
- package/package-lock.json +22001 -0
- package/package.json +6 -4
- package/src/AuthorizationClient.js +1 -1
- package/src/ElvClient.js +4 -1
- package/src/Utils.js +44 -3
- package/src/client/ContentAccess.js +4 -0
- package/src/index.js +7 -0
- package/src/walletClient/ClientMethods.js +1016 -0
- package/src/walletClient/Configuration.js +40 -0
- package/src/walletClient/README.md +185 -0
- package/src/walletClient/Utils.js +234 -0
- package/src/walletClient/index.js +884 -0
- package/testScripts/TestMarketplaceClient.js +25 -0
- package/utilities/ObjectSetPermission.js +4 -4
- package/utilities/SimpleIngest.js +41 -0
- package/utilities/example_files/simple_ingest_library_metadata.json +180 -0
- package/utilities/example_files/simple_ingest_library_metadata_animation_NFTs.json +133 -0
package/dist/src/Utils.js
CHANGED
|
@@ -2,17 +2,15 @@ var _toConsumableArray = require("@babel/runtime/helpers/toConsumableArray");
|
|
|
2
2
|
|
|
3
3
|
var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
4
4
|
|
|
5
|
-
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
6
|
-
|
|
7
5
|
var _defineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
8
6
|
|
|
9
7
|
var _slicedToArray = require("@babel/runtime/helpers/slicedToArray");
|
|
10
8
|
|
|
11
9
|
var _this = this;
|
|
12
10
|
|
|
13
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly
|
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
14
12
|
|
|
15
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source =
|
|
13
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
16
14
|
|
|
17
15
|
if (typeof Buffer === "undefined") {
|
|
18
16
|
Buffer = require("buffer/").Buffer;
|
|
@@ -26,6 +24,8 @@ var VarInt = require("varint");
|
|
|
26
24
|
|
|
27
25
|
var URI = require("urijs");
|
|
28
26
|
|
|
27
|
+
var Pako = require("pako");
|
|
28
|
+
|
|
29
29
|
var _require$utils = require("ethers").utils,
|
|
30
30
|
keccak256 = _require$utils.keccak256,
|
|
31
31
|
getAddress = _require$utils.getAddress;
|
|
@@ -36,14 +36,14 @@ var _require$utils = require("ethers").utils,
|
|
|
36
36
|
*
|
|
37
37
|
* Utils can be imported separately from the client:
|
|
38
38
|
*
|
|
39
|
-
* const Utils = require("@eluvio/elv-client-js/src/Utils)
|
|
39
|
+
* `const Utils = require("@eluvio/elv-client-js/src/Utils)`
|
|
40
40
|
*
|
|
41
41
|
* or
|
|
42
42
|
*
|
|
43
|
-
* import Utils from "@eluvio/elv-client-js/src/Utils"
|
|
43
|
+
* `import Utils from "@eluvio/elv-client-js/src/Utils"`
|
|
44
44
|
*
|
|
45
45
|
*
|
|
46
|
-
* It can be accessed from ElvClient and FrameClient as client.utils
|
|
46
|
+
* It can be accessed from ElvClient and FrameClient as `client.utils`
|
|
47
47
|
*/
|
|
48
48
|
|
|
49
49
|
|
|
@@ -167,6 +167,24 @@ var Utils = {
|
|
|
167
167
|
};
|
|
168
168
|
},
|
|
169
169
|
|
|
170
|
+
/**
|
|
171
|
+
* Decode the specified signed token into its component parts
|
|
172
|
+
*
|
|
173
|
+
* @param {string} token - The token to decode
|
|
174
|
+
*
|
|
175
|
+
* @return {Object} - Components of the signed token
|
|
176
|
+
*/
|
|
177
|
+
DecodeSignedToken: function DecodeSignedToken(token) {
|
|
178
|
+
var decodedToken = Utils.FromB58(token.slice(6));
|
|
179
|
+
var signature = "0x".concat(decodedToken.slice(0, 65).toString("hex"));
|
|
180
|
+
var payload = JSON.parse(Buffer.from(Pako.inflateRaw(decodedToken.slice(65))).toString("utf-8"));
|
|
181
|
+
payload.adr = Utils.FormatAddress("0x".concat(Buffer.from(payload.adr, "base64").toString("hex")));
|
|
182
|
+
return {
|
|
183
|
+
payload: payload,
|
|
184
|
+
signature: signature
|
|
185
|
+
};
|
|
186
|
+
},
|
|
187
|
+
|
|
170
188
|
/**
|
|
171
189
|
* Decode the specified write token into its component parts
|
|
172
190
|
*
|
|
@@ -455,12 +473,29 @@ var Utils = {
|
|
|
455
473
|
FromB64: function FromB64(str) {
|
|
456
474
|
return Buffer.from(str, "base64").toString("utf-8");
|
|
457
475
|
},
|
|
476
|
+
FromB64URL: function FromB64URL(str) {
|
|
477
|
+
str = str.replace(/-/g, "+").replace(/_/g, "/");
|
|
478
|
+
var pad = str.length % 4;
|
|
479
|
+
|
|
480
|
+
if (pad) {
|
|
481
|
+
if (pad === 1) {
|
|
482
|
+
throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
str += new Array(5 - pad).join("=");
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
return Utils.FromB64(str);
|
|
489
|
+
},
|
|
458
490
|
B58: function B58(arr) {
|
|
459
491
|
return bs58.encode(Buffer.from(arr));
|
|
460
492
|
},
|
|
461
493
|
FromB58: function FromB58(str) {
|
|
462
494
|
return bs58.decode(str);
|
|
463
495
|
},
|
|
496
|
+
FromB58ToStr: function FromB58ToStr(str) {
|
|
497
|
+
return new TextDecoder().decode(Utils.FromB58(str));
|
|
498
|
+
},
|
|
464
499
|
|
|
465
500
|
/**
|
|
466
501
|
* Decode the given fabric authorization token
|
|
@@ -477,233 +512,203 @@ var Utils = {
|
|
|
477
512
|
signature = _token$split2[1];
|
|
478
513
|
|
|
479
514
|
info = JSON.parse(Utils.FromB64(info));
|
|
480
|
-
return _objectSpread(
|
|
515
|
+
return _objectSpread({}, info, {
|
|
481
516
|
signature: signature
|
|
482
517
|
});
|
|
483
518
|
},
|
|
484
|
-
LimitedMap: function () {
|
|
485
|
-
var
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
_context.next = 5;
|
|
503
|
-
break;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
_context.next = 3;
|
|
507
|
-
return new Promise(function (resolve) {
|
|
508
|
-
return setTimeout(resolve, 10);
|
|
509
|
-
});
|
|
510
|
-
|
|
511
|
-
case 3:
|
|
512
|
-
_context.next = 0;
|
|
513
|
-
break;
|
|
514
|
-
|
|
515
|
-
case 5:
|
|
516
|
-
locked = true;
|
|
517
|
-
thisIndex = index;
|
|
518
|
-
index += 1;
|
|
519
|
-
locked = false;
|
|
520
|
-
return _context.abrupt("return", thisIndex);
|
|
521
|
-
|
|
522
|
-
case 10:
|
|
523
|
-
case "end":
|
|
524
|
-
return _context.stop();
|
|
519
|
+
LimitedMap: function LimitedMap(limit, array, f) {
|
|
520
|
+
var index, locked, nextIndex, results, active;
|
|
521
|
+
return _regeneratorRuntime.async(function LimitedMap$(_context3) {
|
|
522
|
+
while (1) {
|
|
523
|
+
switch (_context3.prev = _context3.next) {
|
|
524
|
+
case 0:
|
|
525
|
+
index = 0;
|
|
526
|
+
locked = false;
|
|
527
|
+
|
|
528
|
+
nextIndex = function nextIndex() {
|
|
529
|
+
var thisIndex;
|
|
530
|
+
return _regeneratorRuntime.async(function nextIndex$(_context) {
|
|
531
|
+
while (1) {
|
|
532
|
+
switch (_context.prev = _context.next) {
|
|
533
|
+
case 0:
|
|
534
|
+
if (!locked) {
|
|
535
|
+
_context.next = 5;
|
|
536
|
+
break;
|
|
525
537
|
}
|
|
526
|
-
}
|
|
527
|
-
}, _callee);
|
|
528
|
-
}));
|
|
529
|
-
|
|
530
|
-
return function nextIndex() {
|
|
531
|
-
return _ref.apply(this, arguments);
|
|
532
|
-
};
|
|
533
|
-
}();
|
|
534
|
-
|
|
535
|
-
results = [];
|
|
536
|
-
active = 0;
|
|
537
|
-
return _context3.abrupt("return", new Promise(function (resolve, reject) {
|
|
538
|
-
_toConsumableArray(Array(limit || 1)).forEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
539
|
-
var index;
|
|
540
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
541
|
-
while (1) {
|
|
542
|
-
switch (_context2.prev = _context2.next) {
|
|
543
|
-
case 0:
|
|
544
|
-
active += 1;
|
|
545
|
-
_context2.next = 3;
|
|
546
|
-
return nextIndex();
|
|
547
|
-
|
|
548
|
-
case 3:
|
|
549
|
-
index = _context2.sent;
|
|
550
|
-
|
|
551
|
-
case 4:
|
|
552
|
-
if (!(index < array.length)) {
|
|
553
|
-
_context2.next = 19;
|
|
554
|
-
break;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
_context2.prev = 5;
|
|
558
|
-
_context2.next = 8;
|
|
559
|
-
return f(array[index], index);
|
|
560
|
-
|
|
561
|
-
case 8:
|
|
562
|
-
results[index] = _context2.sent;
|
|
563
|
-
_context2.next = 14;
|
|
564
|
-
break;
|
|
565
538
|
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
539
|
+
_context.next = 3;
|
|
540
|
+
return _regeneratorRuntime.awrap(new Promise(function (resolve) {
|
|
541
|
+
return setTimeout(resolve, 10);
|
|
542
|
+
}));
|
|
543
|
+
|
|
544
|
+
case 3:
|
|
545
|
+
_context.next = 0;
|
|
546
|
+
break;
|
|
547
|
+
|
|
548
|
+
case 5:
|
|
549
|
+
locked = true;
|
|
550
|
+
thisIndex = index;
|
|
551
|
+
index += 1;
|
|
552
|
+
locked = false;
|
|
553
|
+
return _context.abrupt("return", thisIndex);
|
|
554
|
+
|
|
555
|
+
case 10:
|
|
556
|
+
case "end":
|
|
557
|
+
return _context.stop();
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
};
|
|
562
|
+
|
|
563
|
+
results = [];
|
|
564
|
+
active = 0;
|
|
565
|
+
return _context3.abrupt("return", new Promise(function (resolve, reject) {
|
|
566
|
+
_toConsumableArray(Array(limit || 1)).forEach(function _callee() {
|
|
567
|
+
var index;
|
|
568
|
+
return _regeneratorRuntime.async(function _callee$(_context2) {
|
|
569
|
+
while (1) {
|
|
570
|
+
switch (_context2.prev = _context2.next) {
|
|
571
|
+
case 0:
|
|
572
|
+
active += 1;
|
|
573
|
+
_context2.next = 3;
|
|
574
|
+
return _regeneratorRuntime.awrap(nextIndex());
|
|
575
|
+
|
|
576
|
+
case 3:
|
|
577
|
+
index = _context2.sent;
|
|
578
|
+
|
|
579
|
+
case 4:
|
|
580
|
+
if (!(index < array.length)) {
|
|
581
|
+
_context2.next = 19;
|
|
578
582
|
break;
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
_context2.prev = 5;
|
|
586
|
+
_context2.next = 8;
|
|
587
|
+
return _regeneratorRuntime.awrap(f(array[index], index));
|
|
588
|
+
|
|
589
|
+
case 8:
|
|
590
|
+
results[index] = _context2.sent;
|
|
591
|
+
_context2.next = 14;
|
|
592
|
+
break;
|
|
593
|
+
|
|
594
|
+
case 11:
|
|
595
|
+
_context2.prev = 11;
|
|
596
|
+
_context2.t0 = _context2["catch"](5);
|
|
597
|
+
reject(_context2.t0);
|
|
598
|
+
|
|
599
|
+
case 14:
|
|
600
|
+
_context2.next = 16;
|
|
601
|
+
return _regeneratorRuntime.awrap(nextIndex());
|
|
602
|
+
|
|
603
|
+
case 16:
|
|
604
|
+
index = _context2.sent;
|
|
605
|
+
_context2.next = 4;
|
|
606
|
+
break;
|
|
607
|
+
|
|
608
|
+
case 19:
|
|
609
|
+
// When finished and no more workers are active, resolve
|
|
610
|
+
active -= 1;
|
|
611
|
+
|
|
612
|
+
if (active === 0) {
|
|
613
|
+
resolve(results);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
case 21:
|
|
617
|
+
case "end":
|
|
618
|
+
return _context2.stop();
|
|
592
619
|
}
|
|
593
|
-
}
|
|
594
|
-
})
|
|
595
|
-
})
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
620
|
+
}
|
|
621
|
+
}, null, null, [[5, 11]]);
|
|
622
|
+
});
|
|
623
|
+
}));
|
|
624
|
+
|
|
625
|
+
case 6:
|
|
626
|
+
case "end":
|
|
627
|
+
return _context3.stop();
|
|
601
628
|
}
|
|
602
|
-
}
|
|
603
|
-
})
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
switch (_context4.prev = _context4.next) {
|
|
616
|
-
case 0:
|
|
617
|
-
return _context4.abrupt("return", Utils.ResponseToFormat("json", response));
|
|
618
|
-
|
|
619
|
-
case 1:
|
|
620
|
-
case "end":
|
|
621
|
-
return _context4.stop();
|
|
622
|
-
}
|
|
629
|
+
}
|
|
630
|
+
});
|
|
631
|
+
},
|
|
632
|
+
ResponseToJson: function ResponseToJson(response) {
|
|
633
|
+
return _regeneratorRuntime.async(function ResponseToJson$(_context4) {
|
|
634
|
+
while (1) {
|
|
635
|
+
switch (_context4.prev = _context4.next) {
|
|
636
|
+
case 0:
|
|
637
|
+
return _context4.abrupt("return", Utils.ResponseToFormat("json", response));
|
|
638
|
+
|
|
639
|
+
case 1:
|
|
640
|
+
case "end":
|
|
641
|
+
return _context4.stop();
|
|
623
642
|
}
|
|
624
|
-
}
|
|
625
|
-
})
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
var _ResponseToFormat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(format, response) {
|
|
635
|
-
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
636
|
-
while (1) {
|
|
637
|
-
switch (_context5.prev = _context5.next) {
|
|
638
|
-
case 0:
|
|
639
|
-
_context5.next = 2;
|
|
640
|
-
return response;
|
|
643
|
+
}
|
|
644
|
+
});
|
|
645
|
+
},
|
|
646
|
+
ResponseToFormat: function ResponseToFormat(format, response) {
|
|
647
|
+
return _regeneratorRuntime.async(function ResponseToFormat$(_context5) {
|
|
648
|
+
while (1) {
|
|
649
|
+
switch (_context5.prev = _context5.next) {
|
|
650
|
+
case 0:
|
|
651
|
+
_context5.next = 2;
|
|
652
|
+
return _regeneratorRuntime.awrap(response);
|
|
641
653
|
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
654
|
+
case 2:
|
|
655
|
+
response = _context5.sent;
|
|
656
|
+
_context5.t0 = format.toLowerCase();
|
|
657
|
+
_context5.next = _context5.t0 === "json" ? 6 : _context5.t0 === "text" ? 9 : _context5.t0 === "blob" ? 12 : _context5.t0 === "arraybuffer" ? 15 : _context5.t0 === "formdata" ? 18 : _context5.t0 === "buffer" ? 21 : 24;
|
|
658
|
+
break;
|
|
647
659
|
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
660
|
+
case 6:
|
|
661
|
+
_context5.next = 8;
|
|
662
|
+
return _regeneratorRuntime.awrap(response.json());
|
|
651
663
|
|
|
652
|
-
|
|
653
|
-
|
|
664
|
+
case 8:
|
|
665
|
+
return _context5.abrupt("return", _context5.sent);
|
|
654
666
|
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
667
|
+
case 9:
|
|
668
|
+
_context5.next = 11;
|
|
669
|
+
return _regeneratorRuntime.awrap(response.text());
|
|
658
670
|
|
|
659
|
-
|
|
660
|
-
|
|
671
|
+
case 11:
|
|
672
|
+
return _context5.abrupt("return", _context5.sent);
|
|
661
673
|
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
674
|
+
case 12:
|
|
675
|
+
_context5.next = 14;
|
|
676
|
+
return _regeneratorRuntime.awrap(response.blob());
|
|
665
677
|
|
|
666
|
-
|
|
667
|
-
|
|
678
|
+
case 14:
|
|
679
|
+
return _context5.abrupt("return", _context5.sent);
|
|
668
680
|
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
681
|
+
case 15:
|
|
682
|
+
_context5.next = 17;
|
|
683
|
+
return _regeneratorRuntime.awrap(response.arrayBuffer());
|
|
672
684
|
|
|
673
|
-
|
|
674
|
-
|
|
685
|
+
case 17:
|
|
686
|
+
return _context5.abrupt("return", _context5.sent);
|
|
675
687
|
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
688
|
+
case 18:
|
|
689
|
+
_context5.next = 20;
|
|
690
|
+
return _regeneratorRuntime.awrap(response.formData());
|
|
679
691
|
|
|
680
|
-
|
|
681
|
-
|
|
692
|
+
case 20:
|
|
693
|
+
return _context5.abrupt("return", _context5.sent);
|
|
682
694
|
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
695
|
+
case 21:
|
|
696
|
+
_context5.next = 23;
|
|
697
|
+
return _regeneratorRuntime.awrap(response.buffer());
|
|
686
698
|
|
|
687
|
-
|
|
688
|
-
|
|
699
|
+
case 23:
|
|
700
|
+
return _context5.abrupt("return", _context5.sent);
|
|
689
701
|
|
|
690
|
-
|
|
691
|
-
|
|
702
|
+
case 24:
|
|
703
|
+
return _context5.abrupt("return", response);
|
|
692
704
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
}
|
|
705
|
+
case 25:
|
|
706
|
+
case "end":
|
|
707
|
+
return _context5.stop();
|
|
697
708
|
}
|
|
698
|
-
}
|
|
699
|
-
})
|
|
700
|
-
|
|
701
|
-
function ResponseToFormat(_x5, _x6) {
|
|
702
|
-
return _ResponseToFormat.apply(this, arguments);
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
return ResponseToFormat;
|
|
706
|
-
}(),
|
|
709
|
+
}
|
|
710
|
+
});
|
|
711
|
+
},
|
|
707
712
|
|
|
708
713
|
/**
|
|
709
714
|
* Resize the image file or link URL to the specified maximum height. Can also be used to remove
|
|
@@ -714,9 +719,9 @@ var Utils = {
|
|
|
714
719
|
*
|
|
715
720
|
* @returns {string} - The modified URL with the height parameter
|
|
716
721
|
*/
|
|
717
|
-
ResizeImage: function ResizeImage(
|
|
718
|
-
var imageUrl =
|
|
719
|
-
height =
|
|
722
|
+
ResizeImage: function ResizeImage(_ref) {
|
|
723
|
+
var imageUrl = _ref.imageUrl,
|
|
724
|
+
height = _ref.height;
|
|
720
725
|
|
|
721
726
|
if (!imageUrl || imageUrl && !imageUrl.startsWith("http")) {
|
|
722
727
|
return imageUrl;
|