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

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