@mjhls/mjh-framework 1.0.1047 → 1.0.1049

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