@mjhls/mjh-framework 1.0.880-beta.0 → 1.0.880

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 (315) hide show
  1. package/README.md +168 -168
  2. package/dist/cjs/AD.js +10 -9
  3. package/dist/cjs/AD300x250.js +29 -28
  4. package/dist/cjs/AD300x250x600.js +29 -28
  5. package/dist/cjs/AD728x90.js +32 -31
  6. package/dist/cjs/ADFloatingFooter.js +31 -30
  7. package/dist/cjs/ADFooter.js +13 -12
  8. package/dist/cjs/ADGutter.js +31 -30
  9. package/dist/cjs/{ADInfeed-2e48af77.js → ADInfeed-9a2e923a.js} +15 -13
  10. package/dist/cjs/ADSkyscraper.js +31 -30
  11. package/dist/cjs/ADSponsoredResources.js +31 -30
  12. package/dist/cjs/ADWebcast.js +31 -30
  13. package/dist/cjs/ADWelcome.js +32 -31
  14. package/dist/cjs/{ADlgInfeed-c39c7131.js → ADlgInfeed-957a1996.js} +11 -10
  15. package/dist/cjs/AccordionPanel.js +29 -27
  16. package/dist/cjs/AdSlot.js +32 -31
  17. package/dist/cjs/AdSlotsProvider.js +18 -909
  18. package/dist/cjs/AlgoliaSearch.js +1391 -1272
  19. package/dist/cjs/AlphabeticList.js +24 -23
  20. package/dist/cjs/ArticleCarousel.js +21 -19
  21. package/dist/cjs/ArticleProgramLandingPage.js +61 -59
  22. package/dist/cjs/ArticleSeriesLandingPage.js +44 -38
  23. package/dist/cjs/ArticleSeriesListing.js +60 -58
  24. package/dist/cjs/Auth.js +680 -1504
  25. package/dist/cjs/AuthWrapper.js +309 -267
  26. package/dist/cjs/{AuthorComponent-02e827ae.js → AuthorComponent-39b37d84.js} +14 -13
  27. package/dist/cjs/Beam.js +6 -6
  28. package/dist/cjs/{BlockContent-9c6b07ad.js → BlockContent-36e54d77.js} +56 -55
  29. package/dist/cjs/Breadcrumbs.js +27 -25
  30. package/dist/cjs/CMEDeck.js +81 -81
  31. package/dist/cjs/Column1.js +14 -11
  32. package/dist/cjs/Column2.js +34 -31
  33. package/dist/cjs/Column3.js +60 -57
  34. package/dist/cjs/ConferenceArticleCard.js +43 -41
  35. package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
  36. package/dist/cjs/DeckContent.js +105 -100
  37. package/dist/cjs/DeckQueue.js +91 -86
  38. package/dist/cjs/{Dfp-14d2455c.js → Dfp-9be904d5.js} +33 -32
  39. package/dist/cjs/EventsDeck.js +157 -150
  40. package/dist/cjs/ExternalResources.js +80 -78
  41. package/dist/cjs/Feature.js +31 -28
  42. package/dist/cjs/ForbesHero.js +43 -41
  43. package/dist/cjs/GridContent.js +237 -231
  44. package/dist/cjs/GridHero.js +45 -43
  45. package/dist/cjs/GroupDeck.js +60 -58
  46. package/dist/cjs/HamMagazine.js +143 -138
  47. package/dist/cjs/Header.js +14 -12
  48. package/dist/cjs/Hero.js +16 -14
  49. package/dist/cjs/HighlightenVideo.js +18 -17
  50. package/dist/cjs/HorizontalArticleListing.js +72 -70
  51. package/dist/cjs/HorizontalHero.js +30 -28
  52. package/dist/cjs/IssueContentDeck.js +77 -71
  53. package/dist/cjs/IssueDeck.js +76 -70
  54. package/dist/cjs/IssueLanding.js +94 -91
  55. package/dist/cjs/KMTracker.js +15 -15
  56. package/dist/cjs/LeftNav.js +39 -37
  57. package/dist/cjs/MasterDeck.js +355 -227
  58. package/dist/cjs/MediaSeriesLanding.js +1118 -1126
  59. package/dist/cjs/NavDvm.js +77 -72
  60. package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
  61. package/dist/cjs/NavMagazine.js +150 -145
  62. package/dist/cjs/NavNative.js +145 -137
  63. package/dist/cjs/OncliveHero.js +24 -23
  64. package/dist/cjs/OncliveLargeHero.js +75 -73
  65. package/dist/cjs/PageFilter.js +13 -12
  66. package/dist/cjs/PartnerDetailListing.js +119 -3917
  67. package/dist/cjs/PdfDownload.js +9 -8
  68. package/dist/cjs/PopUpModal.js +19 -17
  69. package/dist/cjs/PubSection.js +41 -38
  70. package/dist/cjs/PubToc.js +14 -13
  71. package/dist/cjs/PublicationDeck.js +71 -65
  72. package/dist/cjs/PublicationLanding.js +137 -133
  73. package/dist/cjs/QueueDeckExpanded.js +1173 -1001
  74. package/dist/cjs/RecentNews.js +22 -21
  75. package/dist/cjs/RelatedContent.js +59 -57
  76. package/dist/cjs/RelatedTopicsDropdown.js +32 -29
  77. package/dist/cjs/RolesDeck.js +32 -27
  78. package/dist/cjs/Search.js +20 -16
  79. package/dist/cjs/Segment.js +4 -4
  80. package/dist/cjs/SeriesListingDeck.js +37 -36
  81. package/dist/cjs/{SeriesSlider-ec146338.js → SeriesSlider-ce3261cb.js} +41 -40
  82. package/dist/cjs/SetCookie.js +1 -1
  83. package/dist/cjs/SideFooter.js +37 -36
  84. package/dist/cjs/SocialIcons.js +10 -9
  85. package/dist/cjs/{SocialSearchComponent-e8477ca3.js → SocialSearchComponent-5ec44406.js} +40 -36
  86. package/dist/cjs/SocialShare.js +31 -29
  87. package/dist/cjs/TaxonomyCard.js +67 -61
  88. package/dist/cjs/TaxonomyDescription.js +55 -53
  89. package/dist/cjs/TemplateNormal.js +73 -72
  90. package/dist/cjs/ThumbnailCard.js +26 -23
  91. package/dist/cjs/Ustream.js +28 -27
  92. package/dist/cjs/VerticalHero.js +22 -20
  93. package/dist/cjs/VideoProgramLandingPage.js +78 -73
  94. package/dist/cjs/VideoSeriesCard.js +34 -32
  95. package/dist/cjs/VideoSeriesFilter.js +16 -16
  96. package/dist/cjs/VideoSeriesLandingPage.js +52 -48
  97. package/dist/cjs/VideoSeriesListing.js +77 -75
  98. package/dist/cjs/View.js +275 -271
  99. package/dist/cjs/YahooHero.js +42 -40
  100. package/dist/cjs/YoutubeGroup.js +68 -66
  101. package/dist/cjs/{_is-array-aa52fa1e.js → _is-array-54228b29.js} +6 -6
  102. package/dist/cjs/{_iter-detect-05795553.js → _iter-detect-b1df62f0.js} +7 -7
  103. package/dist/cjs/{_object-pie-68c5bcbc.js → _object-pie-083f2dd6.js} +4 -4
  104. package/dist/cjs/{_object-sap-171b9ea5.js → _object-sap-d1978572.js} +1 -1
  105. package/dist/cjs/{_object-to-array-9bac8737.js → _object-to-array-ce86cae7.js} +2 -2
  106. package/dist/cjs/{asyncToGenerator-df19209d.js → asyncToGenerator-77821af0.js} +30 -30
  107. package/dist/cjs/{brightcove-react-player-loader.es-156bd4d6.js → brightcove-react-player-loader.es-a195642e.js} +11 -9
  108. package/dist/cjs/{core.get-iterator-method-f3c44602.js → core.get-iterator-method-5643aa10.js} +35 -35
  109. package/dist/cjs/{debounce-529c8d06.js → debounce-d4a2369b.js} +2 -2
  110. package/dist/cjs/{define-property-21887c62.js → define-property-e8404b64.js} +6 -6
  111. package/dist/cjs/{defineProperty-77a37684.js → defineProperty-9673846a.js} +1 -1
  112. package/dist/cjs/{entities-310b46ee.js → entities-3f9d0f2f.js} +1 -1
  113. package/dist/cjs/{eq-bb2843ed.js → eq-5fc26c07.js} +1 -1
  114. package/dist/cjs/{extends-eed4f016.js → extends-7c86182f.js} +7 -7
  115. package/dist/cjs/faundadb.js +19 -19
  116. package/dist/cjs/{get-adbb11e3.js → get-5839e5b5.js} +21 -21
  117. package/dist/cjs/getRelatedArticle.js +18 -18
  118. package/dist/cjs/getRootDocGroup.js +6 -6
  119. package/dist/cjs/getSerializers.js +43 -42
  120. package/dist/cjs/{getTargeting-8874437b.js → getTargeting-9d509319.js} +12 -12
  121. package/dist/cjs/getTargeting.js +6 -6
  122. package/dist/cjs/iconBase-68959171.js +0 -3
  123. package/dist/cjs/{index-17c6af5a.js → index-22bdde81.js} +1093 -1067
  124. package/dist/cjs/{index-e2e62963.js → index-8041a4eb.js} +11 -1
  125. package/dist/cjs/{index-96b3db50.js → index-eadd5035.js} +17 -15
  126. package/dist/cjs/{urlFor-3a61226f.js → index-efca863c.js} +37 -88
  127. package/dist/cjs/{index-3294d3bc.js → index-f86bb269.js} +44 -45
  128. package/dist/cjs/{index-98e01cb9.js → index-fc2f1ca2.js} +13 -12
  129. package/dist/cjs/{index.es-9110add6.js → index.es-f3e47207.js} +31 -12
  130. package/dist/cjs/{index.esm-ff47db6f.js → index.esm-05850a2f.js} +5 -12
  131. package/dist/cjs/{index.esm-e32d3e8e.js → index.esm-44f3e2d0.js} +3 -6
  132. package/dist/cjs/{index.esm-4d410430.js → index.esm-8123cf40.js} +20 -20
  133. package/dist/cjs/{index.esm-90433435.js → index.esm-974f47d9.js} +6 -15
  134. package/dist/cjs/index.js +170 -164
  135. package/dist/cjs/{inherits-cba9c846.js → inherits-de66ea16.js} +19 -19
  136. package/dist/cjs/{isSymbol-04666465.js → isSymbol-03abbdf0.js} +15 -15
  137. package/dist/cjs/{keys-d207942e.js → keys-e982b3fa.js} +6 -6
  138. package/dist/cjs/{lodash-fc2922d0.js → lodash-f0783643.js} +128 -31
  139. package/dist/cjs/main-025fdc78.js +973 -0
  140. package/dist/cjs/{md5-5039b1a6.js → md5-e1ca5797.js} +1 -1
  141. package/dist/cjs/{moment-575fe24c.js → moment-aca40de1.js} +11 -9
  142. package/dist/cjs/{react-social-icons-f7f48f71.js → react-social-icons-af932527.js} +28 -27
  143. package/dist/cjs/{slicedToArray-f6d4eaa8.js → slicedToArray-067dd3bc.js} +12 -12
  144. package/dist/cjs/{smoothscroll-5054361f.js → smoothscroll-99df7f93.js} +1 -1
  145. package/dist/cjs/{stringify-bbc68047.js → stringify-f7a37a8d.js} +5 -5
  146. package/dist/cjs/timeDifferenceCalc.js +1 -1
  147. package/dist/cjs/{toConsumableArray-c9b8a0d0.js → toConsumableArray-d7797c2b.js} +7 -7
  148. package/dist/cjs/{toNumber-36d1e7e5.js → toNumber-5e1fac58.js} +40 -5
  149. package/dist/cjs/{typeof-5f52cf64.js → typeof-567e31ff.js} +35 -35
  150. package/dist/cjs/urlFor.js +59 -5
  151. package/dist/cjs/{ustream-api-9ebe112f.js → ustream-api-3819e4aa.js} +4 -4
  152. package/dist/cjs/{util-f2c1b65b.js → util-6f784d85.js} +1 -1
  153. package/dist/cjs/{visibility-sensor-ad5e3116.js → visibility-sensor-eb2c5b69.js} +7 -5
  154. package/dist/cjs/{web.dom.iterable-e34bf324.js → web.dom.iterable-d98303e0.js} +2 -2
  155. package/dist/esm/AD.js +7 -7
  156. package/dist/esm/AD300x250.js +25 -25
  157. package/dist/esm/AD300x250x600.js +25 -25
  158. package/dist/esm/AD728x90.js +28 -28
  159. package/dist/esm/ADFloatingFooter.js +27 -27
  160. package/dist/esm/ADFooter.js +9 -9
  161. package/dist/esm/ADGutter.js +27 -27
  162. package/dist/esm/{ADInfeed-0c13c803.js → ADInfeed-8c5f8c58.js} +11 -11
  163. package/dist/esm/ADSkyscraper.js +27 -27
  164. package/dist/esm/ADSponsoredResources.js +27 -27
  165. package/dist/esm/ADWebcast.js +27 -27
  166. package/dist/esm/ADWelcome.js +28 -28
  167. package/dist/esm/{ADlgInfeed-e4e2031a.js → ADlgInfeed-2316e091.js} +8 -8
  168. package/dist/esm/AccordionPanel.js +22 -22
  169. package/dist/esm/AdSlot.js +23 -23
  170. package/dist/esm/AdSlotsProvider.js +15 -907
  171. package/dist/esm/AlgoliaSearch.js +820 -702
  172. package/dist/esm/AlphabeticList.js +20 -20
  173. package/dist/esm/ArticleCarousel.js +17 -16
  174. package/dist/esm/ArticleProgramLandingPage.js +54 -53
  175. package/dist/esm/ArticleSeriesLandingPage.js +38 -33
  176. package/dist/esm/ArticleSeriesListing.js +55 -54
  177. package/dist/esm/Auth.js +659 -1487
  178. package/dist/esm/AuthWrapper.js +306 -265
  179. package/dist/esm/{AuthorComponent-e6f95c2f.js → AuthorComponent-46a745ba.js} +11 -11
  180. package/dist/esm/Beam.js +6 -6
  181. package/dist/esm/{BlockContent-f4515898.js → BlockContent-52cf21c5.js} +35 -35
  182. package/dist/esm/Breadcrumbs.js +15 -15
  183. package/dist/esm/CMEDeck.js +77 -77
  184. package/dist/esm/Column1.js +9 -9
  185. package/dist/esm/Column2.js +28 -28
  186. package/dist/esm/Column3.js +54 -54
  187. package/dist/esm/ConferenceArticleCard.js +38 -37
  188. package/dist/esm/{ConferenceBanner-8792ebd2.js → ConferenceBanner-9162d0ca.js} +4 -4
  189. package/dist/esm/DeckContent.js +96 -95
  190. package/dist/esm/DeckQueue.js +82 -81
  191. package/dist/esm/{Dfp-f867d061.js → Dfp-4ca12f2e.js} +20 -20
  192. package/dist/esm/EventsDeck.js +129 -129
  193. package/dist/esm/ExternalResources.js +73 -72
  194. package/dist/esm/Feature.js +22 -21
  195. package/dist/esm/ForbesHero.js +33 -32
  196. package/dist/esm/GridContent.js +199 -198
  197. package/dist/esm/GridHero.js +35 -34
  198. package/dist/esm/GroupDeck.js +45 -44
  199. package/dist/esm/HamMagazine.js +114 -114
  200. package/dist/esm/Header.js +8 -8
  201. package/dist/esm/Hero.js +13 -12
  202. package/dist/esm/HighlightenVideo.js +14 -14
  203. package/dist/esm/HorizontalArticleListing.js +68 -67
  204. package/dist/esm/HorizontalHero.js +25 -24
  205. package/dist/esm/IssueContentDeck.js +59 -58
  206. package/dist/esm/IssueDeck.js +63 -62
  207. package/dist/esm/IssueLanding.js +90 -88
  208. package/dist/esm/KMTracker.js +15 -15
  209. package/dist/esm/LeftNav.js +33 -33
  210. package/dist/esm/MasterDeck.js +350 -223
  211. package/dist/esm/MediaSeriesLanding.js +839 -850
  212. package/dist/esm/NavDvm.js +57 -57
  213. package/dist/esm/{NavFooter-e27bd93b.js → NavFooter-c29526b7.js} +12 -12
  214. package/dist/esm/NavMagazine.js +124 -124
  215. package/dist/esm/NavNative.js +114 -114
  216. package/dist/esm/OncliveHero.js +20 -20
  217. package/dist/esm/OncliveLargeHero.js +58 -57
  218. package/dist/esm/PageFilter.js +10 -10
  219. package/dist/esm/PartnerDetailListing.js +112 -3910
  220. package/dist/esm/PdfDownload.js +6 -6
  221. package/dist/esm/PopUpModal.js +12 -12
  222. package/dist/esm/PubSection.js +37 -35
  223. package/dist/esm/PubToc.js +10 -10
  224. package/dist/esm/PublicationDeck.js +56 -55
  225. package/dist/esm/PublicationLanding.js +120 -120
  226. package/dist/esm/QueueDeckExpanded.js +1166 -994
  227. package/dist/esm/RecentNews.js +19 -19
  228. package/dist/esm/RelatedContent.js +51 -50
  229. package/dist/esm/RelatedTopicsDropdown.js +21 -21
  230. package/dist/esm/RolesDeck.js +25 -25
  231. package/dist/esm/Search.js +11 -11
  232. package/dist/esm/Segment.js +4 -4
  233. package/dist/esm/SeriesListingDeck.js +31 -30
  234. package/dist/esm/{SeriesSlider-d6561e33.js → SeriesSlider-7a6c45ce.js} +31 -31
  235. package/dist/esm/SetCookie.js +1 -1
  236. package/dist/esm/SideFooter.js +32 -32
  237. package/dist/esm/SocialIcons.js +7 -7
  238. package/dist/esm/{SocialSearchComponent-b5be0e6c.js → SocialSearchComponent-bdecba55.js} +30 -30
  239. package/dist/esm/SocialShare.js +25 -25
  240. package/dist/esm/TaxonomyCard.js +56 -55
  241. package/dist/esm/TaxonomyDescription.js +49 -48
  242. package/dist/esm/TemplateNormal.js +68 -68
  243. package/dist/esm/ThumbnailCard.js +17 -16
  244. package/dist/esm/Ustream.js +24 -24
  245. package/dist/esm/VerticalHero.js +17 -16
  246. package/dist/esm/VideoProgramLandingPage.js +65 -64
  247. package/dist/esm/VideoSeriesCard.js +26 -25
  248. package/dist/esm/VideoSeriesFilter.js +13 -13
  249. package/dist/esm/VideoSeriesLandingPage.js +42 -39
  250. package/dist/esm/VideoSeriesListing.js +72 -71
  251. package/dist/esm/View.js +246 -246
  252. package/dist/esm/YahooHero.js +33 -32
  253. package/dist/esm/YoutubeGroup.js +52 -51
  254. package/dist/esm/{_is-array-4df618a6.js → _is-array-893ab020.js} +6 -6
  255. package/dist/esm/{_iter-detect-130ee549.js → _iter-detect-f089461c.js} +7 -7
  256. package/dist/esm/{_object-pie-33c40e79.js → _object-pie-133f504a.js} +4 -4
  257. package/dist/esm/{_object-sap-8b8ea5a9.js → _object-sap-169d6272.js} +1 -1
  258. package/dist/esm/{_object-to-array-c54dd835.js → _object-to-array-50a6b9a3.js} +2 -2
  259. package/dist/esm/{asyncToGenerator-64812e90.js → asyncToGenerator-b4dfe691.js} +31 -31
  260. package/dist/esm/{brightcove-react-player-loader.es-83f53e4e.js → brightcove-react-player-loader.es-b43c695a.js} +7 -6
  261. package/dist/esm/{core.get-iterator-method-86d4db69.js → core.get-iterator-method-e903ff31.js} +36 -36
  262. package/dist/esm/{debounce-9207d8ee.js → debounce-533d9748.js} +2 -2
  263. package/dist/esm/{define-property-6d26cb48.js → define-property-99e66838.js} +6 -6
  264. package/dist/esm/{defineProperty-d7d9b577.js → defineProperty-8fa0bc8d.js} +1 -1
  265. package/dist/esm/{entities-7cc3bf45.js → entities-932b50cf.js} +1 -1
  266. package/dist/esm/{eq-b470f743.js → eq-bdcbf886.js} +1 -1
  267. package/dist/esm/{extends-5b1796d4.js → extends-dc6a71fd.js} +7 -7
  268. package/dist/esm/faundadb.js +5 -5
  269. package/dist/esm/{get-1e515072.js → get-3c308da4.js} +21 -21
  270. package/dist/esm/getRelatedArticle.js +12 -12
  271. package/dist/esm/getRootDocGroup.js +4 -4
  272. package/dist/esm/getSerializers.js +43 -42
  273. package/dist/esm/{getTargeting-277c801e.js → getTargeting-ff2c9409.js} +11 -11
  274. package/dist/esm/getTargeting.js +6 -6
  275. package/dist/esm/{urlFor-23b2244b.js → index-0dbff1d1.js} +37 -88
  276. package/dist/esm/{index-41a678ea.js → index-2446af28.js} +6 -6
  277. package/dist/esm/{index-5f7e79e7.js → index-35bdcc81.js} +10 -10
  278. package/dist/esm/{index-aaa2dae0.js → index-67e1773f.js} +11 -2
  279. package/dist/esm/{index-ef6d5dcf.js → index-79cfd25c.js} +44 -45
  280. package/dist/esm/{index-a35a5c39.js → index-c9bfc91f.js} +1017 -1001
  281. package/dist/esm/{index.es-29c1cef5.js → index.es-c6222053.js} +28 -10
  282. package/dist/esm/{index.esm-29e48d38.js → index.esm-3fdda599.js} +6 -15
  283. package/dist/esm/{index.esm-fd746768.js → index.esm-8016b507.js} +17 -18
  284. package/dist/esm/{index.esm-cf08bf18.js → index.esm-a8ff922c.js} +5 -12
  285. package/dist/esm/{index.esm-f8aaeeeb.js → index.esm-c6715e80.js} +3 -6
  286. package/dist/esm/index.js +140 -137
  287. package/dist/esm/{inherits-2409637d.js → inherits-8a801a18.js} +18 -18
  288. package/dist/esm/{isSymbol-1981418f.js → isSymbol-a7e9aafe.js} +15 -15
  289. package/dist/esm/{keys-69989821.js → keys-425c8ab0.js} +6 -6
  290. package/dist/esm/{lodash-17fdfebb.js → lodash-f97fd99a.js} +128 -31
  291. package/dist/esm/main-4136096f.js +961 -0
  292. package/dist/esm/{md5-9be0e905.js → md5-4e42248e.js} +1 -1
  293. package/dist/esm/{moment-e2f9b20c.js → moment-bc12cb97.js} +11 -9
  294. package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-91f9716f.js} +20 -20
  295. package/dist/esm/{slicedToArray-67a08c9c.js → slicedToArray-ca2c8b8d.js} +12 -12
  296. package/dist/esm/{smoothscroll-0cd4c7a6.js → smoothscroll-fa4e3f8c.js} +1 -1
  297. package/dist/esm/stringify-c21932b3.js +15 -0
  298. package/dist/esm/timeDifferenceCalc.js +1 -1
  299. package/dist/esm/{toConsumableArray-32282905.js → toConsumableArray-7b1c0e23.js} +7 -7
  300. package/dist/esm/{toNumber-2f7a84cd.js → toNumber-5aeba6e7.js} +40 -5
  301. package/dist/esm/{typeof-c05a82ba.js → typeof-83d9eb10.js} +35 -35
  302. package/dist/esm/urlFor.js +62 -4
  303. package/dist/esm/{ustream-api-4c4fe0ba.js → ustream-api-41166338.js} +4 -4
  304. package/dist/esm/{util-7700fc59.js → util-3ab476bf.js} +1 -1
  305. package/dist/esm/{visibility-sensor-72fd8f8b.js → visibility-sensor-f40c2564.js} +2 -2
  306. package/dist/esm/{web.dom.iterable-f8f967cd.js → web.dom.iterable-fdf034f5.js} +2 -2
  307. package/package.json +111 -112
  308. package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
  309. package/dist/cjs/Pagination-9cb60fba.js +0 -61
  310. package/dist/cjs/inherits-8d29278d.js +0 -110
  311. package/dist/cjs/main-02daeefe.js +0 -862
  312. package/dist/esm/Pagination-256b60e5.js +0 -56
  313. package/dist/esm/inherits-77d5e4fc.js +0 -101
  314. package/dist/esm/main-c0612122.js +0 -851
  315. package/dist/esm/stringify-70b72959.js +0 -15
package/dist/cjs/Auth.js CHANGED
@@ -2,28 +2,33 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
-
7
- var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
8
- require('./core.get-iterator-method-f3c44602.js');
9
- require('./_library-dd23b178.js');
10
- require('./_iter-detect-05795553.js');
11
- require('./_object-pie-68c5bcbc.js');
12
- var _extends$1 = require('./extends-eed4f016.js');
13
- require('./web.dom.iterable-e34bf324.js');
5
+ var asyncToGenerator = require('./asyncToGenerator-77821af0.js');
6
+ var stringify = require('./stringify-f7a37a8d.js');
7
+ var slicedToArray = require('./slicedToArray-067dd3bc.js');
14
8
  var React = require('react');
15
- var React__default = _interopDefault(React);
16
9
  var Router = require('next/router');
17
- var Router__default = _interopDefault(Router);
18
- var slicedToArray = require('./slicedToArray-f6d4eaa8.js');
19
- var stringify = require('./stringify-bbc68047.js');
20
- var asyncToGenerator = require('./asyncToGenerator-df19209d.js');
10
+ var _extends = require('./extends-7c86182f.js');
21
11
  var reactBootstrap = require('react-bootstrap');
22
- var util = require('./util-f2c1b65b.js');
23
- var index$5 = require('./index-bd6c9f56.js');
24
- var Local = _interopDefault(require('passport-local'));
25
- var mysql = _interopDefault(require('mysql'));
26
- var md5 = require('./md5-5039b1a6.js');
12
+ var useSWR = require('swr');
13
+ var index = require('./index-bd6c9f56.js');
14
+ var Local = require('passport-local');
15
+ var mysql = require('mysql');
16
+ var util = require('./util-6f784d85.js');
17
+ var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
18
+ var md5 = require('./md5-e1ca5797.js');
19
+ require('./core.get-iterator-method-5643aa10.js');
20
+ require('./web.dom.iterable-d98303e0.js');
21
+ require('./_library-dd23b178.js');
22
+ require('./_iter-detect-b1df62f0.js');
23
+ require('./_object-pie-083f2dd6.js');
24
+
25
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
26
+
27
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
28
+ var Router__default = /*#__PURE__*/_interopDefaultLegacy(Router);
29
+ var useSWR__default = /*#__PURE__*/_interopDefaultLegacy(useSWR);
30
+ var Local__default = /*#__PURE__*/_interopDefaultLegacy(Local);
31
+ var mysql__default = /*#__PURE__*/_interopDefaultLegacy(mysql);
27
32
 
28
33
  var returnFormField = function returnFormField(_ref) {
29
34
  var name = _ref.name,
@@ -62,21 +67,21 @@ var returnFormField = function returnFormField(_ref) {
62
67
  }
63
68
 
64
69
  if (type == 'text' || type == 'email' || type == 'password' || type == 'number') {
65
- return React__default.createElement(
70
+ return React__default['default'].createElement(
66
71
  reactBootstrap.Form.Group,
67
- _extends$1._extends({}, opts, { controlId: name }),
68
- React__default.createElement(
72
+ _extends._extends({}, opts, { controlId: name }),
73
+ React__default['default'].createElement(
69
74
  reactBootstrap.Form.Label,
70
75
  { kye: name + '_label' },
71
76
  label,
72
- required && React__default.createElement(
77
+ required && React__default['default'].createElement(
73
78
  'span',
74
79
  { style: { color: 'red' } },
75
80
  '*'
76
81
  )
77
82
  ),
78
- React__default.createElement(reactBootstrap.Form.Control, { key: name + '_' + type, type: type, readOnly: readonly, name: name, placeholder: '', defaultValue: default_value, required: required }),
79
- React__default.createElement(
83
+ React__default['default'].createElement(reactBootstrap.Form.Control, { key: name + '_' + type, type: type, readOnly: readonly, name: name, placeholder: '', defaultValue: default_value, required: required }),
84
+ React__default['default'].createElement(
80
85
  reactBootstrap.Form.Control.Feedback,
81
86
  { key: name + '_feedback', type: 'invalid' },
82
87
  errors[name]
@@ -84,28 +89,28 @@ var returnFormField = function returnFormField(_ref) {
84
89
  );
85
90
  }
86
91
  if (type == 'select') {
87
- return React__default.createElement(
92
+ return React__default['default'].createElement(
88
93
  reactBootstrap.Form.Group,
89
- _extends$1._extends({}, opts, { key: name, controlId: name }),
90
- React__default.createElement(
94
+ _extends._extends({}, opts, { key: name, controlId: name }),
95
+ React__default['default'].createElement(
91
96
  reactBootstrap.Form.Label,
92
97
  { key: name + '_' + label },
93
98
  label,
94
- required && React__default.createElement(
99
+ required && React__default['default'].createElement(
95
100
  'span',
96
101
  { key: name + '_required_span', style: { color: 'red' } },
97
102
  '*'
98
103
  )
99
104
  ),
100
- React__default.createElement(
105
+ React__default['default'].createElement(
101
106
  reactBootstrap.Form.Control,
102
107
  { key: name + '_select', as: 'select', name: name, required: required, defaultValue: default_value },
103
- React__default.createElement('option', { value: '', key: name + '_options_empty' }),
108
+ React__default['default'].createElement('option', { value: '', key: name + '_options_empty' }),
104
109
  options.map(function (option, index) {
105
110
  var value = option.value ? option.value : option;
106
111
  var label = option.label ? option.label : option;
107
112
  var key = name + '_options_' + index;
108
- return React__default.createElement(
113
+ return React__default['default'].createElement(
109
114
  'option',
110
115
  { key: key, value: value },
111
116
  label
@@ -116,1081 +121,32 @@ var returnFormField = function returnFormField(_ref) {
116
121
  }
117
122
 
118
123
  if (type == 'radio' || type == 'checkbox') {
119
- return React__default.createElement(
124
+ return React__default['default'].createElement(
120
125
  reactBootstrap.Form.Group,
121
126
  opts,
122
- React__default.createElement(
127
+ React__default['default'].createElement(
123
128
  reactBootstrap.Form.Label,
124
129
  null,
125
130
  label,
126
- required && React__default.createElement(
131
+ required && React__default['default'].createElement(
127
132
  'span',
128
133
  { style: { color: 'red' } },
129
134
  '*'
130
135
  )
131
136
  ),
132
137
  options.map(function (option, index) {
133
- return React__default.createElement(
138
+ return React__default['default'].createElement(
134
139
  reactBootstrap.Form.Check,
135
140
  { type: type, key: index, required: required },
136
- React__default.createElement(reactBootstrap.Form.Check.Input, { type: type, key: type + '_' + index + '_input', defaultChecked: default_value ? default_value === option.value : false, name: name, id: name + '_' + index, value: option.value, required: required }),
137
- React__default.createElement(reactBootstrap.Form.Check.Label, { style: { cursor: 'pointer' }, 'for': name + '_' + index, key: type + '_' + index + '_label', dangerouslySetInnerHTML: { __html: option.label } })
141
+ React__default['default'].createElement(reactBootstrap.Form.Check.Input, { type: type, key: type + '_' + index + '_input', defaultChecked: default_value ? default_value === option.value : false, name: name, id: name + '_' + index, value: option.value, required: required }),
142
+ React__default['default'].createElement(reactBootstrap.Form.Check.Label, { style: { cursor: 'pointer' }, 'for': name + '_' + index, key: type + '_' + index + '_label', dangerouslySetInnerHTML: { __html: option.label } })
138
143
  );
139
144
  })
140
145
  );
141
146
  }
142
147
  };
143
148
 
144
- var has = Object.prototype.hasOwnProperty;
145
-
146
- function dequal(foo, bar) {
147
- var ctor, len;
148
- if (foo === bar) return true;
149
-
150
- if (foo && bar && (ctor=foo.constructor) === bar.constructor) {
151
- if (ctor === Date) return foo.getTime() === bar.getTime();
152
- if (ctor === RegExp) return foo.toString() === bar.toString();
153
-
154
- if (ctor === Array) {
155
- if ((len=foo.length) === bar.length) {
156
- while (len-- && dequal(foo[len], bar[len]));
157
- }
158
- return len === -1;
159
- }
160
-
161
- if (!ctor || typeof foo === 'object') {
162
- len = 0;
163
- for (ctor in foo) {
164
- if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
165
- if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
166
- }
167
- return Object.keys(bar).length === len;
168
- }
169
- }
170
-
171
- return foo !== foo && bar !== bar;
172
- }
173
-
174
- // use WeakMap to store the object->key mapping
175
- // so the objects can be garbage collected.
176
- // WeakMap uses a hashtable under the hood, so the lookup
177
- // complexity is almost O(1).
178
- var table = new WeakMap();
179
- // counter of the key
180
- var counter = 0;
181
- // hashes an array of objects and returns a string
182
- function hash(args) {
183
- if (!args.length)
184
- return '';
185
- var key = 'arg';
186
- for (var i = 0; i < args.length; ++i) {
187
- if (args[i] === null) {
188
- key += '@null';
189
- continue;
190
- }
191
- var _hash = void 0;
192
- if (typeof args[i] !== 'object' && typeof args[i] !== 'function') {
193
- // need to consider the case that args[i] is a string:
194
- // args[i] _hash
195
- // "undefined" -> '"undefined"'
196
- // undefined -> 'undefined'
197
- // 123 -> '123'
198
- // "null" -> '"null"'
199
- if (typeof args[i] === 'string') {
200
- _hash = '"' + args[i] + '"';
201
- }
202
- else {
203
- _hash = String(args[i]);
204
- }
205
- }
206
- else {
207
- if (!table.has(args[i])) {
208
- _hash = counter;
209
- table.set(args[i], counter++);
210
- }
211
- else {
212
- _hash = table.get(args[i]);
213
- }
214
- }
215
- key += '@' + _hash;
216
- }
217
- return key;
218
- }
219
-
220
- var Cache = /** @class */ (function () {
221
- function Cache(initialData) {
222
- if (initialData === void 0) { initialData = {}; }
223
- this.cache = new Map(Object.entries(initialData));
224
- this.subs = [];
225
- }
226
- Cache.prototype.get = function (key) {
227
- var _key = this.serializeKey(key)[0];
228
- return this.cache.get(_key);
229
- };
230
- Cache.prototype.set = function (key, value) {
231
- var _key = this.serializeKey(key)[0];
232
- this.cache.set(_key, value);
233
- this.notify();
234
- };
235
- Cache.prototype.keys = function () {
236
- return Array.from(this.cache.keys());
237
- };
238
- Cache.prototype.has = function (key) {
239
- var _key = this.serializeKey(key)[0];
240
- return this.cache.has(_key);
241
- };
242
- Cache.prototype.clear = function () {
243
- this.cache.clear();
244
- this.notify();
245
- };
246
- Cache.prototype.delete = function (key) {
247
- var _key = this.serializeKey(key)[0];
248
- this.cache.delete(_key);
249
- this.notify();
250
- };
251
- // TODO: introduce namespace for the cache
252
- Cache.prototype.serializeKey = function (key) {
253
- var args = null;
254
- if (typeof key === 'function') {
255
- try {
256
- key = key();
257
- }
258
- catch (err) {
259
- // dependencies not ready
260
- key = '';
261
- }
262
- }
263
- if (Array.isArray(key)) {
264
- // args array
265
- args = key;
266
- key = hash(key);
267
- }
268
- else {
269
- // convert null to ''
270
- key = String(key || '');
271
- }
272
- var errorKey = key ? 'err@' + key : '';
273
- var isValidatingKey = key ? 'validating@' + key : '';
274
- return [key, args, errorKey, isValidatingKey];
275
- };
276
- Cache.prototype.subscribe = function (listener) {
277
- var _this = this;
278
- if (typeof listener !== 'function') {
279
- throw new Error('Expected the listener to be a function.');
280
- }
281
- var isSubscribed = true;
282
- this.subs.push(listener);
283
- return function () {
284
- if (!isSubscribed)
285
- return;
286
- isSubscribed = false;
287
- var index = _this.subs.indexOf(listener);
288
- if (index > -1) {
289
- _this.subs[index] = _this.subs[_this.subs.length - 1];
290
- _this.subs.length--;
291
- }
292
- };
293
- };
294
- // Notify Cache subscribers about a change in the cache
295
- Cache.prototype.notify = function () {
296
- for (var _i = 0, _a = this.subs; _i < _a.length; _i++) {
297
- var listener = _a[_i];
298
- listener();
299
- }
300
- };
301
- return Cache;
302
- }());
303
-
304
- /**
305
- * Due to bug https://bugs.chromium.org/p/chromium/issues/detail?id=678075,
306
- * it's not reliable to detect if the browser is currently online or offline
307
- * based on `navigator.onLine`.
308
- * As a work around, we always assume it's online on first load, and change
309
- * the status upon `online` or `offline` events.
310
- */
311
- var online = true;
312
- var isOnline = function () { return online; };
313
- var isDocumentVisible = function () {
314
- if (typeof document !== 'undefined' &&
315
- document.visibilityState !== undefined) {
316
- return document.visibilityState !== 'hidden';
317
- }
318
- // always assume it's visible
319
- return true;
320
- };
321
- var fetcher = function (url) { return fetch(url).then(function (res) { return res.json(); }); };
322
- var registerOnFocus = function (cb) {
323
- if (typeof window !== 'undefined' &&
324
- window.addEventListener !== undefined &&
325
- typeof document !== 'undefined' &&
326
- document.addEventListener !== undefined) {
327
- // focus revalidate
328
- document.addEventListener('visibilitychange', function () { return cb(); }, false);
329
- window.addEventListener('focus', function () { return cb(); }, false);
330
- }
331
- };
332
- var registerOnReconnect = function (cb) {
333
- if (typeof window !== 'undefined' && window.addEventListener !== undefined) {
334
- // reconnect revalidate
335
- window.addEventListener('online', function () {
336
- online = true;
337
- cb();
338
- }, false);
339
- // nothing to revalidate, just update the status
340
- window.addEventListener('offline', function () { return (online = false); }, false);
341
- }
342
- };
343
- var webPreset = {
344
- isOnline: isOnline,
345
- isDocumentVisible: isDocumentVisible,
346
- fetcher: fetcher,
347
- registerOnFocus: registerOnFocus,
348
- registerOnReconnect: registerOnReconnect
349
- };
350
-
351
- var __assign = (undefined && undefined.__assign) || function () {
352
- __assign = Object.assign || function(t) {
353
- for (var s, i = 1, n = arguments.length; i < n; i++) {
354
- s = arguments[i];
355
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
356
- t[p] = s[p];
357
- }
358
- return t;
359
- };
360
- return __assign.apply(this, arguments);
361
- };
362
- // cache
363
- var cache = new Cache();
364
- // error retry
365
- function onErrorRetry(_, __, config, revalidate, opts) {
366
- if (!config.isDocumentVisible()) {
367
- // if it's hidden, stop
368
- // it will auto revalidate when focus
369
- return;
370
- }
371
- if (typeof config.errorRetryCount === 'number' &&
372
- opts.retryCount > config.errorRetryCount) {
373
- return;
374
- }
375
- // exponential backoff
376
- var count = Math.min(opts.retryCount, 8);
377
- var timeout = ~~((Math.random() + 0.5) * (1 << count)) * config.errorRetryInterval;
378
- setTimeout(revalidate, timeout, opts);
379
- }
380
- // client side: need to adjust the config
381
- // based on the browser status
382
- // slow connection (<= 70Kbps)
383
- var slowConnection = typeof window !== 'undefined' &&
384
- // @ts-ignore
385
- navigator['connection'] &&
386
- // @ts-ignore
387
- ['slow-2g', '2g'].indexOf(navigator['connection'].effectiveType) !== -1;
388
- // config
389
- var defaultConfig = __assign({
390
- // events
391
- onLoadingSlow: function () { }, onSuccess: function () { }, onError: function () { }, onErrorRetry: onErrorRetry, errorRetryInterval: (slowConnection ? 10 : 5) * 1000, focusThrottleInterval: 5 * 1000, dedupingInterval: 2 * 1000, loadingTimeout: (slowConnection ? 5 : 3) * 1000, refreshInterval: 0, revalidateOnFocus: true, revalidateOnReconnect: true, refreshWhenHidden: false, refreshWhenOffline: false, shouldRetryOnError: true, suspense: false, compare: dequal, isPaused: function () { return false; } }, webPreset);
392
-
393
- var IS_SERVER = typeof window === 'undefined' ||
394
- // @ts-ignore
395
- !!(typeof Deno !== 'undefined' && Deno && Deno.version && Deno.version.deno);
396
- // polyfill for requestAnimationFrame
397
- var rAF = IS_SERVER
398
- ? null
399
- : window['requestAnimationFrame']
400
- ? function (f) { return window['requestAnimationFrame'](f); }
401
- : function (f) { return setTimeout(f, 1); };
402
- // React currently throws a warning when using useLayoutEffect on the server.
403
- // To get around it, we can conditionally useEffect on the server (no-op) and
404
- // useLayoutEffect in the browser.
405
- var useIsomorphicLayoutEffect = IS_SERVER ? React.useEffect : React.useLayoutEffect;
406
-
407
- var SWRConfigContext = React.createContext({});
408
- SWRConfigContext.displayName = 'SWRConfigContext';
409
-
410
- var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
411
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
412
- return new (P || (P = Promise))(function (resolve, reject) {
413
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
414
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
415
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
416
- step((generator = generator.apply(thisArg, _arguments || [])).next());
417
- });
418
- };
419
- var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
420
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
421
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
422
- function verb(n) { return function (v) { return step([n, v]); }; }
423
- function step(op) {
424
- if (f) throw new TypeError("Generator is already executing.");
425
- while (_) try {
426
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
427
- if (y = 0, t) op = [op[0] & 2, t.value];
428
- switch (op[0]) {
429
- case 0: case 1: t = op; break;
430
- case 4: _.label++; return { value: op[1], done: false };
431
- case 5: _.label++; y = op[1]; op = [0]; continue;
432
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
433
- default:
434
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
435
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
436
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
437
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
438
- if (t[2]) _.ops.pop();
439
- _.trys.pop(); continue;
440
- }
441
- op = body.call(thisArg, _);
442
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
443
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
444
- }
445
- };
446
- // global state managers
447
- var CONCURRENT_PROMISES = {};
448
- var CONCURRENT_PROMISES_TS = {};
449
- var FOCUS_REVALIDATORS = {};
450
- var RECONNECT_REVALIDATORS = {};
451
- var CACHE_REVALIDATORS = {};
452
- var MUTATION_TS = {};
453
- var MUTATION_END_TS = {};
454
- // generate strictly increasing timestamps
455
- var now = (function () {
456
- var ts = 0;
457
- return function () { return ++ts; };
458
- })();
459
- // setup DOM events listeners for `focus` and `reconnect` actions
460
- if (!IS_SERVER) {
461
- var revalidate_1 = function (revalidators) {
462
- if (!defaultConfig.isDocumentVisible() || !defaultConfig.isOnline())
463
- return;
464
- for (var key in revalidators) {
465
- if (revalidators[key][0])
466
- revalidators[key][0]();
467
- }
468
- };
469
- if (typeof defaultConfig.registerOnFocus === 'function') {
470
- defaultConfig.registerOnFocus(function () { return revalidate_1(FOCUS_REVALIDATORS); });
471
- }
472
- if (typeof defaultConfig.registerOnReconnect === 'function') {
473
- defaultConfig.registerOnReconnect(function () { return revalidate_1(RECONNECT_REVALIDATORS); });
474
- }
475
- }
476
- var trigger = function (_key, shouldRevalidate) {
477
- if (shouldRevalidate === void 0) { shouldRevalidate = true; }
478
- // we are ignoring the second argument which correspond to the arguments
479
- // the fetcher will receive when key is an array
480
- var _a = cache.serializeKey(_key), key = _a[0], keyErr = _a[2], keyValidating = _a[3];
481
- if (!key)
482
- return Promise.resolve();
483
- var updaters = CACHE_REVALIDATORS[key];
484
- if (key && updaters) {
485
- var currentData = cache.get(key);
486
- var currentError = cache.get(keyErr);
487
- var currentIsValidating = cache.get(keyValidating);
488
- var promises = [];
489
- for (var i = 0; i < updaters.length; ++i) {
490
- promises.push(updaters[i](shouldRevalidate, currentData, currentError, currentIsValidating, i > 0));
491
- }
492
- // return new updated value
493
- return Promise.all(promises).then(function () { return cache.get(key); });
494
- }
495
- return Promise.resolve(cache.get(key));
496
- };
497
- var broadcastState = function (key, data, error, isValidating) {
498
- var updaters = CACHE_REVALIDATORS[key];
499
- if (key && updaters) {
500
- for (var i = 0; i < updaters.length; ++i) {
501
- updaters[i](false, data, error, isValidating);
502
- }
503
- }
504
- };
505
- var mutate = function (_key, _data, shouldRevalidate) {
506
- if (shouldRevalidate === void 0) { shouldRevalidate = true; }
507
- return __awaiter(void 0, void 0, void 0, function () {
508
- var _a, key, keyErr, beforeMutationTs, beforeConcurrentPromisesTs, data, error, isAsyncMutation, err_1, shouldAbort, updaters, promises, i;
509
- return __generator(this, function (_b) {
510
- switch (_b.label) {
511
- case 0:
512
- _a = cache.serializeKey(_key), key = _a[0], keyErr = _a[2];
513
- if (!key)
514
- return [2 /*return*/];
515
- // if there is no new data to update, let's just revalidate the key
516
- if (typeof _data === 'undefined')
517
- return [2 /*return*/, trigger(_key, shouldRevalidate)
518
- // update global timestamps
519
- ];
520
- // update global timestamps
521
- MUTATION_TS[key] = now() - 1;
522
- MUTATION_END_TS[key] = 0;
523
- beforeMutationTs = MUTATION_TS[key];
524
- beforeConcurrentPromisesTs = CONCURRENT_PROMISES_TS[key];
525
- isAsyncMutation = false;
526
- if (_data && typeof _data === 'function') {
527
- // `_data` is a function, call it passing current cache value
528
- try {
529
- _data = _data(cache.get(key));
530
- }
531
- catch (err) {
532
- // if `_data` function throws an error synchronously, it shouldn't be cached
533
- _data = undefined;
534
- error = err;
535
- }
536
- }
537
- if (!(_data && typeof _data.then === 'function')) return [3 /*break*/, 5];
538
- // `_data` is a promise
539
- isAsyncMutation = true;
540
- _b.label = 1;
541
- case 1:
542
- _b.trys.push([1, 3, , 4]);
543
- return [4 /*yield*/, _data];
544
- case 2:
545
- data = _b.sent();
546
- return [3 /*break*/, 4];
547
- case 3:
548
- err_1 = _b.sent();
549
- error = err_1;
550
- return [3 /*break*/, 4];
551
- case 4: return [3 /*break*/, 6];
552
- case 5:
553
- data = _data;
554
- _b.label = 6;
555
- case 6:
556
- shouldAbort = function () {
557
- // check if other mutations have occurred since we've started this mutation
558
- if (beforeMutationTs !== MUTATION_TS[key] ||
559
- beforeConcurrentPromisesTs !== CONCURRENT_PROMISES_TS[key]) {
560
- if (error)
561
- throw error;
562
- return true;
563
- }
564
- };
565
- // if there's a race we don't update cache or broadcast change, just return the data
566
- if (shouldAbort())
567
- return [2 /*return*/, data];
568
- if (typeof data !== 'undefined') {
569
- // update cached data
570
- cache.set(key, data);
571
- }
572
- // always update or reset the error
573
- cache.set(keyErr, error);
574
- // reset the timestamp to mark the mutation has ended
575
- MUTATION_END_TS[key] = now() - 1;
576
- if (!isAsyncMutation) {
577
- // we skip broadcasting if there's another mutation happened synchronously
578
- if (shouldAbort())
579
- return [2 /*return*/, data];
580
- }
581
- updaters = CACHE_REVALIDATORS[key];
582
- if (updaters) {
583
- promises = [];
584
- for (i = 0; i < updaters.length; ++i) {
585
- promises.push(updaters[i](!!shouldRevalidate, data, error, undefined, i > 0));
586
- }
587
- // return new updated value
588
- return [2 /*return*/, Promise.all(promises).then(function () {
589
- if (error)
590
- throw error;
591
- return cache.get(key);
592
- })];
593
- }
594
- // throw error or return data to be used by caller of mutate
595
- if (error)
596
- throw error;
597
- return [2 /*return*/, data];
598
- }
599
- });
600
- });
601
- };
602
- function useSWR() {
603
- var _this = this;
604
- var args = [];
605
- for (var _i = 0; _i < arguments.length; _i++) {
606
- args[_i] = arguments[_i];
607
- }
608
- var _key = args[0];
609
- var config = Object.assign({}, defaultConfig, React.useContext(SWRConfigContext), args.length > 2
610
- ? args[2]
611
- : args.length === 2 && typeof args[1] === 'object'
612
- ? args[1]
613
- : {});
614
- // in typescript args.length > 2 is not same as args.lenth === 3
615
- // we do a safe type assertion here
616
- // args.length === 3
617
- var fn = (args.length > 2
618
- ? args[1]
619
- : args.length === 2 && typeof args[1] === 'function'
620
- ? args[1]
621
- : /**
622
- pass fn as null will disable revalidate
623
- https://paco.sh/blog/shared-hook-state-with-swr
624
- */
625
- args[1] === null
626
- ? args[1]
627
- : config.fetcher);
628
- // we assume `key` as the identifier of the request
629
- // `key` can change but `fn` shouldn't
630
- // (because `revalidate` only depends on `key`)
631
- // `keyErr` is the cache key for error objects
632
- var _a = cache.serializeKey(_key), key = _a[0], fnArgs = _a[1], keyErr = _a[2], keyValidating = _a[3];
633
- var configRef = React.useRef(config);
634
- useIsomorphicLayoutEffect(function () {
635
- configRef.current = config;
636
- });
637
- var willRevalidateOnMount = function () {
638
- return (config.revalidateOnMount ||
639
- (!config.initialData && config.revalidateOnMount === undefined));
640
- };
641
- var resolveData = function () {
642
- var cachedData = cache.get(key);
643
- return typeof cachedData === 'undefined' ? config.initialData : cachedData;
644
- };
645
- var resolveIsValidating = function () {
646
- return !!cache.get(keyValidating) || (key && willRevalidateOnMount());
647
- };
648
- var initialData = resolveData();
649
- var initialError = cache.get(keyErr);
650
- var initialIsValidating = resolveIsValidating();
651
- // if a state is accessed (data, error or isValidating),
652
- // we add the state to dependencies so if the state is
653
- // updated in the future, we can trigger a rerender
654
- var stateDependencies = React.useRef({
655
- data: false,
656
- error: false,
657
- isValidating: false
658
- });
659
- var stateRef = React.useRef({
660
- data: initialData,
661
- error: initialError,
662
- isValidating: initialIsValidating
663
- });
664
- // display the data label in the React DevTools next to SWR hooks
665
- React.useDebugValue(stateRef.current.data);
666
- var rerender = React.useState({})[1];
667
- var dispatch = React.useCallback(function (payload) {
668
- var shouldUpdateState = false;
669
- for (var k in payload) {
670
- // @ts-ignore
671
- if (stateRef.current[k] === payload[k]) {
672
- continue;
673
- }
674
- // @ts-ignore
675
- stateRef.current[k] = payload[k];
676
- // @ts-ignore
677
- if (stateDependencies.current[k]) {
678
- shouldUpdateState = true;
679
- }
680
- }
681
- if (shouldUpdateState) {
682
- // if component is unmounted, should skip rerender
683
- // if component is not mounted, should skip rerender
684
- if (unmountedRef.current || !initialMountedRef.current)
685
- return;
686
- rerender({});
687
- }
688
- },
689
- // config.suspense isn't allowed to change during the lifecycle
690
- // eslint-disable-next-line react-hooks/exhaustive-deps
691
- []);
692
- // error ref inside revalidate (is last request errored?)
693
- var unmountedRef = React.useRef(false);
694
- var keyRef = React.useRef(key);
695
- // check if component is mounted in suspense mode
696
- var initialMountedRef = React.useRef(false);
697
- // do unmount check for callbacks
698
- var eventsCallback = React.useCallback(function (event) {
699
- var _a;
700
- var params = [];
701
- for (var _i = 1; _i < arguments.length; _i++) {
702
- params[_i - 1] = arguments[_i];
703
- }
704
- if (unmountedRef.current)
705
- return;
706
- if (!initialMountedRef.current)
707
- return;
708
- if (key !== keyRef.current)
709
- return;
710
- // @ts-ignore
711
- (_a = configRef.current)[event].apply(_a, params);
712
- }, [key]);
713
- var boundMutate = React.useCallback(function (data, shouldRevalidate) {
714
- return mutate(keyRef.current, data, shouldRevalidate);
715
- }, []);
716
- var addRevalidator = function (revalidators, callback) {
717
- if (!revalidators[key]) {
718
- revalidators[key] = [callback];
719
- }
720
- else {
721
- revalidators[key].push(callback);
722
- }
723
- return function () {
724
- var keyedRevalidators = revalidators[key];
725
- var index = keyedRevalidators.indexOf(callback);
726
- if (index >= 0) {
727
- // O(1): faster than splice
728
- keyedRevalidators[index] =
729
- keyedRevalidators[keyedRevalidators.length - 1];
730
- keyedRevalidators.pop();
731
- }
732
- };
733
- };
734
- // start a revalidation
735
- var revalidate = React.useCallback(function (revalidateOpts) {
736
- if (revalidateOpts === void 0) { revalidateOpts = {}; }
737
- return __awaiter(_this, void 0, void 0, function () {
738
- var _a, retryCount, _b, dedupe, loading, shouldDeduping, newData, startAt, newState, err_2;
739
- return __generator(this, function (_c) {
740
- switch (_c.label) {
741
- case 0:
742
- if (!key || !fn)
743
- return [2 /*return*/, false];
744
- if (unmountedRef.current)
745
- return [2 /*return*/, false];
746
- if (configRef.current.isPaused())
747
- return [2 /*return*/, false];
748
- _a = revalidateOpts.retryCount, retryCount = _a === void 0 ? 0 : _a, _b = revalidateOpts.dedupe, dedupe = _b === void 0 ? false : _b;
749
- loading = true;
750
- shouldDeduping = typeof CONCURRENT_PROMISES[key] !== 'undefined' && dedupe;
751
- _c.label = 1;
752
- case 1:
753
- _c.trys.push([1, 6, , 7]);
754
- dispatch({
755
- isValidating: true
756
- });
757
- cache.set(keyValidating, true);
758
- if (!shouldDeduping) {
759
- // also update other hooks
760
- broadcastState(key, stateRef.current.data, stateRef.current.error, true);
761
- }
762
- newData = void 0;
763
- startAt = void 0;
764
- if (!shouldDeduping) return [3 /*break*/, 3];
765
- // there's already an ongoing request,
766
- // this one needs to be deduplicated.
767
- startAt = CONCURRENT_PROMISES_TS[key];
768
- return [4 /*yield*/, CONCURRENT_PROMISES[key]];
769
- case 2:
770
- newData = _c.sent();
771
- return [3 /*break*/, 5];
772
- case 3:
773
- // if no cache being rendered currently (it shows a blank page),
774
- // we trigger the loading slow event.
775
- if (config.loadingTimeout && !cache.get(key)) {
776
- setTimeout(function () {
777
- if (loading)
778
- eventsCallback('onLoadingSlow', key, config);
779
- }, config.loadingTimeout);
780
- }
781
- if (fnArgs !== null) {
782
- CONCURRENT_PROMISES[key] = fn.apply(void 0, fnArgs);
783
- }
784
- else {
785
- CONCURRENT_PROMISES[key] = fn(key);
786
- }
787
- CONCURRENT_PROMISES_TS[key] = startAt = now();
788
- return [4 /*yield*/, CONCURRENT_PROMISES[key]];
789
- case 4:
790
- newData = _c.sent();
791
- setTimeout(function () {
792
- delete CONCURRENT_PROMISES[key];
793
- delete CONCURRENT_PROMISES_TS[key];
794
- }, config.dedupingInterval);
795
- // trigger the success event,
796
- // only do this for the original request.
797
- eventsCallback('onSuccess', newData, key, config);
798
- _c.label = 5;
799
- case 5:
800
- // if there're other ongoing request(s), started after the current one,
801
- // we need to ignore the current one to avoid possible race conditions:
802
- // req1------------------>res1 (current one)
803
- // req2---------------->res2
804
- // the request that fired later will always be kept.
805
- if (CONCURRENT_PROMISES_TS[key] > startAt) {
806
- return [2 /*return*/, false];
807
- }
808
- // if there're other mutations(s), overlapped with the current revalidation:
809
- // case 1:
810
- // req------------------>res
811
- // mutate------>end
812
- // case 2:
813
- // req------------>res
814
- // mutate------>end
815
- // case 3:
816
- // req------------------>res
817
- // mutate-------...---------->
818
- // we have to ignore the revalidation result (res) because it's no longer fresh.
819
- // meanwhile, a new revalidation should be triggered when the mutation ends.
820
- if (MUTATION_TS[key] &&
821
- // case 1
822
- (startAt <= MUTATION_TS[key] ||
823
- // case 2
824
- startAt <= MUTATION_END_TS[key] ||
825
- // case 3
826
- MUTATION_END_TS[key] === 0)) {
827
- dispatch({ isValidating: false });
828
- return [2 /*return*/, false];
829
- }
830
- cache.set(keyErr, undefined);
831
- cache.set(keyValidating, false);
832
- newState = {
833
- isValidating: false
834
- };
835
- if (typeof stateRef.current.error !== 'undefined') {
836
- // we don't have an error
837
- newState.error = undefined;
838
- }
839
- if (!config.compare(stateRef.current.data, newData)) {
840
- // deep compare to avoid extra re-render
841
- // data changed
842
- newState.data = newData;
843
- }
844
- if (!config.compare(cache.get(key), newData)) {
845
- cache.set(key, newData);
846
- }
847
- // merge the new state
848
- dispatch(newState);
849
- if (!shouldDeduping) {
850
- // also update other hooks
851
- broadcastState(key, newData, newState.error, false);
852
- }
853
- return [3 /*break*/, 7];
854
- case 6:
855
- err_2 = _c.sent();
856
- delete CONCURRENT_PROMISES[key];
857
- delete CONCURRENT_PROMISES_TS[key];
858
- if (configRef.current.isPaused()) {
859
- dispatch({
860
- isValidating: false
861
- });
862
- return [2 /*return*/, false];
863
- }
864
- cache.set(keyErr, err_2);
865
- // get a new error
866
- // don't use deep equal for errors
867
- if (stateRef.current.error !== err_2) {
868
- // we keep the stale data
869
- dispatch({
870
- isValidating: false,
871
- error: err_2
872
- });
873
- if (!shouldDeduping) {
874
- // also broadcast to update other hooks
875
- broadcastState(key, undefined, err_2, false);
876
- }
877
- }
878
- // events and retry
879
- eventsCallback('onError', err_2, key, config);
880
- if (config.shouldRetryOnError) {
881
- // when retrying, we always enable deduping
882
- eventsCallback('onErrorRetry', err_2, key, config, revalidate, {
883
- retryCount: retryCount + 1,
884
- dedupe: true
885
- });
886
- }
887
- return [3 /*break*/, 7];
888
- case 7:
889
- loading = false;
890
- return [2 /*return*/, true];
891
- }
892
- });
893
- });
894
- },
895
- // dispatch is immutable, and `eventsCallback`, `fnArgs`, `keyErr`, and `keyValidating` are based on `key`,
896
- // so we can them from the deps array.
897
- //
898
- // FIXME:
899
- // `fn` and `config` might be changed during the lifecycle,
900
- // but they might be changed every render like this.
901
- // useSWR('key', () => fetch('/api/'), { suspense: true })
902
- // So we omit the values from the deps array
903
- // even though it might cause unexpected behaviors.
904
- // eslint-disable-next-line react-hooks/exhaustive-deps
905
- [key]);
906
- // mounted (client side rendering)
907
- useIsomorphicLayoutEffect(function () {
908
- if (!key)
909
- return undefined;
910
- // after `key` updates, we need to mark it as mounted
911
- unmountedRef.current = false;
912
- var isUpdating = initialMountedRef.current;
913
- initialMountedRef.current = true;
914
- // after the component is mounted (hydrated),
915
- // we need to update the data from the cache
916
- // and trigger a revalidation
917
- var currentHookData = stateRef.current.data;
918
- var latestKeyedData = resolveData();
919
- // update the state if the key changed (not the inital render) or cache updated
920
- keyRef.current = key;
921
- if (!config.compare(currentHookData, latestKeyedData)) {
922
- dispatch({ data: latestKeyedData });
923
- }
924
- // revalidate with deduping
925
- var softRevalidate = function () { return revalidate({ dedupe: true }); };
926
- // trigger a revalidation
927
- if (isUpdating || willRevalidateOnMount()) {
928
- if (typeof latestKeyedData !== 'undefined' && !IS_SERVER) {
929
- // delay revalidate if there's cache
930
- // to not block the rendering
931
- // @ts-ignore it's safe to use requestAnimationFrame in browser
932
- rAF(softRevalidate);
933
- }
934
- else {
935
- softRevalidate();
936
- }
937
- }
938
- var pending = false;
939
- var onFocus = function () {
940
- if (pending || !configRef.current.revalidateOnFocus)
941
- return;
942
- pending = true;
943
- softRevalidate();
944
- setTimeout(function () { return (pending = false); }, configRef.current.focusThrottleInterval);
945
- };
946
- var onReconnect = function () {
947
- if (configRef.current.revalidateOnReconnect) {
948
- softRevalidate();
949
- }
950
- };
951
- // register global cache update listener
952
- var onUpdate = function (shouldRevalidate, updatedData, updatedError, updatedIsValidating, dedupe) {
953
- if (shouldRevalidate === void 0) { shouldRevalidate = true; }
954
- if (dedupe === void 0) { dedupe = true; }
955
- // update hook state
956
- var newState = {};
957
- var needUpdate = false;
958
- if (typeof updatedData !== 'undefined' &&
959
- !config.compare(stateRef.current.data, updatedData)) {
960
- newState.data = updatedData;
961
- needUpdate = true;
962
- }
963
- // always update error
964
- // because it can be `undefined`
965
- if (stateRef.current.error !== updatedError) {
966
- newState.error = updatedError;
967
- needUpdate = true;
968
- }
969
- if (typeof updatedIsValidating !== 'undefined' &&
970
- stateRef.current.isValidating !== updatedIsValidating) {
971
- newState.isValidating = updatedIsValidating;
972
- needUpdate = true;
973
- }
974
- if (needUpdate) {
975
- dispatch(newState);
976
- }
977
- if (shouldRevalidate) {
978
- if (dedupe) {
979
- return softRevalidate();
980
- }
981
- else {
982
- return revalidate();
983
- }
984
- }
985
- return false;
986
- };
987
- var unsubFocus = addRevalidator(FOCUS_REVALIDATORS, onFocus);
988
- var unsubReconnect = addRevalidator(RECONNECT_REVALIDATORS, onReconnect);
989
- var unsubUpdate = addRevalidator(CACHE_REVALIDATORS, onUpdate);
990
- return function () {
991
- // cleanup
992
- dispatch = function () { return null; };
993
- // mark it as unmounted
994
- unmountedRef.current = true;
995
- unsubFocus();
996
- unsubReconnect();
997
- unsubUpdate();
998
- };
999
- }, [key, revalidate]);
1000
- useIsomorphicLayoutEffect(function () {
1001
- var timer = null;
1002
- var tick = function () { return __awaiter(_this, void 0, void 0, function () {
1003
- return __generator(this, function (_a) {
1004
- switch (_a.label) {
1005
- case 0:
1006
- if (!(!stateRef.current.error &&
1007
- (configRef.current.refreshWhenHidden ||
1008
- configRef.current.isDocumentVisible()) &&
1009
- (configRef.current.refreshWhenOffline || configRef.current.isOnline()))) return [3 /*break*/, 2];
1010
- // only revalidate when the page is visible
1011
- // if API request errored, we stop polling in this round
1012
- // and let the error retry function handle it
1013
- return [4 /*yield*/, revalidate({ dedupe: true })];
1014
- case 1:
1015
- // only revalidate when the page is visible
1016
- // if API request errored, we stop polling in this round
1017
- // and let the error retry function handle it
1018
- _a.sent();
1019
- _a.label = 2;
1020
- case 2:
1021
- // Read the latest refreshInterval
1022
- if (configRef.current.refreshInterval && timer) {
1023
- timer = setTimeout(tick, configRef.current.refreshInterval);
1024
- }
1025
- return [2 /*return*/];
1026
- }
1027
- });
1028
- }); };
1029
- if (configRef.current.refreshInterval) {
1030
- timer = setTimeout(tick, configRef.current.refreshInterval);
1031
- }
1032
- return function () {
1033
- if (timer) {
1034
- clearTimeout(timer);
1035
- timer = null;
1036
- }
1037
- };
1038
- }, [
1039
- config.refreshInterval,
1040
- config.refreshWhenHidden,
1041
- config.refreshWhenOffline,
1042
- revalidate
1043
- ]);
1044
- // suspense
1045
- var latestData;
1046
- var latestError;
1047
- if (config.suspense) {
1048
- // in suspense mode, we can't return empty state
1049
- // (it should be suspended)
1050
- // try to get data and error from cache
1051
- latestData = cache.get(key);
1052
- latestError = cache.get(keyErr);
1053
- if (typeof latestData === 'undefined') {
1054
- latestData = initialData;
1055
- }
1056
- if (typeof latestError === 'undefined') {
1057
- latestError = initialError;
1058
- }
1059
- if (typeof latestData === 'undefined' &&
1060
- typeof latestError === 'undefined') {
1061
- // need to start the request if it hasn't
1062
- if (!CONCURRENT_PROMISES[key]) {
1063
- // trigger revalidate immediately
1064
- // to get the promise
1065
- // in this revalidate, should not rerender
1066
- revalidate();
1067
- }
1068
- if (CONCURRENT_PROMISES[key] &&
1069
- typeof CONCURRENT_PROMISES[key].then === 'function') {
1070
- // if it is a promise
1071
- throw CONCURRENT_PROMISES[key];
1072
- }
1073
- // it's a value, return it directly (override)
1074
- latestData = CONCURRENT_PROMISES[key];
1075
- }
1076
- if (typeof latestData === 'undefined' && latestError) {
1077
- // in suspense mode, throw error if there's no content
1078
- throw latestError;
1079
- }
1080
- }
1081
- // define returned state
1082
- // can be memorized since the state is a ref
1083
- var memoizedState = React.useMemo(function () {
1084
- // revalidate will be deprecated in the 1.x release
1085
- // because mutate() covers the same use case of revalidate().
1086
- // This remains only for backward compatibility
1087
- var state = { revalidate: revalidate, mutate: boundMutate };
1088
- Object.defineProperties(state, {
1089
- error: {
1090
- // `key` might be changed in the upcoming hook re-render,
1091
- // but the previous state will stay
1092
- // so we need to match the latest key and data (fallback to `initialData`)
1093
- get: function () {
1094
- stateDependencies.current.error = true;
1095
- if (config.suspense) {
1096
- return latestError;
1097
- }
1098
- return keyRef.current === key ? stateRef.current.error : initialError;
1099
- },
1100
- enumerable: true
1101
- },
1102
- data: {
1103
- get: function () {
1104
- stateDependencies.current.data = true;
1105
- if (config.suspense) {
1106
- return latestData;
1107
- }
1108
- return keyRef.current === key ? stateRef.current.data : initialData;
1109
- },
1110
- enumerable: true
1111
- },
1112
- isValidating: {
1113
- get: function () {
1114
- stateDependencies.current.isValidating = true;
1115
- return key ? stateRef.current.isValidating : false;
1116
- },
1117
- enumerable: true
1118
- }
1119
- });
1120
- return state;
1121
- // `config.suspense` isn't allowed to change during the lifecycle.
1122
- // `boundMutate` is immutable, and the immutability of `revalidate` depends on `key`
1123
- // so we can omit them from the deps array,
1124
- // but we put it to enable react-hooks/exhaustive-deps rule.
1125
- // `initialData` and `initialError` are not initial values
1126
- // because they are changed during the lifecycle
1127
- // so we should add them in the deps array.
1128
- }, [
1129
- revalidate,
1130
- initialData,
1131
- initialError,
1132
- boundMutate,
1133
- key,
1134
- config.suspense,
1135
- latestError,
1136
- latestData
1137
- ]);
1138
- return memoizedState;
1139
- }
1140
- Object.defineProperty(SWRConfigContext.Provider, 'default', {
1141
- value: defaultConfig
1142
- });
1143
- var SWRConfig = SWRConfigContext.Provider;
1144
-
1145
- var __awaiter$1 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
1146
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1147
- return new (P || (P = Promise))(function (resolve, reject) {
1148
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1149
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1150
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1151
- step((generator = generator.apply(thisArg, _arguments || [])).next());
1152
- });
1153
- };
1154
- var __generator$1 = (undefined && undefined.__generator) || function (thisArg, body) {
1155
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
1156
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
1157
- function verb(n) { return function (v) { return step([n, v]); }; }
1158
- function step(op) {
1159
- if (f) throw new TypeError("Generator is already executing.");
1160
- while (_) try {
1161
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
1162
- if (y = 0, t) op = [op[0] & 2, t.value];
1163
- switch (op[0]) {
1164
- case 0: case 1: t = op; break;
1165
- case 4: _.label++; return { value: op[1], done: false };
1166
- case 5: _.label++; y = op[1]; op = [0]; continue;
1167
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
1168
- default:
1169
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
1170
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
1171
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
1172
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
1173
- if (t[2]) _.ops.pop();
1174
- _.trys.pop(); continue;
1175
- }
1176
- op = body.call(thisArg, _);
1177
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
1178
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
1179
- }
1180
- };
1181
- var __rest = (undefined && undefined.__rest) || function (s, e) {
1182
- var t = {};
1183
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1184
- t[p] = s[p];
1185
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1186
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1187
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1188
- t[p[i]] = s[p[i]];
1189
- }
1190
- return t;
1191
- };
1192
-
1193
- var _this = undefined;
149
+ var _this$4 = undefined;
1194
150
 
1195
151
  var dataHandler = function () {
1196
152
  var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(api_url, body) {
@@ -1256,7 +212,7 @@ var dataHandler = function () {
1256
212
  return _context.stop();
1257
213
  }
1258
214
  }
1259
- }, _callee, _this, [[0, 20]]);
215
+ }, _callee, _this$4, [[0, 20]]);
1260
216
  }));
1261
217
 
1262
218
  return function dataHandler(_x, _x2) {
@@ -1269,7 +225,7 @@ function useUser() {
1269
225
  redirectTo = _ref.redirectTo,
1270
226
  redirectIfFound = _ref.redirectIfFound;
1271
227
 
1272
- var _useSWR = useSWR('/api/auth/user', dataHandler),
228
+ var _useSWR = useSWR__default['default']('/api/auth/user', dataHandler),
1273
229
  data = _useSWR.data,
1274
230
  error = _useSWR.error;
1275
231
 
@@ -1284,7 +240,7 @@ function useUser() {
1284
240
  redirectTo && !redirectIfFound && !hasUser ||
1285
241
  // If redirectIfFound is also set, redirect if the user was found
1286
242
  redirectIfFound && hasUser) {
1287
- Router__default.push(redirectTo);
243
+ Router__default['default'].push(redirectTo);
1288
244
  }
1289
245
  }, [redirectTo, redirectIfFound, finished, hasUser]);
1290
246
 
@@ -1390,43 +346,43 @@ var LoginForm = function LoginForm(props) {
1390
346
  loading = _useState4[0],
1391
347
  setLoading = _useState4[1];
1392
348
 
1393
- return React__default.createElement(
349
+ return React__default['default'].createElement(
1394
350
  reactBootstrap.Form,
1395
351
  { className: 'login', onSubmit: handleSubmit },
1396
- React__default.createElement(
352
+ React__default['default'].createElement(
1397
353
  'h1',
1398
354
  null,
1399
355
  'Login'
1400
356
  ),
1401
- React__default.createElement('hr', null),
357
+ React__default['default'].createElement('hr', null),
1402
358
  returnFormField({ name: 'email', label: 'Email', type: 'email', required: true }),
1403
359
  returnFormField({ name: 'password', label: 'Password', type: 'password', required: true }),
1404
- React__default.createElement('hr', null),
1405
- React__default.createElement(
360
+ React__default['default'].createElement('hr', null),
361
+ React__default['default'].createElement(
1406
362
  reactBootstrap.Form.Row,
1407
363
  null,
1408
- React__default.createElement(
364
+ React__default['default'].createElement(
1409
365
  reactBootstrap.Form.Group,
1410
366
  { as: reactBootstrap.Col },
1411
- React__default.createElement(
367
+ React__default['default'].createElement(
1412
368
  'a',
1413
369
  { href: '/auth/signup' },
1414
370
  'I don\'t have an account'
1415
371
  )
1416
372
  ),
1417
- React__default.createElement(
373
+ React__default['default'].createElement(
1418
374
  reactBootstrap.Form.Group,
1419
375
  { as: reactBootstrap.Col, className: 'text-right' },
1420
- !loading && React__default.createElement(
376
+ !loading && React__default['default'].createElement(
1421
377
  reactBootstrap.Button,
1422
378
  { type: 'submit' },
1423
379
  'Login'
1424
380
  ),
1425
- loading && React__default.createElement(
381
+ loading && React__default['default'].createElement(
1426
382
  reactBootstrap.Button,
1427
383
  { variant: 'primary', disabled: true },
1428
- React__default.createElement(reactBootstrap.Spinner, { as: 'span', animation: 'border', role: 'status', 'aria-hidden': 'true', size: 'sm' }),
1429
- React__default.createElement(
384
+ React__default['default'].createElement(reactBootstrap.Spinner, { as: 'span', animation: 'border', role: 'status', 'aria-hidden': 'true', size: 'sm' }),
385
+ React__default['default'].createElement(
1430
386
  'span',
1431
387
  { className: 'sr-only' },
1432
388
  'Loading...'
@@ -1434,12 +390,12 @@ var LoginForm = function LoginForm(props) {
1434
390
  )
1435
391
  )
1436
392
  ),
1437
- errorMsg && React__default.createElement(
393
+ errorMsg && React__default['default'].createElement(
1438
394
  'p',
1439
395
  { className: 'error' },
1440
396
  errorMsg
1441
397
  ),
1442
- React__default.createElement(
398
+ React__default['default'].createElement(
1443
399
  'style',
1444
400
  { jsx: 'true'.toString() },
1445
401
  '\n .login {\n margin: 0 auto;\n padding: 1rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n }\n .error {\n color: red;\n margin: 1rem 0 0;\n }\n '
@@ -1452,9 +408,9 @@ var countries = ["United States", "Afghanistan", "Albania", "Algeria", "American
1452
408
 
1453
409
  var states = ['AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FM', 'FL', 'GA', 'GU', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MH', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'MP', 'OH', 'OK', 'OR', 'PW', 'PA', 'PR', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VI', 'VA', 'WA', 'WV', 'WI', 'WY'];
1454
410
 
1455
- var _this$1 = undefined;
411
+ var _this$3 = undefined;
1456
412
 
1457
- var SignupForm = function SignupForm(props) {
413
+ var SignupForm$1 = function SignupForm(props) {
1458
414
  var handleSubmit = function () {
1459
415
  var _ref3 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee3(e) {
1460
416
  var formData, body, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, key, res;
@@ -1615,7 +571,7 @@ var SignupForm = function SignupForm(props) {
1615
571
  return _context.stop();
1616
572
  }
1617
573
  }
1618
- }, _callee, _this$1);
574
+ }, _callee, _this$3);
1619
575
  }));
1620
576
 
1621
577
  return function loadInitData() {
@@ -1682,7 +638,7 @@ var SignupForm = function SignupForm(props) {
1682
638
  return _context2.stop();
1683
639
  }
1684
640
  }
1685
- }, _callee2, _this$1);
641
+ }, _callee2, _this$3);
1686
642
  }));
1687
643
 
1688
644
  return function handleOccupationChanged(_x) {
@@ -1695,29 +651,29 @@ var SignupForm = function SignupForm(props) {
1695
651
  loading = _useState14[0],
1696
652
  setLoading = _useState14[1];
1697
653
 
1698
- return React__default.createElement(
654
+ return React__default['default'].createElement(
1699
655
  reactBootstrap.Form,
1700
656
  { className: 'login', id: 'signupForm', onSubmit: handleSubmit },
1701
- React__default.createElement(
657
+ React__default['default'].createElement(
1702
658
  'h1',
1703
659
  null,
1704
660
  'Sign Up'
1705
661
  ),
1706
- React__default.createElement('hr', null),
662
+ React__default['default'].createElement('hr', null),
1707
663
  returnFormField({ name: 'email', label: 'Email', type: 'email', required: true }),
1708
- React__default.createElement(
664
+ React__default['default'].createElement(
1709
665
  reactBootstrap.Form.Row,
1710
666
  null,
1711
667
  returnFormField({ name: 'password', label: 'Password', type: 'password', groupType: reactBootstrap.Col, required: true }),
1712
668
  returnFormField({ name: 'rpassword', label: 'Retype Password', type: 'password', groupType: reactBootstrap.Col, required: true })
1713
669
  ),
1714
- React__default.createElement(
670
+ React__default['default'].createElement(
1715
671
  reactBootstrap.Form.Row,
1716
672
  null,
1717
673
  returnFormField({ name: 'first_name', label: 'First Name', type: 'text', groupType: reactBootstrap.Col, required: true }),
1718
674
  returnFormField({ name: 'last_name', label: 'Last Name', type: 'text', groupType: reactBootstrap.Col, required: true })
1719
675
  ),
1720
- React__default.createElement(
676
+ React__default['default'].createElement(
1721
677
  reactBootstrap.Form.Row,
1722
678
  null,
1723
679
  returnFormField({
@@ -1731,7 +687,7 @@ var SignupForm = function SignupForm(props) {
1731
687
  }),
1732
688
  countryUS && returnFormField({ name: 'state', label: 'State', type: 'select', required: true, groupType: reactBootstrap.Col, options: states })
1733
689
  ),
1734
- React__default.createElement(
690
+ React__default['default'].createElement(
1735
691
  reactBootstrap.Form.Row,
1736
692
  null,
1737
693
  countryUS && returnFormField({ name: 'zip', label: 'Working Zip Code', type: 'text', required: true, groupType: reactBootstrap.Col }),
@@ -1778,38 +734,38 @@ var SignupForm = function SignupForm(props) {
1778
734
  required: true,
1779
735
  options: [{ label: 'By registering you agree to our <a href="/terms" style="color:blue">Terms and Conditions</a> and <a href="/privacy" style="color:blue">Privacy Policy</a> and understand that you will be receiving email communications', value: 'Y' }]
1780
736
  }),
1781
- React__default.createElement('hr', null),
1782
- React__default.createElement(
737
+ React__default['default'].createElement('hr', null),
738
+ React__default['default'].createElement(
1783
739
  reactBootstrap.Form.Row,
1784
740
  null,
1785
- React__default.createElement(
741
+ React__default['default'].createElement(
1786
742
  reactBootstrap.Form.Group,
1787
743
  { as: reactBootstrap.Col },
1788
- React__default.createElement(
744
+ React__default['default'].createElement(
1789
745
  'a',
1790
746
  { href: '/auth/login' },
1791
747
  'I already have an account'
1792
748
  )
1793
749
  ),
1794
- React__default.createElement(
750
+ React__default['default'].createElement(
1795
751
  reactBootstrap.Form.Group,
1796
752
  { as: reactBootstrap.Col, className: 'text-right' },
1797
- !loading && React__default.createElement(
753
+ !loading && React__default['default'].createElement(
1798
754
  reactBootstrap.Button,
1799
755
  { type: 'submit' },
1800
756
  'Sign Up'
1801
757
  ),
1802
- loading && React__default.createElement(
758
+ loading && React__default['default'].createElement(
1803
759
  reactBootstrap.Button,
1804
760
  { variant: 'primary', disabled: true },
1805
- React__default.createElement(reactBootstrap.Spinner, {
761
+ React__default['default'].createElement(reactBootstrap.Spinner, {
1806
762
  as: 'span',
1807
763
  animation: 'border',
1808
764
  role: 'status',
1809
765
  'aria-hidden': 'true',
1810
766
  size: 'sm'
1811
767
  }),
1812
- React__default.createElement(
768
+ React__default['default'].createElement(
1813
769
  'span',
1814
770
  { className: 'sr-only' },
1815
771
  'Loading...'
@@ -1817,12 +773,12 @@ var SignupForm = function SignupForm(props) {
1817
773
  )
1818
774
  )
1819
775
  ),
1820
- errorMsg && React__default.createElement(
776
+ errorMsg && React__default['default'].createElement(
1821
777
  'p',
1822
778
  { className: 'error' },
1823
779
  errorMsg
1824
780
  ),
1825
- React__default.createElement(
781
+ React__default['default'].createElement(
1826
782
  'style',
1827
783
  { jsx: 'true'.toString() },
1828
784
  ' \n .login {\n margin: 0 auto;\n padding: 1rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n }\n .error {\n color: red;\n margin: 1rem 0 0;\n }\n '
@@ -1832,7 +788,7 @@ var SignupForm = function SignupForm(props) {
1832
788
 
1833
789
  var _this$2 = undefined;
1834
790
 
1835
- var SignupForm$1 = function SignupForm(props) {
791
+ var SignupForm = function SignupForm(props) {
1836
792
  var handleSubmit = function () {
1837
793
  var _ref3 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee3(e) {
1838
794
  var formData, body, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, key, res;
@@ -2112,32 +1068,32 @@ var SignupForm$1 = function SignupForm(props) {
2112
1068
  loading = _useState18[0],
2113
1069
  setLoading = _useState18[1];
2114
1070
 
2115
- return React__default.createElement(
1071
+ return React__default['default'].createElement(
2116
1072
  reactBootstrap.Form,
2117
1073
  { className: 'login', id: 'signupForm', onSubmit: handleSubmit },
2118
- React__default.createElement(
1074
+ React__default['default'].createElement(
2119
1075
  'h1',
2120
1076
  null,
2121
1077
  'Profile'
2122
1078
  ),
2123
- React__default.createElement('hr', null),
2124
- userData ? React__default.createElement(
2125
- React__default.Fragment,
1079
+ React__default['default'].createElement('hr', null),
1080
+ userData ? React__default['default'].createElement(
1081
+ React__default['default'].Fragment,
2126
1082
  null,
2127
1083
  returnFormField({ name: 'email', label: 'Email', type: 'email', required: true, readonly: true, default_value: userData.email }),
2128
- React__default.createElement(
1084
+ React__default['default'].createElement(
2129
1085
  reactBootstrap.Form.Row,
2130
1086
  null,
2131
1087
  returnFormField({ name: 'password', label: 'Password', type: 'password', groupType: reactBootstrap.Col, required: false }),
2132
1088
  returnFormField({ name: 'rpassword', label: 'Retype Password', type: 'password', groupType: reactBootstrap.Col, required: false })
2133
1089
  ),
2134
- React__default.createElement(
1090
+ React__default['default'].createElement(
2135
1091
  reactBootstrap.Form.Row,
2136
1092
  null,
2137
1093
  returnFormField({ name: 'first_name', label: 'First Name', type: 'text', groupType: reactBootstrap.Col, required: true, default_value: userData.shared.first_name }),
2138
1094
  returnFormField({ name: 'last_name', label: 'Last Name', type: 'text', groupType: reactBootstrap.Col, required: true, default_value: userData.shared.last_name })
2139
1095
  ),
2140
- React__default.createElement(
1096
+ React__default['default'].createElement(
2141
1097
  reactBootstrap.Form.Row,
2142
1098
  null,
2143
1099
  returnFormField({
@@ -2152,7 +1108,7 @@ var SignupForm$1 = function SignupForm(props) {
2152
1108
  }),
2153
1109
  countryUS && returnFormField({ name: 'state', label: 'State', type: 'select', required: true, groupType: reactBootstrap.Col, options: states, default_value: userData.shared.state })
2154
1110
  ),
2155
- React__default.createElement(
1111
+ React__default['default'].createElement(
2156
1112
  reactBootstrap.Form.Row,
2157
1113
  null,
2158
1114
  countryUS && returnFormField({ name: 'zip', label: 'Working Zip Code', type: 'text', required: true, groupType: reactBootstrap.Col, default_value: userData.shared.zip }),
@@ -2202,29 +1158,29 @@ var SignupForm$1 = function SignupForm(props) {
2202
1158
  required: true,
2203
1159
  options: [{ label: 'By registering you agree to our <a href="/terms">Terms and Conditions</a> and <a href="/privacy">Privacy Policy</a> and understand that you will be receiving email communications', value: 'Y' }]
2204
1160
  }),
2205
- React__default.createElement('hr', null),
2206
- React__default.createElement(
1161
+ React__default['default'].createElement('hr', null),
1162
+ React__default['default'].createElement(
2207
1163
  reactBootstrap.Form.Row,
2208
1164
  null,
2209
- React__default.createElement(
1165
+ React__default['default'].createElement(
2210
1166
  reactBootstrap.Form.Group,
2211
1167
  { as: reactBootstrap.Col },
2212
- !loading && React__default.createElement(
1168
+ !loading && React__default['default'].createElement(
2213
1169
  reactBootstrap.Button,
2214
1170
  { type: 'submit' },
2215
1171
  'Update'
2216
1172
  ),
2217
- loading && React__default.createElement(
1173
+ loading && React__default['default'].createElement(
2218
1174
  reactBootstrap.Button,
2219
1175
  { variant: 'primary', disabled: true },
2220
- React__default.createElement(reactBootstrap.Spinner, {
1176
+ React__default['default'].createElement(reactBootstrap.Spinner, {
2221
1177
  as: 'span',
2222
1178
  animation: 'border',
2223
1179
  role: 'status',
2224
1180
  'aria-hidden': 'true',
2225
1181
  size: 'sm'
2226
1182
  }),
2227
- React__default.createElement(
1183
+ React__default['default'].createElement(
2228
1184
  'span',
2229
1185
  { className: 'sr-only' },
2230
1186
  'Loading...'
@@ -2232,24 +1188,24 @@ var SignupForm$1 = function SignupForm(props) {
2232
1188
  )
2233
1189
  )
2234
1190
  )
2235
- ) : React__default.createElement(reactBootstrap.Spinner, {
1191
+ ) : React__default['default'].createElement(reactBootstrap.Spinner, {
2236
1192
  as: 'span',
2237
1193
  animation: 'border',
2238
1194
  role: 'status',
2239
1195
  'aria-hidden': 'true',
2240
1196
  size: 'sm'
2241
1197
  }),
2242
- errorMsg && React__default.createElement(
1198
+ errorMsg && React__default['default'].createElement(
2243
1199
  'p',
2244
1200
  { className: 'error' },
2245
1201
  errorMsg
2246
1202
  ),
2247
- successMsg && React__default.createElement(
1203
+ successMsg && React__default['default'].createElement(
2248
1204
  'p',
2249
1205
  { className: 'success' },
2250
1206
  successMsg
2251
1207
  ),
2252
- React__default.createElement(
1208
+ React__default['default'].createElement(
2253
1209
  'style',
2254
1210
  { jsx: 'true'.toString() },
2255
1211
  ' \n .login {\n margin: 0 auto;\n padding: 1rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n }\n .error {\n color: red;\n margin: 1rem 0 0;\n }\n .success {\n color: green;\n margin: 1rem 0 0;\n }\n '
@@ -2262,7 +1218,7 @@ var MAX_AGE = 60 * 60 * 8; // 8 hours
2262
1218
 
2263
1219
  function setTokenCookie(res, token, eKey) {
2264
1220
  var cookies_serailized = [];
2265
- cookies_serailized.push(index$5.serialize_1(TOKEN_NAME, token, {
1221
+ cookies_serailized.push(index.serialize_1(TOKEN_NAME, token, {
2266
1222
  //maxAge: MAX_AGE, // we want login cookie to expire when browser
2267
1223
  //expires: new Date(Date.now() + MAX_AGE * 1000),
2268
1224
  //httpOnly: true,
@@ -2271,7 +1227,7 @@ function setTokenCookie(res, token, eKey) {
2271
1227
  //sameSite: 'lax',
2272
1228
  }));
2273
1229
 
2274
- cookies_serailized.push(index$5.serialize_1('eKey', eKey, {
1230
+ cookies_serailized.push(index.serialize_1('eKey', eKey, {
2275
1231
  //maxAge: MAX_AGE, // we want login cookie to expire when browser
2276
1232
  //expires: new Date(Date.now() + MAX_AGE * 1000),
2277
1233
  //httpOnly: true,
@@ -2285,12 +1241,12 @@ function setTokenCookie(res, token, eKey) {
2285
1241
 
2286
1242
  function removeTokenCookie(res) {
2287
1243
  var cookies_serailized = [];
2288
- cookies_serailized.push(index$5.serialize_1(TOKEN_NAME, '', {
1244
+ cookies_serailized.push(index.serialize_1(TOKEN_NAME, '', {
2289
1245
  maxAge: -1,
2290
1246
  expires: new Date(Date.now() - MAX_AGE * 1000),
2291
1247
  path: '/'
2292
1248
  }));
2293
- cookies_serailized.push(index$5.serialize_1('eKey', '', {
1249
+ cookies_serailized.push(index.serialize_1('eKey', '', {
2294
1250
  maxAge: -1,
2295
1251
  expires: new Date(Date.now() - MAX_AGE * 1000),
2296
1252
  path: '/'
@@ -2305,7 +1261,7 @@ function parseCookies(req) {
2305
1261
 
2306
1262
  // For pages we do need to parse the cookies.
2307
1263
  var cookie = req.headers ? req.headers.cookie : null;
2308
- return index$5.parse_1(cookie || '');
1264
+ return index.parse_1(cookie || '');
2309
1265
  }
2310
1266
 
2311
1267
  function getTokenCookie(req) {
@@ -2367,10 +1323,10 @@ var iron = /*#__PURE__*/Object.freeze({
2367
1323
  getSession: getSession
2368
1324
  });
2369
1325
 
2370
- var toStr = Object.prototype.toString;
1326
+ var toStr$5 = Object.prototype.toString;
2371
1327
 
2372
1328
  var isArguments = function isArguments(value) {
2373
- var str = toStr.call(value);
1329
+ var str = toStr$5.call(value);
2374
1330
  var isArgs = str === '[object Arguments]';
2375
1331
  if (!isArgs) {
2376
1332
  isArgs = str !== '[object Array]' &&
@@ -2378,16 +1334,16 @@ var isArguments = function isArguments(value) {
2378
1334
  typeof value === 'object' &&
2379
1335
  typeof value.length === 'number' &&
2380
1336
  value.length >= 0 &&
2381
- toStr.call(value.callee) === '[object Function]';
1337
+ toStr$5.call(value.callee) === '[object Function]';
2382
1338
  }
2383
1339
  return isArgs;
2384
1340
  };
2385
1341
 
2386
- var keysShim;
1342
+ var keysShim$1;
2387
1343
  if (!Object.keys) {
2388
1344
  // modified from https://github.com/es-shims/es5-shim
2389
1345
  var has$1 = Object.prototype.hasOwnProperty;
2390
- var toStr$1 = Object.prototype.toString;
1346
+ var toStr$4 = Object.prototype.toString;
2391
1347
  var isArgs = isArguments; // eslint-disable-line global-require
2392
1348
  var isEnumerable = Object.prototype.propertyIsEnumerable;
2393
1349
  var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
@@ -2460,11 +1416,11 @@ if (!Object.keys) {
2460
1416
  }
2461
1417
  };
2462
1418
 
2463
- keysShim = function keys(object) {
1419
+ keysShim$1 = function keys(object) {
2464
1420
  var isObject = object !== null && typeof object === 'object';
2465
- var isFunction = toStr$1.call(object) === '[object Function]';
1421
+ var isFunction = toStr$4.call(object) === '[object Function]';
2466
1422
  var isArguments = isArgs(object);
2467
- var isString = isObject && toStr$1.call(object) === '[object String]';
1423
+ var isString = isObject && toStr$4.call(object) === '[object String]';
2468
1424
  var theKeys = [];
2469
1425
 
2470
1426
  if (!isObject && !isFunction && !isArguments) {
@@ -2502,17 +1458,17 @@ if (!Object.keys) {
2502
1458
  return theKeys;
2503
1459
  };
2504
1460
  }
2505
- var implementation = keysShim;
1461
+ var implementation$3 = keysShim$1;
2506
1462
 
2507
- var slice = Array.prototype.slice;
1463
+ var slice$1 = Array.prototype.slice;
2508
1464
 
2509
1465
 
2510
1466
  var origKeys = Object.keys;
2511
- var keysShim$1 = origKeys ? function keys(o) { return origKeys(o); } : implementation;
1467
+ var keysShim = origKeys ? function keys(o) { return origKeys(o); } : implementation$3;
2512
1468
 
2513
1469
  var originalKeys = Object.keys;
2514
1470
 
2515
- keysShim$1.shim = function shimObjectKeys() {
1471
+ keysShim.shim = function shimObjectKeys() {
2516
1472
  if (Object.keys) {
2517
1473
  var keysWorksWithArguments = (function () {
2518
1474
  // Safari 5.0 bug
@@ -2522,27 +1478,27 @@ keysShim$1.shim = function shimObjectKeys() {
2522
1478
  if (!keysWorksWithArguments) {
2523
1479
  Object.keys = function keys(object) { // eslint-disable-line func-name-matching
2524
1480
  if (isArguments(object)) {
2525
- return originalKeys(slice.call(object));
1481
+ return originalKeys(slice$1.call(object));
2526
1482
  }
2527
1483
  return originalKeys(object);
2528
1484
  };
2529
1485
  }
2530
1486
  } else {
2531
- Object.keys = keysShim$1;
1487
+ Object.keys = keysShim;
2532
1488
  }
2533
- return Object.keys || keysShim$1;
1489
+ return Object.keys || keysShim;
2534
1490
  };
2535
1491
 
2536
- var objectKeys = keysShim$1;
1492
+ var objectKeys = keysShim;
2537
1493
 
2538
- var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
1494
+ var hasSymbols$4 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
2539
1495
 
2540
- var toStr$2 = Object.prototype.toString;
1496
+ var toStr$3 = Object.prototype.toString;
2541
1497
  var concat = Array.prototype.concat;
2542
1498
  var origDefineProperty = Object.defineProperty;
2543
1499
 
2544
1500
  var isFunction = function (fn) {
2545
- return typeof fn === 'function' && toStr$2.call(fn) === '[object Function]';
1501
+ return typeof fn === 'function' && toStr$3.call(fn) === '[object Function]';
2546
1502
  };
2547
1503
 
2548
1504
  var arePropertyDescriptorsSupported = function () {
@@ -2579,7 +1535,7 @@ var defineProperty = function (object, name, value, predicate) {
2579
1535
  var defineProperties = function (object, map) {
2580
1536
  var predicates = arguments.length > 2 ? arguments[2] : {};
2581
1537
  var props = objectKeys(map);
2582
- if (hasSymbols) {
1538
+ if (hasSymbols$4) {
2583
1539
  props = concat.call(props, Object.getOwnPropertySymbols(map));
2584
1540
  }
2585
1541
  for (var i = 0; i < props.length; i += 1) {
@@ -2591,6 +1547,59 @@ defineProperties.supportsDescriptors = !!supportsDescriptors;
2591
1547
 
2592
1548
  var defineProperties_1 = defineProperties;
2593
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$2 = 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$2.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
+
2594
1603
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
2595
1604
  var shams = function hasSymbols() {
2596
1605
  if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
@@ -2614,7 +1623,7 @@ var shams = function hasSymbols() {
2614
1623
 
2615
1624
  var symVal = 42;
2616
1625
  obj[sym] = symVal;
2617
- for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax
1626
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
2618
1627
  if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
2619
1628
 
2620
1629
  if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
@@ -2632,10 +1641,10 @@ var shams = function hasSymbols() {
2632
1641
  return true;
2633
1642
  };
2634
1643
 
2635
- var origSymbol = _commonjsHelpers.commonjsGlobal.Symbol;
1644
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
2636
1645
 
2637
1646
 
2638
- var hasSymbols$1 = function hasNativeSymbols() {
1647
+ var hasSymbols$3 = function hasNativeSymbols() {
2639
1648
  if (typeof origSymbol !== 'function') { return false; }
2640
1649
  if (typeof Symbol !== 'function') { return false; }
2641
1650
  if (typeof origSymbol('foo') !== 'symbol') { return false; }
@@ -2644,79 +1653,34 @@ var hasSymbols$1 = function hasNativeSymbols() {
2644
1653
  return shams();
2645
1654
  };
2646
1655
 
2647
- /* eslint no-invalid-this: 1 */
2648
-
2649
- var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
2650
- var slice$1 = Array.prototype.slice;
2651
- var toStr$3 = Object.prototype.toString;
2652
- var funcType = '[object Function]';
2653
-
2654
- var implementation$1 = function bind(that) {
2655
- var target = this;
2656
- if (typeof target !== 'function' || toStr$3.call(target) !== funcType) {
2657
- throw new TypeError(ERROR_MESSAGE + target);
2658
- }
2659
- var args = slice$1.call(arguments, 1);
2660
-
2661
- var bound;
2662
- var binder = function () {
2663
- if (this instanceof bound) {
2664
- var result = target.apply(
2665
- this,
2666
- args.concat(slice$1.call(arguments))
2667
- );
2668
- if (Object(result) === result) {
2669
- return result;
2670
- }
2671
- return this;
2672
- } else {
2673
- return target.apply(
2674
- that,
2675
- args.concat(slice$1.call(arguments))
2676
- );
2677
- }
2678
- };
2679
-
2680
- var boundLength = Math.max(0, target.length - args.length);
2681
- var boundArgs = [];
2682
- for (var i = 0; i < boundLength; i++) {
2683
- boundArgs.push('$' + i);
2684
- }
1656
+ var src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
2685
1657
 
2686
- bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
1658
+ var undefined$1;
2687
1659
 
2688
- if (target.prototype) {
2689
- var Empty = function Empty() {};
2690
- Empty.prototype = target.prototype;
2691
- bound.prototype = new Empty();
2692
- Empty.prototype = null;
2693
- }
1660
+ var $SyntaxError$1 = SyntaxError;
1661
+ var $Function = Function;
1662
+ var $TypeError$5 = TypeError;
2694
1663
 
2695
- return bound;
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) {}
2696
1669
  };
2697
1670
 
2698
- var functionBind = Function.prototype.bind || implementation$1;
2699
-
2700
- /* globals
2701
- Atomics,
2702
- SharedArrayBuffer,
2703
- */
2704
-
2705
- var undefined$1;
2706
-
2707
- var $TypeError = TypeError;
2708
-
2709
- var $gOPD = Object.getOwnPropertyDescriptor;
2710
- if ($gOPD) {
1671
+ var $gOPD$2 = Object.getOwnPropertyDescriptor;
1672
+ if ($gOPD$2) {
2711
1673
  try {
2712
- $gOPD({}, '');
1674
+ $gOPD$2({}, '');
2713
1675
  } catch (e) {
2714
- $gOPD = null; // this is IE 8, which has a broken gOPD
1676
+ $gOPD$2 = null; // this is IE 8, which has a broken gOPD
2715
1677
  }
2716
1678
  }
2717
1679
 
2718
- var throwTypeError = function () { throw new $TypeError(); };
2719
- var ThrowTypeError = $gOPD
1680
+ var throwTypeError = function () {
1681
+ throw new $TypeError$5();
1682
+ };
1683
+ var ThrowTypeError = $gOPD$2
2720
1684
  ? (function () {
2721
1685
  try {
2722
1686
  // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
@@ -2725,7 +1689,7 @@ var ThrowTypeError = $gOPD
2725
1689
  } catch (calleeThrows) {
2726
1690
  try {
2727
1691
  // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
2728
- return $gOPD(arguments, 'callee').get;
1692
+ return $gOPD$2(arguments, 'callee').get;
2729
1693
  } catch (gOPDthrows) {
2730
1694
  return throwTypeError;
2731
1695
  }
@@ -2733,206 +1697,354 @@ var ThrowTypeError = $gOPD
2733
1697
  }())
2734
1698
  : throwTypeError;
2735
1699
 
2736
- var hasSymbols$2 = hasSymbols$1();
1700
+ var hasSymbols$2 = hasSymbols$3();
2737
1701
 
2738
1702
  var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
2739
- var generatorFunction = undefined$1;
2740
- var asyncFunction = undefined$1;
2741
- var asyncGenFunction = undefined$1;
1703
+
1704
+ var needsEval = {};
2742
1705
 
2743
1706
  var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
2744
1707
 
2745
1708
  var INTRINSICS = {
1709
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
2746
1710
  '%Array%': Array,
2747
1711
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
2748
- '%ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer.prototype,
2749
1712
  '%ArrayIteratorPrototype%': hasSymbols$2 ? getProto([][Symbol.iterator]()) : undefined$1,
2750
- '%ArrayPrototype%': Array.prototype,
2751
- '%ArrayProto_entries%': Array.prototype.entries,
2752
- '%ArrayProto_forEach%': Array.prototype.forEach,
2753
- '%ArrayProto_keys%': Array.prototype.keys,
2754
- '%ArrayProto_values%': Array.prototype.values,
2755
1713
  '%AsyncFromSyncIteratorPrototype%': undefined$1,
2756
- '%AsyncFunction%': asyncFunction,
2757
- '%AsyncFunctionPrototype%': undefined$1,
2758
- '%AsyncGenerator%': undefined$1,
2759
- '%AsyncGeneratorFunction%': asyncGenFunction,
2760
- '%AsyncGeneratorPrototype%': undefined$1,
2761
- '%AsyncIteratorPrototype%': undefined$1,
1714
+ '%AsyncFunction%': needsEval,
1715
+ '%AsyncGenerator%': needsEval,
1716
+ '%AsyncGeneratorFunction%': needsEval,
1717
+ '%AsyncIteratorPrototype%': needsEval,
2762
1718
  '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
1719
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
2763
1720
  '%Boolean%': Boolean,
2764
- '%BooleanPrototype%': Boolean.prototype,
2765
1721
  '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
2766
- '%DataViewPrototype%': typeof DataView === 'undefined' ? undefined$1 : DataView.prototype,
2767
1722
  '%Date%': Date,
2768
- '%DatePrototype%': Date.prototype,
2769
1723
  '%decodeURI%': decodeURI,
2770
1724
  '%decodeURIComponent%': decodeURIComponent,
2771
1725
  '%encodeURI%': encodeURI,
2772
1726
  '%encodeURIComponent%': encodeURIComponent,
2773
1727
  '%Error%': Error,
2774
- '%ErrorPrototype%': Error.prototype,
2775
1728
  '%eval%': eval, // eslint-disable-line no-eval
2776
1729
  '%EvalError%': EvalError,
2777
- '%EvalErrorPrototype%': EvalError.prototype,
2778
1730
  '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
2779
- '%Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array.prototype,
2780
1731
  '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
2781
- '%Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array.prototype,
2782
- '%Function%': Function,
2783
- '%FunctionPrototype%': Function.prototype,
2784
- '%Generator%': undefined$1,
2785
- '%GeneratorFunction%': generatorFunction,
2786
- '%GeneratorPrototype%': undefined$1,
1732
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
1733
+ '%Function%': $Function,
1734
+ '%GeneratorFunction%': needsEval,
2787
1735
  '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
2788
- '%Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array.prototype,
2789
1736
  '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
2790
- '%Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined$1 : Int8Array.prototype,
2791
1737
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
2792
- '%Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array.prototype,
2793
1738
  '%isFinite%': isFinite,
2794
1739
  '%isNaN%': isNaN,
2795
1740
  '%IteratorPrototype%': hasSymbols$2 ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
2796
1741
  '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
2797
- '%JSONParse%': typeof JSON === 'object' ? JSON.parse : undefined$1,
2798
1742
  '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
2799
1743
  '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
2800
- '%MapPrototype%': typeof Map === 'undefined' ? undefined$1 : Map.prototype,
2801
1744
  '%Math%': Math,
2802
1745
  '%Number%': Number,
2803
- '%NumberPrototype%': Number.prototype,
2804
1746
  '%Object%': Object,
2805
- '%ObjectPrototype%': Object.prototype,
2806
- '%ObjProto_toString%': Object.prototype.toString,
2807
- '%ObjProto_valueOf%': Object.prototype.valueOf,
2808
1747
  '%parseFloat%': parseFloat,
2809
1748
  '%parseInt%': parseInt,
2810
1749
  '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
2811
- '%PromisePrototype%': typeof Promise === 'undefined' ? undefined$1 : Promise.prototype,
2812
- '%PromiseProto_then%': typeof Promise === 'undefined' ? undefined$1 : Promise.prototype.then,
2813
- '%Promise_all%': typeof Promise === 'undefined' ? undefined$1 : Promise.all,
2814
- '%Promise_reject%': typeof Promise === 'undefined' ? undefined$1 : Promise.reject,
2815
- '%Promise_resolve%': typeof Promise === 'undefined' ? undefined$1 : Promise.resolve,
2816
1750
  '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
2817
1751
  '%RangeError%': RangeError,
2818
- '%RangeErrorPrototype%': RangeError.prototype,
2819
1752
  '%ReferenceError%': ReferenceError,
2820
- '%ReferenceErrorPrototype%': ReferenceError.prototype,
2821
1753
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
2822
1754
  '%RegExp%': RegExp,
2823
- '%RegExpPrototype%': RegExp.prototype,
2824
1755
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
2825
1756
  '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
2826
- '%SetPrototype%': typeof Set === 'undefined' ? undefined$1 : Set.prototype,
2827
1757
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
2828
- '%SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer.prototype,
2829
1758
  '%String%': String,
2830
1759
  '%StringIteratorPrototype%': hasSymbols$2 ? getProto(''[Symbol.iterator]()) : undefined$1,
2831
- '%StringPrototype%': String.prototype,
2832
1760
  '%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
2833
- '%SymbolPrototype%': hasSymbols$2 ? Symbol.prototype : undefined$1,
2834
- '%SyntaxError%': SyntaxError,
2835
- '%SyntaxErrorPrototype%': SyntaxError.prototype,
1761
+ '%SyntaxError%': $SyntaxError$1,
2836
1762
  '%ThrowTypeError%': ThrowTypeError,
2837
1763
  '%TypedArray%': TypedArray,
2838
- '%TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined$1,
2839
- '%TypeError%': $TypeError,
2840
- '%TypeErrorPrototype%': $TypeError.prototype,
1764
+ '%TypeError%': $TypeError$5,
2841
1765
  '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
2842
- '%Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array.prototype,
2843
1766
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
2844
- '%Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray.prototype,
2845
1767
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
2846
- '%Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array.prototype,
2847
1768
  '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
2848
- '%Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array.prototype,
2849
1769
  '%URIError%': URIError,
2850
- '%URIErrorPrototype%': URIError.prototype,
2851
1770
  '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
2852
- '%WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap.prototype,
2853
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
2854
- '%WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet.prototype
2855
- };
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;
2856
1796
 
1797
+ return value;
1798
+ };
2857
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);
2858
1858
  var $replace = functionBind.call(Function.call, String.prototype.replace);
1859
+ var $strSlice = functionBind.call(Function.call, String.prototype.slice);
2859
1860
 
2860
1861
  /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
2861
1862
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
2862
1863
  var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
2863
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
+ }
2864
1872
  var result = [];
2865
1873
  $replace(string, rePropName, function (match, number, quote, subString) {
2866
- result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : (number || match);
1874
+ result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
2867
1875
  });
2868
1876
  return result;
2869
1877
  };
2870
1878
  /* end adaptation */
2871
1879
 
2872
1880
  var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
2873
- if (!(name in INTRINSICS)) {
2874
- throw new SyntaxError('intrinsic ' + name + ' does not exist!');
1881
+ var intrinsicName = name;
1882
+ var alias;
1883
+ if (src(LEGACY_ALIASES, intrinsicName)) {
1884
+ alias = LEGACY_ALIASES[intrinsicName];
1885
+ intrinsicName = '%' + alias[0] + '%';
2875
1886
  }
2876
1887
 
2877
- // istanbul ignore if // hopefully this is impossible to test :-)
2878
- if (typeof INTRINSICS[name] === 'undefined' && !allowMissing) {
2879
- throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
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
+ };
2880
1902
  }
2881
1903
 
2882
- return INTRINSICS[name];
1904
+ throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
2883
1905
  };
2884
1906
 
2885
- var GetIntrinsic = function GetIntrinsic(name, allowMissing) {
1907
+ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
2886
1908
  if (typeof name !== 'string' || name.length === 0) {
2887
- throw new TypeError('intrinsic name must be a non-empty string');
1909
+ throw new $TypeError$5('intrinsic name must be a non-empty string');
2888
1910
  }
2889
1911
  if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
2890
- throw new TypeError('"allowMissing" argument must be a boolean');
1912
+ throw new $TypeError$5('"allowMissing" argument must be a boolean');
2891
1913
  }
2892
1914
 
2893
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
+ }
2894
1945
 
2895
- var value = getBaseIntrinsic('%' + (parts.length > 0 ? parts[0] : '') + '%', allowMissing);
2896
- for (var i = 1; i < parts.length; i += 1) {
2897
- if (value != null) {
2898
- if ($gOPD && (i + 1) >= parts.length) {
2899
- var desc = $gOPD(value, parts[i]);
2900
- if (!allowMissing && !(parts[i] in value)) {
2901
- throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
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];
2902
1973
  }
2903
- value = desc ? (desc.get || desc.value) : value[parts[i]];
2904
1974
  } else {
2905
- value = value[parts[i]];
1975
+ isOwn = src(value, part);
1976
+ value = value[part];
1977
+ }
1978
+
1979
+ if (isOwn && !skipFurtherCaching) {
1980
+ INTRINSICS[intrinsicRealName] = value;
2906
1981
  }
2907
1982
  }
2908
1983
  }
2909
1984
  return value;
2910
1985
  };
2911
1986
 
2912
- var $Function = GetIntrinsic('%Function%');
2913
- var $apply = $Function.apply;
2914
- var $call = $Function.call;
1987
+ var callBind = _commonjsHelpers.createCommonjsModule(function (module) {
2915
1988
 
2916
- var callBind = function callBind() {
2917
- return functionBind.apply($call, arguments);
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;
2918
2023
  };
2919
2024
 
2920
- var apply = function applyBind() {
2921
- return functionBind.apply($apply, arguments);
2025
+ var applyBind = function applyBind() {
2026
+ return $reflectApply(functionBind, $apply, arguments);
2922
2027
  };
2923
- callBind.apply = apply;
2924
2028
 
2925
- var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
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'));
2926
2038
 
2927
- var callBound = function callBoundIntrinsic(name, allowMissing) {
2928
- var intrinsic = GetIntrinsic(name, !!allowMissing);
2929
- if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.')) {
2039
+ var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
2040
+ var intrinsic = getIntrinsic(name, !!allowMissing);
2041
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
2930
2042
  return callBind(intrinsic);
2931
2043
  }
2932
2044
  return intrinsic;
2933
2045
  };
2934
2046
 
2935
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
2047
+ var $defineProperty = getIntrinsic('%Object.defineProperty%', true);
2936
2048
 
2937
2049
  if ($defineProperty) {
2938
2050
  try {
@@ -2945,7 +2057,7 @@ if ($defineProperty) {
2945
2057
 
2946
2058
 
2947
2059
 
2948
- var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
2060
+ var $isEnumerable$1 = callBound$1('Object.prototype.propertyIsEnumerable');
2949
2061
 
2950
2062
  // eslint-disable-next-line max-params
2951
2063
  var DefineOwnProperty = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {
@@ -2959,7 +2071,7 @@ var DefineOwnProperty = function DefineOwnProperty(IsDataDescriptor, SameValue,
2959
2071
  }
2960
2072
 
2961
2073
  // fallback for ES3
2962
- if (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {
2074
+ if (P in O && $isEnumerable$1(O, P) !== !!desc['[[Enumerable]]']) {
2963
2075
  // a non-enumerable existing property
2964
2076
  return false;
2965
2077
  }
@@ -2974,15 +2086,13 @@ var DefineOwnProperty = function DefineOwnProperty(IsDataDescriptor, SameValue,
2974
2086
  return true;
2975
2087
  };
2976
2088
 
2977
- var src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
2978
-
2979
- var $TypeError$1 = GetIntrinsic('%TypeError%');
2980
- var $SyntaxError = GetIntrinsic('%SyntaxError%');
2089
+ var $TypeError$4 = getIntrinsic('%TypeError%');
2090
+ var $SyntaxError = getIntrinsic('%SyntaxError%');
2981
2091
 
2982
2092
 
2983
2093
 
2984
2094
  var predicates = {
2985
- // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type
2095
+ // https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type
2986
2096
  'Property Descriptor': function isPropertyDescriptor(Type, Desc) {
2987
2097
  if (Type(Desc) !== 'Object') {
2988
2098
  return false;
@@ -3005,7 +2115,7 @@ var predicates = {
3005
2115
  var isData = src(Desc, '[[Value]]');
3006
2116
  var IsAccessor = src(Desc, '[[Get]]') || src(Desc, '[[Set]]');
3007
2117
  if (isData && IsAccessor) {
3008
- throw new $TypeError$1('Property Descriptors may not be both accessor and data descriptors');
2118
+ throw new $TypeError$4('Property Descriptors may not be both accessor and data descriptors');
3009
2119
  }
3010
2120
  return true;
3011
2121
  }
@@ -3017,13 +2127,13 @@ var assertRecord = function assertRecord(Type, recordType, argumentName, value)
3017
2127
  throw new $SyntaxError('unknown record type: ' + recordType);
3018
2128
  }
3019
2129
  if (!predicate(Type, value)) {
3020
- throw new $TypeError$1(argumentName + ' must be a ' + recordType);
2130
+ throw new $TypeError$4(argumentName + ' must be a ' + recordType);
3021
2131
  }
3022
2132
  };
3023
2133
 
3024
- // https://www.ecma-international.org/ecma-262/5.1/#sec-8
2134
+ // https://262.ecma-international.org/5.1/#sec-8
3025
2135
 
3026
- var Type = function Type(x) {
2136
+ var Type$1 = function Type(x) {
3027
2137
  if (x === null) {
3028
2138
  return 'Null';
3029
2139
  }
@@ -3044,23 +2154,26 @@ var Type = function Type(x) {
3044
2154
  }
3045
2155
  };
3046
2156
 
3047
- // https://www.ecma-international.org/ecma-262/6.0/#sec-tostring
2157
+ // https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values
3048
2158
 
3049
- var Type$1 = function Type$1(x) {
2159
+ var Type = function Type(x) {
3050
2160
  if (typeof x === 'symbol') {
3051
2161
  return 'Symbol';
3052
2162
  }
3053
- return Type(x);
2163
+ if (typeof x === 'bigint') {
2164
+ return 'BigInt';
2165
+ }
2166
+ return Type$1(x);
3054
2167
  };
3055
2168
 
3056
- // https://www.ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor
2169
+ // https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor
3057
2170
 
3058
2171
  var FromPropertyDescriptor = function FromPropertyDescriptor(Desc) {
3059
2172
  if (typeof Desc === 'undefined') {
3060
2173
  return Desc;
3061
2174
  }
3062
2175
 
3063
- assertRecord(Type$1, 'Property Descriptor', 'Desc', Desc);
2176
+ assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
3064
2177
 
3065
2178
  var obj = {};
3066
2179
  if ('[[Value]]' in Desc) {
@@ -3084,7 +2197,7 @@ var FromPropertyDescriptor = function FromPropertyDescriptor(Desc) {
3084
2197
  return obj;
3085
2198
  };
3086
2199
 
3087
- var $gOPD$1 = GetIntrinsic('%Object.getOwnPropertyDescriptor%');
2200
+ var $gOPD$1 = getIntrinsic('%Object.getOwnPropertyDescriptor%');
3088
2201
  if ($gOPD$1) {
3089
2202
  try {
3090
2203
  $gOPD$1([], 'length');
@@ -3096,65 +2209,85 @@ if ($gOPD$1) {
3096
2209
 
3097
2210
  var getOwnPropertyDescriptor = $gOPD$1;
3098
2211
 
3099
- var $Array = GetIntrinsic('%Array%');
2212
+ var $Array = getIntrinsic('%Array%');
3100
2213
 
3101
2214
  // eslint-disable-next-line global-require
3102
- var toStr$4 = !$Array.isArray && callBound('Object.prototype.toString');
2215
+ var toStr$1 = !$Array.isArray && callBound$1('Object.prototype.toString');
3103
2216
 
3104
- // https://www.ecma-international.org/ecma-262/6.0/#sec-isarray
2217
+ // https://ecma-international.org/ecma-262/6.0/#sec-isarray
3105
2218
 
3106
2219
  var IsArray = $Array.isArray || function IsArray(argument) {
3107
- return toStr$4(argument) === '[object Array]';
2220
+ return toStr$1(argument) === '[object Array]';
3108
2221
  };
3109
2222
 
3110
- // https://www.ecma-international.org/ecma-262/6.0/#sec-ispropertykey
2223
+ // https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey
3111
2224
 
3112
2225
  var IsPropertyKey = function IsPropertyKey(argument) {
3113
2226
  return typeof argument === 'string' || typeof argument === 'symbol';
3114
2227
  };
3115
2228
 
3116
- var regexExec = RegExp.prototype.exec;
3117
- var gOPD = Object.getOwnPropertyDescriptor;
2229
+ var hasSymbols$1 = hasSymbols$3();
2230
+ var hasToStringTag$1 = hasSymbols$1 && typeof Symbol.toStringTag === 'symbol';
2231
+ var has;
2232
+ var $exec;
2233
+ var isRegexMarker;
2234
+ var badStringifier;
3118
2235
 
3119
- var tryRegexExecCall = function tryRegexExec(value) {
3120
- try {
3121
- var lastIndex = value.lastIndex;
3122
- value.lastIndex = 0; // eslint-disable-line no-param-reassign
2236
+ if (hasToStringTag$1) {
2237
+ has = callBound$1('Object.prototype.hasOwnProperty');
2238
+ $exec = callBound$1('RegExp.prototype.exec');
2239
+ isRegexMarker = {};
3123
2240
 
3124
- regexExec.call(value);
3125
- return true;
3126
- } catch (e) {
3127
- return false;
3128
- } finally {
3129
- value.lastIndex = lastIndex; // eslint-disable-line no-param-reassign
2241
+ var throwRegexMarker = function () {
2242
+ throw isRegexMarker;
2243
+ };
2244
+ badStringifier = {
2245
+ toString: throwRegexMarker,
2246
+ valueOf: throwRegexMarker
2247
+ };
2248
+
2249
+ if (typeof Symbol.toPrimitive === 'symbol') {
2250
+ badStringifier[Symbol.toPrimitive] = throwRegexMarker;
3130
2251
  }
3131
- };
3132
- var toStr$5 = Object.prototype.toString;
2252
+ }
2253
+
2254
+ var $toString = callBound$1('Object.prototype.toString');
2255
+ var gOPD = Object.getOwnPropertyDescriptor;
3133
2256
  var regexClass = '[object RegExp]';
3134
- var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
3135
2257
 
3136
- var isRegex = function isRegex(value) {
3137
- if (!value || typeof value !== 'object') {
3138
- return false;
3139
- }
3140
- if (!hasToStringTag) {
3141
- return toStr$5.call(value) === regexClass;
3142
- }
2258
+ var isRegex = hasToStringTag$1
2259
+ // eslint-disable-next-line consistent-return
2260
+ ? function isRegex(value) {
2261
+ if (!value || typeof value !== 'object') {
2262
+ return false;
2263
+ }
3143
2264
 
3144
- var descriptor = gOPD(value, 'lastIndex');
3145
- var hasLastIndexDataProperty = descriptor && src(descriptor, 'value');
3146
- if (!hasLastIndexDataProperty) {
3147
- return false;
2265
+ var descriptor = gOPD(value, 'lastIndex');
2266
+ var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
2267
+ if (!hasLastIndexDataProperty) {
2268
+ return false;
2269
+ }
2270
+
2271
+ try {
2272
+ $exec(value, badStringifier);
2273
+ } catch (e) {
2274
+ return e === isRegexMarker;
2275
+ }
3148
2276
  }
2277
+ : function isRegex(value) {
2278
+ // In older browsers, typeof regex incorrectly returns 'function'
2279
+ if (!value || (typeof value !== 'object' && typeof value !== 'function')) {
2280
+ return false;
2281
+ }
3149
2282
 
3150
- return tryRegexExecCall(value);
3151
- };
2283
+ return $toString(value) === regexClass;
2284
+ };
3152
2285
 
3153
- // http://www.ecma-international.org/ecma-262/5.1/#sec-9.2
2286
+ // http://262.ecma-international.org/5.1/#sec-9.2
3154
2287
 
3155
2288
  var ToBoolean = function ToBoolean(value) { return !!value; };
3156
2289
 
3157
- var $match = GetIntrinsic('%Symbol.match%', true);
2290
+ var $match = getIntrinsic('%Symbol.match%', true);
3158
2291
 
3159
2292
 
3160
2293
 
@@ -3176,6 +2309,27 @@ var IsRegExp = function IsRegExp(argument) {
3176
2309
  };
3177
2310
 
3178
2311
  var fnToStr = Function.prototype.toString;
2312
+ var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;
2313
+ var badArrayLike;
2314
+ var isCallableMarker;
2315
+ if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {
2316
+ try {
2317
+ badArrayLike = Object.defineProperty({}, 'length', {
2318
+ get: function () {
2319
+ throw isCallableMarker;
2320
+ }
2321
+ });
2322
+ isCallableMarker = {};
2323
+ // eslint-disable-next-line no-throw-literal
2324
+ reflectApply(function () { throw 42; }, null, badArrayLike);
2325
+ } catch (_) {
2326
+ if (_ !== isCallableMarker) {
2327
+ reflectApply = null;
2328
+ }
2329
+ }
2330
+ } else {
2331
+ reflectApply = null;
2332
+ }
3179
2333
 
3180
2334
  var constructorRegex = /^\s*class\b/;
3181
2335
  var isES6ClassFn = function isES6ClassFunction(value) {
@@ -3196,36 +2350,52 @@ var tryFunctionObject = function tryFunctionToStr(value) {
3196
2350
  return false;
3197
2351
  }
3198
2352
  };
3199
- var toStr$6 = Object.prototype.toString;
2353
+ var toStr = Object.prototype.toString;
3200
2354
  var fnClass = '[object Function]';
3201
2355
  var genClass = '[object GeneratorFunction]';
3202
- var hasToStringTag$1 = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
3203
-
3204
- var isCallable = function isCallable(value) {
3205
- if (!value) { return false; }
3206
- if (typeof value !== 'function' && typeof value !== 'object') { return false; }
3207
- if (typeof value === 'function' && !value.prototype) { return true; }
3208
- if (hasToStringTag$1) { return tryFunctionObject(value); }
3209
- if (isES6ClassFn(value)) { return false; }
3210
- var strClass = toStr$6.call(value);
3211
- return strClass === fnClass || strClass === genClass;
3212
- };
2356
+ var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
2357
+ /* globals document: false */
2358
+ var documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {};
2359
+
2360
+ var isCallable = reflectApply
2361
+ ? function isCallable(value) {
2362
+ if (value === documentDotAll) { return true; }
2363
+ if (!value) { return false; }
2364
+ if (typeof value !== 'function' && typeof value !== 'object') { return false; }
2365
+ if (typeof value === 'function' && !value.prototype) { return true; }
2366
+ try {
2367
+ reflectApply(value, null, badArrayLike);
2368
+ } catch (e) {
2369
+ if (e !== isCallableMarker) { return false; }
2370
+ }
2371
+ return !isES6ClassFn(value);
2372
+ }
2373
+ : function isCallable(value) {
2374
+ if (value === documentDotAll) { return true; }
2375
+ if (!value) { return false; }
2376
+ if (typeof value !== 'function' && typeof value !== 'object') { return false; }
2377
+ if (typeof value === 'function' && !value.prototype) { return true; }
2378
+ if (hasToStringTag) { return tryFunctionObject(value); }
2379
+ if (isES6ClassFn(value)) { return false; }
2380
+ var strClass = toStr.call(value);
2381
+ return strClass === fnClass || strClass === genClass;
2382
+ };
3213
2383
 
3214
- // http://www.ecma-international.org/ecma-262/5.1/#sec-9.11
2384
+ // http://262.ecma-international.org/5.1/#sec-9.11
3215
2385
 
3216
2386
  var IsCallable = isCallable;
3217
2387
 
3218
- var $TypeError$2 = GetIntrinsic('%TypeError%');
2388
+ var $TypeError$3 = getIntrinsic('%TypeError%');
3219
2389
 
3220
2390
 
3221
2391
 
3222
2392
 
3223
2393
 
3224
- // https://ecma-international.org/ecma-262/5.1/#sec-8.10.5
2394
+ // https://262.ecma-international.org/5.1/#sec-8.10.5
3225
2395
 
3226
2396
  var ToPropertyDescriptor = function ToPropertyDescriptor(Obj) {
3227
- if (Type$1(Obj) !== 'Object') {
3228
- throw new $TypeError$2('ToPropertyDescriptor requires an object');
2397
+ if (Type(Obj) !== 'Object') {
2398
+ throw new $TypeError$3('ToPropertyDescriptor requires an object');
3229
2399
  }
3230
2400
 
3231
2401
  var desc = {};
@@ -3244,29 +2414,29 @@ var ToPropertyDescriptor = function ToPropertyDescriptor(Obj) {
3244
2414
  if (src(Obj, 'get')) {
3245
2415
  var getter = Obj.get;
3246
2416
  if (typeof getter !== 'undefined' && !IsCallable(getter)) {
3247
- throw new TypeError('getter must be a function');
2417
+ throw new $TypeError$3('getter must be a function');
3248
2418
  }
3249
2419
  desc['[[Get]]'] = getter;
3250
2420
  }
3251
2421
  if (src(Obj, 'set')) {
3252
2422
  var setter = Obj.set;
3253
2423
  if (typeof setter !== 'undefined' && !IsCallable(setter)) {
3254
- throw new $TypeError$2('setter must be a function');
2424
+ throw new $TypeError$3('setter must be a function');
3255
2425
  }
3256
2426
  desc['[[Set]]'] = setter;
3257
2427
  }
3258
2428
 
3259
2429
  if ((src(desc, '[[Get]]') || src(desc, '[[Set]]')) && (src(desc, '[[Value]]') || src(desc, '[[Writable]]'))) {
3260
- throw new $TypeError$2('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
2430
+ throw new $TypeError$3('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
3261
2431
  }
3262
2432
  return desc;
3263
2433
  };
3264
2434
 
3265
- var $TypeError$3 = GetIntrinsic('%TypeError%');
2435
+ var $TypeError$2 = getIntrinsic('%TypeError%');
3266
2436
 
3267
2437
 
3268
2438
 
3269
- var $isEnumerable$1 = callBound('Object.prototype.propertyIsEnumerable');
2439
+ var $isEnumerable = callBound$1('Object.prototype.propertyIsEnumerable');
3270
2440
 
3271
2441
 
3272
2442
 
@@ -3276,14 +2446,14 @@ var $isEnumerable$1 = callBound('Object.prototype.propertyIsEnumerable');
3276
2446
 
3277
2447
 
3278
2448
 
3279
- // https://www.ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty
2449
+ // https://ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty
3280
2450
 
3281
2451
  var OrdinaryGetOwnProperty = function OrdinaryGetOwnProperty(O, P) {
3282
- if (Type$1(O) !== 'Object') {
3283
- throw new $TypeError$3('Assertion failed: O must be an Object');
2452
+ if (Type(O) !== 'Object') {
2453
+ throw new $TypeError$2('Assertion failed: O must be an Object');
3284
2454
  }
3285
2455
  if (!IsPropertyKey(P)) {
3286
- throw new $TypeError$3('Assertion failed: P must be a Property Key');
2456
+ throw new $TypeError$2('Assertion failed: P must be a Property Key');
3287
2457
  }
3288
2458
  if (!src(O, P)) {
3289
2459
  return void 0;
@@ -3294,7 +2464,7 @@ var OrdinaryGetOwnProperty = function OrdinaryGetOwnProperty(O, P) {
3294
2464
  var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
3295
2465
  return {
3296
2466
  '[[Configurable]]': !(arrayLength || regexLastIndex),
3297
- '[[Enumerable]]': $isEnumerable$1(O, P),
2467
+ '[[Enumerable]]': $isEnumerable(O, P),
3298
2468
  '[[Value]]': O[P],
3299
2469
  '[[Writable]]': true
3300
2470
  };
@@ -3302,14 +2472,14 @@ var OrdinaryGetOwnProperty = function OrdinaryGetOwnProperty(O, P) {
3302
2472
  return ToPropertyDescriptor(getOwnPropertyDescriptor(O, P));
3303
2473
  };
3304
2474
 
3305
- // https://www.ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor
2475
+ // https://ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor
3306
2476
 
3307
2477
  var IsDataDescriptor = function IsDataDescriptor(Desc) {
3308
2478
  if (typeof Desc === 'undefined') {
3309
2479
  return false;
3310
2480
  }
3311
2481
 
3312
- assertRecord(Type$1, 'Property Descriptor', 'Desc', Desc);
2482
+ assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
3313
2483
 
3314
2484
  if (!src(Desc, '[[Value]]') && !src(Desc, '[[Writable]]')) {
3315
2485
  return false;
@@ -3322,14 +2492,14 @@ var isPrimitive = function isPrimitive(value) {
3322
2492
  return value === null || (typeof value !== 'function' && typeof value !== 'object');
3323
2493
  };
3324
2494
 
3325
- var $Object = GetIntrinsic('%Object%');
2495
+ var $Object$1 = getIntrinsic('%Object%');
3326
2496
 
3327
2497
 
3328
2498
 
3329
- var $preventExtensions = $Object.preventExtensions;
3330
- var $isExtensible = $Object.isExtensible;
2499
+ var $preventExtensions = $Object$1.preventExtensions;
2500
+ var $isExtensible = $Object$1.isExtensible;
3331
2501
 
3332
- // https://www.ecma-international.org/ecma-262/6.0/#sec-isextensible-o
2502
+ // https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o
3333
2503
 
3334
2504
  var IsExtensible = $preventExtensions
3335
2505
  ? function IsExtensible(obj) {
@@ -3343,7 +2513,7 @@ var _isNaN = Number.isNaN || function isNaN(a) {
3343
2513
  return a !== a;
3344
2514
  };
3345
2515
 
3346
- // http://www.ecma-international.org/ecma-262/5.1/#sec-9.12
2516
+ // http://262.ecma-international.org/5.1/#sec-9.12
3347
2517
 
3348
2518
  var SameValue = function SameValue(x, y) {
3349
2519
  if (x === y) { // 0 === -0, but they are not identical.
@@ -3353,7 +2523,7 @@ var SameValue = function SameValue(x, y) {
3353
2523
  return _isNaN(x) && _isNaN(y);
3354
2524
  };
3355
2525
 
3356
- var $TypeError$4 = GetIntrinsic('%TypeError%');
2526
+ var $TypeError$1 = getIntrinsic('%TypeError%');
3357
2527
 
3358
2528
 
3359
2529
 
@@ -3365,18 +2535,18 @@ var $TypeError$4 = GetIntrinsic('%TypeError%');
3365
2535
 
3366
2536
 
3367
2537
 
3368
- // https://www.ecma-international.org/ecma-262/6.0/#sec-createdataproperty
2538
+ // https://ecma-international.org/ecma-262/6.0/#sec-createdataproperty
3369
2539
 
3370
2540
  var CreateDataProperty = function CreateDataProperty(O, P, V) {
3371
- if (Type$1(O) !== 'Object') {
3372
- throw new $TypeError$4('Assertion failed: Type(O) is not Object');
2541
+ if (Type(O) !== 'Object') {
2542
+ throw new $TypeError$1('Assertion failed: Type(O) is not Object');
3373
2543
  }
3374
2544
  if (!IsPropertyKey(P)) {
3375
- throw new $TypeError$4('Assertion failed: IsPropertyKey(P) is not true');
2545
+ throw new $TypeError$1('Assertion failed: IsPropertyKey(P) is not true');
3376
2546
  }
3377
2547
  var oldDesc = OrdinaryGetOwnProperty(O, P);
3378
- var extensible = oldDesc || IsExtensible(O);
3379
- var immutable = oldDesc && (!oldDesc.writable || !oldDesc.configurable);
2548
+ var extensible = !oldDesc || IsExtensible(O);
2549
+ var immutable = oldDesc && (!oldDesc['[[Writable]]'] || !oldDesc['[[Configurable]]']);
3380
2550
  if (immutable || !extensible) {
3381
2551
  return false;
3382
2552
  }
@@ -3395,44 +2565,44 @@ var CreateDataProperty = function CreateDataProperty(O, P, V) {
3395
2565
  );
3396
2566
  };
3397
2567
 
3398
- var $TypeError$5 = GetIntrinsic('%TypeError%');
2568
+ var $TypeError = getIntrinsic('%TypeError%');
3399
2569
 
3400
- // http://www.ecma-international.org/ecma-262/5.1/#sec-9.10
2570
+ // http://262.ecma-international.org/5.1/#sec-9.10
3401
2571
 
3402
2572
  var CheckObjectCoercible = function CheckObjectCoercible(value, optMessage) {
3403
2573
  if (value == null) {
3404
- throw new $TypeError$5(optMessage || ('Cannot call method on ' + value));
2574
+ throw new $TypeError(optMessage || ('Cannot call method on ' + value));
3405
2575
  }
3406
2576
  return value;
3407
2577
  };
3408
2578
 
3409
2579
  var RequireObjectCoercible = CheckObjectCoercible;
3410
2580
 
3411
- var $Object$1 = GetIntrinsic('%Object%');
2581
+ var $Object = getIntrinsic('%Object%');
3412
2582
 
3413
2583
 
3414
2584
 
3415
- // https://www.ecma-international.org/ecma-262/6.0/#sec-toobject
2585
+ // https://ecma-international.org/ecma-262/6.0/#sec-toobject
3416
2586
 
3417
2587
  var ToObject = function ToObject(value) {
3418
2588
  RequireObjectCoercible(value);
3419
- return $Object$1(value);
2589
+ return $Object(value);
3420
2590
  };
3421
2591
 
3422
- var $gOPD$2 = Object.getOwnPropertyDescriptor;
2592
+ var $gOPD = Object.getOwnPropertyDescriptor;
3423
2593
  var $getOwnNames = Object.getOwnPropertyNames;
3424
2594
  var $getSymbols = Object.getOwnPropertySymbols;
3425
- var $concat = callBound('Array.prototype.concat');
3426
- var $reduce = callBound('Array.prototype.reduce');
2595
+ var $concat$1 = callBound$1('Array.prototype.concat');
2596
+ var $reduce = callBound$1('Array.prototype.reduce');
3427
2597
  var getAll = $getSymbols ? function (obj) {
3428
- return $concat($getOwnNames(obj), $getSymbols(obj));
2598
+ return $concat$1($getOwnNames(obj), $getSymbols(obj));
3429
2599
  } : $getOwnNames;
3430
2600
 
3431
- var isES5 = IsCallable($gOPD$2) && IsCallable($getOwnNames);
2601
+ var isES5$1 = IsCallable($gOPD) && IsCallable($getOwnNames);
3432
2602
 
3433
- var implementation$2 = function getOwnPropertyDescriptors(value) {
2603
+ var implementation$1 = function getOwnPropertyDescriptors(value) {
3434
2604
  RequireObjectCoercible(value);
3435
- if (!isES5) {
2605
+ if (!isES5$1) {
3436
2606
  throw new TypeError('getOwnPropertyDescriptors requires Object.getOwnPropertyDescriptor');
3437
2607
  }
3438
2608
 
@@ -3440,7 +2610,7 @@ var implementation$2 = function getOwnPropertyDescriptors(value) {
3440
2610
  return $reduce(
3441
2611
  getAll(O),
3442
2612
  function (acc, key) {
3443
- var descriptor = $gOPD$2(O, key);
2613
+ var descriptor = $gOPD(O, key);
3444
2614
  if (typeof descriptor !== 'undefined') {
3445
2615
  CreateDataProperty(acc, key, descriptor);
3446
2616
  }
@@ -3450,34 +2620,40 @@ var implementation$2 = function getOwnPropertyDescriptors(value) {
3450
2620
  );
3451
2621
  };
3452
2622
 
3453
- var polyfill = function getPolyfill() {
3454
- return typeof Object.getOwnPropertyDescriptors === 'function' ? Object.getOwnPropertyDescriptors : implementation$2;
2623
+ var polyfill$2 = function getPolyfill() {
2624
+ return typeof Object.getOwnPropertyDescriptors === 'function' ? Object.getOwnPropertyDescriptors : implementation$1;
3455
2625
  };
3456
2626
 
3457
- var shim = function shimGetOwnPropertyDescriptors() {
3458
- var polyfill$1 = polyfill();
2627
+ var shim$1 = function shimGetOwnPropertyDescriptors() {
2628
+ var polyfill = polyfill$2();
3459
2629
  defineProperties_1(
3460
2630
  Object,
3461
- { getOwnPropertyDescriptors: polyfill$1 },
3462
- { getOwnPropertyDescriptors: function () { return Object.getOwnPropertyDescriptors !== polyfill$1; } }
2631
+ { getOwnPropertyDescriptors: polyfill },
2632
+ { getOwnPropertyDescriptors: function () { return Object.getOwnPropertyDescriptors !== polyfill; } }
3463
2633
  );
3464
- return polyfill$1;
2634
+ return polyfill;
3465
2635
  };
3466
2636
 
3467
- defineProperties_1(implementation$2, {
3468
- getPolyfill: polyfill,
3469
- implementation: implementation$2,
3470
- shim: shim
2637
+ var bound = callBind(polyfill$2(), Object);
2638
+
2639
+ defineProperties_1(bound, {
2640
+ getPolyfill: polyfill$2,
2641
+ implementation: implementation$1,
2642
+ shim: shim$1
3471
2643
  });
3472
2644
 
3473
- var object_getownpropertydescriptors = implementation$2;
2645
+ var object_getownpropertydescriptors = bound;
3474
2646
 
3475
- var isES5$1 = typeof Object.defineProperty === 'function'
2647
+ // TODO; semver-major: remove
2648
+
2649
+ var callBound = callBound$1;
2650
+
2651
+ var isES5 = typeof Object.defineProperty === 'function'
3476
2652
  && typeof Object.defineProperties === 'function';
3477
2653
 
3478
2654
  var hasProto = [].__proto__ === Array.prototype; // eslint-disable-line no-proto
3479
2655
 
3480
- if (!isES5$1 || !hasProto) {
2656
+ if (!isES5 || !hasProto) {
3481
2657
  throw new TypeError('util.promisify requires a true ES5 environment, that also supports `__proto__`');
3482
2658
  }
3483
2659
 
@@ -3490,15 +2666,15 @@ if (typeof Promise !== 'function') {
3490
2666
 
3491
2667
 
3492
2668
  var $slice = callBound('Array.prototype.slice');
3493
- var $concat$1 = callBound('Array.prototype.concat');
2669
+ var $concat = callBound('Array.prototype.concat');
3494
2670
  var $forEach = callBound('Array.prototype.forEach');
3495
2671
 
3496
- var hasSymbols$3 = hasSymbols$1();
2672
+ var hasSymbols = hasSymbols$3();
3497
2673
 
3498
- var kCustomPromisifiedSymbol = hasSymbols$3 ? Symbol('util.promisify.custom') : null;
3499
- var kCustomPromisifyArgsSymbol = hasSymbols$3 ? Symbol('customPromisifyArgs') : null;
2674
+ var kCustomPromisifiedSymbol = hasSymbols ? Symbol('util.promisify.custom') : null;
2675
+ var kCustomPromisifyArgsSymbol = hasSymbols ? Symbol('customPromisifyArgs') : null;
3500
2676
 
3501
- var implementation$3 = function promisify(orig) {
2677
+ var implementation = function promisify(orig) {
3502
2678
  if (typeof orig !== 'function') {
3503
2679
  var error = new TypeError('The "original" argument must be of type function');
3504
2680
  error.name = 'TypeError [ERR_INVALID_ARG_TYPE]';
@@ -3506,7 +2682,7 @@ var implementation$3 = function promisify(orig) {
3506
2682
  throw error;
3507
2683
  }
3508
2684
 
3509
- if (hasSymbols$3 && orig[kCustomPromisifiedSymbol]) {
2685
+ if (hasSymbols && orig[kCustomPromisifiedSymbol]) {
3510
2686
  var customFunction = orig[kCustomPromisifiedSymbol];
3511
2687
  if (typeof customFunction !== 'function') {
3512
2688
  throw new TypeError('The [util.promisify.custom] property must be a function');
@@ -3528,7 +2704,7 @@ var implementation$3 = function promisify(orig) {
3528
2704
  var args = $slice(arguments);
3529
2705
  var self = this; // eslint-disable-line no-invalid-this
3530
2706
  return new Promise(function (resolve, reject) {
3531
- orig.apply(self, $concat$1(args, function (err) {
2707
+ orig.apply(self, $concat(args, function (err) {
3532
2708
  var values = arguments.length > 1 ? $slice(arguments, 1) : [];
3533
2709
  if (err) {
3534
2710
  reject(err);
@@ -3558,17 +2734,17 @@ var implementation$3 = function promisify(orig) {
3558
2734
 
3559
2735
  var custom = kCustomPromisifiedSymbol;
3560
2736
  var customPromisifyArgs = kCustomPromisifyArgsSymbol;
3561
- implementation$3.custom = custom;
3562
- implementation$3.customPromisifyArgs = customPromisifyArgs;
2737
+ implementation.custom = custom;
2738
+ implementation.customPromisifyArgs = customPromisifyArgs;
3563
2739
 
3564
2740
  var polyfill$1 = function getPolyfill() {
3565
2741
  if (typeof util.util.promisify === 'function') {
3566
2742
  return util.util.promisify;
3567
2743
  }
3568
- return implementation$3;
2744
+ return implementation;
3569
2745
  };
3570
2746
 
3571
- var shim$1 = function shimUtilPromisify() {
2747
+ var shim = function shimUtilPromisify() {
3572
2748
  var polyfill = polyfill$1();
3573
2749
  if (polyfill !== util.util.promisify) {
3574
2750
  Object.defineProperty(util.util, 'promisify', {
@@ -3581,20 +2757,20 @@ var shim$1 = function shimUtilPromisify() {
3581
2757
  return polyfill;
3582
2758
  };
3583
2759
 
3584
- var polyfill$2 = polyfill$1();
2760
+ var polyfill = polyfill$1();
3585
2761
 
3586
2762
 
3587
2763
  /* eslint-disable no-unused-vars */
3588
2764
  var boundPromisify = function promisify(orig) {
3589
2765
  /* eslint-enable no-unused-vars */
3590
- return polyfill$2.apply(util.util, arguments);
2766
+ return polyfill.apply(util.util, arguments);
3591
2767
  };
3592
2768
  defineProperties_1(boundPromisify, {
3593
- custom: polyfill$2.custom,
3594
- customPromisifyArgs: polyfill$2.customPromisifyArgs,
2769
+ custom: polyfill.custom,
2770
+ customPromisifyArgs: polyfill.customPromisifyArgs,
3595
2771
  getPolyfill: polyfill$1,
3596
- implementation: implementation$3,
3597
- shim: shim$1
2772
+ implementation: implementation,
2773
+ shim: shim
3598
2774
  });
3599
2775
 
3600
2776
  var util_promisify = boundPromisify;
@@ -3613,7 +2789,7 @@ function connect() {
3613
2789
  };
3614
2790
  }
3615
2791
 
3616
- var connection = mysql.createConnection(config);
2792
+ var connection = mysql__default['default'].createConnection(config);
3617
2793
  return {
3618
2794
  query: function query(sql, args) {
3619
2795
  return util.util.promisify(connection.query).call(connection, sql, args);
@@ -3635,16 +2811,16 @@ function connect() {
3635
2811
 
3636
2812
  var db = connect;
3637
2813
 
3638
- var _this$3 = undefined;
2814
+ var _this$1 = undefined;
3639
2815
 
3640
- var config = {
2816
+ var config$1 = {
3641
2817
  host: 'sanity-datasource.cluster-crao688bsrdh.us-east-1.rds.amazonaws.com',
3642
2818
  user: 'nasp',
3643
2819
  password: 'uRNkF9SkfXQs6AKK',
3644
2820
  database: 'user'
3645
2821
  };
3646
2822
 
3647
- var findUser = function () {
2823
+ var findUser$1 = function () {
3648
2824
  var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(email) {
3649
2825
  var password = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
3650
2826
  var db$1, query, res, user, hash, passwordsMatch, user_shared, occupation_id;
@@ -3656,7 +2832,7 @@ var findUser = function () {
3656
2832
  _context.prev = 1;
3657
2833
 
3658
2834
 
3659
- db$1 = db(config);
2835
+ db$1 = db(config$1);
3660
2836
 
3661
2837
  query = '\n select * \n from user \n where trim(lower(email)) = ?\n ';
3662
2838
  _context.next = 6;
@@ -3752,7 +2928,7 @@ var findUser = function () {
3752
2928
  };
3753
2929
  }();
3754
2930
 
3755
- var updateUser = function () {
2931
+ var updateUser$1 = function () {
3756
2932
  var _ref2 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee2(data) {
3757
2933
  var db$1, query, res, hash, columns, i, column, occupation_name;
3758
2934
  return asyncToGenerator.regenerator.wrap(function _callee2$(_context2) {
@@ -3765,7 +2941,7 @@ var updateUser = function () {
3765
2941
 
3766
2942
  validateUserData(data);
3767
2943
 
3768
- db$1 = db(config);
2944
+ db$1 = db(config$1);
3769
2945
 
3770
2946
  _context2.next = 6;
3771
2947
  return db$1.beginTransaction();
@@ -3872,7 +3048,7 @@ var updateUser = function () {
3872
3048
 
3873
3049
  return _context2.abrupt('return', {
3874
3050
  error: '',
3875
- user: findUser(data.email)
3051
+ user: findUser$1(data.email)
3876
3052
  });
3877
3053
 
3878
3054
  case 45:
@@ -3984,7 +3160,7 @@ var getOccupationNameById = function () {
3984
3160
  return _context3.stop();
3985
3161
  }
3986
3162
  }
3987
- }, _callee3, _this$3);
3163
+ }, _callee3, _this$1);
3988
3164
  }));
3989
3165
 
3990
3166
  return function getOccupationNameById(_x5, _x6) {
@@ -3992,7 +3168,7 @@ var getOccupationNameById = function () {
3992
3168
  };
3993
3169
  }();
3994
3170
 
3995
- var createUser = function () {
3171
+ var createUser$1 = function () {
3996
3172
  var _ref4 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee4(data) {
3997
3173
  var db$1, query, res, hash, columns, i, column, user_id, occupation_name;
3998
3174
  return asyncToGenerator.regenerator.wrap(function _callee4$(_context4) {
@@ -4005,7 +3181,7 @@ var createUser = function () {
4005
3181
 
4006
3182
  validateUserData(data, true);
4007
3183
 
4008
- db$1 = db(config);
3184
+ db$1 = db(config$1);
4009
3185
 
4010
3186
  _context4.next = 6;
4011
3187
  return db$1.beginTransaction();
@@ -4101,7 +3277,7 @@ var createUser = function () {
4101
3277
  case 39:
4102
3278
  return _context4.abrupt('return', {
4103
3279
  error: '',
4104
- user: findUser(data.email)
3280
+ user: findUser$1(data.email)
4105
3281
  });
4106
3282
 
4107
3283
  case 42:
@@ -4139,7 +3315,7 @@ var createUser = function () {
4139
3315
  };
4140
3316
  }();
4141
3317
 
4142
- var createUser$1 = function () {
3318
+ var createUser = function () {
4143
3319
  var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(data) {
4144
3320
  var res;
4145
3321
  return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
@@ -4147,7 +3323,7 @@ var createUser$1 = function () {
4147
3323
  switch (_context.prev = _context.next) {
4148
3324
  case 0:
4149
3325
  _context.next = 2;
4150
- return createUser(data);
3326
+ return createUser$1(data);
4151
3327
 
4152
3328
  case 2:
4153
3329
  res = _context.sent;
@@ -4175,7 +3351,7 @@ var createUser$1 = function () {
4175
3351
  };
4176
3352
  }();
4177
3353
 
4178
- var updateUser$1 = function () {
3354
+ var updateUser = function () {
4179
3355
  var _ref2 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee2(data) {
4180
3356
  var res;
4181
3357
  return asyncToGenerator.regenerator.wrap(function _callee2$(_context2) {
@@ -4183,7 +3359,7 @@ var updateUser$1 = function () {
4183
3359
  switch (_context2.prev = _context2.next) {
4184
3360
  case 0:
4185
3361
  _context2.next = 2;
4186
- return updateUser(data);
3362
+ return updateUser$1(data);
4187
3363
 
4188
3364
  case 2:
4189
3365
  res = _context2.sent;
@@ -4211,7 +3387,7 @@ var updateUser$1 = function () {
4211
3387
  };
4212
3388
  }();
4213
3389
 
4214
- var findUser$1 = function () {
3390
+ var findUser = function () {
4215
3391
  var _ref3 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee3(_ref4) {
4216
3392
  var email = _ref4.email,
4217
3393
  password = _ref4.password;
@@ -4221,7 +3397,7 @@ var findUser$1 = function () {
4221
3397
  switch (_context3.prev = _context3.next) {
4222
3398
  case 0:
4223
3399
  _context3.next = 2;
4224
- return findUser(email, password);
3400
+ return findUser$1(email, password);
4225
3401
 
4226
3402
  case 2:
4227
3403
  res = _context3.sent;
@@ -4251,17 +3427,17 @@ var findUser$1 = function () {
4251
3427
 
4252
3428
  var user = /*#__PURE__*/Object.freeze({
4253
3429
  __proto__: null,
4254
- createUser: createUser$1,
4255
- updateUser: updateUser$1,
4256
- findUser: findUser$1
3430
+ createUser: createUser,
3431
+ updateUser: updateUser,
3432
+ findUser: findUser
4257
3433
  });
4258
3434
 
4259
- var localStrategy = new Local.Strategy({
3435
+ var localStrategy = new Local__default['default'].Strategy({
4260
3436
  usernameField: 'email',
4261
3437
  passwordField: 'password'
4262
3438
  }, function (email, password, done) {
4263
3439
 
4264
- findUser$1({ email: email, password: password }).then(function (user) {
3440
+ findUser({ email: email, password: password }).then(function (user) {
4265
3441
  done(null, user);
4266
3442
  }).catch(function (error) {
4267
3443
  done(error);
@@ -4273,9 +3449,9 @@ var passportLocal = /*#__PURE__*/Object.freeze({
4273
3449
  localStrategy: localStrategy
4274
3450
  });
4275
3451
 
4276
- var _this$4 = undefined;
3452
+ var _this = undefined;
4277
3453
 
4278
- var config$1 = {
3454
+ var config = {
4279
3455
  host: 'sanity-datasource.cluster-crao688bsrdh.us-east-1.rds.amazonaws.com',
4280
3456
  user: 'nasp',
4281
3457
  password: 'uRNkF9SkfXQs6AKK',
@@ -4289,7 +3465,7 @@ var getOccupation = function () {
4289
3465
  while (1) {
4290
3466
  switch (_context.prev = _context.next) {
4291
3467
  case 0:
4292
- db$1 = db(config$1);
3468
+ db$1 = db(config);
4293
3469
  query = '\n select name as label, id as value\n from occupation\n where type = ?\n ';
4294
3470
  _context.next = 4;
4295
3471
  return db$1.query(query, [type]);
@@ -4307,7 +3483,7 @@ var getOccupation = function () {
4307
3483
  return _context.stop();
4308
3484
  }
4309
3485
  }
4310
- }, _callee, _this$4);
3486
+ }, _callee, _this);
4311
3487
  }));
4312
3488
 
4313
3489
  return function getOccupation(_x) {
@@ -4322,7 +3498,7 @@ var getFieldsAndOptions = function () {
4322
3498
  while (1) {
4323
3499
  switch (_context2.prev = _context2.next) {
4324
3500
  case 0:
4325
- db$1 = db(config$1);
3501
+ db$1 = db(config);
4326
3502
  query = '\n select * \n from field\n where occupation_id = ?\n order by sorting\n ';
4327
3503
  _context2.next = 4;
4328
3504
  return db$1.query(query, [occupation]);
@@ -4370,7 +3546,7 @@ var getFieldsAndOptions = function () {
4370
3546
  return _context2.stop();
4371
3547
  }
4372
3548
  }
4373
- }, _callee2, _this$4);
3549
+ }, _callee2, _this);
4374
3550
  }));
4375
3551
 
4376
3552
  return function getFieldsAndOptions(_x2) {
@@ -4441,8 +3617,8 @@ var ProcessData = (function () {
4441
3617
  })();
4442
3618
 
4443
3619
  var LoginForm_1 = LoginForm;
4444
- var SignupForm_1 = SignupForm;
4445
- var ProfileForm_1 = SignupForm$1;
3620
+ var SignupForm_1 = SignupForm$1;
3621
+ var ProfileForm_1 = SignupForm;
4446
3622
  var AuthCookies_1 = authCookies;
4447
3623
  var AuthHooks_1 = hooks;
4448
3624
  var Iron_1 = iron;