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

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 (339) hide show
  1. package/README.md +168 -168
  2. package/dist/cjs/AD.js +10 -9
  3. package/dist/cjs/AD300x250.js +29 -28
  4. package/dist/cjs/AD300x250x600.js +29 -28
  5. package/dist/cjs/AD728x90.js +32 -31
  6. package/dist/cjs/ADFloatingFooter.js +31 -30
  7. package/dist/cjs/ADFooter.js +13 -12
  8. package/dist/cjs/ADGutter.js +31 -30
  9. package/dist/cjs/{ADInfeed-2e48af77.js → ADInfeed-bce0ba07.js} +15 -13
  10. package/dist/cjs/ADSkyscraper.js +31 -30
  11. package/dist/cjs/ADSponsoredResources.js +31 -30
  12. package/dist/cjs/ADWebcast.js +31 -30
  13. package/dist/cjs/ADWelcome.js +32 -31
  14. package/dist/cjs/{ADlgInfeed-c39c7131.js → ADlgInfeed-950b414b.js} +11 -10
  15. package/dist/cjs/AccordionPanel.js +29 -27
  16. package/dist/cjs/AdSlot.js +32 -31
  17. package/dist/cjs/AdSlotsProvider.js +18 -909
  18. package/dist/cjs/AlgoliaSearch.js +1490 -1306
  19. package/dist/cjs/AlphabeticList.js +24 -23
  20. package/dist/cjs/ArticleCarousel.js +20 -19
  21. package/dist/cjs/ArticleProgramLandingPage.js +58 -57
  22. package/dist/cjs/ArticleSeriesLandingPage.js +39 -38
  23. package/dist/cjs/ArticleSeriesListing.js +60 -59
  24. package/dist/cjs/Auth.js +680 -1504
  25. package/dist/cjs/AuthWrapper.js +1637 -419
  26. package/dist/cjs/{AuthorComponent-02e827ae.js → AuthorComponent-39b37d84.js} +14 -13
  27. package/dist/cjs/Beam.js +6 -6
  28. package/dist/cjs/{BlockContent-091a991f.js → BlockContent-9ebd251f.js} +56 -55
  29. package/dist/cjs/Breadcrumbs.js +27 -25
  30. package/dist/cjs/CMEDeck.js +81 -81
  31. package/dist/cjs/Column1.js +14 -11
  32. package/dist/cjs/Column2.js +34 -31
  33. package/dist/cjs/Column3.js +60 -57
  34. package/dist/cjs/ConferenceArticleCard.js +41 -40
  35. package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
  36. package/dist/cjs/ContentCardPaginated.js +98 -92
  37. package/dist/cjs/DeckContent.js +105 -101
  38. package/dist/cjs/DeckQueue.js +91 -87
  39. package/dist/cjs/DeckQueuePaginated.js +92 -86
  40. package/dist/cjs/{Dfp-f492f985.js → Dfp-9be904d5.js} +32 -31
  41. package/dist/cjs/EventsDeck.js +157 -150
  42. package/dist/cjs/ExternalResources.js +79 -78
  43. package/dist/cjs/Feature.js +29 -27
  44. package/dist/cjs/ForbesHero.js +41 -40
  45. package/dist/cjs/GridContent.js +189 -185
  46. package/dist/cjs/GridContentPaginated.js +190 -184
  47. package/dist/cjs/GridHero.js +43 -42
  48. package/dist/cjs/GroupDeck.js +58 -57
  49. package/dist/cjs/HamMagazine.js +144 -139
  50. package/dist/cjs/Header.js +14 -12
  51. package/dist/cjs/Hero.js +16 -15
  52. package/dist/cjs/HighlightenVideo.js +18 -17
  53. package/dist/cjs/HorizontalArticleListing.js +72 -71
  54. package/dist/cjs/HorizontalHero.js +29 -28
  55. package/dist/cjs/{ImageSlider-38f25e66.js → ImageSlider-b96720eb.js} +202 -1378
  56. package/dist/cjs/IssueContentDeck.js +76 -71
  57. package/dist/cjs/IssueDeck.js +75 -70
  58. package/dist/cjs/IssueLanding.js +94 -93
  59. package/dist/cjs/KMTracker.js +15 -15
  60. package/dist/cjs/LeftNav.js +39 -37
  61. package/dist/cjs/MasterDeck.js +79 -78
  62. package/dist/cjs/MasterDeckPaginated.js +76 -73
  63. package/dist/cjs/{MediaSeriesCard-8d27612b.js → MediaSeriesCard-8b4efd28.js} +1145 -1051
  64. package/dist/cjs/MediaSeriesLanding.js +93 -91
  65. package/dist/cjs/MediaSeriesLandingPaginated.js +95 -92
  66. package/dist/cjs/NavDvm.js +77 -72
  67. package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
  68. package/dist/cjs/NavMagazine.js +151 -146
  69. package/dist/cjs/NavNative.js +145 -137
  70. package/dist/cjs/OncliveHero.js +22 -22
  71. package/dist/cjs/OncliveLargeHero.js +71 -70
  72. package/dist/cjs/PageFilter.js +13 -12
  73. package/dist/cjs/Pagination-8f2038bf.js +53 -0
  74. package/dist/cjs/PartnerDetailListing.js +100 -98
  75. package/dist/cjs/PartnerDetailListingPaginated.js +99 -96
  76. package/dist/cjs/PdfDownload.js +10 -9
  77. package/dist/cjs/PopUpModal.js +19 -17
  78. package/dist/cjs/PubSection.js +41 -40
  79. package/dist/cjs/PubToc.js +14 -13
  80. package/dist/cjs/PublicationDeck.js +70 -65
  81. package/dist/cjs/{PublicationFeature-28c549f2.js → PublicationFeature-5ccf9b13.js} +40 -36
  82. package/dist/cjs/PublicationLanding.js +141 -133
  83. package/dist/cjs/QueueDeckExpanded.js +308 -308
  84. package/dist/cjs/QueueDeckExpandedPaginated.js +268 -267
  85. package/dist/cjs/RecentNews.js +23 -22
  86. package/dist/cjs/RelatedContent.js +58 -57
  87. package/dist/cjs/RelatedTopicsDropdown.js +32 -29
  88. package/dist/cjs/RolesDeck.js +32 -27
  89. package/dist/cjs/Schema.js +16 -15
  90. package/dist/cjs/Search.js +20 -16
  91. package/dist/cjs/Segment.js +4 -4
  92. package/dist/cjs/SeriesListingDeck.js +36 -36
  93. package/dist/cjs/{SeriesSlider-49b81b0b.js → SeriesSlider-ba0c5d1a.js} +40 -39
  94. package/dist/cjs/SetCookie.js +1 -1
  95. package/dist/cjs/SideFooter.js +37 -36
  96. package/dist/cjs/SocialIcons.js +10 -9
  97. package/dist/cjs/{SocialSearchComponent-e8477ca3.js → SocialSearchComponent-4942ddfc.js} +40 -36
  98. package/dist/cjs/SocialShare.js +31 -29
  99. package/dist/cjs/TaxonomyCard.js +66 -61
  100. package/dist/cjs/TaxonomyDescription.js +54 -53
  101. package/dist/cjs/TemplateNormal.js +73 -72
  102. package/dist/cjs/ThumbnailCard.js +26 -24
  103. package/dist/cjs/Ustream.js +29 -28
  104. package/dist/cjs/VerticalHero.js +20 -19
  105. package/dist/cjs/VideoProgramLandingPage.js +76 -72
  106. package/dist/cjs/VideoSeriesCard.js +33 -32
  107. package/dist/cjs/VideoSeriesFilter.js +16 -16
  108. package/dist/cjs/VideoSeriesLandingPage.js +48 -47
  109. package/dist/cjs/VideoSeriesListing.js +77 -76
  110. package/dist/cjs/View.js +267 -264
  111. package/dist/cjs/YahooHero.js +40 -39
  112. package/dist/cjs/YoutubeGroup.js +68 -67
  113. package/dist/cjs/{_is-array-aa52fa1e.js → _is-array-54228b29.js} +6 -6
  114. package/dist/cjs/{_iter-detect-05795553.js → _iter-detect-b1df62f0.js} +7 -7
  115. package/dist/cjs/{_object-pie-68c5bcbc.js → _object-pie-083f2dd6.js} +4 -4
  116. package/dist/cjs/{_object-sap-171b9ea5.js → _object-sap-d1978572.js} +1 -1
  117. package/dist/cjs/{_object-to-array-9bac8737.js → _object-to-array-ce86cae7.js} +2 -2
  118. package/dist/cjs/{asyncToGenerator-df19209d.js → asyncToGenerator-77821af0.js} +30 -30
  119. package/dist/cjs/{brightcove-react-player-loader.es-156bd4d6.js → brightcove-react-player-loader.es-a195642e.js} +11 -9
  120. package/dist/cjs/{core.get-iterator-method-f3c44602.js → core.get-iterator-method-5643aa10.js} +35 -35
  121. package/dist/cjs/{debounce-529c8d06.js → debounce-d4a2369b.js} +2 -2
  122. package/dist/cjs/{define-property-21887c62.js → define-property-e8404b64.js} +6 -6
  123. package/dist/cjs/{defineProperty-77a37684.js → defineProperty-9673846a.js} +1 -1
  124. package/dist/cjs/defineProperty-e0fb52c5.js +73 -0
  125. package/dist/cjs/{entities-310b46ee.js → entities-df1aed86.js} +5 -1
  126. package/dist/cjs/{eq-bb2843ed.js → eq-5fc26c07.js} +1 -1
  127. package/dist/cjs/{extends-eed4f016.js → extends-7c86182f.js} +7 -7
  128. package/dist/cjs/faundadb.js +5 -5
  129. package/dist/cjs/{get-adbb11e3.js → get-5839e5b5.js} +21 -21
  130. package/dist/cjs/getQuery.js +1 -1
  131. package/dist/cjs/getRelatedArticle.js +16 -16
  132. package/dist/cjs/getRootDocGroup.js +4 -4
  133. package/dist/cjs/getSerializers.js +43 -43
  134. package/dist/cjs/{getTargeting-8874437b.js → getTargeting-9d509319.js} +12 -12
  135. package/dist/cjs/getTargeting.js +6 -6
  136. package/dist/{esm/iconBase-602d52fe.js → cjs/iconBase-be4097c0.js} +33 -8
  137. package/dist/cjs/{index-e2e62963.js → index-50be6759.js} +26 -10
  138. package/dist/cjs/{index-54adcbc3.js → index-6f89aea7.js} +1070 -1044
  139. package/dist/cjs/{index-be0c82be.js → index-d48b231c.js} +31 -25
  140. package/dist/cjs/{index-96b3db50.js → index-eadd5035.js} +17 -15
  141. package/dist/cjs/{index-3294d3bc.js → index-f86bb269.js} +44 -45
  142. package/dist/cjs/{index-98e01cb9.js → index-fc2f1ca2.js} +13 -12
  143. package/dist/cjs/{index.es-9110add6.js → index.es-f3e47207.js} +31 -12
  144. package/dist/cjs/{index.esm-90433435.js → index.esm-00a6aade.js} +7 -16
  145. package/dist/cjs/{index.esm-4d410430.js → index.esm-2bb721c8.js} +21 -21
  146. package/dist/cjs/{index.esm-e32d3e8e.js → index.esm-c1e16606.js} +4 -7
  147. package/dist/cjs/{index.esm-ff47db6f.js → index.esm-f27f80d9.js} +6 -13
  148. package/dist/cjs/index.js +175 -168
  149. package/dist/cjs/{inherits-12d44cca.js → inherits-de66ea16.js} +18 -18
  150. package/dist/cjs/{isSymbol-04666465.js → isSymbol-03abbdf0.js} +15 -15
  151. package/dist/cjs/{keys-d207942e.js → keys-e982b3fa.js} +6 -6
  152. package/dist/cjs/{lodash-fc2922d0.js → lodash-f0783643.js} +128 -31
  153. package/dist/cjs/main-f1c77adb.js +973 -0
  154. package/dist/cjs/{md5-5039b1a6.js → md5-e1ca5797.js} +1 -1
  155. package/dist/cjs/{moment-575fe24c.js → moment-aca40de1.js} +11 -9
  156. package/dist/cjs/{react-social-icons-f7f48f71.js → react-social-icons-af932527.js} +28 -27
  157. package/dist/cjs/{slicedToArray-f6d4eaa8.js → slicedToArray-067dd3bc.js} +12 -12
  158. package/dist/cjs/{smoothscroll-5054361f.js → smoothscroll-99df7f93.js} +1 -1
  159. package/dist/cjs/{stringify-bbc68047.js → stringify-f7a37a8d.js} +5 -5
  160. package/dist/cjs/timeDifferenceCalc.js +1 -1
  161. package/dist/cjs/{toConsumableArray-c9b8a0d0.js → toConsumableArray-d7797c2b.js} +7 -7
  162. package/dist/cjs/{toNumber-36d1e7e5.js → toNumber-5e1fac58.js} +40 -5
  163. package/dist/cjs/typeof-1358762e.js +33 -0
  164. package/dist/cjs/{typeof-5f52cf64.js → typeof-567e31ff.js} +35 -35
  165. package/dist/cjs/urlFor.js +6 -6
  166. package/dist/cjs/{ustream-api-9ebe112f.js → ustream-api-3819e4aa.js} +4 -4
  167. package/dist/cjs/{util-f2c1b65b.js → util-93a37fd0.js} +12 -1
  168. package/dist/cjs/{visibility-sensor-ad5e3116.js → visibility-sensor-eb2c5b69.js} +7 -5
  169. package/dist/cjs/{web.dom.iterable-e34bf324.js → web.dom.iterable-d98303e0.js} +2 -2
  170. package/dist/esm/AD.js +1 -1
  171. package/dist/esm/AD300x250.js +22 -22
  172. package/dist/esm/AD300x250x600.js +22 -22
  173. package/dist/esm/AD728x90.js +25 -25
  174. package/dist/esm/ADFloatingFooter.js +21 -21
  175. package/dist/esm/ADFooter.js +4 -4
  176. package/dist/esm/ADGutter.js +21 -21
  177. package/dist/esm/{ADInfeed-d767ebe2.js → ADInfeed-0a55cd2d.js} +4 -4
  178. package/dist/esm/ADSkyscraper.js +21 -21
  179. package/dist/esm/ADSponsoredResources.js +21 -21
  180. package/dist/esm/ADWebcast.js +21 -21
  181. package/dist/esm/ADWelcome.js +18 -18
  182. package/dist/esm/{ADlgInfeed-cee95aa2.js → ADlgInfeed-013e1f4a.js} +4 -4
  183. package/dist/esm/AccordionPanel.js +6 -6
  184. package/dist/esm/AdSlot.js +20 -20
  185. package/dist/esm/AdSlotsProvider.js +14 -906
  186. package/dist/esm/AlgoliaSearch.js +717 -534
  187. package/dist/esm/AlphabeticList.js +8 -8
  188. package/dist/esm/ArticleCarousel.js +13 -13
  189. package/dist/esm/ArticleProgramLandingPage.js +48 -48
  190. package/dist/esm/ArticleSeriesLandingPage.js +30 -30
  191. package/dist/esm/ArticleSeriesListing.js +31 -31
  192. package/dist/esm/Auth.js +591 -1419
  193. package/dist/esm/AuthWrapper.js +1609 -392
  194. package/dist/esm/{AuthorComponent-e6f95c2f.js → AuthorComponent-11adff02.js} +1 -1
  195. package/dist/esm/Beam.js +6 -6
  196. package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-1e73bd2c.js} +34 -34
  197. package/dist/esm/Breadcrumbs.js +5 -5
  198. package/dist/esm/CMEDeck.js +22 -22
  199. package/dist/esm/Column2.js +14 -14
  200. package/dist/esm/Column3.js +31 -31
  201. package/dist/esm/ConferenceArticleCard.js +25 -25
  202. package/dist/esm/ContentCardPaginated.js +36 -35
  203. package/dist/esm/DeckContent.js +41 -41
  204. package/dist/esm/DeckQueue.js +31 -31
  205. package/dist/esm/DeckQueuePaginated.js +32 -31
  206. package/dist/esm/{Dfp-f867d061.js → Dfp-102f0beb.js} +13 -13
  207. package/dist/esm/EventsDeck.js +41 -41
  208. package/dist/esm/ExternalResources.js +45 -45
  209. package/dist/esm/Feature.js +7 -7
  210. package/dist/esm/ForbesHero.js +10 -10
  211. package/dist/esm/GridContent.js +47 -47
  212. package/dist/esm/GridContentPaginated.js +46 -45
  213. package/dist/esm/GridHero.js +11 -11
  214. package/dist/esm/GroupDeck.js +12 -12
  215. package/dist/esm/HamMagazine.js +35 -35
  216. package/dist/esm/Hero.js +7 -7
  217. package/dist/esm/HighlightenVideo.js +2 -2
  218. package/dist/esm/HorizontalArticleListing.js +46 -46
  219. package/dist/esm/HorizontalHero.js +8 -8
  220. package/dist/esm/{ImageSlider-a3154b97.js → ImageSlider-de7846ea.js} +141 -1317
  221. package/dist/esm/IssueContentDeck.js +11 -11
  222. package/dist/esm/IssueDeck.js +14 -14
  223. package/dist/esm/IssueLanding.js +82 -82
  224. package/dist/esm/KMTracker.js +15 -15
  225. package/dist/esm/LeftNav.js +20 -20
  226. package/dist/esm/MasterDeck.js +40 -40
  227. package/dist/esm/MasterDeckPaginated.js +39 -38
  228. package/dist/esm/{MediaSeriesCard-1dd7eae8.js → MediaSeriesCard-51ebf1c0.js} +694 -602
  229. package/dist/esm/MediaSeriesLanding.js +58 -58
  230. package/dist/esm/MediaSeriesLandingPaginated.js +62 -61
  231. package/dist/esm/NavDvm.js +11 -11
  232. package/dist/esm/NavMagazine.js +39 -39
  233. package/dist/esm/NavNative.js +37 -37
  234. package/dist/esm/OncliveHero.js +7 -8
  235. package/dist/esm/OncliveLargeHero.js +11 -11
  236. package/dist/esm/PageFilter.js +4 -4
  237. package/dist/esm/Pagination-c0db7ca1.js +46 -0
  238. package/dist/esm/PartnerDetailListing.js +63 -62
  239. package/dist/esm/PartnerDetailListingPaginated.js +62 -60
  240. package/dist/esm/PdfDownload.js +2 -2
  241. package/dist/esm/PopUpModal.js +4 -4
  242. package/dist/esm/PubSection.js +32 -32
  243. package/dist/esm/PubToc.js +6 -6
  244. package/dist/esm/PublicationDeck.js +10 -10
  245. package/dist/esm/{PublicationFeature-fa24dedb.js → PublicationFeature-d88e76b9.js} +2 -2
  246. package/dist/esm/PublicationLanding.js +56 -52
  247. package/dist/esm/QueueDeckExpanded.js +36 -36
  248. package/dist/esm/QueueDeckExpandedPaginated.js +36 -35
  249. package/dist/esm/RecentNews.js +4 -4
  250. package/dist/esm/RelatedContent.js +38 -38
  251. package/dist/esm/RelatedTopicsDropdown.js +10 -10
  252. package/dist/esm/Schema.js +10 -10
  253. package/dist/esm/Search.js +5 -5
  254. package/dist/esm/Segment.js +4 -4
  255. package/dist/esm/SeriesListingDeck.js +18 -18
  256. package/dist/esm/{SeriesSlider-ce19fa25.js → SeriesSlider-45adb8dc.js} +14 -14
  257. package/dist/esm/SetCookie.js +1 -1
  258. package/dist/esm/SideFooter.js +15 -15
  259. package/dist/esm/{SocialSearchComponent-dca69151.js → SocialSearchComponent-8e0fcf66.js} +10 -10
  260. package/dist/esm/TaxonomyCard.js +12 -12
  261. package/dist/esm/TaxonomyDescription.js +44 -44
  262. package/dist/esm/TemplateNormal.js +46 -46
  263. package/dist/esm/ThumbnailCard.js +10 -10
  264. package/dist/esm/Ustream.js +12 -12
  265. package/dist/esm/VerticalHero.js +6 -6
  266. package/dist/esm/VideoProgramLandingPage.js +49 -49
  267. package/dist/esm/VideoSeriesCard.js +14 -14
  268. package/dist/esm/VideoSeriesFilter.js +7 -7
  269. package/dist/esm/VideoSeriesLandingPage.js +36 -36
  270. package/dist/esm/VideoSeriesListing.js +31 -31
  271. package/dist/esm/View.js +89 -90
  272. package/dist/esm/YahooHero.js +13 -13
  273. package/dist/esm/YoutubeGroup.js +21 -21
  274. package/dist/esm/{_is-array-4df618a6.js → _is-array-8d21b9e3.js} +6 -6
  275. package/dist/esm/{_iter-detect-130ee549.js → _iter-detect-98db3b07.js} +7 -7
  276. package/dist/esm/{_object-pie-33c40e79.js → _object-pie-133f504a.js} +4 -4
  277. package/dist/esm/{_object-sap-8b8ea5a9.js → _object-sap-7cee6f84.js} +1 -1
  278. package/dist/esm/{_object-to-array-c54dd835.js → _object-to-array-2300e51b.js} +2 -2
  279. package/dist/esm/{asyncToGenerator-7bf8bc4d.js → asyncToGenerator-5ef104a7.js} +30 -30
  280. package/dist/esm/{brightcove-react-player-loader.es-83f53e4e.js → brightcove-react-player-loader.es-57a70a56.js} +5 -4
  281. package/dist/esm/{core.get-iterator-method-86d4db69.js → core.get-iterator-method-ea258bb1.js} +36 -36
  282. package/dist/esm/{debounce-9207d8ee.js → debounce-533d9748.js} +2 -2
  283. package/dist/esm/define-property-5f1bda73.js +18 -0
  284. package/dist/esm/defineProperty-23a8f8cd.js +68 -0
  285. package/dist/esm/{defineProperty-d7d9b577.js → defineProperty-8c30428f.js} +1 -1
  286. package/dist/esm/{entities-7cc3bf45.js → entities-6d9154b4.js} +5 -1
  287. package/dist/esm/{eq-b470f743.js → eq-bdcbf886.js} +1 -1
  288. package/dist/esm/{extends-5b1796d4.js → extends-6d8e3924.js} +7 -7
  289. package/dist/esm/faundadb.js +5 -5
  290. package/dist/esm/{get-1e515072.js → get-3c308da4.js} +21 -21
  291. package/dist/esm/getQuery.js +1 -1
  292. package/dist/esm/getRelatedArticle.js +11 -11
  293. package/dist/esm/getRootDocGroup.js +4 -4
  294. package/dist/esm/getSerializers.js +43 -43
  295. package/dist/esm/{getTargeting-277c801e.js → getTargeting-4061f839.js} +11 -11
  296. package/dist/esm/getTargeting.js +6 -6
  297. package/dist/{cjs/iconBase-68959171.js → esm/iconBase-ccc56b97.js} +2 -8
  298. package/dist/esm/{index-73819142.js → index-3f5c03b2.js} +31 -25
  299. package/dist/esm/{index-5f7e79e7.js → index-755f2cc2.js} +6 -6
  300. package/dist/esm/{index-ef6d5dcf.js → index-79cfd25c.js} +44 -45
  301. package/dist/esm/{index-aaa2dae0.js → index-98ca9cec.js} +26 -11
  302. package/dist/esm/{index-d1476645.js → index-ca0c9ff5.js} +615 -599
  303. package/dist/esm/{index-41a678ea.js → index-f0fc23eb.js} +4 -4
  304. package/dist/esm/{index.es-29c1cef5.js → index.es-a6137319.js} +23 -5
  305. package/dist/esm/{index.esm-fd746768.js → index.esm-37268dca.js} +4 -5
  306. package/dist/esm/{index.esm-f8aaeeeb.js → index.esm-9b042655.js} +4 -7
  307. package/dist/esm/{index.esm-cf08bf18.js → index.esm-d4932dea.js} +6 -13
  308. package/dist/esm/{index.esm-29e48d38.js → index.esm-f6156a57.js} +7 -16
  309. package/dist/esm/index.js +126 -122
  310. package/dist/esm/{inherits-2409637d.js → inherits-a6ba2ec4.js} +18 -18
  311. package/dist/esm/{isSymbol-1981418f.js → isSymbol-a7e9aafe.js} +15 -15
  312. package/dist/esm/{keys-69989821.js → keys-31dcdb31.js} +6 -6
  313. package/dist/esm/{lodash-17fdfebb.js → lodash-f97fd99a.js} +128 -31
  314. package/dist/esm/main-1894c974.js +961 -0
  315. package/dist/esm/{md5-9be0e905.js → md5-4e42248e.js} +1 -1
  316. package/dist/esm/{moment-e2f9b20c.js → moment-bc12cb97.js} +11 -9
  317. package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-9be47857.js} +16 -16
  318. package/dist/esm/{slicedToArray-67a08c9c.js → slicedToArray-6ebcbfea.js} +12 -12
  319. package/dist/esm/{smoothscroll-0cd4c7a6.js → smoothscroll-fa4e3f8c.js} +1 -1
  320. package/dist/esm/stringify-2b084bee.js +15 -0
  321. package/dist/esm/timeDifferenceCalc.js +1 -1
  322. package/dist/esm/{toConsumableArray-32282905.js → toConsumableArray-f7074d7c.js} +7 -7
  323. package/dist/esm/{toNumber-2f7a84cd.js → toNumber-5aeba6e7.js} +40 -5
  324. package/dist/esm/typeof-2f07d0e8.js +30 -0
  325. package/dist/esm/{typeof-c05a82ba.js → typeof-e9fc0c5d.js} +35 -35
  326. package/dist/esm/urlFor.js +4 -4
  327. package/dist/esm/{ustream-api-4c4fe0ba.js → ustream-api-d3714624.js} +4 -4
  328. package/dist/esm/{util-7700fc59.js → util-8ed16d48.js} +12 -1
  329. package/dist/esm/{web.dom.iterable-f8f967cd.js → web.dom.iterable-ab4dea5c.js} +2 -2
  330. package/package.json +112 -112
  331. package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
  332. package/dist/cjs/Pagination-90473595.js +0 -59
  333. package/dist/cjs/inherits-8d29278d.js +0 -110
  334. package/dist/cjs/main-02daeefe.js +0 -862
  335. package/dist/esm/Pagination-683fa8ef.js +0 -54
  336. package/dist/esm/define-property-6d26cb48.js +0 -18
  337. package/dist/esm/inherits-77d5e4fc.js +0 -101
  338. package/dist/esm/main-c0612122.js +0 -851
  339. package/dist/esm/stringify-70b72959.js +0 -15
@@ -1,52 +1,969 @@
1
+ import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
1
2
  import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
2
- import './core.get-iterator-method-86d4db69.js';
3
- import './web.dom.iterable-f8f967cd.js';
3
+ import { a as _typeof_1 } from './typeof-2f07d0e8.js';
4
+ import { d as defineProperty, b as asyncToGenerator } from './defineProperty-23a8f8cd.js';
4
5
  import React__default, { useState, useEffect } from 'react';
5
- import { _ as _slicedToArray } from './slicedToArray-67a08c9c.js';
6
6
  import { Form } from 'react-bootstrap';
7
7
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
8
+ import './web.dom.iterable-ab4dea5c.js';
9
+ import './core.get-iterator-method-ea258bb1.js';
8
10
 
9
- var logger_1 = createCommonjsModule(function (module, exports) {
11
+ var interopRequireDefault = createCommonjsModule(function (module) {
12
+ function _interopRequireDefault(obj) {
13
+ return obj && obj.__esModule ? obj : {
14
+ "default": obj
15
+ };
16
+ }
10
17
 
11
- Object.defineProperty(exports, "__esModule", {
12
- value: true
18
+ module.exports = _interopRequireDefault;
19
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
13
20
  });
14
- exports.default = void 0;
15
- var logger = {
16
- error(code) {
17
- for (var _len = arguments.length, message = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
18
- message[_key - 1] = arguments[_key];
21
+
22
+ unwrapExports(interopRequireDefault);
23
+
24
+ var runtime_1 = createCommonjsModule(function (module) {
25
+ /**
26
+ * Copyright (c) 2014-present, Facebook, Inc.
27
+ *
28
+ * This source code is licensed under the MIT license found in the
29
+ * LICENSE file in the root directory of this source tree.
30
+ */
31
+
32
+ var runtime = (function (exports) {
33
+
34
+ var Op = Object.prototype;
35
+ var hasOwn = Op.hasOwnProperty;
36
+ var undefined$1; // More compressible than void 0.
37
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
38
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
39
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
40
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
41
+
42
+ function define(obj, key, value) {
43
+ Object.defineProperty(obj, key, {
44
+ value: value,
45
+ enumerable: true,
46
+ configurable: true,
47
+ writable: true
48
+ });
49
+ return obj[key];
50
+ }
51
+ try {
52
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
53
+ define({}, "");
54
+ } catch (err) {
55
+ define = function(obj, key, value) {
56
+ return obj[key] = value;
57
+ };
58
+ }
59
+
60
+ function wrap(innerFn, outerFn, self, tryLocsList) {
61
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
62
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
63
+ var generator = Object.create(protoGenerator.prototype);
64
+ var context = new Context(tryLocsList || []);
65
+
66
+ // The ._invoke method unifies the implementations of the .next,
67
+ // .throw, and .return methods.
68
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
69
+
70
+ return generator;
71
+ }
72
+ exports.wrap = wrap;
73
+
74
+ // Try/catch helper to minimize deoptimizations. Returns a completion
75
+ // record like context.tryEntries[i].completion. This interface could
76
+ // have been (and was previously) designed to take a closure to be
77
+ // invoked without arguments, but in all the cases we care about we
78
+ // already have an existing method we want to call, so there's no need
79
+ // to create a new function object. We can even get away with assuming
80
+ // the method takes exactly one argument, since that happens to be true
81
+ // in every case, so we don't have to touch the arguments object. The
82
+ // only additional allocation required is the completion record, which
83
+ // has a stable shape and so hopefully should be cheap to allocate.
84
+ function tryCatch(fn, obj, arg) {
85
+ try {
86
+ return { type: "normal", arg: fn.call(obj, arg) };
87
+ } catch (err) {
88
+ return { type: "throw", arg: err };
19
89
  }
90
+ }
20
91
 
21
- console.error("[next-auth][error][".concat(code.toLowerCase(), "]"), "\nhttps://next-auth.js.org/errors#".concat(code.toLowerCase()), ...message);
22
- },
92
+ var GenStateSuspendedStart = "suspendedStart";
93
+ var GenStateSuspendedYield = "suspendedYield";
94
+ var GenStateExecuting = "executing";
95
+ var GenStateCompleted = "completed";
96
+
97
+ // Returning this object from the innerFn has the same effect as
98
+ // breaking out of the dispatch switch statement.
99
+ var ContinueSentinel = {};
100
+
101
+ // Dummy constructor functions that we use as the .constructor and
102
+ // .constructor.prototype properties for functions that return Generator
103
+ // objects. For full spec compliance, you may wish to configure your
104
+ // minifier not to mangle the names of these two functions.
105
+ function Generator() {}
106
+ function GeneratorFunction() {}
107
+ function GeneratorFunctionPrototype() {}
108
+
109
+ // This is a polyfill for %IteratorPrototype% for environments that
110
+ // don't natively support it.
111
+ var IteratorPrototype = {};
112
+ IteratorPrototype[iteratorSymbol] = function () {
113
+ return this;
114
+ };
23
115
 
24
- warn(code) {
25
- for (var _len2 = arguments.length, message = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
26
- message[_key2 - 1] = arguments[_key2];
116
+ var getProto = Object.getPrototypeOf;
117
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
118
+ if (NativeIteratorPrototype &&
119
+ NativeIteratorPrototype !== Op &&
120
+ hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
121
+ // This environment has a native %IteratorPrototype%; use it instead
122
+ // of the polyfill.
123
+ IteratorPrototype = NativeIteratorPrototype;
124
+ }
125
+
126
+ var Gp = GeneratorFunctionPrototype.prototype =
127
+ Generator.prototype = Object.create(IteratorPrototype);
128
+ GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
129
+ GeneratorFunctionPrototype.constructor = GeneratorFunction;
130
+ GeneratorFunction.displayName = define(
131
+ GeneratorFunctionPrototype,
132
+ toStringTagSymbol,
133
+ "GeneratorFunction"
134
+ );
135
+
136
+ // Helper for defining the .next, .throw, and .return methods of the
137
+ // Iterator interface in terms of a single ._invoke method.
138
+ function defineIteratorMethods(prototype) {
139
+ ["next", "throw", "return"].forEach(function(method) {
140
+ define(prototype, method, function(arg) {
141
+ return this._invoke(method, arg);
142
+ });
143
+ });
144
+ }
145
+
146
+ exports.isGeneratorFunction = function(genFun) {
147
+ var ctor = typeof genFun === "function" && genFun.constructor;
148
+ return ctor
149
+ ? ctor === GeneratorFunction ||
150
+ // For the native GeneratorFunction constructor, the best we can
151
+ // do is to check its .name property.
152
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
153
+ : false;
154
+ };
155
+
156
+ exports.mark = function(genFun) {
157
+ if (Object.setPrototypeOf) {
158
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
159
+ } else {
160
+ genFun.__proto__ = GeneratorFunctionPrototype;
161
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
27
162
  }
163
+ genFun.prototype = Object.create(Gp);
164
+ return genFun;
165
+ };
28
166
 
29
- console.warn("[next-auth][warn][".concat(code.toLowerCase(), "]"), "\nhttps://next-auth.js.org/warnings#".concat(code.toLowerCase()), ...message);
30
- },
167
+ // Within the body of any async function, `await x` is transformed to
168
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
169
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
170
+ // meant to be awaited.
171
+ exports.awrap = function(arg) {
172
+ return { __await: arg };
173
+ };
31
174
 
32
- debug(code) {
33
- var _process, _process$env;
175
+ function AsyncIterator(generator, PromiseImpl) {
176
+ function invoke(method, arg, resolve, reject) {
177
+ var record = tryCatch(generator[method], generator, arg);
178
+ if (record.type === "throw") {
179
+ reject(record.arg);
180
+ } else {
181
+ var result = record.arg;
182
+ var value = result.value;
183
+ if (value &&
184
+ typeof value === "object" &&
185
+ hasOwn.call(value, "__await")) {
186
+ return PromiseImpl.resolve(value.__await).then(function(value) {
187
+ invoke("next", value, resolve, reject);
188
+ }, function(err) {
189
+ invoke("throw", err, resolve, reject);
190
+ });
191
+ }
34
192
 
35
- if (!((_process = process) !== null && _process !== void 0 && (_process$env = _process.env) !== null && _process$env !== void 0 && _process$env._NEXTAUTH_DEBUG)) return;
193
+ return PromiseImpl.resolve(value).then(function(unwrapped) {
194
+ // When a yielded Promise is resolved, its final value becomes
195
+ // the .value of the Promise<{value,done}> result for the
196
+ // current iteration.
197
+ result.value = unwrapped;
198
+ resolve(result);
199
+ }, function(error) {
200
+ // If a rejected Promise was yielded, throw the rejection back
201
+ // into the async generator function so it can be handled there.
202
+ return invoke("throw", error, resolve, reject);
203
+ });
204
+ }
205
+ }
206
+
207
+ var previousPromise;
208
+
209
+ function enqueue(method, arg) {
210
+ function callInvokeWithMethodAndArg() {
211
+ return new PromiseImpl(function(resolve, reject) {
212
+ invoke(method, arg, resolve, reject);
213
+ });
214
+ }
215
+
216
+ return previousPromise =
217
+ // If enqueue has been called before, then we want to wait until
218
+ // all previous Promises have been resolved before calling invoke,
219
+ // so that results are always delivered in the correct order. If
220
+ // enqueue has not been called before, then it is important to
221
+ // call invoke immediately, without waiting on a callback to fire,
222
+ // so that the async generator function has the opportunity to do
223
+ // any necessary setup in a predictable way. This predictability
224
+ // is why the Promise constructor synchronously invokes its
225
+ // executor callback, and why async functions synchronously
226
+ // execute code before the first await. Since we implement simple
227
+ // async functions in terms of async generators, it is especially
228
+ // important to get this right, even though it requires care.
229
+ previousPromise ? previousPromise.then(
230
+ callInvokeWithMethodAndArg,
231
+ // Avoid propagating failures to Promises returned by later
232
+ // invocations of the iterator.
233
+ callInvokeWithMethodAndArg
234
+ ) : callInvokeWithMethodAndArg();
235
+ }
236
+
237
+ // Define the unified helper method that is used to implement .next,
238
+ // .throw, and .return (see defineIteratorMethods).
239
+ this._invoke = enqueue;
240
+ }
241
+
242
+ defineIteratorMethods(AsyncIterator.prototype);
243
+ AsyncIterator.prototype[asyncIteratorSymbol] = function () {
244
+ return this;
245
+ };
246
+ exports.AsyncIterator = AsyncIterator;
247
+
248
+ // Note that simple async functions are implemented on top of
249
+ // AsyncIterator objects; they just return a Promise for the value of
250
+ // the final result produced by the iterator.
251
+ exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
252
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
253
+
254
+ var iter = new AsyncIterator(
255
+ wrap(innerFn, outerFn, self, tryLocsList),
256
+ PromiseImpl
257
+ );
258
+
259
+ return exports.isGeneratorFunction(outerFn)
260
+ ? iter // If outerFn is a generator, return the full iterator.
261
+ : iter.next().then(function(result) {
262
+ return result.done ? result.value : iter.next();
263
+ });
264
+ };
265
+
266
+ function makeInvokeMethod(innerFn, self, context) {
267
+ var state = GenStateSuspendedStart;
268
+
269
+ return function invoke(method, arg) {
270
+ if (state === GenStateExecuting) {
271
+ throw new Error("Generator is already running");
272
+ }
273
+
274
+ if (state === GenStateCompleted) {
275
+ if (method === "throw") {
276
+ throw arg;
277
+ }
278
+
279
+ // Be forgiving, per 25.3.3.3.3 of the spec:
280
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
281
+ return doneResult();
282
+ }
283
+
284
+ context.method = method;
285
+ context.arg = arg;
286
+
287
+ while (true) {
288
+ var delegate = context.delegate;
289
+ if (delegate) {
290
+ var delegateResult = maybeInvokeDelegate(delegate, context);
291
+ if (delegateResult) {
292
+ if (delegateResult === ContinueSentinel) continue;
293
+ return delegateResult;
294
+ }
295
+ }
296
+
297
+ if (context.method === "next") {
298
+ // Setting context._sent for legacy support of Babel's
299
+ // function.sent implementation.
300
+ context.sent = context._sent = context.arg;
301
+
302
+ } else if (context.method === "throw") {
303
+ if (state === GenStateSuspendedStart) {
304
+ state = GenStateCompleted;
305
+ throw context.arg;
306
+ }
307
+
308
+ context.dispatchException(context.arg);
309
+
310
+ } else if (context.method === "return") {
311
+ context.abrupt("return", context.arg);
312
+ }
313
+
314
+ state = GenStateExecuting;
315
+
316
+ var record = tryCatch(innerFn, self, context);
317
+ if (record.type === "normal") {
318
+ // If an exception is thrown from innerFn, we leave state ===
319
+ // GenStateExecuting and loop back for another invocation.
320
+ state = context.done
321
+ ? GenStateCompleted
322
+ : GenStateSuspendedYield;
323
+
324
+ if (record.arg === ContinueSentinel) {
325
+ continue;
326
+ }
327
+
328
+ return {
329
+ value: record.arg,
330
+ done: context.done
331
+ };
332
+
333
+ } else if (record.type === "throw") {
334
+ state = GenStateCompleted;
335
+ // Dispatch the exception by looping back around to the
336
+ // context.dispatchException(context.arg) call above.
337
+ context.method = "throw";
338
+ context.arg = record.arg;
339
+ }
340
+ }
341
+ };
342
+ }
343
+
344
+ // Call delegate.iterator[context.method](context.arg) and handle the
345
+ // result, either by returning a { value, done } result from the
346
+ // delegate iterator, or by modifying context.method and context.arg,
347
+ // setting context.delegate to null, and returning the ContinueSentinel.
348
+ function maybeInvokeDelegate(delegate, context) {
349
+ var method = delegate.iterator[context.method];
350
+ if (method === undefined$1) {
351
+ // A .throw or .return when the delegate iterator has no .throw
352
+ // method always terminates the yield* loop.
353
+ context.delegate = null;
354
+
355
+ if (context.method === "throw") {
356
+ // Note: ["return"] must be used for ES3 parsing compatibility.
357
+ if (delegate.iterator["return"]) {
358
+ // If the delegate iterator has a return method, give it a
359
+ // chance to clean up.
360
+ context.method = "return";
361
+ context.arg = undefined$1;
362
+ maybeInvokeDelegate(delegate, context);
363
+
364
+ if (context.method === "throw") {
365
+ // If maybeInvokeDelegate(context) changed context.method from
366
+ // "return" to "throw", let that override the TypeError below.
367
+ return ContinueSentinel;
368
+ }
369
+ }
370
+
371
+ context.method = "throw";
372
+ context.arg = new TypeError(
373
+ "The iterator does not provide a 'throw' method");
374
+ }
36
375
 
37
- for (var _len3 = arguments.length, message = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
38
- message[_key3 - 1] = arguments[_key3];
376
+ return ContinueSentinel;
39
377
  }
40
378
 
41
- console.log("[next-auth][debug][".concat(code.toLowerCase(), "]"), ...message);
379
+ var record = tryCatch(method, delegate.iterator, context.arg);
380
+
381
+ if (record.type === "throw") {
382
+ context.method = "throw";
383
+ context.arg = record.arg;
384
+ context.delegate = null;
385
+ return ContinueSentinel;
386
+ }
387
+
388
+ var info = record.arg;
389
+
390
+ if (! info) {
391
+ context.method = "throw";
392
+ context.arg = new TypeError("iterator result is not an object");
393
+ context.delegate = null;
394
+ return ContinueSentinel;
395
+ }
396
+
397
+ if (info.done) {
398
+ // Assign the result of the finished delegate to the temporary
399
+ // variable specified by delegate.resultName (see delegateYield).
400
+ context[delegate.resultName] = info.value;
401
+
402
+ // Resume execution at the desired location (see delegateYield).
403
+ context.next = delegate.nextLoc;
404
+
405
+ // If context.method was "throw" but the delegate handled the
406
+ // exception, let the outer generator proceed normally. If
407
+ // context.method was "next", forget context.arg since it has been
408
+ // "consumed" by the delegate iterator. If context.method was
409
+ // "return", allow the original .return call to continue in the
410
+ // outer generator.
411
+ if (context.method !== "return") {
412
+ context.method = "next";
413
+ context.arg = undefined$1;
414
+ }
415
+
416
+ } else {
417
+ // Re-yield the result returned by the delegate method.
418
+ return info;
419
+ }
420
+
421
+ // The delegate iterator is finished, so forget it and continue with
422
+ // the outer generator.
423
+ context.delegate = null;
424
+ return ContinueSentinel;
425
+ }
426
+
427
+ // Define Generator.prototype.{next,throw,return} in terms of the
428
+ // unified ._invoke helper method.
429
+ defineIteratorMethods(Gp);
430
+
431
+ define(Gp, toStringTagSymbol, "Generator");
432
+
433
+ // A Generator should always return itself as the iterator object when the
434
+ // @@iterator function is called on it. Some browsers' implementations of the
435
+ // iterator prototype chain incorrectly implement this, causing the Generator
436
+ // object to not be returned from this call. This ensures that doesn't happen.
437
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
438
+ Gp[iteratorSymbol] = function() {
439
+ return this;
440
+ };
441
+
442
+ Gp.toString = function() {
443
+ return "[object Generator]";
444
+ };
445
+
446
+ function pushTryEntry(locs) {
447
+ var entry = { tryLoc: locs[0] };
448
+
449
+ if (1 in locs) {
450
+ entry.catchLoc = locs[1];
451
+ }
452
+
453
+ if (2 in locs) {
454
+ entry.finallyLoc = locs[2];
455
+ entry.afterLoc = locs[3];
456
+ }
457
+
458
+ this.tryEntries.push(entry);
459
+ }
460
+
461
+ function resetTryEntry(entry) {
462
+ var record = entry.completion || {};
463
+ record.type = "normal";
464
+ delete record.arg;
465
+ entry.completion = record;
466
+ }
467
+
468
+ function Context(tryLocsList) {
469
+ // The root entry object (effectively a try statement without a catch
470
+ // or a finally block) gives us a place to store values thrown from
471
+ // locations where there is no enclosing try statement.
472
+ this.tryEntries = [{ tryLoc: "root" }];
473
+ tryLocsList.forEach(pushTryEntry, this);
474
+ this.reset(true);
475
+ }
476
+
477
+ exports.keys = function(object) {
478
+ var keys = [];
479
+ for (var key in object) {
480
+ keys.push(key);
481
+ }
482
+ keys.reverse();
483
+
484
+ // Rather than returning an object with a next method, we keep
485
+ // things simple and return the next function itself.
486
+ return function next() {
487
+ while (keys.length) {
488
+ var key = keys.pop();
489
+ if (key in object) {
490
+ next.value = key;
491
+ next.done = false;
492
+ return next;
493
+ }
494
+ }
495
+
496
+ // To avoid creating an additional object, we just hang the .value
497
+ // and .done properties off the next function object itself. This
498
+ // also ensures that the minifier will not anonymize the function.
499
+ next.done = true;
500
+ return next;
501
+ };
502
+ };
503
+
504
+ function values(iterable) {
505
+ if (iterable) {
506
+ var iteratorMethod = iterable[iteratorSymbol];
507
+ if (iteratorMethod) {
508
+ return iteratorMethod.call(iterable);
509
+ }
510
+
511
+ if (typeof iterable.next === "function") {
512
+ return iterable;
513
+ }
514
+
515
+ if (!isNaN(iterable.length)) {
516
+ var i = -1, next = function next() {
517
+ while (++i < iterable.length) {
518
+ if (hasOwn.call(iterable, i)) {
519
+ next.value = iterable[i];
520
+ next.done = false;
521
+ return next;
522
+ }
523
+ }
524
+
525
+ next.value = undefined$1;
526
+ next.done = true;
527
+
528
+ return next;
529
+ };
530
+
531
+ return next.next = next;
532
+ }
533
+ }
534
+
535
+ // Return an iterator with no values.
536
+ return { next: doneResult };
537
+ }
538
+ exports.values = values;
539
+
540
+ function doneResult() {
541
+ return { value: undefined$1, done: true };
542
+ }
543
+
544
+ Context.prototype = {
545
+ constructor: Context,
546
+
547
+ reset: function(skipTempReset) {
548
+ this.prev = 0;
549
+ this.next = 0;
550
+ // Resetting context._sent for legacy support of Babel's
551
+ // function.sent implementation.
552
+ this.sent = this._sent = undefined$1;
553
+ this.done = false;
554
+ this.delegate = null;
555
+
556
+ this.method = "next";
557
+ this.arg = undefined$1;
558
+
559
+ this.tryEntries.forEach(resetTryEntry);
560
+
561
+ if (!skipTempReset) {
562
+ for (var name in this) {
563
+ // Not sure about the optimal order of these conditions:
564
+ if (name.charAt(0) === "t" &&
565
+ hasOwn.call(this, name) &&
566
+ !isNaN(+name.slice(1))) {
567
+ this[name] = undefined$1;
568
+ }
569
+ }
570
+ }
571
+ },
572
+
573
+ stop: function() {
574
+ this.done = true;
575
+
576
+ var rootEntry = this.tryEntries[0];
577
+ var rootRecord = rootEntry.completion;
578
+ if (rootRecord.type === "throw") {
579
+ throw rootRecord.arg;
580
+ }
581
+
582
+ return this.rval;
583
+ },
584
+
585
+ dispatchException: function(exception) {
586
+ if (this.done) {
587
+ throw exception;
588
+ }
589
+
590
+ var context = this;
591
+ function handle(loc, caught) {
592
+ record.type = "throw";
593
+ record.arg = exception;
594
+ context.next = loc;
595
+
596
+ if (caught) {
597
+ // If the dispatched exception was caught by a catch block,
598
+ // then let that catch block handle the exception normally.
599
+ context.method = "next";
600
+ context.arg = undefined$1;
601
+ }
602
+
603
+ return !! caught;
604
+ }
605
+
606
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
607
+ var entry = this.tryEntries[i];
608
+ var record = entry.completion;
609
+
610
+ if (entry.tryLoc === "root") {
611
+ // Exception thrown outside of any try block that could handle
612
+ // it, so set the completion value of the entire function to
613
+ // throw the exception.
614
+ return handle("end");
615
+ }
616
+
617
+ if (entry.tryLoc <= this.prev) {
618
+ var hasCatch = hasOwn.call(entry, "catchLoc");
619
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
620
+
621
+ if (hasCatch && hasFinally) {
622
+ if (this.prev < entry.catchLoc) {
623
+ return handle(entry.catchLoc, true);
624
+ } else if (this.prev < entry.finallyLoc) {
625
+ return handle(entry.finallyLoc);
626
+ }
627
+
628
+ } else if (hasCatch) {
629
+ if (this.prev < entry.catchLoc) {
630
+ return handle(entry.catchLoc, true);
631
+ }
632
+
633
+ } else if (hasFinally) {
634
+ if (this.prev < entry.finallyLoc) {
635
+ return handle(entry.finallyLoc);
636
+ }
637
+
638
+ } else {
639
+ throw new Error("try statement without catch or finally");
640
+ }
641
+ }
642
+ }
643
+ },
644
+
645
+ abrupt: function(type, arg) {
646
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
647
+ var entry = this.tryEntries[i];
648
+ if (entry.tryLoc <= this.prev &&
649
+ hasOwn.call(entry, "finallyLoc") &&
650
+ this.prev < entry.finallyLoc) {
651
+ var finallyEntry = entry;
652
+ break;
653
+ }
654
+ }
655
+
656
+ if (finallyEntry &&
657
+ (type === "break" ||
658
+ type === "continue") &&
659
+ finallyEntry.tryLoc <= arg &&
660
+ arg <= finallyEntry.finallyLoc) {
661
+ // Ignore the finally entry if control is not jumping to a
662
+ // location outside the try/catch block.
663
+ finallyEntry = null;
664
+ }
665
+
666
+ var record = finallyEntry ? finallyEntry.completion : {};
667
+ record.type = type;
668
+ record.arg = arg;
669
+
670
+ if (finallyEntry) {
671
+ this.method = "next";
672
+ this.next = finallyEntry.finallyLoc;
673
+ return ContinueSentinel;
674
+ }
675
+
676
+ return this.complete(record);
677
+ },
678
+
679
+ complete: function(record, afterLoc) {
680
+ if (record.type === "throw") {
681
+ throw record.arg;
682
+ }
683
+
684
+ if (record.type === "break" ||
685
+ record.type === "continue") {
686
+ this.next = record.arg;
687
+ } else if (record.type === "return") {
688
+ this.rval = this.arg = record.arg;
689
+ this.method = "return";
690
+ this.next = "end";
691
+ } else if (record.type === "normal" && afterLoc) {
692
+ this.next = afterLoc;
693
+ }
694
+
695
+ return ContinueSentinel;
696
+ },
697
+
698
+ finish: function(finallyLoc) {
699
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
700
+ var entry = this.tryEntries[i];
701
+ if (entry.finallyLoc === finallyLoc) {
702
+ this.complete(entry.completion, entry.afterLoc);
703
+ resetTryEntry(entry);
704
+ return ContinueSentinel;
705
+ }
706
+ }
707
+ },
708
+
709
+ "catch": function(tryLoc) {
710
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
711
+ var entry = this.tryEntries[i];
712
+ if (entry.tryLoc === tryLoc) {
713
+ var record = entry.completion;
714
+ if (record.type === "throw") {
715
+ var thrown = record.arg;
716
+ resetTryEntry(entry);
717
+ }
718
+ return thrown;
719
+ }
720
+ }
721
+
722
+ // The context.catch method must only be called with a location
723
+ // argument that corresponds to a known catch block.
724
+ throw new Error("illegal catch attempt");
725
+ },
726
+
727
+ delegateYield: function(iterable, resultName, nextLoc) {
728
+ this.delegate = {
729
+ iterator: values(iterable),
730
+ resultName: resultName,
731
+ nextLoc: nextLoc
732
+ };
733
+
734
+ if (this.method === "next") {
735
+ // Deliberately forget the last sent value so that we don't
736
+ // accidentally pass it on to the delegate.
737
+ this.arg = undefined$1;
738
+ }
739
+
740
+ return ContinueSentinel;
741
+ }
742
+ };
743
+
744
+ // Regardless of whether this script is executing as a CommonJS module
745
+ // or not, return the runtime object so that we can declare the variable
746
+ // regeneratorRuntime in the outer scope, which allows this module to be
747
+ // injected easily by `bin/regenerator --include-runtime script.js`.
748
+ return exports;
749
+
750
+ }(
751
+ // If this script is executing as a CommonJS module, use module.exports
752
+ // as the regeneratorRuntime namespace. Otherwise create a new empty
753
+ // object. Either way, the resulting object will be used to initialize
754
+ // the regeneratorRuntime variable at the top of this file.
755
+ module.exports
756
+ ));
757
+
758
+ try {
759
+ regeneratorRuntime = runtime;
760
+ } catch (accidentalStrictMode) {
761
+ // This module should not be running in strict mode, so the above
762
+ // assignment should always work unless something is misconfigured. Just
763
+ // in case runtime.js accidentally runs in strict mode, we can escape
764
+ // strict mode using a global Function call. This could conceivably fail
765
+ // if a Content Security Policy forbids using Function, but in that case
766
+ // the proper solution is to fix the accidental strict mode problem. If
767
+ // you've misconfigured your bundler to force strict mode and applied a
768
+ // CSP to forbid Function, and you're not willing to fix either of those
769
+ // problems, please detail your unique predicament in a GitHub issue.
770
+ Function("r", "regeneratorRuntime = r")(runtime);
771
+ }
772
+ });
773
+
774
+ var regenerator = runtime_1;
775
+
776
+ var arrayWithHoles = createCommonjsModule(function (module) {
777
+ function _arrayWithHoles(arr) {
778
+ if (Array.isArray(arr)) return arr;
779
+ }
780
+
781
+ module.exports = _arrayWithHoles;
782
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
783
+ });
784
+
785
+ unwrapExports(arrayWithHoles);
786
+
787
+ var iterableToArrayLimit = createCommonjsModule(function (module) {
788
+ function _iterableToArrayLimit(arr, i) {
789
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
790
+
791
+ if (_i == null) return;
792
+ var _arr = [];
793
+ var _n = true;
794
+ var _d = false;
795
+
796
+ var _s, _e;
797
+
798
+ try {
799
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
800
+ _arr.push(_s.value);
801
+
802
+ if (i && _arr.length === i) break;
803
+ }
804
+ } catch (err) {
805
+ _d = true;
806
+ _e = err;
807
+ } finally {
808
+ try {
809
+ if (!_n && _i["return"] != null) _i["return"]();
810
+ } finally {
811
+ if (_d) throw _e;
812
+ }
813
+ }
814
+
815
+ return _arr;
816
+ }
817
+
818
+ module.exports = _iterableToArrayLimit;
819
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
820
+ });
821
+
822
+ unwrapExports(iterableToArrayLimit);
823
+
824
+ var arrayLikeToArray = createCommonjsModule(function (module) {
825
+ function _arrayLikeToArray(arr, len) {
826
+ if (len == null || len > arr.length) len = arr.length;
827
+
828
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
829
+ arr2[i] = arr[i];
830
+ }
831
+
832
+ return arr2;
833
+ }
834
+
835
+ module.exports = _arrayLikeToArray;
836
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
837
+ });
838
+
839
+ unwrapExports(arrayLikeToArray);
840
+
841
+ var unsupportedIterableToArray = createCommonjsModule(function (module) {
842
+ function _unsupportedIterableToArray(o, minLen) {
843
+ if (!o) return;
844
+ if (typeof o === "string") return arrayLikeToArray(o, minLen);
845
+ var n = Object.prototype.toString.call(o).slice(8, -1);
846
+ if (n === "Object" && o.constructor) n = o.constructor.name;
847
+ if (n === "Map" || n === "Set") return Array.from(o);
848
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
849
+ }
850
+
851
+ module.exports = _unsupportedIterableToArray;
852
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
853
+ });
854
+
855
+ unwrapExports(unsupportedIterableToArray);
856
+
857
+ var nonIterableRest = createCommonjsModule(function (module) {
858
+ function _nonIterableRest() {
859
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
860
+ }
861
+
862
+ module.exports = _nonIterableRest;
863
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
864
+ });
865
+
866
+ unwrapExports(nonIterableRest);
867
+
868
+ var slicedToArray = createCommonjsModule(function (module) {
869
+ function _slicedToArray(arr, i) {
870
+ return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
871
+ }
872
+
873
+ module.exports = _slicedToArray;
874
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
875
+ });
876
+
877
+ unwrapExports(slicedToArray);
878
+
879
+ var logger = createCommonjsModule(function (module, exports) {
880
+
881
+ Object.defineProperty(exports, "__esModule", {
882
+ value: true
883
+ });
884
+ exports.setLogger = setLogger;
885
+ exports.proxyLogger = proxyLogger;
886
+ exports.default = void 0;
887
+ const _logger = {
888
+ error(code, ...message) {
889
+ console.error(`[next-auth][error][${code.toLowerCase()}]`, `\nhttps://next-auth.js.org/errors#${code.toLowerCase()}`, ...message);
890
+ },
891
+
892
+ warn(code, ...message) {
893
+ console.warn(`[next-auth][warn][${code.toLowerCase()}]`, `\nhttps://next-auth.js.org/warnings#${code.toLowerCase()}`, ...message);
894
+ },
895
+
896
+ debug(code, ...message) {
897
+ var _process, _process$env;
898
+
899
+ if (!((_process = process) !== null && _process !== void 0 && (_process$env = _process.env) !== null && _process$env !== void 0 && _process$env._NEXTAUTH_DEBUG)) return;
900
+ console.log(`[next-auth][debug][${code.toLowerCase()}]`, ...message);
42
901
  }
43
902
 
44
903
  };
45
- var _default = logger;
904
+
905
+ function setLogger(newLogger = {}) {
906
+ if (newLogger.error) _logger.error = newLogger.error;
907
+ if (newLogger.warn) _logger.warn = newLogger.warn;
908
+ if (newLogger.debug) _logger.debug = newLogger.debug;
909
+ }
910
+
911
+ var _default = _logger;
46
912
  exports.default = _default;
913
+
914
+ function proxyLogger(logger = _logger, basePath) {
915
+ try {
916
+ if (typeof window === "undefined") {
917
+ return logger;
918
+ }
919
+
920
+ const clientLogger = {};
921
+
922
+ for (const level in logger) {
923
+ clientLogger[level] = (code, ...message) => {
924
+ _logger[level](code, ...message);
925
+
926
+ const url = `${basePath}/_log`;
927
+ const body = new URLSearchParams({
928
+ level,
929
+ code,
930
+ message: JSON.stringify(message.map(m => {
931
+ if (m instanceof Error) {
932
+ return {
933
+ name: m.name,
934
+ message: m.message,
935
+ stack: m.stack
936
+ };
937
+ }
938
+
939
+ return m;
940
+ }))
941
+ });
942
+
943
+ if (navigator.sendBeacon) {
944
+ return navigator.sendBeacon(url, body);
945
+ }
946
+
947
+ return fetch(url, {
948
+ method: "POST",
949
+ headers: {
950
+ "Content-Type": "application/json"
951
+ },
952
+ body
953
+ });
954
+ };
955
+ }
956
+
957
+ return clientLogger;
958
+ } catch (_unused) {
959
+ return _logger;
960
+ }
961
+ }
47
962
  });
48
963
 
49
- unwrapExports(logger_1);
964
+ unwrapExports(logger);
965
+ logger.setLogger;
966
+ logger.proxyLogger;
50
967
 
51
968
  var parseUrl_1 = createCommonjsModule(function (module, exports) {
52
969
 
@@ -56,18 +973,18 @@ Object.defineProperty(exports, "__esModule", {
56
973
  exports.default = parseUrl;
57
974
 
58
975
  function parseUrl(url) {
59
- var defaultHost = 'http://localhost:3000';
60
- var defaultPath = '/api/auth';
976
+ const defaultHost = 'http://localhost:3000';
977
+ const defaultPath = '/api/auth';
61
978
 
62
979
  if (!url) {
63
- url = "".concat(defaultHost).concat(defaultPath);
980
+ url = `${defaultHost}${defaultPath}`;
64
981
  }
65
982
 
66
- var protocol = url.startsWith('http:') ? 'http' : 'https';
983
+ const protocol = url.startsWith('http:') ? 'http' : 'https';
67
984
  url = url.replace(/^https?:\/\//, '').replace(/\/$/, '');
68
- var [_host, ..._path] = url.split('/');
69
- var baseUrl = _host ? "".concat(protocol, "://").concat(_host) : defaultHost;
70
- var basePath = _path.length > 0 ? "/".concat(_path.join('/')) : defaultPath;
985
+ const [_host, ..._path] = url.split('/');
986
+ const baseUrl = _host ? `${protocol}://${_host}` : defaultHost;
987
+ const basePath = _path.length > 0 ? `/${_path.join('/')}` : defaultPath;
71
988
  return {
72
989
  baseUrl,
73
990
  basePath
@@ -77,336 +994,444 @@ function parseUrl(url) {
77
994
 
78
995
  unwrapExports(parseUrl_1);
79
996
 
80
- var client = createCommonjsModule(function (module, exports) {
997
+ var client$1 = createCommonjsModule(function (module, exports) {
998
+
999
+
1000
+
1001
+
81
1002
 
82
1003
  Object.defineProperty(exports, "__esModule", {
83
1004
  value: true
84
1005
  });
85
- exports.getSession = getSession;
86
- exports.signIn = signIn;
87
- exports.signOut = signOut;
88
- exports.default = exports.Provider = exports.useSession = void 0;
1006
+ exports.useSession = useSession;
1007
+ exports.session = exports.getSession = getSession;
1008
+ exports.csrfToken = exports.getCsrfToken = getCsrfToken;
1009
+ exports.providers = exports.getProviders = getProviders;
1010
+ exports.signin = exports.signIn = signIn;
1011
+ exports.signout = exports.signOut = signOut;
1012
+ exports.options = exports.setOptions = setOptions;
1013
+ exports.Provider = Provider;
1014
+ exports.default = void 0;
89
1015
 
1016
+ var _regenerator = interopRequireDefault(regenerator);
90
1017
 
1018
+ var _defineProperty2 = interopRequireDefault(defineProperty);
91
1019
 
92
- var _logger = _interopRequireDefault(logger_1);
1020
+ var _asyncToGenerator2 = interopRequireDefault(asyncToGenerator);
93
1021
 
94
- var _parseUrl = _interopRequireDefault(parseUrl_1);
1022
+ var _slicedToArray2 = interopRequireDefault(slicedToArray);
95
1023
 
96
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
97
1024
 
98
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
99
1025
 
100
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1026
+ var _logger2 = _interopRequireWildcard(logger);
101
1027
 
102
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1028
+ var _parseUrl = interopRequireDefault(parseUrl_1);
103
1029
 
104
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
1030
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
105
1031
 
106
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
1032
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof_1(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
1033
+
1034
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
1035
+
1036
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
107
1037
 
108
1038
  var __NEXTAUTH = {
109
1039
  baseUrl: (0, _parseUrl.default)(process.env.NEXTAUTH_URL || process.env.VERCEL_URL).baseUrl,
110
1040
  basePath: (0, _parseUrl.default)(process.env.NEXTAUTH_URL).basePath,
1041
+ baseUrlServer: (0, _parseUrl.default)(process.env.NEXTAUTH_URL_INTERNAL || process.env.NEXTAUTH_URL || process.env.VERCEL_URL).baseUrl,
1042
+ basePathServer: (0, _parseUrl.default)(process.env.NEXTAUTH_URL_INTERNAL || process.env.NEXTAUTH_URL).basePath,
111
1043
  keepAlive: 0,
112
1044
  clientMaxAge: 0,
113
1045
  _clientLastSync: 0,
114
1046
  _clientSyncTimer: null,
115
1047
  _eventListenersAdded: false,
116
1048
  _clientSession: undefined,
117
- _clientId: Math.random().toString(36).substring(2) + Date.now().toString(36),
118
- _getSession: () => {}
1049
+ _getSession: function _getSession() {}
119
1050
  };
120
-
121
- if (typeof window !== 'undefined') {
122
- if (__NEXTAUTH._eventListenersAdded === false) {
123
- __NEXTAUTH._eventListenersAdded = true;
124
- window.addEventListener('storage', function () {
125
- var _ref = _asyncToGenerator(function* (event) {
126
- if (event.key === 'nextauth.message') {
127
- var message = JSON.parse(event.newValue);
128
-
129
- if ((message === null || message === void 0 ? void 0 : message.event) === 'session' && message.data) {
130
- if (__NEXTAUTH._clientId === message.clientId) {
131
- return;
132
- }
133
-
134
- yield __NEXTAUTH._getSession({
135
- event: 'storage'
136
- });
137
- }
138
- }
139
- });
140
-
141
- return function (_x) {
142
- return _ref.apply(this, arguments);
143
- };
144
- }());
145
- var hidden, visibilityChange;
146
-
147
- if (typeof document.hidden !== 'undefined') {
148
- hidden = 'hidden';
149
- visibilityChange = 'visibilitychange';
150
- } else if (typeof document.msHidden !== 'undefined') {
151
- hidden = 'msHidden';
152
- visibilityChange = 'msvisibilitychange';
153
- } else if (typeof document.webkitHidden !== 'undefined') {
154
- hidden = 'webkitHidden';
155
- visibilityChange = 'webkitvisibilitychange';
156
- }
157
-
158
- var handleVisibilityChange = () => !document[hidden] && __NEXTAUTH._getSession({
159
- event: visibilityChange
1051
+ var logger$1 = (0, _logger2.proxyLogger)(_logger2.default, __NEXTAUTH.basePath);
1052
+ var broadcast = BroadcastChannel();
1053
+
1054
+ if (typeof window !== "undefined" && !__NEXTAUTH._eventListenersAdded) {
1055
+ __NEXTAUTH._eventListenersAdded = true;
1056
+ broadcast.receive(function () {
1057
+ return __NEXTAUTH._getSession({
1058
+ event: "storage"
160
1059
  });
161
-
162
- document.addEventListener('visibilitychange', handleVisibilityChange, false);
163
- }
1060
+ });
1061
+ document.addEventListener("visibilitychange", function () {
1062
+ !document.hidden && __NEXTAUTH._getSession({
1063
+ event: "visibilitychange"
1064
+ });
1065
+ }, false);
164
1066
  }
165
1067
 
166
- var setOptions = function setOptions() {
167
- var {
168
- baseUrl,
169
- basePath,
170
- clientMaxAge,
171
- keepAlive
172
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
173
-
174
- if (baseUrl) {
175
- __NEXTAUTH.baseUrl = baseUrl;
176
- }
177
-
178
- if (basePath) {
179
- __NEXTAUTH.basePath = basePath;
180
- }
181
-
182
- if (clientMaxAge) {
183
- __NEXTAUTH.clientMaxAge = clientMaxAge;
184
- }
185
-
186
- if (keepAlive) {
187
- __NEXTAUTH.keepAlive = keepAlive;
188
-
189
- if (typeof window !== 'undefined' && keepAlive > 0) {
190
- if (__NEXTAUTH._clientSyncTimer !== null) {
191
- clearTimeout(__NEXTAUTH._clientSyncTimer);
192
- }
193
-
194
- __NEXTAUTH._clientSyncTimer = setTimeout(_asyncToGenerator(function* () {
195
- if (__NEXTAUTH._clientSession) {
196
- yield __NEXTAUTH._getSession({
197
- event: 'timer'
198
- });
199
- }
200
- }), keepAlive * 1000);
201
- }
202
- }
203
- };
1068
+ var SessionContext = (0, React__default.createContext)();
204
1069
 
205
- function getSession() {
206
- return _getSession2.apply(this, arguments);
1070
+ function useSession(session) {
1071
+ var context = (0, React__default.useContext)(SessionContext);
1072
+ if (context) return context;
1073
+ return _useSessionHook(session);
207
1074
  }
208
1075
 
209
- function _getSession2() {
210
- _getSession2 = _asyncToGenerator(function* () {
211
- var {
212
- ctx,
213
- req = ctx === null || ctx === void 0 ? void 0 : ctx.req,
214
- triggerEvent = true
215
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
216
-
217
- var baseUrl = _apiBaseUrl();
218
-
219
- var fetchOptions = req ? {
220
- headers: {
221
- cookie: req.headers.cookie
222
- }
223
- } : {};
224
- var session = yield _fetchData("".concat(baseUrl, "/session"), fetchOptions);
225
-
226
- if (triggerEvent) {
227
- _sendMessage({
228
- event: 'session',
229
- data: {
230
- trigger: 'getSession'
1076
+ function _useSessionHook(session) {
1077
+ var _useState = (0, React__default.useState)(session),
1078
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
1079
+ data = _useState2[0],
1080
+ setData = _useState2[1];
1081
+
1082
+ var _useState3 = (0, React__default.useState)(!data),
1083
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
1084
+ loading = _useState4[0],
1085
+ setLoading = _useState4[1];
1086
+
1087
+ (0, React__default.useEffect)(function () {
1088
+ __NEXTAUTH._getSession = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee() {
1089
+ var _ref2,
1090
+ _ref2$event,
1091
+ event,
1092
+ triggredByEvent,
1093
+ triggeredByStorageEvent,
1094
+ clientMaxAge,
1095
+ clientLastSync,
1096
+ currentTime,
1097
+ clientSession,
1098
+ newClientSessionData,
1099
+ _args = arguments;
1100
+
1101
+ return _regenerator.default.wrap(function _callee$(_context) {
1102
+ while (1) {
1103
+ switch (_context.prev = _context.next) {
1104
+ case 0:
1105
+ _ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$event = _ref2.event, event = _ref2$event === void 0 ? null : _ref2$event;
1106
+ _context.prev = 1;
1107
+ triggredByEvent = event !== null;
1108
+ triggeredByStorageEvent = event === "storage";
1109
+ clientMaxAge = __NEXTAUTH.clientMaxAge;
1110
+ clientLastSync = parseInt(__NEXTAUTH._clientLastSync);
1111
+ currentTime = _now();
1112
+ clientSession = __NEXTAUTH._clientSession;
1113
+
1114
+ if (!(!triggeredByStorageEvent && clientSession !== undefined)) {
1115
+ _context.next = 19;
1116
+ break;
1117
+ }
1118
+
1119
+ if (!(clientMaxAge === 0 && triggredByEvent !== true)) {
1120
+ _context.next = 13;
1121
+ break;
1122
+ }
1123
+
1124
+ return _context.abrupt("return");
1125
+
1126
+ case 13:
1127
+ if (!(clientMaxAge > 0 && clientSession === null)) {
1128
+ _context.next = 17;
1129
+ break;
1130
+ }
1131
+
1132
+ return _context.abrupt("return");
1133
+
1134
+ case 17:
1135
+ if (!(clientMaxAge > 0 && currentTime < clientLastSync + clientMaxAge)) {
1136
+ _context.next = 19;
1137
+ break;
1138
+ }
1139
+
1140
+ return _context.abrupt("return");
1141
+
1142
+ case 19:
1143
+ if (clientSession === undefined) {
1144
+ __NEXTAUTH._clientSession = null;
1145
+ }
1146
+
1147
+ __NEXTAUTH._clientLastSync = _now();
1148
+ _context.next = 23;
1149
+ return getSession({
1150
+ triggerEvent: !triggeredByStorageEvent
1151
+ });
1152
+
1153
+ case 23:
1154
+ newClientSessionData = _context.sent;
1155
+ __NEXTAUTH._clientSession = newClientSessionData;
1156
+ setData(newClientSessionData);
1157
+ setLoading(false);
1158
+ _context.next = 33;
1159
+ break;
1160
+
1161
+ case 29:
1162
+ _context.prev = 29;
1163
+ _context.t0 = _context["catch"](1);
1164
+ logger$1.error("CLIENT_USE_SESSION_ERROR", _context.t0);
1165
+ setLoading(false);
1166
+
1167
+ case 33:
1168
+ case "end":
1169
+ return _context.stop();
1170
+ }
231
1171
  }
232
- });
233
- }
1172
+ }, _callee, null, [[1, 29]]);
1173
+ }));
234
1174
 
235
- return session;
1175
+ __NEXTAUTH._getSession();
236
1176
  });
237
- return _getSession2.apply(this, arguments);
1177
+ return [data, loading];
238
1178
  }
239
1179
 
240
- function getCsrfToken() {
241
- return _getCsrfToken.apply(this, arguments);
1180
+ function getSession(_x) {
1181
+ return _getSession2.apply(this, arguments);
242
1182
  }
243
1183
 
244
- function _getCsrfToken() {
245
- _getCsrfToken = _asyncToGenerator(function* () {
246
- var {
247
- ctx,
248
- req = ctx === null || ctx === void 0 ? void 0 : ctx.req
249
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1184
+ function _getSession2() {
1185
+ _getSession2 = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee4(ctx) {
1186
+ var _ctx$triggerEvent;
1187
+
1188
+ var session;
1189
+ return _regenerator.default.wrap(function _callee4$(_context4) {
1190
+ while (1) {
1191
+ switch (_context4.prev = _context4.next) {
1192
+ case 0:
1193
+ _context4.next = 2;
1194
+ return _fetchData("session", ctx);
1195
+
1196
+ case 2:
1197
+ session = _context4.sent;
1198
+
1199
+ if ((_ctx$triggerEvent = ctx === null || ctx === void 0 ? void 0 : ctx.triggerEvent) !== null && _ctx$triggerEvent !== void 0 ? _ctx$triggerEvent : true) {
1200
+ broadcast.post({
1201
+ event: "session",
1202
+ data: {
1203
+ trigger: "getSession"
1204
+ }
1205
+ });
1206
+ }
250
1207
 
251
- var baseUrl = _apiBaseUrl();
1208
+ return _context4.abrupt("return", session);
252
1209
 
253
- var fetchOptions = req ? {
254
- headers: {
255
- cookie: req.headers.cookie
1210
+ case 5:
1211
+ case "end":
1212
+ return _context4.stop();
1213
+ }
256
1214
  }
257
- } : {};
258
- var data = yield _fetchData("".concat(baseUrl, "/csrf"), fetchOptions);
259
- return data && data.csrfToken ? data.csrfToken : null;
260
- });
261
- return _getCsrfToken.apply(this, arguments);
1215
+ }, _callee4);
1216
+ }));
1217
+ return _getSession2.apply(this, arguments);
262
1218
  }
263
1219
 
264
- var getProviders = function () {
265
- var _ref3 = _asyncToGenerator(function* () {
266
- var baseUrl = _apiBaseUrl();
267
-
268
- return _fetchData("".concat(baseUrl, "/providers"));
269
- });
270
-
271
- return function getProviders() {
272
- return _ref3.apply(this, arguments);
273
- };
274
- }();
275
-
276
- var SessionContext = (0, React__default.createContext)();
1220
+ function getCsrfToken(_x2) {
1221
+ return _getCsrfToken.apply(this, arguments);
1222
+ }
277
1223
 
278
- var useSession = session => {
279
- var value = (0, React__default.useContext)(SessionContext);
1224
+ function _getCsrfToken() {
1225
+ _getCsrfToken = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee5(ctx) {
1226
+ var _yield$_fetchData;
1227
+
1228
+ return _regenerator.default.wrap(function _callee5$(_context5) {
1229
+ while (1) {
1230
+ switch (_context5.prev = _context5.next) {
1231
+ case 0:
1232
+ _context5.next = 2;
1233
+ return _fetchData("csrf", ctx);
1234
+
1235
+ case 2:
1236
+ _context5.t1 = _yield$_fetchData = _context5.sent;
1237
+ _context5.t0 = _context5.t1 === null;
1238
+
1239
+ if (_context5.t0) {
1240
+ _context5.next = 6;
1241
+ break;
1242
+ }
280
1243
 
281
- if (value === undefined) {
282
- return _useSessionHook(session);
283
- }
1244
+ _context5.t0 = _yield$_fetchData === void 0;
284
1245
 
285
- return value;
286
- };
1246
+ case 6:
1247
+ if (!_context5.t0) {
1248
+ _context5.next = 10;
1249
+ break;
1250
+ }
287
1251
 
288
- exports.useSession = useSession;
1252
+ _context5.t2 = void 0;
1253
+ _context5.next = 11;
1254
+ break;
289
1255
 
290
- var _useSessionHook = session => {
291
- var [data, setData] = (0, React__default.useState)(session);
292
- var [loading, setLoading] = (0, React__default.useState)(true);
293
- (0, React__default.useEffect)(() => {
294
- var _getSession = function () {
295
- var _ref4 = _asyncToGenerator(function* () {
296
- var {
297
- event = null
298
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
299
-
300
- try {
301
- var triggredByEvent = event !== null;
302
- var triggeredByStorageEvent = !!(event && event === 'storage');
303
- var clientMaxAge = __NEXTAUTH.clientMaxAge;
304
- var clientLastSync = parseInt(__NEXTAUTH._clientLastSync);
305
- var currentTime = Math.floor(new Date().getTime() / 1000);
306
- var clientSession = __NEXTAUTH._clientSession;
307
-
308
- if (triggeredByStorageEvent === false && clientSession !== undefined) {
309
- if (clientMaxAge === 0 && triggredByEvent !== true) {
310
- return;
311
- } else if (clientMaxAge > 0 && clientSession === null) {
312
- return;
313
- } else if (clientMaxAge > 0 && currentTime < clientLastSync + clientMaxAge) {
314
- return;
315
- }
316
- }
1256
+ case 10:
1257
+ _context5.t2 = _yield$_fetchData.csrfToken;
317
1258
 
318
- if (clientSession === undefined) {
319
- __NEXTAUTH._clientSession = null;
320
- }
1259
+ case 11:
1260
+ return _context5.abrupt("return", _context5.t2);
321
1261
 
322
- __NEXTAUTH._clientLastSync = Math.floor(new Date().getTime() / 1000);
323
- var triggerEvent = triggeredByStorageEvent === false;
324
- var newClientSessionData = yield getSession({
325
- triggerEvent
326
- });
327
- __NEXTAUTH._clientSession = newClientSessionData;
328
- setData(newClientSessionData);
329
- setLoading(false);
330
- } catch (error) {
331
- _logger.default.error('CLIENT_USE_SESSION_ERROR', error);
1262
+ case 12:
1263
+ case "end":
1264
+ return _context5.stop();
332
1265
  }
333
- });
334
-
335
- return function _getSession() {
336
- return _ref4.apply(this, arguments);
337
- };
338
- }();
1266
+ }
1267
+ }, _callee5);
1268
+ }));
1269
+ return _getCsrfToken.apply(this, arguments);
1270
+ }
339
1271
 
340
- __NEXTAUTH._getSession = _getSession;
1272
+ function getProviders() {
1273
+ return _getProviders.apply(this, arguments);
1274
+ }
341
1275
 
342
- _getSession();
343
- });
344
- return [data, loading];
345
- };
1276
+ function _getProviders() {
1277
+ _getProviders = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee6() {
1278
+ return _regenerator.default.wrap(function _callee6$(_context6) {
1279
+ while (1) {
1280
+ switch (_context6.prev = _context6.next) {
1281
+ case 0:
1282
+ _context6.next = 2;
1283
+ return _fetchData("providers");
1284
+
1285
+ case 2:
1286
+ return _context6.abrupt("return", _context6.sent);
1287
+
1288
+ case 3:
1289
+ case "end":
1290
+ return _context6.stop();
1291
+ }
1292
+ }
1293
+ }, _callee6);
1294
+ }));
1295
+ return _getProviders.apply(this, arguments);
1296
+ }
346
1297
 
347
- function signIn(_x2) {
1298
+ function signIn(_x3) {
348
1299
  return _signIn.apply(this, arguments);
349
1300
  }
350
1301
 
351
1302
  function _signIn() {
352
- _signIn = _asyncToGenerator(function* (provider) {
353
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
354
- var authorizationParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
355
- var {
356
- callbackUrl = window.location,
357
- redirect = true
358
- } = options;
359
-
360
- var baseUrl = _apiBaseUrl();
361
-
362
- var providers = yield getProviders();
1303
+ _signIn = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee7(provider) {
1304
+ var options,
1305
+ authorizationParams,
1306
+ _options$callbackUrl,
1307
+ callbackUrl,
1308
+ _options$redirect,
1309
+ redirect,
1310
+ baseUrl,
1311
+ providers,
1312
+ isCredentials,
1313
+ isEmail,
1314
+ isSupportingReturn,
1315
+ signInUrl,
1316
+ _signInUrl,
1317
+ res,
1318
+ data,
1319
+ _data$url,
1320
+ url,
1321
+ error,
1322
+ _args7 = arguments;
1323
+
1324
+ return _regenerator.default.wrap(function _callee7$(_context7) {
1325
+ while (1) {
1326
+ switch (_context7.prev = _context7.next) {
1327
+ case 0:
1328
+ options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
1329
+ authorizationParams = _args7.length > 2 && _args7[2] !== undefined ? _args7[2] : {};
1330
+ _options$callbackUrl = options.callbackUrl, callbackUrl = _options$callbackUrl === void 0 ? window.location.href : _options$callbackUrl, _options$redirect = options.redirect, redirect = _options$redirect === void 0 ? true : _options$redirect;
1331
+ baseUrl = _apiBaseUrl();
1332
+ _context7.next = 6;
1333
+ return getProviders();
1334
+
1335
+ case 6:
1336
+ providers = _context7.sent;
1337
+
1338
+ if (providers) {
1339
+ _context7.next = 9;
1340
+ break;
1341
+ }
363
1342
 
364
- if (!(provider in providers)) {
365
- window.location = "".concat(baseUrl, "/signin?callbackUrl=").concat(encodeURIComponent(callbackUrl));
366
- return;
367
- }
1343
+ return _context7.abrupt("return", window.location.replace("".concat(baseUrl, "/error")));
368
1344
 
369
- var isCredentials = providers[provider].type === 'credentials';
370
- var signInUrl = isCredentials ? "".concat(baseUrl, "/callback/").concat(provider) : "".concat(baseUrl, "/signin/").concat(provider);
371
- var fetchOptions = {
372
- method: 'post',
373
- headers: {
374
- 'Content-Type': 'application/x-www-form-urlencoded'
375
- },
376
- body: new URLSearchParams(_objectSpread(_objectSpread({}, options), {}, {
377
- csrfToken: yield getCsrfToken(),
378
- callbackUrl,
379
- json: true
380
- }))
381
- };
1345
+ case 9:
1346
+ if (provider in providers) {
1347
+ _context7.next = 11;
1348
+ break;
1349
+ }
382
1350
 
383
- var _signInUrl = "".concat(signInUrl, "?").concat(new URLSearchParams(authorizationParams));
1351
+ return _context7.abrupt("return", window.location.replace("".concat(baseUrl, "/signin?callbackUrl=").concat(encodeURIComponent(callbackUrl))));
1352
+
1353
+ case 11:
1354
+ isCredentials = providers[provider].type === "credentials";
1355
+ isEmail = providers[provider].type === "email";
1356
+ isSupportingReturn = isCredentials || isEmail;
1357
+ signInUrl = isCredentials ? "".concat(baseUrl, "/callback/").concat(provider) : "".concat(baseUrl, "/signin/").concat(provider);
1358
+ _signInUrl = "".concat(signInUrl, "?").concat(new URLSearchParams(authorizationParams));
1359
+ _context7.t0 = fetch;
1360
+ _context7.t1 = _signInUrl;
1361
+ _context7.t2 = {
1362
+ "Content-Type": "application/x-www-form-urlencoded"
1363
+ };
1364
+ _context7.t3 = URLSearchParams;
1365
+ _context7.t4 = _objectSpread;
1366
+ _context7.t5 = _objectSpread({}, options);
1367
+ _context7.t6 = {};
1368
+ _context7.next = 25;
1369
+ return getCsrfToken();
1370
+
1371
+ case 25:
1372
+ _context7.t7 = _context7.sent;
1373
+ _context7.t8 = callbackUrl;
1374
+ _context7.t9 = {
1375
+ csrfToken: _context7.t7,
1376
+ callbackUrl: _context7.t8,
1377
+ json: true
1378
+ };
1379
+ _context7.t10 = (0, _context7.t4)(_context7.t5, _context7.t6, _context7.t9);
1380
+ _context7.t11 = new _context7.t3(_context7.t10);
1381
+ _context7.t12 = {
1382
+ method: "post",
1383
+ headers: _context7.t2,
1384
+ body: _context7.t11
1385
+ };
1386
+ _context7.next = 33;
1387
+ return (0, _context7.t0)(_context7.t1, _context7.t12);
1388
+
1389
+ case 33:
1390
+ res = _context7.sent;
1391
+ _context7.next = 36;
1392
+ return res.json();
1393
+
1394
+ case 36:
1395
+ data = _context7.sent;
1396
+
1397
+ if (!(redirect || !isSupportingReturn)) {
1398
+ _context7.next = 42;
1399
+ break;
1400
+ }
384
1401
 
385
- var res = yield fetch(_signInUrl, fetchOptions);
386
- var data = yield res.json();
1402
+ url = (_data$url = data.url) !== null && _data$url !== void 0 ? _data$url : callbackUrl;
1403
+ window.location.replace(url);
1404
+ if (url.includes("#")) window.location.reload();
1405
+ return _context7.abrupt("return");
387
1406
 
388
- if (redirect || !isCredentials) {
389
- var _data$url;
1407
+ case 42:
1408
+ error = new URL(data.url).searchParams.get("error");
390
1409
 
391
- window.location = (_data$url = data.url) !== null && _data$url !== void 0 ? _data$url : callbackUrl;
392
- return;
393
- }
1410
+ if (!res.ok) {
1411
+ _context7.next = 46;
1412
+ break;
1413
+ }
394
1414
 
395
- var error = new URL(data.url).searchParams.get('error');
1415
+ _context7.next = 46;
1416
+ return __NEXTAUTH._getSession({
1417
+ event: "storage"
1418
+ });
396
1419
 
397
- if (res.ok) {
398
- yield __NEXTAUTH._getSession({
399
- event: 'storage'
400
- });
401
- }
1420
+ case 46:
1421
+ return _context7.abrupt("return", {
1422
+ error: error,
1423
+ status: res.status,
1424
+ ok: res.ok,
1425
+ url: error ? null : data.url
1426
+ });
402
1427
 
403
- return {
404
- error,
405
- status: res.status,
406
- ok: res.ok,
407
- url: error ? null : data.url
408
- };
409
- });
1428
+ case 47:
1429
+ case "end":
1430
+ return _context7.stop();
1431
+ }
1432
+ }
1433
+ }, _callee7);
1434
+ }));
410
1435
  return _signIn.apply(this, arguments);
411
1436
  }
412
1437
 
@@ -415,116 +1440,299 @@ function signOut() {
415
1440
  }
416
1441
 
417
1442
  function _signOut() {
418
- _signOut = _asyncToGenerator(function* () {
419
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
420
- var {
421
- callbackUrl = window.location,
422
- redirect = true
423
- } = options;
424
-
425
- var baseUrl = _apiBaseUrl();
426
-
427
- var fetchOptions = {
428
- method: 'post',
429
- headers: {
430
- 'Content-Type': 'application/x-www-form-urlencoded'
431
- },
432
- body: new URLSearchParams({
433
- csrfToken: yield getCsrfToken(),
1443
+ _signOut = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee8() {
1444
+ var options,
1445
+ _options$callbackUrl2,
434
1446
  callbackUrl,
435
- json: true
436
- })
437
- };
438
- var res = yield fetch("".concat(baseUrl, "/signout"), fetchOptions);
439
- var data = yield res.json();
1447
+ _options$redirect2,
1448
+ redirect,
1449
+ baseUrl,
1450
+ fetchOptions,
1451
+ res,
1452
+ data,
1453
+ _data$url2,
1454
+ url,
1455
+ _args8 = arguments;
1456
+
1457
+ return _regenerator.default.wrap(function _callee8$(_context8) {
1458
+ while (1) {
1459
+ switch (_context8.prev = _context8.next) {
1460
+ case 0:
1461
+ options = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
1462
+ _options$callbackUrl2 = options.callbackUrl, callbackUrl = _options$callbackUrl2 === void 0 ? window.location.href : _options$callbackUrl2, _options$redirect2 = options.redirect, redirect = _options$redirect2 === void 0 ? true : _options$redirect2;
1463
+ baseUrl = _apiBaseUrl();
1464
+ _context8.t0 = {
1465
+ "Content-Type": "application/x-www-form-urlencoded"
1466
+ };
1467
+ _context8.t1 = URLSearchParams;
1468
+ _context8.next = 7;
1469
+ return getCsrfToken();
1470
+
1471
+ case 7:
1472
+ _context8.t2 = _context8.sent;
1473
+ _context8.t3 = callbackUrl;
1474
+ _context8.t4 = {
1475
+ csrfToken: _context8.t2,
1476
+ callbackUrl: _context8.t3,
1477
+ json: true
1478
+ };
1479
+ _context8.t5 = new _context8.t1(_context8.t4);
1480
+ fetchOptions = {
1481
+ method: "post",
1482
+ headers: _context8.t0,
1483
+ body: _context8.t5
1484
+ };
1485
+ _context8.next = 14;
1486
+ return fetch("".concat(baseUrl, "/signout"), fetchOptions);
1487
+
1488
+ case 14:
1489
+ res = _context8.sent;
1490
+ _context8.next = 17;
1491
+ return res.json();
1492
+
1493
+ case 17:
1494
+ data = _context8.sent;
1495
+ broadcast.post({
1496
+ event: "session",
1497
+ data: {
1498
+ trigger: "signout"
1499
+ }
1500
+ });
1501
+
1502
+ if (!redirect) {
1503
+ _context8.next = 24;
1504
+ break;
1505
+ }
1506
+
1507
+ url = (_data$url2 = data.url) !== null && _data$url2 !== void 0 ? _data$url2 : callbackUrl;
1508
+ window.location.replace(url);
1509
+ if (url.includes("#")) window.location.reload();
1510
+ return _context8.abrupt("return");
440
1511
 
441
- _sendMessage({
442
- event: 'session',
443
- data: {
444
- trigger: 'signout'
1512
+ case 24:
1513
+ _context8.next = 26;
1514
+ return __NEXTAUTH._getSession({
1515
+ event: "storage"
1516
+ });
1517
+
1518
+ case 26:
1519
+ return _context8.abrupt("return", data);
1520
+
1521
+ case 27:
1522
+ case "end":
1523
+ return _context8.stop();
1524
+ }
445
1525
  }
446
- });
1526
+ }, _callee8);
1527
+ }));
1528
+ return _signOut.apply(this, arguments);
1529
+ }
1530
+
1531
+ function setOptions() {
1532
+ var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
1533
+ baseUrl = _ref3.baseUrl,
1534
+ basePath = _ref3.basePath,
1535
+ clientMaxAge = _ref3.clientMaxAge,
1536
+ keepAlive = _ref3.keepAlive;
447
1537
 
448
- if (redirect) {
449
- var _data$url2;
1538
+ if (baseUrl) __NEXTAUTH.baseUrl = baseUrl;
1539
+ if (basePath) __NEXTAUTH.basePath = basePath;
1540
+ if (clientMaxAge) __NEXTAUTH.clientMaxAge = clientMaxAge;
450
1541
 
451
- window.location = (_data$url2 = data.url) !== null && _data$url2 !== void 0 ? _data$url2 : callbackUrl;
452
- return;
1542
+ if (keepAlive) {
1543
+ __NEXTAUTH.keepAlive = keepAlive;
1544
+ if (typeof window === "undefined") return;
1545
+
1546
+ if (__NEXTAUTH._clientSyncTimer !== null) {
1547
+ clearTimeout(__NEXTAUTH._clientSyncTimer);
453
1548
  }
454
1549
 
455
- yield __NEXTAUTH._getSession({
456
- event: 'storage'
457
- });
458
- return data;
459
- });
460
- return _signOut.apply(this, arguments);
1550
+ __NEXTAUTH._clientSyncTimer = setTimeout((0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee2() {
1551
+ return _regenerator.default.wrap(function _callee2$(_context2) {
1552
+ while (1) {
1553
+ switch (_context2.prev = _context2.next) {
1554
+ case 0:
1555
+ if (__NEXTAUTH._clientSession) {
1556
+ _context2.next = 2;
1557
+ break;
1558
+ }
1559
+
1560
+ return _context2.abrupt("return");
1561
+
1562
+ case 2:
1563
+ _context2.next = 4;
1564
+ return __NEXTAUTH._getSession({
1565
+ event: "timer"
1566
+ });
1567
+
1568
+ case 4:
1569
+ case "end":
1570
+ return _context2.stop();
1571
+ }
1572
+ }
1573
+ }, _callee2);
1574
+ })), keepAlive * 1000);
1575
+ }
461
1576
  }
462
1577
 
463
- var Provider = (_ref5) => {
464
- var {
465
- children,
466
- session,
467
- options
468
- } = _ref5;
1578
+ function Provider(_ref5) {
1579
+ var children = _ref5.children,
1580
+ session = _ref5.session,
1581
+ options = _ref5.options;
469
1582
  setOptions(options);
470
1583
  return (0, React__default.createElement)(SessionContext.Provider, {
471
1584
  value: useSession(session)
472
1585
  }, children);
473
- };
1586
+ }
474
1587
 
475
- exports.Provider = Provider;
1588
+ function _fetchData(_x4) {
1589
+ return _fetchData2.apply(this, arguments);
1590
+ }
476
1591
 
477
- var _fetchData = function () {
478
- var _ref6 = _asyncToGenerator(function* (url) {
479
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1592
+ function _fetchData2() {
1593
+ _fetchData2 = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee9(path) {
1594
+ var _ref7,
1595
+ ctx,
1596
+ _ref7$req,
1597
+ req,
1598
+ baseUrl,
1599
+ options,
1600
+ res,
1601
+ data,
1602
+ _args9 = arguments;
1603
+
1604
+ return _regenerator.default.wrap(function _callee9$(_context9) {
1605
+ while (1) {
1606
+ switch (_context9.prev = _context9.next) {
1607
+ case 0:
1608
+ _ref7 = _args9.length > 1 && _args9[1] !== undefined ? _args9[1] : {}, ctx = _ref7.ctx, _ref7$req = _ref7.req, req = _ref7$req === void 0 ? ctx === null || ctx === void 0 ? void 0 : ctx.req : _ref7$req;
1609
+ _context9.prev = 1;
1610
+ _context9.next = 4;
1611
+ return _apiBaseUrl();
1612
+
1613
+ case 4:
1614
+ baseUrl = _context9.sent;
1615
+ options = req ? {
1616
+ headers: {
1617
+ cookie: req.headers.cookie
1618
+ }
1619
+ } : {};
1620
+ _context9.next = 8;
1621
+ return fetch("".concat(baseUrl, "/").concat(path), options);
1622
+
1623
+ case 8:
1624
+ res = _context9.sent;
1625
+ _context9.next = 11;
1626
+ return res.json();
1627
+
1628
+ case 11:
1629
+ data = _context9.sent;
1630
+
1631
+ if (res.ok) {
1632
+ _context9.next = 14;
1633
+ break;
1634
+ }
480
1635
 
481
- try {
482
- var res = yield fetch(url, options);
483
- var data = yield res.json();
484
- return Promise.resolve(Object.keys(data).length > 0 ? data : null);
485
- } catch (error) {
486
- _logger.default.error('CLIENT_FETCH_ERROR', url, error);
1636
+ throw data;
487
1637
 
488
- return Promise.resolve(null);
489
- }
490
- });
1638
+ case 14:
1639
+ return _context9.abrupt("return", Object.keys(data).length > 0 ? data : null);
491
1640
 
492
- return function _fetchData(_x3) {
493
- return _ref6.apply(this, arguments);
494
- };
495
- }();
1641
+ case 17:
1642
+ _context9.prev = 17;
1643
+ _context9.t0 = _context9["catch"](1);
1644
+ logger$1.error("CLIENT_FETCH_ERROR", path, _context9.t0);
1645
+ return _context9.abrupt("return", null);
496
1646
 
497
- var _apiBaseUrl = () => {
498
- if (typeof window === 'undefined') {
1647
+ case 21:
1648
+ case "end":
1649
+ return _context9.stop();
1650
+ }
1651
+ }
1652
+ }, _callee9, null, [[1, 17]]);
1653
+ }));
1654
+ return _fetchData2.apply(this, arguments);
1655
+ }
1656
+
1657
+ function _apiBaseUrl() {
1658
+ if (typeof window === "undefined") {
499
1659
  if (!process.env.NEXTAUTH_URL) {
500
- _logger.default.warn('NEXTAUTH_URL', 'NEXTAUTH_URL environment variable not set');
1660
+ logger$1.warn("NEXTAUTH_URL", "NEXTAUTH_URL environment variable not set");
501
1661
  }
502
1662
 
503
- return "".concat(__NEXTAUTH.baseUrl).concat(__NEXTAUTH.basePath);
504
- } else {
505
- return __NEXTAUTH.basePath;
1663
+ return "".concat(__NEXTAUTH.baseUrlServer).concat(__NEXTAUTH.basePathServer);
506
1664
  }
507
- };
508
1665
 
509
- var _sendMessage = message => {
510
- if (typeof localStorage !== 'undefined') {
511
- var timestamp = Math.floor(new Date().getTime() / 1000);
512
- localStorage.setItem('nextauth.message', JSON.stringify(_objectSpread(_objectSpread({}, message), {}, {
513
- clientId: __NEXTAUTH._clientId,
514
- timestamp
515
- })));
516
- }
517
- };
1666
+ return __NEXTAUTH.basePath;
1667
+ }
1668
+
1669
+ function _now() {
1670
+ return Math.floor(Date.now() / 1000);
1671
+ }
1672
+
1673
+ function BroadcastChannel() {
1674
+ var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "nextauth.message";
1675
+ return {
1676
+ receive: function receive(onReceive) {
1677
+ if (typeof window === "undefined") return;
1678
+ window.addEventListener("storage", function () {
1679
+ var _ref6 = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee3(event) {
1680
+ var message;
1681
+ return _regenerator.default.wrap(function _callee3$(_context3) {
1682
+ while (1) {
1683
+ switch (_context3.prev = _context3.next) {
1684
+ case 0:
1685
+ if (!(event.key !== name)) {
1686
+ _context3.next = 2;
1687
+ break;
1688
+ }
1689
+
1690
+ return _context3.abrupt("return");
1691
+
1692
+ case 2:
1693
+ message = JSON.parse(event.newValue);
1694
+
1695
+ if (!((message === null || message === void 0 ? void 0 : message.event) !== "session" || !(message !== null && message !== void 0 && message.data))) {
1696
+ _context3.next = 5;
1697
+ break;
1698
+ }
1699
+
1700
+ return _context3.abrupt("return");
1701
+
1702
+ case 5:
1703
+ onReceive(message);
1704
+
1705
+ case 6:
1706
+ case "end":
1707
+ return _context3.stop();
1708
+ }
1709
+ }
1710
+ }, _callee3);
1711
+ }));
1712
+
1713
+ return function (_x5) {
1714
+ return _ref6.apply(this, arguments);
1715
+ };
1716
+ }());
1717
+ },
1718
+ post: function post(message) {
1719
+ if (typeof localStorage === "undefined") return;
1720
+ localStorage.setItem(name, JSON.stringify(_objectSpread(_objectSpread({}, message), {}, {
1721
+ timestamp: _now()
1722
+ })));
1723
+ }
1724
+ };
1725
+ }
518
1726
 
519
1727
  var _default = {
520
- getSession,
521
- getCsrfToken,
522
- getProviders,
523
- useSession,
524
- signIn,
525
- signOut,
526
- Provider,
527
- setOptions,
1728
+ getSession: getSession,
1729
+ getCsrfToken: getCsrfToken,
1730
+ getProviders: getProviders,
1731
+ useSession: useSession,
1732
+ signIn: signIn,
1733
+ signOut: signOut,
1734
+ Provider: Provider,
1735
+ setOptions: setOptions,
528
1736
  options: setOptions,
529
1737
  session: getSession,
530
1738
  providers: getProviders,
@@ -535,16 +1743,25 @@ var _default = {
535
1743
  exports.default = _default;
536
1744
  });
537
1745
 
538
- unwrapExports(client);
539
- var client_1 = client.getSession;
540
- var client_2 = client.signIn;
541
- var client_3 = client.signOut;
542
- var client_4 = client.Provider;
543
- var client_5 = client.useSession;
544
-
545
- var client$1 = client.default;
546
-
547
- var css = ".AuthWrapper-module_loginBox__3l-BE {\r\n margin-bottom: 2rem;\r\n width: 350px;\r\n max-width: 90vw;\r\n margin-left: auto;\r\n margin-right: auto;\r\n /* box-shadow: 2px 5px 12px rgba(0, 0, 0, 0.15); */\r\n background: #fff;\r\n z-index: 1;\r\n}\r\n.AuthWrapper-module_loginBox_title__12rGD {\r\n margin-bottom: 2rem;\r\n text-align: center;\r\n}\r\n.AuthWrapper-module_bar__1dafn {\r\n background: #eee;\r\n margin-left: unset;\r\n margin-right: unset;\r\n}\r\n.AuthWrapper-module_bar__1dafn:nth-child(1) {\r\n float: left;\r\n border-right: 1rem solid #fff;\r\n background: rgb(245, 245, 245);\r\n height: 10rem;\r\n width: 25%;\r\n margin-left: auto;\r\n margin-right: auto;\r\n margin-bottom: 2rem;\r\n}\r\n.AuthWrapper-module_bar__1dafn:nth-child(2n) {\r\n width: 97%;\r\n height: 1.5rem;\r\n margin-bottom: 0.25rem;\r\n}\r\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(3n) {\r\n width: 96%;\r\n height: 1.5rem;\r\n margin-bottom: 1.5rem;\r\n}\r\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(4n) {\r\n width: 72%;\r\n height: 1.5rem;\r\n margin-bottom: 0.25rem;\r\n}\r\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(5n) {\r\n width: 88%;\r\n height: 1.5rem;\r\n margin-bottom: 0.25rem;\r\n}\r\n\r\n.AuthWrapper-module_iframe__2wDJW {\r\n margin-top: -3rem;\r\n border: none;\r\n width: 100%;\r\n height: 1900px;\r\n}";
1746
+ unwrapExports(client$1);
1747
+ client$1.useSession;
1748
+ client$1.session;
1749
+ client$1.getSession;
1750
+ client$1.csrfToken;
1751
+ client$1.getCsrfToken;
1752
+ client$1.providers;
1753
+ client$1.getProviders;
1754
+ client$1.signin;
1755
+ client$1.signIn;
1756
+ client$1.signout;
1757
+ client$1.signOut;
1758
+ client$1.options;
1759
+ client$1.setOptions;
1760
+ client$1.Provider;
1761
+
1762
+ var client = client$1.default;
1763
+
1764
+ var css = ".AuthWrapper-module_loginBox__3l-BE {\n margin-bottom: 2rem;\n width: 350px;\n max-width: 90vw;\n margin-left: auto;\n margin-right: auto;\n /* box-shadow: 2px 5px 12px rgba(0, 0, 0, 0.15); */\n background: #fff;\n z-index: 1;\n}\n.AuthWrapper-module_loginBox_title__12rGD {\n margin-bottom: 2rem;\n text-align: center;\n}\n.AuthWrapper-module_bar__1dafn {\n background: #eee;\n margin-left: unset;\n margin-right: unset;\n}\n.AuthWrapper-module_bar__1dafn:nth-child(1) {\n float: left;\n border-right: 1rem solid #fff;\n background: rgb(245, 245, 245);\n height: 10rem;\n width: 25%;\n margin-left: auto;\n margin-right: auto;\n margin-bottom: 2rem;\n}\n.AuthWrapper-module_bar__1dafn:nth-child(2n) {\n width: 97%;\n height: 1.5rem;\n margin-bottom: 0.25rem;\n}\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(3n) {\n width: 96%;\n height: 1.5rem;\n margin-bottom: 1.5rem;\n}\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(4n) {\n width: 72%;\n height: 1.5rem;\n margin-bottom: 0.25rem;\n}\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(5n) {\n width: 88%;\n height: 1.5rem;\n margin-bottom: 0.25rem;\n}\n\n.AuthWrapper-module_iframe__2wDJW {\n margin-top: -3rem;\n border: none;\n width: 100%;\n height: 1900px;\n}";
548
1765
  var styles = { "loginBox": "AuthWrapper-module_loginBox__3l-BE", "loginBox_title": "AuthWrapper-module_loginBox_title__12rGD", "bar": "AuthWrapper-module_bar__1dafn", "iframe": "AuthWrapper-module_iframe__2wDJW" };
549
1766
  styleInject(css);
550
1767
 
@@ -554,7 +1771,7 @@ var AuthWrapper = function AuthWrapper(_ref) {
554
1771
  _ref$formUrl = _ref.formUrl,
555
1772
  formUrl = _ref$formUrl === undefined ? '' : _ref$formUrl;
556
1773
 
557
- var _nextAuth$useSession = client$1.useSession(),
1774
+ var _nextAuth$useSession = client.useSession(),
558
1775
  _nextAuth$useSession2 = _slicedToArray(_nextAuth$useSession, 2),
559
1776
  session = _nextAuth$useSession2[0],
560
1777
  loading = _nextAuth$useSession2[1];
@@ -632,7 +1849,7 @@ var AuthWrapper = function AuthWrapper(_ref) {
632
1849
  React__default.createElement(
633
1850
  'button',
634
1851
  { className: 'btn btn-primary btn-block', onClick: function onClick() {
635
- return client$1.signIn('credentials', { email: email, password: password, callbackUrl: callbackUrl });
1852
+ return client.signIn('credentials', { email: email, password: password, callbackUrl: callbackUrl });
636
1853
  } },
637
1854
  'Sign in'
638
1855
  )