@mjhls/mjh-framework 1.0.1043 → 1.0.1044

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.
Files changed (174) hide show
  1. package/README.md +168 -168
  2. package/dist/cjs/AD300x250.js +1 -1
  3. package/dist/cjs/AD300x250x600.js +1 -1
  4. package/dist/cjs/AD728x90.js +1 -1
  5. package/dist/cjs/ADFloatingFooter.js +1 -1
  6. package/dist/cjs/ADGutter.js +1 -1
  7. package/dist/cjs/{ADInfeed-8559adc4.js → ADInfeed-92da28cb.js} +1 -1
  8. package/dist/cjs/ADSkyscraper.js +1 -1
  9. package/dist/cjs/ADSponsoredResources.js +1 -1
  10. package/dist/cjs/ADWebcast.js +1 -1
  11. package/dist/cjs/ADWelcome.js +1 -1
  12. package/dist/cjs/{ADlgInfeed-493559a2.js → ADlgInfeed-04685f6f.js} +1 -1
  13. package/dist/cjs/AdSlot.js +1 -1
  14. package/dist/cjs/AdSlotsProvider.js +1 -1
  15. package/dist/cjs/AlgoliaSearch.js +63 -91
  16. package/dist/cjs/ArticleCarousel.js +1 -1
  17. package/dist/cjs/ArticleProgramLandingPage.js +3 -3
  18. package/dist/cjs/ArticleSeriesLandingPage.js +3 -3
  19. package/dist/cjs/ArticleSeriesListing.js +1 -1
  20. package/dist/cjs/Auth.js +1492 -10
  21. package/dist/cjs/AuthWrapper.js +1476 -294
  22. package/dist/cjs/CEDeckSupabase.js +2 -2
  23. package/dist/cjs/CMEDeck.js +1 -1
  24. package/dist/cjs/Column3.js +1 -1
  25. package/dist/cjs/ConferenceArticleCard.js +15 -15
  26. package/dist/cjs/ContentCardPaginated.js +3 -3
  27. package/dist/cjs/DeckContent.js +11 -11
  28. package/dist/cjs/DeckQueue.js +2 -2
  29. package/dist/cjs/DeckQueuePaginated.js +2 -2
  30. package/dist/cjs/EventsDeck.js +18 -18
  31. package/dist/cjs/ExternalResources.js +3 -3
  32. package/dist/cjs/Feature.js +1 -1
  33. package/dist/cjs/GridContent.js +4 -4
  34. package/dist/cjs/GridContentPaginated.js +4 -4
  35. package/dist/cjs/GridHero.js +1 -1
  36. package/dist/cjs/HamMagazine.js +11 -11
  37. package/dist/cjs/HealthCareProfessionalModal.js +1 -1
  38. package/dist/cjs/Hero.js +1 -1
  39. package/dist/cjs/HorizontalArticleListing.js +3 -3
  40. package/dist/cjs/{ImageSlider-62a43659.js → ImageSlider-984a697b.js} +92 -149
  41. package/dist/cjs/IssueLanding.js +34 -34
  42. package/dist/cjs/KMTracker.js +15 -15
  43. package/dist/cjs/LeftNav.js +1 -1
  44. package/dist/cjs/MasterDeck.js +11 -11
  45. package/dist/cjs/MasterDeckPaginated.js +11 -11
  46. package/dist/cjs/{MediaSeriesCard-6938b284.js → MediaSeriesCard-d7801ba1.js} +2 -2
  47. package/dist/cjs/MediaSeriesLanding.js +13 -13
  48. package/dist/cjs/MediaSeriesLandingPaginated.js +13 -13
  49. package/dist/cjs/NavMagazine.js +12 -12
  50. package/dist/cjs/NavNative.js +10 -10
  51. package/dist/cjs/OncliveLargeHero.js +1 -1
  52. package/dist/cjs/PartnerDetailListing.js +7 -6
  53. package/dist/cjs/PartnerDetailListingPaginated.js +7 -6
  54. package/dist/cjs/PodcastsLanding.js +6 -6
  55. package/dist/cjs/PubSection.js +4 -4
  56. package/dist/cjs/PublicationLanding.js +26 -26
  57. package/dist/cjs/QueueDeckExpanded.js +4 -4
  58. package/dist/cjs/QueueDeckExpandedPaginated.js +4 -4
  59. package/dist/cjs/RelatedContent.js +28 -28
  60. package/dist/cjs/RelatedTopicsDropdown.js +10 -10
  61. package/dist/cjs/SeriesListingDeck.js +2 -2
  62. package/dist/cjs/{SeriesSlider-edcb8e4b.js → SeriesSlider-086a8319.js} +5 -5
  63. package/dist/cjs/SideFooter.js +2 -2
  64. package/dist/cjs/{SocialSearchComponent-e9ec9c63.js → SocialSearchComponent-d7e5d3a6.js} +1 -1
  65. package/dist/cjs/TaxonomyDescription.js +3 -3
  66. package/dist/cjs/TemplateNormal.js +2 -2
  67. package/dist/cjs/ThumbnailCard.js +1 -1
  68. package/dist/cjs/{Tooltip-980a1d1a.js → Tooltip-96fe6ef6.js} +264 -108
  69. package/dist/cjs/Ustream.js +1 -1
  70. package/dist/cjs/VideoProgramLandingPage.js +3 -3
  71. package/dist/cjs/VideoSeriesCard.js +1 -1
  72. package/dist/cjs/VideoSeriesLandingPage.js +3 -3
  73. package/dist/cjs/VideoSeriesListing.js +1 -1
  74. package/dist/cjs/View.js +33 -31
  75. package/dist/cjs/YahooHero.js +1 -1
  76. package/dist/cjs/YoutubeGroup.js +5 -5
  77. package/dist/cjs/defineProperty-e0fb52c5.js +73 -0
  78. package/dist/cjs/{entities-3f9d0f2f.js → entities-df1aed86.js} +4 -0
  79. package/dist/cjs/getQuery.js +1 -1
  80. package/dist/cjs/getSerializers.js +3 -3
  81. package/dist/cjs/{getTargeting-45ffbee8.js → getTargeting-5b954783.js} +9 -9
  82. package/dist/cjs/getTargeting.js +1 -1
  83. package/dist/cjs/{index-8041a4eb.js → index-50be6759.js} +15 -9
  84. package/dist/cjs/{index-aac3ee40.js → index-abcf2d94.js} +2 -2
  85. package/dist/cjs/index.js +12 -11
  86. package/dist/cjs/{main-47be4f9f.js → main-ae8472f3.js} +4 -9
  87. package/dist/cjs/typeof-1358762e.js +33 -0
  88. package/dist/esm/AD300x250.js +1 -1
  89. package/dist/esm/AD300x250x600.js +1 -1
  90. package/dist/esm/AD728x90.js +1 -1
  91. package/dist/esm/ADFloatingFooter.js +1 -1
  92. package/dist/esm/ADGutter.js +1 -1
  93. package/dist/esm/{ADInfeed-fb501f15.js → ADInfeed-50f279b3.js} +1 -1
  94. package/dist/esm/ADSkyscraper.js +1 -1
  95. package/dist/esm/ADSponsoredResources.js +1 -1
  96. package/dist/esm/ADWebcast.js +1 -1
  97. package/dist/esm/ADWelcome.js +1 -1
  98. package/dist/esm/{ADlgInfeed-b742488e.js → ADlgInfeed-3bb275ad.js} +1 -1
  99. package/dist/esm/AdSlot.js +1 -1
  100. package/dist/esm/AdSlotsProvider.js +1 -1
  101. package/dist/esm/AlgoliaSearch.js +63 -91
  102. package/dist/esm/ArticleCarousel.js +1 -1
  103. package/dist/esm/ArticleProgramLandingPage.js +3 -3
  104. package/dist/esm/ArticleSeriesLandingPage.js +3 -3
  105. package/dist/esm/ArticleSeriesListing.js +1 -1
  106. package/dist/esm/Auth.js +1492 -9
  107. package/dist/esm/AuthWrapper.js +1470 -288
  108. package/dist/esm/CEDeckSupabase.js +2 -2
  109. package/dist/esm/CMEDeck.js +1 -1
  110. package/dist/esm/Column3.js +1 -1
  111. package/dist/esm/ConferenceArticleCard.js +15 -15
  112. package/dist/esm/ContentCardPaginated.js +3 -3
  113. package/dist/esm/DeckContent.js +11 -11
  114. package/dist/esm/DeckQueue.js +2 -2
  115. package/dist/esm/DeckQueuePaginated.js +2 -2
  116. package/dist/esm/EventsDeck.js +18 -18
  117. package/dist/esm/ExternalResources.js +3 -3
  118. package/dist/esm/Feature.js +1 -1
  119. package/dist/esm/GridContent.js +4 -4
  120. package/dist/esm/GridContentPaginated.js +4 -4
  121. package/dist/esm/GridHero.js +1 -1
  122. package/dist/esm/HamMagazine.js +11 -11
  123. package/dist/esm/HealthCareProfessionalModal.js +1 -1
  124. package/dist/esm/Hero.js +1 -1
  125. package/dist/esm/HorizontalArticleListing.js +3 -3
  126. package/dist/esm/{ImageSlider-aea3a615.js → ImageSlider-497e9c88.js} +10 -67
  127. package/dist/esm/IssueLanding.js +34 -34
  128. package/dist/esm/KMTracker.js +15 -15
  129. package/dist/esm/LeftNav.js +1 -1
  130. package/dist/esm/MasterDeck.js +11 -11
  131. package/dist/esm/MasterDeckPaginated.js +11 -11
  132. package/dist/esm/{MediaSeriesCard-5f578738.js → MediaSeriesCard-ffe77e8e.js} +2 -2
  133. package/dist/esm/MediaSeriesLanding.js +13 -13
  134. package/dist/esm/MediaSeriesLandingPaginated.js +13 -13
  135. package/dist/esm/NavMagazine.js +12 -12
  136. package/dist/esm/NavNative.js +10 -10
  137. package/dist/esm/OncliveLargeHero.js +1 -1
  138. package/dist/esm/PartnerDetailListing.js +7 -6
  139. package/dist/esm/PartnerDetailListingPaginated.js +7 -6
  140. package/dist/esm/PodcastsLanding.js +6 -6
  141. package/dist/esm/PubSection.js +4 -4
  142. package/dist/esm/PublicationLanding.js +26 -26
  143. package/dist/esm/QueueDeckExpanded.js +4 -4
  144. package/dist/esm/QueueDeckExpandedPaginated.js +4 -4
  145. package/dist/esm/RelatedContent.js +28 -28
  146. package/dist/esm/RelatedTopicsDropdown.js +10 -10
  147. package/dist/esm/SeriesListingDeck.js +2 -2
  148. package/dist/esm/{SeriesSlider-2e83e861.js → SeriesSlider-a6b1d617.js} +5 -5
  149. package/dist/esm/SideFooter.js +2 -2
  150. package/dist/esm/{SocialSearchComponent-020f9e81.js → SocialSearchComponent-6065bff2.js} +1 -1
  151. package/dist/esm/TaxonomyDescription.js +3 -3
  152. package/dist/esm/TemplateNormal.js +2 -2
  153. package/dist/esm/ThumbnailCard.js +1 -1
  154. package/dist/esm/{Tooltip-51957f7c.js → Tooltip-bc98d17e.js} +264 -108
  155. package/dist/esm/Ustream.js +1 -1
  156. package/dist/esm/VideoProgramLandingPage.js +3 -3
  157. package/dist/esm/VideoSeriesCard.js +1 -1
  158. package/dist/esm/VideoSeriesLandingPage.js +3 -3
  159. package/dist/esm/VideoSeriesListing.js +1 -1
  160. package/dist/esm/View.js +33 -31
  161. package/dist/esm/YahooHero.js +1 -1
  162. package/dist/esm/YoutubeGroup.js +5 -5
  163. package/dist/esm/defineProperty-23a8f8cd.js +68 -0
  164. package/dist/esm/{entities-932b50cf.js → entities-6d9154b4.js} +4 -0
  165. package/dist/esm/getQuery.js +1 -1
  166. package/dist/esm/getSerializers.js +3 -3
  167. package/dist/esm/{getTargeting-a569a9cc.js → getTargeting-5a281334.js} +9 -9
  168. package/dist/esm/getTargeting.js +1 -1
  169. package/dist/esm/{index-55840558.js → index-5b4444df.js} +2 -2
  170. package/dist/esm/{index-67e1773f.js → index-98ca9cec.js} +15 -9
  171. package/dist/esm/index.js +12 -11
  172. package/dist/esm/{main-f97773b2.js → main-754d4992.js} +4 -9
  173. package/dist/esm/typeof-2f07d0e8.js +30 -0
  174. package/package.json +116 -116
package/dist/cjs/Auth.js CHANGED
@@ -13,10 +13,9 @@ var useSWR = require('swr');
13
13
  var index = require('./index-bd6c9f56.js');
14
14
  var Local = require('passport-local');
15
15
  var mysql = require('mysql');
16
- var util$1 = require('./util-93a37fd0.js');
17
- var util = require('util.promisify');
16
+ var util = require('./util-93a37fd0.js');
17
+ var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
18
18
  var md5 = require('./md5-e1ca5797.js');
19
- require('./_commonjsHelpers-06173234.js');
20
19
  require('./core.get-iterator-method-5643aa10.js');
21
20
  require('./web.dom.iterable-d98303e0.js');
22
21
  require('./_library-dd23b178.js');
@@ -30,7 +29,6 @@ var Router__default = /*#__PURE__*/_interopDefaultLegacy(Router);
30
29
  var useSWR__default = /*#__PURE__*/_interopDefaultLegacy(useSWR);
31
30
  var Local__default = /*#__PURE__*/_interopDefaultLegacy(Local);
32
31
  var mysql__default = /*#__PURE__*/_interopDefaultLegacy(mysql);
33
- var util__default = /*#__PURE__*/_interopDefaultLegacy(util);
34
32
 
35
33
  var returnFormField = function returnFormField(_ref) {
36
34
  var name = _ref.name,
@@ -1325,7 +1323,1491 @@ var iron = /*#__PURE__*/Object.freeze({
1325
1323
  getSession: getSession
1326
1324
  });
1327
1325
 
1328
- util__default["default"].shim();
1326
+ var toStr$6 = Object.prototype.toString;
1327
+
1328
+ var isArguments = function isArguments(value) {
1329
+ var str = toStr$6.call(value);
1330
+ var isArgs = str === '[object Arguments]';
1331
+ if (!isArgs) {
1332
+ isArgs = str !== '[object Array]' &&
1333
+ value !== null &&
1334
+ typeof value === 'object' &&
1335
+ typeof value.length === 'number' &&
1336
+ value.length >= 0 &&
1337
+ toStr$6.call(value.callee) === '[object Function]';
1338
+ }
1339
+ return isArgs;
1340
+ };
1341
+
1342
+ var keysShim$1;
1343
+ if (!Object.keys) {
1344
+ // modified from https://github.com/es-shims/es5-shim
1345
+ var has$1 = Object.prototype.hasOwnProperty;
1346
+ var toStr$5 = Object.prototype.toString;
1347
+ var isArgs = isArguments; // eslint-disable-line global-require
1348
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
1349
+ var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
1350
+ var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
1351
+ var dontEnums = [
1352
+ 'toString',
1353
+ 'toLocaleString',
1354
+ 'valueOf',
1355
+ 'hasOwnProperty',
1356
+ 'isPrototypeOf',
1357
+ 'propertyIsEnumerable',
1358
+ 'constructor'
1359
+ ];
1360
+ var equalsConstructorPrototype = function (o) {
1361
+ var ctor = o.constructor;
1362
+ return ctor && ctor.prototype === o;
1363
+ };
1364
+ var excludedKeys = {
1365
+ $applicationCache: true,
1366
+ $console: true,
1367
+ $external: true,
1368
+ $frame: true,
1369
+ $frameElement: true,
1370
+ $frames: true,
1371
+ $innerHeight: true,
1372
+ $innerWidth: true,
1373
+ $onmozfullscreenchange: true,
1374
+ $onmozfullscreenerror: true,
1375
+ $outerHeight: true,
1376
+ $outerWidth: true,
1377
+ $pageXOffset: true,
1378
+ $pageYOffset: true,
1379
+ $parent: true,
1380
+ $scrollLeft: true,
1381
+ $scrollTop: true,
1382
+ $scrollX: true,
1383
+ $scrollY: true,
1384
+ $self: true,
1385
+ $webkitIndexedDB: true,
1386
+ $webkitStorageInfo: true,
1387
+ $window: true
1388
+ };
1389
+ var hasAutomationEqualityBug = (function () {
1390
+ /* global window */
1391
+ if (typeof window === 'undefined') { return false; }
1392
+ for (var k in window) {
1393
+ try {
1394
+ if (!excludedKeys['$' + k] && has$1.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
1395
+ try {
1396
+ equalsConstructorPrototype(window[k]);
1397
+ } catch (e) {
1398
+ return true;
1399
+ }
1400
+ }
1401
+ } catch (e) {
1402
+ return true;
1403
+ }
1404
+ }
1405
+ return false;
1406
+ }());
1407
+ var equalsConstructorPrototypeIfNotBuggy = function (o) {
1408
+ /* global window */
1409
+ if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
1410
+ return equalsConstructorPrototype(o);
1411
+ }
1412
+ try {
1413
+ return equalsConstructorPrototype(o);
1414
+ } catch (e) {
1415
+ return false;
1416
+ }
1417
+ };
1418
+
1419
+ keysShim$1 = function keys(object) {
1420
+ var isObject = object !== null && typeof object === 'object';
1421
+ var isFunction = toStr$5.call(object) === '[object Function]';
1422
+ var isArguments = isArgs(object);
1423
+ var isString = isObject && toStr$5.call(object) === '[object String]';
1424
+ var theKeys = [];
1425
+
1426
+ if (!isObject && !isFunction && !isArguments) {
1427
+ throw new TypeError('Object.keys called on a non-object');
1428
+ }
1429
+
1430
+ var skipProto = hasProtoEnumBug && isFunction;
1431
+ if (isString && object.length > 0 && !has$1.call(object, 0)) {
1432
+ for (var i = 0; i < object.length; ++i) {
1433
+ theKeys.push(String(i));
1434
+ }
1435
+ }
1436
+
1437
+ if (isArguments && object.length > 0) {
1438
+ for (var j = 0; j < object.length; ++j) {
1439
+ theKeys.push(String(j));
1440
+ }
1441
+ } else {
1442
+ for (var name in object) {
1443
+ if (!(skipProto && name === 'prototype') && has$1.call(object, name)) {
1444
+ theKeys.push(String(name));
1445
+ }
1446
+ }
1447
+ }
1448
+
1449
+ if (hasDontEnumBug) {
1450
+ var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
1451
+
1452
+ for (var k = 0; k < dontEnums.length; ++k) {
1453
+ if (!(skipConstructor && dontEnums[k] === 'constructor') && has$1.call(object, dontEnums[k])) {
1454
+ theKeys.push(dontEnums[k]);
1455
+ }
1456
+ }
1457
+ }
1458
+ return theKeys;
1459
+ };
1460
+ }
1461
+ var implementation$3 = keysShim$1;
1462
+
1463
+ var slice$1 = Array.prototype.slice;
1464
+
1465
+
1466
+ var origKeys = Object.keys;
1467
+ var keysShim = origKeys ? function keys(o) { return origKeys(o); } : implementation$3;
1468
+
1469
+ var originalKeys = Object.keys;
1470
+
1471
+ keysShim.shim = function shimObjectKeys() {
1472
+ if (Object.keys) {
1473
+ var keysWorksWithArguments = (function () {
1474
+ // Safari 5.0 bug
1475
+ var args = Object.keys(arguments);
1476
+ return args && args.length === arguments.length;
1477
+ }(1, 2));
1478
+ if (!keysWorksWithArguments) {
1479
+ Object.keys = function keys(object) { // eslint-disable-line func-name-matching
1480
+ if (isArguments(object)) {
1481
+ return originalKeys(slice$1.call(object));
1482
+ }
1483
+ return originalKeys(object);
1484
+ };
1485
+ }
1486
+ } else {
1487
+ Object.keys = keysShim;
1488
+ }
1489
+ return Object.keys || keysShim;
1490
+ };
1491
+
1492
+ var objectKeys = keysShim;
1493
+
1494
+ var hasSymbols$3 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
1495
+
1496
+ var toStr$4 = Object.prototype.toString;
1497
+ var concat = Array.prototype.concat;
1498
+ var origDefineProperty = Object.defineProperty;
1499
+
1500
+ var isFunction = function (fn) {
1501
+ return typeof fn === 'function' && toStr$4.call(fn) === '[object Function]';
1502
+ };
1503
+
1504
+ var arePropertyDescriptorsSupported = function () {
1505
+ var obj = {};
1506
+ try {
1507
+ origDefineProperty(obj, 'x', { enumerable: false, value: obj });
1508
+ // eslint-disable-next-line no-unused-vars, no-restricted-syntax
1509
+ for (var _ in obj) { // jscs:ignore disallowUnusedVariables
1510
+ return false;
1511
+ }
1512
+ return obj.x === obj;
1513
+ } catch (e) { /* this is IE 8. */
1514
+ return false;
1515
+ }
1516
+ };
1517
+ var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
1518
+
1519
+ var defineProperty = function (object, name, value, predicate) {
1520
+ if (name in object && (!isFunction(predicate) || !predicate())) {
1521
+ return;
1522
+ }
1523
+ if (supportsDescriptors) {
1524
+ origDefineProperty(object, name, {
1525
+ configurable: true,
1526
+ enumerable: false,
1527
+ value: value,
1528
+ writable: true
1529
+ });
1530
+ } else {
1531
+ object[name] = value;
1532
+ }
1533
+ };
1534
+
1535
+ var defineProperties = function (object, map) {
1536
+ var predicates = arguments.length > 2 ? arguments[2] : {};
1537
+ var props = objectKeys(map);
1538
+ if (hasSymbols$3) {
1539
+ props = concat.call(props, Object.getOwnPropertySymbols(map));
1540
+ }
1541
+ for (var i = 0; i < props.length; i += 1) {
1542
+ defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
1543
+ }
1544
+ };
1545
+
1546
+ defineProperties.supportsDescriptors = !!supportsDescriptors;
1547
+
1548
+ var defineProperties_1 = defineProperties;
1549
+
1550
+ /* eslint no-invalid-this: 1 */
1551
+
1552
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
1553
+ var slice = Array.prototype.slice;
1554
+ var toStr$3 = Object.prototype.toString;
1555
+ var funcType = '[object Function]';
1556
+
1557
+ var implementation$2 = function bind(that) {
1558
+ var target = this;
1559
+ if (typeof target !== 'function' || toStr$3.call(target) !== funcType) {
1560
+ throw new TypeError(ERROR_MESSAGE + target);
1561
+ }
1562
+ var args = slice.call(arguments, 1);
1563
+
1564
+ var bound;
1565
+ var binder = function () {
1566
+ if (this instanceof bound) {
1567
+ var result = target.apply(
1568
+ this,
1569
+ args.concat(slice.call(arguments))
1570
+ );
1571
+ if (Object(result) === result) {
1572
+ return result;
1573
+ }
1574
+ return this;
1575
+ } else {
1576
+ return target.apply(
1577
+ that,
1578
+ args.concat(slice.call(arguments))
1579
+ );
1580
+ }
1581
+ };
1582
+
1583
+ var boundLength = Math.max(0, target.length - args.length);
1584
+ var boundArgs = [];
1585
+ for (var i = 0; i < boundLength; i++) {
1586
+ boundArgs.push('$' + i);
1587
+ }
1588
+
1589
+ bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
1590
+
1591
+ if (target.prototype) {
1592
+ var Empty = function Empty() {};
1593
+ Empty.prototype = target.prototype;
1594
+ bound.prototype = new Empty();
1595
+ Empty.prototype = null;
1596
+ }
1597
+
1598
+ return bound;
1599
+ };
1600
+
1601
+ var functionBind = Function.prototype.bind || implementation$2;
1602
+
1603
+ /* eslint complexity: [2, 18], max-statements: [2, 33] */
1604
+ var shams$1 = function hasSymbols() {
1605
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
1606
+ if (typeof Symbol.iterator === 'symbol') { return true; }
1607
+
1608
+ var obj = {};
1609
+ var sym = Symbol('test');
1610
+ var symObj = Object(sym);
1611
+ if (typeof sym === 'string') { return false; }
1612
+
1613
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
1614
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
1615
+
1616
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
1617
+ // if (sym instanceof Symbol) { return false; }
1618
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
1619
+ // if (!(symObj instanceof Symbol)) { return false; }
1620
+
1621
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
1622
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
1623
+
1624
+ var symVal = 42;
1625
+ obj[sym] = symVal;
1626
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
1627
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
1628
+
1629
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
1630
+
1631
+ var syms = Object.getOwnPropertySymbols(obj);
1632
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
1633
+
1634
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
1635
+
1636
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
1637
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
1638
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
1639
+ }
1640
+
1641
+ return true;
1642
+ };
1643
+
1644
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
1645
+
1646
+
1647
+ var hasSymbols$2 = function hasNativeSymbols() {
1648
+ if (typeof origSymbol !== 'function') { return false; }
1649
+ if (typeof Symbol !== 'function') { return false; }
1650
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
1651
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
1652
+
1653
+ return shams$1();
1654
+ };
1655
+
1656
+ var src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
1657
+
1658
+ var undefined$1;
1659
+
1660
+ var $SyntaxError$1 = SyntaxError;
1661
+ var $Function = Function;
1662
+ var $TypeError$5 = TypeError;
1663
+
1664
+ // eslint-disable-next-line consistent-return
1665
+ var getEvalledConstructor = function (expressionSyntax) {
1666
+ try {
1667
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
1668
+ } catch (e) {}
1669
+ };
1670
+
1671
+ var $gOPD$2 = Object.getOwnPropertyDescriptor;
1672
+ if ($gOPD$2) {
1673
+ try {
1674
+ $gOPD$2({}, '');
1675
+ } catch (e) {
1676
+ $gOPD$2 = null; // this is IE 8, which has a broken gOPD
1677
+ }
1678
+ }
1679
+
1680
+ var throwTypeError = function () {
1681
+ throw new $TypeError$5();
1682
+ };
1683
+ var ThrowTypeError = $gOPD$2
1684
+ ? (function () {
1685
+ try {
1686
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
1687
+ arguments.callee; // IE 8 does not throw here
1688
+ return throwTypeError;
1689
+ } catch (calleeThrows) {
1690
+ try {
1691
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
1692
+ return $gOPD$2(arguments, 'callee').get;
1693
+ } catch (gOPDthrows) {
1694
+ return throwTypeError;
1695
+ }
1696
+ }
1697
+ }())
1698
+ : throwTypeError;
1699
+
1700
+ var hasSymbols$1 = hasSymbols$2();
1701
+
1702
+ var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
1703
+
1704
+ var needsEval = {};
1705
+
1706
+ var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
1707
+
1708
+ var INTRINSICS = {
1709
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
1710
+ '%Array%': Array,
1711
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
1712
+ '%ArrayIteratorPrototype%': hasSymbols$1 ? getProto([][Symbol.iterator]()) : undefined$1,
1713
+ '%AsyncFromSyncIteratorPrototype%': undefined$1,
1714
+ '%AsyncFunction%': needsEval,
1715
+ '%AsyncGenerator%': needsEval,
1716
+ '%AsyncGeneratorFunction%': needsEval,
1717
+ '%AsyncIteratorPrototype%': needsEval,
1718
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
1719
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
1720
+ '%Boolean%': Boolean,
1721
+ '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
1722
+ '%Date%': Date,
1723
+ '%decodeURI%': decodeURI,
1724
+ '%decodeURIComponent%': decodeURIComponent,
1725
+ '%encodeURI%': encodeURI,
1726
+ '%encodeURIComponent%': encodeURIComponent,
1727
+ '%Error%': Error,
1728
+ '%eval%': eval, // eslint-disable-line no-eval
1729
+ '%EvalError%': EvalError,
1730
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
1731
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
1732
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
1733
+ '%Function%': $Function,
1734
+ '%GeneratorFunction%': needsEval,
1735
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
1736
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
1737
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
1738
+ '%isFinite%': isFinite,
1739
+ '%isNaN%': isNaN,
1740
+ '%IteratorPrototype%': hasSymbols$1 ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
1741
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
1742
+ '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
1743
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$1 ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
1744
+ '%Math%': Math,
1745
+ '%Number%': Number,
1746
+ '%Object%': Object,
1747
+ '%parseFloat%': parseFloat,
1748
+ '%parseInt%': parseInt,
1749
+ '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
1750
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
1751
+ '%RangeError%': RangeError,
1752
+ '%ReferenceError%': ReferenceError,
1753
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
1754
+ '%RegExp%': RegExp,
1755
+ '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
1756
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$1 ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
1757
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
1758
+ '%String%': String,
1759
+ '%StringIteratorPrototype%': hasSymbols$1 ? getProto(''[Symbol.iterator]()) : undefined$1,
1760
+ '%Symbol%': hasSymbols$1 ? Symbol : undefined$1,
1761
+ '%SyntaxError%': $SyntaxError$1,
1762
+ '%ThrowTypeError%': ThrowTypeError,
1763
+ '%TypedArray%': TypedArray,
1764
+ '%TypeError%': $TypeError$5,
1765
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
1766
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
1767
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
1768
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
1769
+ '%URIError%': URIError,
1770
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
1771
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
1772
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
1773
+ };
1774
+
1775
+ var doEval = function doEval(name) {
1776
+ var value;
1777
+ if (name === '%AsyncFunction%') {
1778
+ value = getEvalledConstructor('async function () {}');
1779
+ } else if (name === '%GeneratorFunction%') {
1780
+ value = getEvalledConstructor('function* () {}');
1781
+ } else if (name === '%AsyncGeneratorFunction%') {
1782
+ value = getEvalledConstructor('async function* () {}');
1783
+ } else if (name === '%AsyncGenerator%') {
1784
+ var fn = doEval('%AsyncGeneratorFunction%');
1785
+ if (fn) {
1786
+ value = fn.prototype;
1787
+ }
1788
+ } else if (name === '%AsyncIteratorPrototype%') {
1789
+ var gen = doEval('%AsyncGenerator%');
1790
+ if (gen) {
1791
+ value = getProto(gen.prototype);
1792
+ }
1793
+ }
1794
+
1795
+ INTRINSICS[name] = value;
1796
+
1797
+ return value;
1798
+ };
1799
+
1800
+ var LEGACY_ALIASES = {
1801
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
1802
+ '%ArrayPrototype%': ['Array', 'prototype'],
1803
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
1804
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
1805
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
1806
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
1807
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
1808
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
1809
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
1810
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
1811
+ '%DataViewPrototype%': ['DataView', 'prototype'],
1812
+ '%DatePrototype%': ['Date', 'prototype'],
1813
+ '%ErrorPrototype%': ['Error', 'prototype'],
1814
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
1815
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
1816
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
1817
+ '%FunctionPrototype%': ['Function', 'prototype'],
1818
+ '%Generator%': ['GeneratorFunction', 'prototype'],
1819
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
1820
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
1821
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
1822
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
1823
+ '%JSONParse%': ['JSON', 'parse'],
1824
+ '%JSONStringify%': ['JSON', 'stringify'],
1825
+ '%MapPrototype%': ['Map', 'prototype'],
1826
+ '%NumberPrototype%': ['Number', 'prototype'],
1827
+ '%ObjectPrototype%': ['Object', 'prototype'],
1828
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
1829
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
1830
+ '%PromisePrototype%': ['Promise', 'prototype'],
1831
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
1832
+ '%Promise_all%': ['Promise', 'all'],
1833
+ '%Promise_reject%': ['Promise', 'reject'],
1834
+ '%Promise_resolve%': ['Promise', 'resolve'],
1835
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
1836
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
1837
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
1838
+ '%SetPrototype%': ['Set', 'prototype'],
1839
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
1840
+ '%StringPrototype%': ['String', 'prototype'],
1841
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
1842
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
1843
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
1844
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
1845
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
1846
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
1847
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
1848
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
1849
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
1850
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
1851
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
1852
+ };
1853
+
1854
+
1855
+
1856
+ var $concat$2 = functionBind.call(Function.call, Array.prototype.concat);
1857
+ var $spliceApply = functionBind.call(Function.apply, Array.prototype.splice);
1858
+ var $replace = functionBind.call(Function.call, String.prototype.replace);
1859
+ var $strSlice = functionBind.call(Function.call, String.prototype.slice);
1860
+
1861
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
1862
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
1863
+ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
1864
+ var stringToPath = function stringToPath(string) {
1865
+ var first = $strSlice(string, 0, 1);
1866
+ var last = $strSlice(string, -1);
1867
+ if (first === '%' && last !== '%') {
1868
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
1869
+ } else if (last === '%' && first !== '%') {
1870
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
1871
+ }
1872
+ var result = [];
1873
+ $replace(string, rePropName, function (match, number, quote, subString) {
1874
+ result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
1875
+ });
1876
+ return result;
1877
+ };
1878
+ /* end adaptation */
1879
+
1880
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
1881
+ var intrinsicName = name;
1882
+ var alias;
1883
+ if (src(LEGACY_ALIASES, intrinsicName)) {
1884
+ alias = LEGACY_ALIASES[intrinsicName];
1885
+ intrinsicName = '%' + alias[0] + '%';
1886
+ }
1887
+
1888
+ if (src(INTRINSICS, intrinsicName)) {
1889
+ var value = INTRINSICS[intrinsicName];
1890
+ if (value === needsEval) {
1891
+ value = doEval(intrinsicName);
1892
+ }
1893
+ if (typeof value === 'undefined' && !allowMissing) {
1894
+ throw new $TypeError$5('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
1895
+ }
1896
+
1897
+ return {
1898
+ alias: alias,
1899
+ name: intrinsicName,
1900
+ value: value
1901
+ };
1902
+ }
1903
+
1904
+ throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
1905
+ };
1906
+
1907
+ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
1908
+ if (typeof name !== 'string' || name.length === 0) {
1909
+ throw new $TypeError$5('intrinsic name must be a non-empty string');
1910
+ }
1911
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
1912
+ throw new $TypeError$5('"allowMissing" argument must be a boolean');
1913
+ }
1914
+
1915
+ var parts = stringToPath(name);
1916
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
1917
+
1918
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
1919
+ var intrinsicRealName = intrinsic.name;
1920
+ var value = intrinsic.value;
1921
+ var skipFurtherCaching = false;
1922
+
1923
+ var alias = intrinsic.alias;
1924
+ if (alias) {
1925
+ intrinsicBaseName = alias[0];
1926
+ $spliceApply(parts, $concat$2([0, 1], alias));
1927
+ }
1928
+
1929
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
1930
+ var part = parts[i];
1931
+ var first = $strSlice(part, 0, 1);
1932
+ var last = $strSlice(part, -1);
1933
+ if (
1934
+ (
1935
+ (first === '"' || first === "'" || first === '`')
1936
+ || (last === '"' || last === "'" || last === '`')
1937
+ )
1938
+ && first !== last
1939
+ ) {
1940
+ throw new $SyntaxError$1('property names with quotes must have matching quotes');
1941
+ }
1942
+ if (part === 'constructor' || !isOwn) {
1943
+ skipFurtherCaching = true;
1944
+ }
1945
+
1946
+ intrinsicBaseName += '.' + part;
1947
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
1948
+
1949
+ if (src(INTRINSICS, intrinsicRealName)) {
1950
+ value = INTRINSICS[intrinsicRealName];
1951
+ } else if (value != null) {
1952
+ if (!(part in value)) {
1953
+ if (!allowMissing) {
1954
+ throw new $TypeError$5('base intrinsic for ' + name + ' exists, but the property is not available.');
1955
+ }
1956
+ return void undefined$1;
1957
+ }
1958
+ if ($gOPD$2 && (i + 1) >= parts.length) {
1959
+ var desc = $gOPD$2(value, part);
1960
+ isOwn = !!desc;
1961
+
1962
+ // By convention, when a data property is converted to an accessor
1963
+ // property to emulate a data property that does not suffer from
1964
+ // the override mistake, that accessor's getter is marked with
1965
+ // an `originalValue` property. Here, when we detect this, we
1966
+ // uphold the illusion by pretending to see that original data
1967
+ // property, i.e., returning the value rather than the getter
1968
+ // itself.
1969
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
1970
+ value = desc.get;
1971
+ } else {
1972
+ value = value[part];
1973
+ }
1974
+ } else {
1975
+ isOwn = src(value, part);
1976
+ value = value[part];
1977
+ }
1978
+
1979
+ if (isOwn && !skipFurtherCaching) {
1980
+ INTRINSICS[intrinsicRealName] = value;
1981
+ }
1982
+ }
1983
+ }
1984
+ return value;
1985
+ };
1986
+
1987
+ var callBind = _commonjsHelpers.createCommonjsModule(function (module) {
1988
+
1989
+
1990
+
1991
+
1992
+ var $apply = getIntrinsic('%Function.prototype.apply%');
1993
+ var $call = getIntrinsic('%Function.prototype.call%');
1994
+ var $reflectApply = getIntrinsic('%Reflect.apply%', true) || functionBind.call($call, $apply);
1995
+
1996
+ var $gOPD = getIntrinsic('%Object.getOwnPropertyDescriptor%', true);
1997
+ var $defineProperty = getIntrinsic('%Object.defineProperty%', true);
1998
+ var $max = getIntrinsic('%Math.max%');
1999
+
2000
+ if ($defineProperty) {
2001
+ try {
2002
+ $defineProperty({}, 'a', { value: 1 });
2003
+ } catch (e) {
2004
+ // IE 8 has a broken defineProperty
2005
+ $defineProperty = null;
2006
+ }
2007
+ }
2008
+
2009
+ module.exports = function callBind(originalFunction) {
2010
+ var func = $reflectApply(functionBind, $call, arguments);
2011
+ if ($gOPD && $defineProperty) {
2012
+ var desc = $gOPD(func, 'length');
2013
+ if (desc.configurable) {
2014
+ // original length, plus the receiver, minus any additional arguments (after the receiver)
2015
+ $defineProperty(
2016
+ func,
2017
+ 'length',
2018
+ { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
2019
+ );
2020
+ }
2021
+ }
2022
+ return func;
2023
+ };
2024
+
2025
+ var applyBind = function applyBind() {
2026
+ return $reflectApply(functionBind, $apply, arguments);
2027
+ };
2028
+
2029
+ if ($defineProperty) {
2030
+ $defineProperty(module.exports, 'apply', { value: applyBind });
2031
+ } else {
2032
+ module.exports.apply = applyBind;
2033
+ }
2034
+ });
2035
+ callBind.apply;
2036
+
2037
+ var $indexOf = callBind(getIntrinsic('String.prototype.indexOf'));
2038
+
2039
+ var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
2040
+ var intrinsic = getIntrinsic(name, !!allowMissing);
2041
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
2042
+ return callBind(intrinsic);
2043
+ }
2044
+ return intrinsic;
2045
+ };
2046
+
2047
+ var $Array$1 = getIntrinsic('%Array%');
2048
+
2049
+ // eslint-disable-next-line global-require
2050
+ var toStr$2 = !$Array$1.isArray && callBound$1('Object.prototype.toString');
2051
+
2052
+ // https://ecma-international.org/ecma-262/6.0/#sec-isarray
2053
+
2054
+ var IsArray$1 = $Array$1.isArray || function IsArray(argument) {
2055
+ return toStr$2(argument) === '[object Array]';
2056
+ };
2057
+
2058
+ var $defineProperty = getIntrinsic('%Object.defineProperty%', true);
2059
+
2060
+ if ($defineProperty) {
2061
+ try {
2062
+ $defineProperty({}, 'a', { value: 1 });
2063
+ } catch (e) {
2064
+ // IE 8 has a broken defineProperty
2065
+ $defineProperty = null;
2066
+ }
2067
+ }
2068
+
2069
+ // node v0.6 has a bug where array lengths can be Set but not Defined
2070
+ var hasArrayLengthDefineBug = Object.defineProperty && Object.defineProperty([], 'length', { value: 1 }).length === 0;
2071
+
2072
+ // eslint-disable-next-line global-require
2073
+ var isArray = hasArrayLengthDefineBug && IsArray$1; // this does not depend on any other AOs.
2074
+
2075
+
2076
+
2077
+ var $isEnumerable$1 = callBound$1('Object.prototype.propertyIsEnumerable');
2078
+
2079
+ // eslint-disable-next-line max-params
2080
+ var DefineOwnProperty = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {
2081
+ if (!$defineProperty) {
2082
+ if (!IsDataDescriptor(desc)) {
2083
+ // ES3 does not support getters/setters
2084
+ return false;
2085
+ }
2086
+ if (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {
2087
+ return false;
2088
+ }
2089
+
2090
+ // fallback for ES3
2091
+ if (P in O && $isEnumerable$1(O, P) !== !!desc['[[Enumerable]]']) {
2092
+ // a non-enumerable existing property
2093
+ return false;
2094
+ }
2095
+
2096
+ // property does not exist at all, or exists but is enumerable
2097
+ var V = desc['[[Value]]'];
2098
+ // eslint-disable-next-line no-param-reassign
2099
+ O[P] = V; // will use [[Define]]
2100
+ return SameValue(O[P], V);
2101
+ }
2102
+ if (
2103
+ hasArrayLengthDefineBug
2104
+ && P === 'length'
2105
+ && '[[Value]]' in desc
2106
+ && isArray(O)
2107
+ && O.length !== desc['[[Value]]']
2108
+ ) {
2109
+ // eslint-disable-next-line no-param-reassign
2110
+ O.length = desc['[[Value]]'];
2111
+ return O.length === desc['[[Value]]'];
2112
+ }
2113
+
2114
+ $defineProperty(O, P, FromPropertyDescriptor(desc));
2115
+ return true;
2116
+ };
2117
+
2118
+ var $TypeError$4 = getIntrinsic('%TypeError%');
2119
+ var $SyntaxError = getIntrinsic('%SyntaxError%');
2120
+
2121
+
2122
+
2123
+ var predicates = {
2124
+ // https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type
2125
+ 'Property Descriptor': function isPropertyDescriptor(Type, Desc) {
2126
+ if (Type(Desc) !== 'Object') {
2127
+ return false;
2128
+ }
2129
+ var allowed = {
2130
+ '[[Configurable]]': true,
2131
+ '[[Enumerable]]': true,
2132
+ '[[Get]]': true,
2133
+ '[[Set]]': true,
2134
+ '[[Value]]': true,
2135
+ '[[Writable]]': true
2136
+ };
2137
+
2138
+ for (var key in Desc) { // eslint-disable-line
2139
+ if (src(Desc, key) && !allowed[key]) {
2140
+ return false;
2141
+ }
2142
+ }
2143
+
2144
+ var isData = src(Desc, '[[Value]]');
2145
+ var IsAccessor = src(Desc, '[[Get]]') || src(Desc, '[[Set]]');
2146
+ if (isData && IsAccessor) {
2147
+ throw new $TypeError$4('Property Descriptors may not be both accessor and data descriptors');
2148
+ }
2149
+ return true;
2150
+ }
2151
+ };
2152
+
2153
+ var assertRecord = function assertRecord(Type, recordType, argumentName, value) {
2154
+ var predicate = predicates[recordType];
2155
+ if (typeof predicate !== 'function') {
2156
+ throw new $SyntaxError('unknown record type: ' + recordType);
2157
+ }
2158
+ if (!predicate(Type, value)) {
2159
+ throw new $TypeError$4(argumentName + ' must be a ' + recordType);
2160
+ }
2161
+ };
2162
+
2163
+ // https://262.ecma-international.org/5.1/#sec-8
2164
+
2165
+ var Type$1 = function Type(x) {
2166
+ if (x === null) {
2167
+ return 'Null';
2168
+ }
2169
+ if (typeof x === 'undefined') {
2170
+ return 'Undefined';
2171
+ }
2172
+ if (typeof x === 'function' || typeof x === 'object') {
2173
+ return 'Object';
2174
+ }
2175
+ if (typeof x === 'number') {
2176
+ return 'Number';
2177
+ }
2178
+ if (typeof x === 'boolean') {
2179
+ return 'Boolean';
2180
+ }
2181
+ if (typeof x === 'string') {
2182
+ return 'String';
2183
+ }
2184
+ };
2185
+
2186
+ // https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values
2187
+
2188
+ var Type = function Type(x) {
2189
+ if (typeof x === 'symbol') {
2190
+ return 'Symbol';
2191
+ }
2192
+ if (typeof x === 'bigint') {
2193
+ return 'BigInt';
2194
+ }
2195
+ return Type$1(x);
2196
+ };
2197
+
2198
+ // https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor
2199
+
2200
+ var FromPropertyDescriptor = function FromPropertyDescriptor(Desc) {
2201
+ if (typeof Desc === 'undefined') {
2202
+ return Desc;
2203
+ }
2204
+
2205
+ assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
2206
+
2207
+ var obj = {};
2208
+ if ('[[Value]]' in Desc) {
2209
+ obj.value = Desc['[[Value]]'];
2210
+ }
2211
+ if ('[[Writable]]' in Desc) {
2212
+ obj.writable = Desc['[[Writable]]'];
2213
+ }
2214
+ if ('[[Get]]' in Desc) {
2215
+ obj.get = Desc['[[Get]]'];
2216
+ }
2217
+ if ('[[Set]]' in Desc) {
2218
+ obj.set = Desc['[[Set]]'];
2219
+ }
2220
+ if ('[[Enumerable]]' in Desc) {
2221
+ obj.enumerable = Desc['[[Enumerable]]'];
2222
+ }
2223
+ if ('[[Configurable]]' in Desc) {
2224
+ obj.configurable = Desc['[[Configurable]]'];
2225
+ }
2226
+ return obj;
2227
+ };
2228
+
2229
+ var $gOPD$1 = getIntrinsic('%Object.getOwnPropertyDescriptor%', true);
2230
+ if ($gOPD$1) {
2231
+ try {
2232
+ $gOPD$1([], 'length');
2233
+ } catch (e) {
2234
+ // IE 8 has a broken gOPD
2235
+ $gOPD$1 = null;
2236
+ }
2237
+ }
2238
+
2239
+ var getOwnPropertyDescriptor = $gOPD$1;
2240
+
2241
+ var $Array = getIntrinsic('%Array%');
2242
+
2243
+ // eslint-disable-next-line global-require
2244
+ var toStr$1 = !$Array.isArray && callBound$1('Object.prototype.toString');
2245
+
2246
+ // https://ecma-international.org/ecma-262/6.0/#sec-isarray
2247
+
2248
+ var IsArray = $Array.isArray || function IsArray(argument) {
2249
+ return toStr$1(argument) === '[object Array]';
2250
+ };
2251
+
2252
+ // https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey
2253
+
2254
+ var IsPropertyKey = function IsPropertyKey(argument) {
2255
+ return typeof argument === 'string' || typeof argument === 'symbol';
2256
+ };
2257
+
2258
+ var shams = function hasToStringTagShams() {
2259
+ return shams$1() && !!Symbol.toStringTag;
2260
+ };
2261
+
2262
+ var hasToStringTag$1 = shams();
2263
+ var has;
2264
+ var $exec;
2265
+ var isRegexMarker;
2266
+ var badStringifier;
2267
+
2268
+ if (hasToStringTag$1) {
2269
+ has = callBound$1('Object.prototype.hasOwnProperty');
2270
+ $exec = callBound$1('RegExp.prototype.exec');
2271
+ isRegexMarker = {};
2272
+
2273
+ var throwRegexMarker = function () {
2274
+ throw isRegexMarker;
2275
+ };
2276
+ badStringifier = {
2277
+ toString: throwRegexMarker,
2278
+ valueOf: throwRegexMarker
2279
+ };
2280
+
2281
+ if (typeof Symbol.toPrimitive === 'symbol') {
2282
+ badStringifier[Symbol.toPrimitive] = throwRegexMarker;
2283
+ }
2284
+ }
2285
+
2286
+ var $toString = callBound$1('Object.prototype.toString');
2287
+ var gOPD = Object.getOwnPropertyDescriptor;
2288
+ var regexClass = '[object RegExp]';
2289
+
2290
+ var isRegex = hasToStringTag$1
2291
+ // eslint-disable-next-line consistent-return
2292
+ ? function isRegex(value) {
2293
+ if (!value || typeof value !== 'object') {
2294
+ return false;
2295
+ }
2296
+
2297
+ var descriptor = gOPD(value, 'lastIndex');
2298
+ var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
2299
+ if (!hasLastIndexDataProperty) {
2300
+ return false;
2301
+ }
2302
+
2303
+ try {
2304
+ $exec(value, badStringifier);
2305
+ } catch (e) {
2306
+ return e === isRegexMarker;
2307
+ }
2308
+ }
2309
+ : function isRegex(value) {
2310
+ // In older browsers, typeof regex incorrectly returns 'function'
2311
+ if (!value || (typeof value !== 'object' && typeof value !== 'function')) {
2312
+ return false;
2313
+ }
2314
+
2315
+ return $toString(value) === regexClass;
2316
+ };
2317
+
2318
+ // http://262.ecma-international.org/5.1/#sec-9.2
2319
+
2320
+ var ToBoolean = function ToBoolean(value) { return !!value; };
2321
+
2322
+ var $match = getIntrinsic('%Symbol.match%', true);
2323
+
2324
+
2325
+
2326
+
2327
+
2328
+ // https://ecma-international.org/ecma-262/6.0/#sec-isregexp
2329
+
2330
+ var IsRegExp = function IsRegExp(argument) {
2331
+ if (!argument || typeof argument !== 'object') {
2332
+ return false;
2333
+ }
2334
+ if ($match) {
2335
+ var isRegExp = argument[$match];
2336
+ if (typeof isRegExp !== 'undefined') {
2337
+ return ToBoolean(isRegExp);
2338
+ }
2339
+ }
2340
+ return isRegex(argument);
2341
+ };
2342
+
2343
+ var fnToStr = Function.prototype.toString;
2344
+ var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;
2345
+ var badArrayLike;
2346
+ var isCallableMarker;
2347
+ if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {
2348
+ try {
2349
+ badArrayLike = Object.defineProperty({}, 'length', {
2350
+ get: function () {
2351
+ throw isCallableMarker;
2352
+ }
2353
+ });
2354
+ isCallableMarker = {};
2355
+ // eslint-disable-next-line no-throw-literal
2356
+ reflectApply(function () { throw 42; }, null, badArrayLike);
2357
+ } catch (_) {
2358
+ if (_ !== isCallableMarker) {
2359
+ reflectApply = null;
2360
+ }
2361
+ }
2362
+ } else {
2363
+ reflectApply = null;
2364
+ }
2365
+
2366
+ var constructorRegex = /^\s*class\b/;
2367
+ var isES6ClassFn = function isES6ClassFunction(value) {
2368
+ try {
2369
+ var fnStr = fnToStr.call(value);
2370
+ return constructorRegex.test(fnStr);
2371
+ } catch (e) {
2372
+ return false; // not a function
2373
+ }
2374
+ };
2375
+
2376
+ var tryFunctionObject = function tryFunctionToStr(value) {
2377
+ try {
2378
+ if (isES6ClassFn(value)) { return false; }
2379
+ fnToStr.call(value);
2380
+ return true;
2381
+ } catch (e) {
2382
+ return false;
2383
+ }
2384
+ };
2385
+ var toStr = Object.prototype.toString;
2386
+ var fnClass = '[object Function]';
2387
+ var genClass = '[object GeneratorFunction]';
2388
+ var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`
2389
+ /* globals document: false */
2390
+ var documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {};
2391
+
2392
+ var isCallable = reflectApply
2393
+ ? function isCallable(value) {
2394
+ if (value === documentDotAll) { return true; }
2395
+ if (!value) { return false; }
2396
+ if (typeof value !== 'function' && typeof value !== 'object') { return false; }
2397
+ if (typeof value === 'function' && !value.prototype) { return true; }
2398
+ try {
2399
+ reflectApply(value, null, badArrayLike);
2400
+ } catch (e) {
2401
+ if (e !== isCallableMarker) { return false; }
2402
+ }
2403
+ return !isES6ClassFn(value);
2404
+ }
2405
+ : function isCallable(value) {
2406
+ if (value === documentDotAll) { return true; }
2407
+ if (!value) { return false; }
2408
+ if (typeof value !== 'function' && typeof value !== 'object') { return false; }
2409
+ if (typeof value === 'function' && !value.prototype) { return true; }
2410
+ if (hasToStringTag) { return tryFunctionObject(value); }
2411
+ if (isES6ClassFn(value)) { return false; }
2412
+ var strClass = toStr.call(value);
2413
+ return strClass === fnClass || strClass === genClass;
2414
+ };
2415
+
2416
+ // http://262.ecma-international.org/5.1/#sec-9.11
2417
+
2418
+ var IsCallable = isCallable;
2419
+
2420
+ var $TypeError$3 = getIntrinsic('%TypeError%');
2421
+
2422
+
2423
+
2424
+
2425
+
2426
+ // https://262.ecma-international.org/5.1/#sec-8.10.5
2427
+
2428
+ var ToPropertyDescriptor = function ToPropertyDescriptor(Obj) {
2429
+ if (Type(Obj) !== 'Object') {
2430
+ throw new $TypeError$3('ToPropertyDescriptor requires an object');
2431
+ }
2432
+
2433
+ var desc = {};
2434
+ if (src(Obj, 'enumerable')) {
2435
+ desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
2436
+ }
2437
+ if (src(Obj, 'configurable')) {
2438
+ desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
2439
+ }
2440
+ if (src(Obj, 'value')) {
2441
+ desc['[[Value]]'] = Obj.value;
2442
+ }
2443
+ if (src(Obj, 'writable')) {
2444
+ desc['[[Writable]]'] = ToBoolean(Obj.writable);
2445
+ }
2446
+ if (src(Obj, 'get')) {
2447
+ var getter = Obj.get;
2448
+ if (typeof getter !== 'undefined' && !IsCallable(getter)) {
2449
+ throw new $TypeError$3('getter must be a function');
2450
+ }
2451
+ desc['[[Get]]'] = getter;
2452
+ }
2453
+ if (src(Obj, 'set')) {
2454
+ var setter = Obj.set;
2455
+ if (typeof setter !== 'undefined' && !IsCallable(setter)) {
2456
+ throw new $TypeError$3('setter must be a function');
2457
+ }
2458
+ desc['[[Set]]'] = setter;
2459
+ }
2460
+
2461
+ if ((src(desc, '[[Get]]') || src(desc, '[[Set]]')) && (src(desc, '[[Value]]') || src(desc, '[[Writable]]'))) {
2462
+ throw new $TypeError$3('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
2463
+ }
2464
+ return desc;
2465
+ };
2466
+
2467
+ var $TypeError$2 = getIntrinsic('%TypeError%');
2468
+
2469
+
2470
+
2471
+ var $isEnumerable = callBound$1('Object.prototype.propertyIsEnumerable');
2472
+
2473
+
2474
+
2475
+
2476
+
2477
+
2478
+
2479
+
2480
+
2481
+ // https://ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty
2482
+
2483
+ var OrdinaryGetOwnProperty = function OrdinaryGetOwnProperty(O, P) {
2484
+ if (Type(O) !== 'Object') {
2485
+ throw new $TypeError$2('Assertion failed: O must be an Object');
2486
+ }
2487
+ if (!IsPropertyKey(P)) {
2488
+ throw new $TypeError$2('Assertion failed: P must be a Property Key');
2489
+ }
2490
+ if (!src(O, P)) {
2491
+ return void 0;
2492
+ }
2493
+ if (!getOwnPropertyDescriptor) {
2494
+ // ES3 / IE 8 fallback
2495
+ var arrayLength = IsArray(O) && P === 'length';
2496
+ var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
2497
+ return {
2498
+ '[[Configurable]]': !(arrayLength || regexLastIndex),
2499
+ '[[Enumerable]]': $isEnumerable(O, P),
2500
+ '[[Value]]': O[P],
2501
+ '[[Writable]]': true
2502
+ };
2503
+ }
2504
+ return ToPropertyDescriptor(getOwnPropertyDescriptor(O, P));
2505
+ };
2506
+
2507
+ // https://ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor
2508
+
2509
+ var IsDataDescriptor = function IsDataDescriptor(Desc) {
2510
+ if (typeof Desc === 'undefined') {
2511
+ return false;
2512
+ }
2513
+
2514
+ assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
2515
+
2516
+ if (!src(Desc, '[[Value]]') && !src(Desc, '[[Writable]]')) {
2517
+ return false;
2518
+ }
2519
+
2520
+ return true;
2521
+ };
2522
+
2523
+ var isPrimitive = function isPrimitive(value) {
2524
+ return value === null || (typeof value !== 'function' && typeof value !== 'object');
2525
+ };
2526
+
2527
+ var $Object$1 = getIntrinsic('%Object%');
2528
+
2529
+
2530
+
2531
+ var $preventExtensions = $Object$1.preventExtensions;
2532
+ var $isExtensible = $Object$1.isExtensible;
2533
+
2534
+ // https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o
2535
+
2536
+ var IsExtensible = $preventExtensions
2537
+ ? function IsExtensible(obj) {
2538
+ return !isPrimitive(obj) && $isExtensible(obj);
2539
+ }
2540
+ : function IsExtensible(obj) {
2541
+ return !isPrimitive(obj);
2542
+ };
2543
+
2544
+ var _isNaN = Number.isNaN || function isNaN(a) {
2545
+ return a !== a;
2546
+ };
2547
+
2548
+ // http://262.ecma-international.org/5.1/#sec-9.12
2549
+
2550
+ var SameValue = function SameValue(x, y) {
2551
+ if (x === y) { // 0 === -0, but they are not identical.
2552
+ if (x === 0) { return 1 / x === 1 / y; }
2553
+ return true;
2554
+ }
2555
+ return _isNaN(x) && _isNaN(y);
2556
+ };
2557
+
2558
+ var $TypeError$1 = getIntrinsic('%TypeError%');
2559
+
2560
+
2561
+
2562
+
2563
+
2564
+
2565
+
2566
+
2567
+
2568
+
2569
+
2570
+ // https://ecma-international.org/ecma-262/6.0/#sec-createdataproperty
2571
+
2572
+ var CreateDataProperty = function CreateDataProperty(O, P, V) {
2573
+ if (Type(O) !== 'Object') {
2574
+ throw new $TypeError$1('Assertion failed: Type(O) is not Object');
2575
+ }
2576
+ if (!IsPropertyKey(P)) {
2577
+ throw new $TypeError$1('Assertion failed: IsPropertyKey(P) is not true');
2578
+ }
2579
+ var oldDesc = OrdinaryGetOwnProperty(O, P);
2580
+ var extensible = !oldDesc || IsExtensible(O);
2581
+ var immutable = oldDesc && (!oldDesc['[[Writable]]'] || !oldDesc['[[Configurable]]']);
2582
+ if (immutable || !extensible) {
2583
+ return false;
2584
+ }
2585
+ return DefineOwnProperty(
2586
+ IsDataDescriptor,
2587
+ SameValue,
2588
+ FromPropertyDescriptor,
2589
+ O,
2590
+ P,
2591
+ {
2592
+ '[[Configurable]]': true,
2593
+ '[[Enumerable]]': true,
2594
+ '[[Value]]': V,
2595
+ '[[Writable]]': true
2596
+ }
2597
+ );
2598
+ };
2599
+
2600
+ var $TypeError = getIntrinsic('%TypeError%');
2601
+
2602
+ // http://262.ecma-international.org/5.1/#sec-9.10
2603
+
2604
+ var CheckObjectCoercible = function CheckObjectCoercible(value, optMessage) {
2605
+ if (value == null) {
2606
+ throw new $TypeError(optMessage || ('Cannot call method on ' + value));
2607
+ }
2608
+ return value;
2609
+ };
2610
+
2611
+ var RequireObjectCoercible = CheckObjectCoercible;
2612
+
2613
+ var $Object = getIntrinsic('%Object%');
2614
+
2615
+
2616
+
2617
+ // https://ecma-international.org/ecma-262/6.0/#sec-toobject
2618
+
2619
+ var ToObject = function ToObject(value) {
2620
+ RequireObjectCoercible(value);
2621
+ return $Object(value);
2622
+ };
2623
+
2624
+ var $gOPD = Object.getOwnPropertyDescriptor;
2625
+ var $getOwnNames = Object.getOwnPropertyNames;
2626
+ var $getSymbols = Object.getOwnPropertySymbols;
2627
+ var $concat$1 = callBound$1('Array.prototype.concat');
2628
+ var $reduce = callBound$1('Array.prototype.reduce');
2629
+ var getAll = $getSymbols ? function (obj) {
2630
+ return $concat$1($getOwnNames(obj), $getSymbols(obj));
2631
+ } : $getOwnNames;
2632
+
2633
+ var isES5$1 = IsCallable($gOPD) && IsCallable($getOwnNames);
2634
+
2635
+ var implementation$1 = function getOwnPropertyDescriptors(value) {
2636
+ RequireObjectCoercible(value);
2637
+ if (!isES5$1) {
2638
+ throw new TypeError('getOwnPropertyDescriptors requires Object.getOwnPropertyDescriptor');
2639
+ }
2640
+
2641
+ var O = ToObject(value);
2642
+ return $reduce(
2643
+ getAll(O),
2644
+ function (acc, key) {
2645
+ var descriptor = $gOPD(O, key);
2646
+ if (typeof descriptor !== 'undefined') {
2647
+ CreateDataProperty(acc, key, descriptor);
2648
+ }
2649
+ return acc;
2650
+ },
2651
+ {}
2652
+ );
2653
+ };
2654
+
2655
+ var polyfill$2 = function getPolyfill() {
2656
+ return typeof Object.getOwnPropertyDescriptors === 'function' ? Object.getOwnPropertyDescriptors : implementation$1;
2657
+ };
2658
+
2659
+ var shim$1 = function shimGetOwnPropertyDescriptors() {
2660
+ var polyfill = polyfill$2();
2661
+ defineProperties_1(
2662
+ Object,
2663
+ { getOwnPropertyDescriptors: polyfill },
2664
+ { getOwnPropertyDescriptors: function () { return Object.getOwnPropertyDescriptors !== polyfill; } }
2665
+ );
2666
+ return polyfill;
2667
+ };
2668
+
2669
+ var bound = callBind(polyfill$2(), Object);
2670
+
2671
+ defineProperties_1(bound, {
2672
+ getPolyfill: polyfill$2,
2673
+ implementation: implementation$1,
2674
+ shim: shim$1
2675
+ });
2676
+
2677
+ var object_getownpropertydescriptors = bound;
2678
+
2679
+ // TODO; semver-major: remove
2680
+
2681
+ var callBound = callBound$1;
2682
+
2683
+ var isES5 = typeof Object.defineProperty === 'function'
2684
+ && typeof Object.defineProperties === 'function';
2685
+
2686
+ var hasProto = [].__proto__ === Array.prototype; // eslint-disable-line no-proto
2687
+
2688
+ if (!isES5 || !hasProto) {
2689
+ throw new TypeError('util.promisify requires a true ES5 environment, that also supports `__proto__`');
2690
+ }
2691
+
2692
+
2693
+
2694
+ if (typeof Promise !== 'function') {
2695
+ throw new TypeError('`Promise` must be globally available for util.promisify to work.');
2696
+ }
2697
+
2698
+
2699
+
2700
+ var $slice = callBound('Array.prototype.slice');
2701
+ var $concat = callBound('Array.prototype.concat');
2702
+ var $forEach = callBound('Array.prototype.forEach');
2703
+
2704
+ var hasSymbols = hasSymbols$2();
2705
+
2706
+ var kCustomPromisifiedSymbol = hasSymbols ? Symbol('util.promisify.custom') : null;
2707
+ var kCustomPromisifyArgsSymbol = hasSymbols ? Symbol('customPromisifyArgs') : null;
2708
+
2709
+ var implementation = function promisify(orig) {
2710
+ if (typeof orig !== 'function') {
2711
+ var error = new TypeError('The "original" argument must be of type function');
2712
+ error.name = 'TypeError [ERR_INVALID_ARG_TYPE]';
2713
+ error.code = 'ERR_INVALID_ARG_TYPE';
2714
+ throw error;
2715
+ }
2716
+
2717
+ if (hasSymbols && orig[kCustomPromisifiedSymbol]) {
2718
+ var customFunction = orig[kCustomPromisifiedSymbol];
2719
+ if (typeof customFunction !== 'function') {
2720
+ throw new TypeError('The [util.promisify.custom] property must be a function');
2721
+ }
2722
+ Object.defineProperty(customFunction, kCustomPromisifiedSymbol, {
2723
+ configurable: true,
2724
+ enumerable: false,
2725
+ value: customFunction,
2726
+ writable: false
2727
+ });
2728
+ return customFunction;
2729
+ }
2730
+
2731
+ // Names to create an object from in case the callback receives multiple
2732
+ // arguments, e.g. ['stdout', 'stderr'] for child_process.exec.
2733
+ var argumentNames = orig[kCustomPromisifyArgsSymbol];
2734
+
2735
+ var promisified = function fn() {
2736
+ var args = $slice(arguments);
2737
+ var self = this; // eslint-disable-line no-invalid-this
2738
+ return new Promise(function (resolve, reject) {
2739
+ orig.apply(self, $concat(args, function (err) {
2740
+ var values = arguments.length > 1 ? $slice(arguments, 1) : [];
2741
+ if (err) {
2742
+ reject(err);
2743
+ } else if (typeof argumentNames !== 'undefined' && values.length > 1) {
2744
+ var obj = {};
2745
+ $forEach(argumentNames, function (name, index) {
2746
+ obj[name] = values[index];
2747
+ });
2748
+ resolve(obj);
2749
+ } else {
2750
+ resolve(values[0]);
2751
+ }
2752
+ }));
2753
+ });
2754
+ };
2755
+
2756
+ promisified.__proto__ = orig.__proto__; // eslint-disable-line no-proto
2757
+
2758
+ Object.defineProperty(promisified, kCustomPromisifiedSymbol, {
2759
+ configurable: true,
2760
+ enumerable: false,
2761
+ value: promisified,
2762
+ writable: false
2763
+ });
2764
+ return Object.defineProperties(promisified, object_getownpropertydescriptors(orig));
2765
+ };
2766
+
2767
+ var custom = kCustomPromisifiedSymbol;
2768
+ var customPromisifyArgs = kCustomPromisifyArgsSymbol;
2769
+ implementation.custom = custom;
2770
+ implementation.customPromisifyArgs = customPromisifyArgs;
2771
+
2772
+ var polyfill$1 = function getPolyfill() {
2773
+ if (typeof util.util.promisify === 'function') {
2774
+ return util.util.promisify;
2775
+ }
2776
+ return implementation;
2777
+ };
2778
+
2779
+ var shim = function shimUtilPromisify() {
2780
+ var polyfill = polyfill$1();
2781
+ if (polyfill !== util.util.promisify) {
2782
+ Object.defineProperty(util.util, 'promisify', {
2783
+ configurable: true,
2784
+ enumerable: true,
2785
+ value: polyfill,
2786
+ writable: true
2787
+ });
2788
+ }
2789
+ return polyfill;
2790
+ };
2791
+
2792
+ var polyfill = polyfill$1();
2793
+
2794
+
2795
+ /* eslint-disable no-unused-vars */
2796
+ var boundPromisify = function promisify(orig) {
2797
+ /* eslint-enable no-unused-vars */
2798
+ return polyfill.apply(util.util, arguments);
2799
+ };
2800
+ defineProperties_1(boundPromisify, {
2801
+ custom: polyfill.custom,
2802
+ customPromisifyArgs: polyfill.customPromisifyArgs,
2803
+ getPolyfill: polyfill$1,
2804
+ implementation: implementation,
2805
+ shim: shim
2806
+ });
2807
+
2808
+ var util_promisify = boundPromisify;
2809
+
2810
+ util_promisify.shim();
1329
2811
 
1330
2812
  function connect() {
1331
2813
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -1342,19 +2824,19 @@ function connect() {
1342
2824
  var connection = mysql__default["default"].createConnection(config);
1343
2825
  return {
1344
2826
  query: function query(sql, args) {
1345
- return util$1.util.promisify(connection.query).call(connection, sql, args);
2827
+ return util.util.promisify(connection.query).call(connection, sql, args);
1346
2828
  },
1347
2829
  beginTransaction: function beginTransaction() {
1348
- return util$1.util.promisify(connection.beginTransaction).call(connection);
2830
+ return util.util.promisify(connection.beginTransaction).call(connection);
1349
2831
  },
1350
2832
  commit: function commit() {
1351
- return util$1.util.promisify(connection.commit).call(connection);
2833
+ return util.util.promisify(connection.commit).call(connection);
1352
2834
  },
1353
2835
  rollback: function rollback() {
1354
- return util$1.util.promisify(connection.rollback).call(connection);
2836
+ return util.util.promisify(connection.rollback).call(connection);
1355
2837
  },
1356
2838
  close: function close() {
1357
- return util$1.util.promisify(connection.end).call(connection);
2839
+ return util.util.promisify(connection.end).call(connection);
1358
2840
  }
1359
2841
  };
1360
2842
  }