@mjhls/mjh-framework 1.0.985-article-abstract-v2 → 1.0.985

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 (231) hide show
  1. package/dist/cjs/AD.js +1 -1
  2. package/dist/cjs/AD300x250.js +1 -2
  3. package/dist/cjs/AD300x250x600.js +1 -2
  4. package/dist/cjs/AD728x90.js +1 -2
  5. package/dist/cjs/ADFloatingFooter.js +1 -2
  6. package/dist/cjs/ADGutter.js +1 -2
  7. package/dist/cjs/ADSkyscraper.js +1 -2
  8. package/dist/cjs/ADSponsoredResources.js +1 -2
  9. package/dist/cjs/ADWebcast.js +1 -2
  10. package/dist/cjs/ADWelcome.js +1 -2
  11. package/dist/cjs/AdSlot.js +1 -2
  12. package/dist/cjs/AdSlotsProvider.js +1 -2
  13. package/dist/cjs/AlgoliaSearch.js +18 -14281
  14. package/dist/cjs/ArticleCarousel.js +1 -1
  15. package/dist/cjs/ArticleProgramLandingPage.js +6 -7
  16. package/dist/cjs/ArticleSeriesLandingPage.js +4 -5
  17. package/dist/cjs/ArticleSeriesListing.js +2 -3
  18. package/dist/cjs/Auth.js +3 -3
  19. package/dist/cjs/AuthWrapper.js +293 -1469
  20. package/dist/cjs/{BlockContent-9ebd251f.js → BlockContent-36e54d77.js} +1 -1
  21. package/dist/cjs/CMEDeck.js +1 -2
  22. package/dist/cjs/Column3.js +1 -2
  23. package/dist/cjs/ConferenceArticleCard.js +1 -1
  24. package/dist/cjs/ContentCardPaginated.js +6 -6
  25. package/dist/cjs/DeckContent.js +4 -5
  26. package/dist/cjs/DeckQueue.js +3 -4
  27. package/dist/cjs/DeckQueuePaginated.js +5 -5
  28. package/dist/cjs/{Dfp-9be904d5.js → Dfp-94f8ccdf.js} +1 -2
  29. package/dist/cjs/ExternalResources.js +6 -7
  30. package/dist/cjs/Feature.js +1 -1
  31. package/dist/cjs/ForbesHero.js +1 -1
  32. package/dist/cjs/GridContent.js +6 -7
  33. package/dist/cjs/GridContentPaginated.js +8 -8
  34. package/dist/cjs/GridHero.js +2 -2
  35. package/dist/cjs/GroupDeck.js +1 -1
  36. package/dist/cjs/Hero.js +2 -2
  37. package/dist/cjs/HorizontalArticleListing.js +6 -7
  38. package/dist/cjs/HorizontalHero.js +1 -1
  39. package/dist/cjs/ImageSlider-a7fb6218.js +182 -0
  40. package/dist/cjs/IssueContentDeck.js +1 -1
  41. package/dist/cjs/IssueDeck.js +1 -1
  42. package/dist/cjs/IssueLanding.js +8 -9
  43. package/dist/cjs/LeftNav.js +1 -2
  44. package/dist/cjs/MasterDeck.js +4 -5
  45. package/dist/cjs/MasterDeckPaginated.js +5 -5
  46. package/dist/cjs/{MediaSeriesCard-84fa20f4.js → MediaSeriesCard-64f3487c.js} +390 -393
  47. package/dist/cjs/MediaSeriesLanding.js +10 -12
  48. package/dist/cjs/MediaSeriesLandingPaginated.js +12 -13
  49. package/dist/cjs/OncliveHero.js +1 -1
  50. package/dist/cjs/OncliveLargeHero.js +2 -2
  51. package/dist/cjs/Pagination-1e0d5f1d.js +90 -0
  52. package/dist/cjs/PartnerDetailListing.js +12 -13
  53. package/dist/cjs/PartnerDetailListingPaginated.js +14 -14
  54. package/dist/cjs/PubSection.js +5 -6
  55. package/dist/cjs/PublicationDeck.js +1 -1
  56. package/dist/cjs/PublicationLanding.js +0 -4
  57. package/dist/cjs/QueueDeckExpanded.js +5 -6
  58. package/dist/cjs/QueueDeckExpandedPaginated.js +7 -7
  59. package/dist/cjs/RelatedContent.js +1 -1
  60. package/dist/cjs/Schema.js +1 -1
  61. package/dist/cjs/SeriesListingDeck.js +3 -4
  62. package/dist/cjs/TaxonomyCard.js +2 -2
  63. package/dist/cjs/TaxonomyDescription.js +6 -7
  64. package/dist/cjs/TemplateNormal.js +1 -2
  65. package/dist/cjs/ThumbnailCard.js +2 -2
  66. package/dist/cjs/VerticalHero.js +1 -1
  67. package/dist/cjs/VideoProgramLandingPage.js +6 -7
  68. package/dist/cjs/VideoSeriesCard.js +1 -1
  69. package/dist/cjs/VideoSeriesLandingPage.js +4 -5
  70. package/dist/cjs/VideoSeriesListing.js +2 -3
  71. package/dist/cjs/View.js +11 -31
  72. package/dist/cjs/YahooHero.js +2 -2
  73. package/dist/cjs/YoutubeGroup.js +1 -1
  74. package/dist/cjs/{entities-df1aed86.js → entities-3f9d0f2f.js} +0 -4
  75. package/dist/cjs/getRelatedArticle.js +2 -2
  76. package/dist/cjs/getSerializers.js +6 -7
  77. package/dist/cjs/{index-fc2f1ca2.js → index-0e4427c8.js} +467 -2
  78. package/dist/cjs/{index-7f3d9184.js → index-803853cf.js} +4 -4
  79. package/dist/cjs/{index-d48b231c.js → index-efca863c.js} +5 -5
  80. package/dist/cjs/index.js +14 -15
  81. package/dist/cjs/urlFor.js +1 -1
  82. package/dist/cjs/{util-93a37fd0.js → util-6f784d85.js} +0 -11
  83. package/dist/esm/AD.js +1 -1
  84. package/dist/esm/AD300x250.js +8 -9
  85. package/dist/esm/AD300x250x600.js +8 -9
  86. package/dist/esm/AD728x90.js +8 -9
  87. package/dist/esm/ADFloatingFooter.js +8 -9
  88. package/dist/esm/ADFooter.js +3 -3
  89. package/dist/esm/ADGutter.js +8 -9
  90. package/dist/esm/{ADInfeed-6d1fc6bf.js → ADInfeed-f684cac9.js} +1 -1
  91. package/dist/esm/ADSkyscraper.js +8 -9
  92. package/dist/esm/ADSponsoredResources.js +8 -9
  93. package/dist/esm/ADWebcast.js +8 -9
  94. package/dist/esm/ADWelcome.js +8 -9
  95. package/dist/esm/{ADlgInfeed-dc36c928.js → ADlgInfeed-8c438cee.js} +1 -1
  96. package/dist/esm/AccordionPanel.js +3 -3
  97. package/dist/esm/AdSlot.js +8 -9
  98. package/dist/esm/AdSlotsProvider.js +6 -7
  99. package/dist/esm/AlgoliaSearch.js +18 -14281
  100. package/dist/esm/AlphabeticList.js +6 -6
  101. package/dist/esm/ArticleCarousel.js +5 -5
  102. package/dist/esm/ArticleProgramLandingPage.js +21 -22
  103. package/dist/esm/ArticleSeriesLandingPage.js +17 -18
  104. package/dist/esm/ArticleSeriesListing.js +11 -12
  105. package/dist/esm/Auth.js +11 -11
  106. package/dist/esm/AuthWrapper.js +290 -1466
  107. package/dist/esm/{AuthorComponent-11adff02.js → AuthorComponent-defe68b6.js} +1 -1
  108. package/dist/esm/Beam.js +5 -5
  109. package/dist/esm/{BlockContent-1e73bd2c.js → BlockContent-c99c9a8d.js} +1 -1
  110. package/dist/esm/Breadcrumbs.js +3 -3
  111. package/dist/esm/CMEDeck.js +8 -9
  112. package/dist/esm/Column2.js +6 -6
  113. package/dist/esm/Column3.js +10 -11
  114. package/dist/esm/ConferenceArticleCard.js +4 -4
  115. package/dist/esm/ContentCardPaginated.js +19 -19
  116. package/dist/esm/DeckContent.js +17 -18
  117. package/dist/esm/DeckQueue.js +14 -15
  118. package/dist/esm/DeckQueuePaginated.js +17 -17
  119. package/dist/esm/{Dfp-102f0beb.js → Dfp-4b99f79d.js} +4 -5
  120. package/dist/esm/EventsDeck.js +10 -10
  121. package/dist/esm/ExternalResources.js +21 -22
  122. package/dist/esm/Feature.js +4 -4
  123. package/dist/esm/ForbesHero.js +5 -5
  124. package/dist/esm/GridContent.js +20 -21
  125. package/dist/esm/GridContentPaginated.js +22 -22
  126. package/dist/esm/GridHero.js +6 -6
  127. package/dist/esm/GroupDeck.js +6 -6
  128. package/dist/esm/HamMagazine.js +6 -6
  129. package/dist/esm/Hero.js +5 -5
  130. package/dist/esm/HorizontalArticleListing.js +21 -22
  131. package/dist/esm/HorizontalHero.js +4 -4
  132. package/dist/esm/ImageSlider-eab2fe41.js +176 -0
  133. package/dist/esm/IssueContentDeck.js +5 -5
  134. package/dist/esm/IssueDeck.js +7 -7
  135. package/dist/esm/IssueLanding.js +24 -25
  136. package/dist/esm/LeftNav.js +8 -9
  137. package/dist/esm/MasterDeck.js +17 -18
  138. package/dist/esm/MasterDeckPaginated.js +18 -18
  139. package/dist/esm/{MediaSeriesCard-22059712.js → MediaSeriesCard-a484aaa6.js} +106 -109
  140. package/dist/esm/MediaSeriesLanding.js +25 -27
  141. package/dist/esm/MediaSeriesLandingPaginated.js +27 -28
  142. package/dist/esm/NavDvm.js +5 -5
  143. package/dist/esm/NavMagazine.js +6 -6
  144. package/dist/esm/NavNative.js +5 -5
  145. package/dist/esm/OncliveHero.js +4 -4
  146. package/dist/esm/OncliveLargeHero.js +6 -6
  147. package/dist/esm/PageFilter.js +3 -3
  148. package/dist/esm/Pagination-cd21f8c2.js +82 -0
  149. package/dist/esm/PartnerDetailListing.js +27 -28
  150. package/dist/esm/PartnerDetailListingPaginated.js +29 -29
  151. package/dist/esm/PixelTracking.js +3 -3
  152. package/dist/esm/PopUpModal.js +3 -3
  153. package/dist/esm/PtceDeck.js +7 -7
  154. package/dist/esm/PubSection.js +14 -15
  155. package/dist/esm/PubToc.js +5 -5
  156. package/dist/esm/PublicationDeck.js +4 -4
  157. package/dist/esm/PublicationLanding.js +9 -13
  158. package/dist/esm/QueueDeckExpanded.js +14 -15
  159. package/dist/esm/QueueDeckExpandedPaginated.js +16 -16
  160. package/dist/esm/RelatedContent.js +4 -4
  161. package/dist/esm/Schema.js +8 -8
  162. package/dist/esm/Search.js +3 -3
  163. package/dist/esm/Segment.js +4 -4
  164. package/dist/esm/SeriesListingDeck.js +9 -10
  165. package/dist/esm/{SeriesSlider-e495571f.js → SeriesSlider-609f9d94.js} +1 -1
  166. package/dist/esm/SideFooter.js +6 -6
  167. package/dist/esm/{SocialSearchComponent-4b56cd8c.js → SocialSearchComponent-1d8a9f59.js} +1 -1
  168. package/dist/esm/TaxonomyCard.js +6 -6
  169. package/dist/esm/TaxonomyDescription.js +21 -22
  170. package/dist/esm/TemplateNormal.js +11 -12
  171. package/dist/esm/ThumbnailCard.js +5 -5
  172. package/dist/esm/Ustream.js +6 -6
  173. package/dist/esm/VerticalHero.js +4 -4
  174. package/dist/esm/VideoProgramLandingPage.js +21 -22
  175. package/dist/esm/VideoSeriesCard.js +6 -6
  176. package/dist/esm/VideoSeriesFilter.js +5 -5
  177. package/dist/esm/VideoSeriesLandingPage.js +17 -18
  178. package/dist/esm/VideoSeriesListing.js +11 -12
  179. package/dist/esm/View.js +27 -48
  180. package/dist/esm/YahooHero.js +6 -6
  181. package/dist/esm/YoutubeGroup.js +4 -4
  182. package/dist/esm/{_is-array-8d21b9e3.js → _is-array-893ab020.js} +1 -1
  183. package/dist/esm/{_iter-detect-98db3b07.js → _iter-detect-f089461c.js} +1 -1
  184. package/dist/esm/{_object-sap-7cee6f84.js → _object-sap-169d6272.js} +1 -1
  185. package/dist/esm/{_object-to-array-2300e51b.js → _object-to-array-50a6b9a3.js} +1 -1
  186. package/dist/esm/{asyncToGenerator-958ef5fc.js → asyncToGenerator-9716ae8d.js} +3 -3
  187. package/dist/esm/{core.get-iterator-method-ea258bb1.js → core.get-iterator-method-e903ff31.js} +1 -1
  188. package/dist/esm/{define-property-5f1bda73.js → define-property-99e66838.js} +1 -1
  189. package/dist/esm/{defineProperty-8c30428f.js → defineProperty-8fa0bc8d.js} +1 -1
  190. package/dist/esm/{entities-6d9154b4.js → entities-932b50cf.js} +0 -4
  191. package/dist/esm/{extends-6d8e3924.js → extends-dc6a71fd.js} +1 -1
  192. package/dist/esm/faundadb.js +4 -4
  193. package/dist/esm/getPtceActivities.js +4 -4
  194. package/dist/esm/getRelatedArticle.js +7 -7
  195. package/dist/esm/getRootDocGroup.js +4 -4
  196. package/dist/esm/getSerializers.js +21 -22
  197. package/dist/esm/{getTargeting-04d979c9.js → getTargeting-0cdf8983.js} +2 -2
  198. package/dist/esm/getTargeting.js +5 -5
  199. package/dist/esm/{index-3f5c03b2.js → index-0dbff1d1.js} +5 -5
  200. package/dist/esm/{index-f0fc23eb.js → index-5cc7b406.js} +466 -1
  201. package/dist/esm/{index-1df13f26.js → index-f9d13c55.js} +14 -14
  202. package/dist/esm/index.js +34 -35
  203. package/dist/esm/{inherits-a6ba2ec4.js → inherits-8a801a18.js} +4 -4
  204. package/dist/esm/{keys-31dcdb31.js → keys-425c8ab0.js} +2 -2
  205. package/dist/esm/{slicedToArray-6ebcbfea.js → slicedToArray-ca2c8b8d.js} +2 -2
  206. package/dist/esm/{stringify-2b084bee.js → stringify-c21932b3.js} +1 -1
  207. package/dist/esm/{toConsumableArray-f7074d7c.js → toConsumableArray-7b1c0e23.js} +2 -2
  208. package/dist/esm/{typeof-e9fc0c5d.js → typeof-83d9eb10.js} +3 -3
  209. package/dist/esm/urlFor.js +4 -4
  210. package/dist/esm/{urlForFile-b69adffc.js → urlForFile-413f5ddb.js} +1 -1
  211. package/dist/esm/{ustream-api-d3714624.js → ustream-api-41166338.js} +4 -4
  212. package/dist/esm/{util-8ed16d48.js → util-3ab476bf.js} +0 -11
  213. package/dist/esm/{web.dom.iterable-ab4dea5c.js → web.dom.iterable-fdf034f5.js} +1 -1
  214. package/package.json +1 -1
  215. package/dist/cjs/ImageSlider-6c00b878.js +0 -2813
  216. package/dist/cjs/Pagination-2a3d0103.js +0 -97
  217. package/dist/cjs/defineProperty-e0fb52c5.js +0 -73
  218. package/dist/cjs/events-1b438fe7.js +0 -469
  219. package/dist/cjs/index-50be6759.js +0 -105
  220. package/dist/cjs/typeof-1358762e.js +0 -33
  221. package/dist/esm/ImageSlider-f84174cb.js +0 -2804
  222. package/dist/esm/Pagination-dc30727b.js +0 -90
  223. package/dist/esm/defineProperty-23a8f8cd.js +0 -68
  224. package/dist/esm/events-6c3a7a63.js +0 -467
  225. package/dist/esm/index-98ca9cec.js +0 -100
  226. package/dist/esm/typeof-2f07d0e8.js +0 -30
  227. /package/dist/cjs/{ADInfeed-81006615.js → ADInfeed-cf54cb8a.js} +0 -0
  228. /package/dist/cjs/{ADlgInfeed-0db07099.js → ADlgInfeed-d06624d8.js} +0 -0
  229. /package/dist/cjs/{PublicationFeature-5ccf9b13.js → PublicationFeature-be5f3503.js} +0 -0
  230. /package/dist/cjs/{SeriesSlider-74546d19.js → SeriesSlider-b94f1dd5.js} +0 -0
  231. /package/dist/esm/{PublicationFeature-d88e76b9.js → PublicationFeature-03500094.js} +0 -0
@@ -1,880 +1,10 @@
1
- import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
1
+ import { _ as _slicedToArray } from './slicedToArray-ca2c8b8d.js';
2
2
  import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
3
- import { a as _typeof_1 } from './typeof-2f07d0e8.js';
4
- import { d as defineProperty, b as asyncToGenerator } from './defineProperty-23a8f8cd.js';
5
3
  import React__default, { useState, useEffect } from 'react';
6
4
  import { Form } from 'react-bootstrap';
7
5
  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';
10
-
11
- var interopRequireDefault = createCommonjsModule(function (module) {
12
- function _interopRequireDefault(obj) {
13
- return obj && obj.__esModule ? obj : {
14
- "default": obj
15
- };
16
- }
17
-
18
- module.exports = _interopRequireDefault;
19
- module.exports["default"] = module.exports, module.exports.__esModule = true;
20
- });
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 };
89
- }
90
- }
91
-
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
- };
115
-
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");
162
- }
163
- genFun.prototype = Object.create(Gp);
164
- return genFun;
165
- };
166
-
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
- };
174
-
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
- }
192
-
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
- }
375
-
376
- return ContinueSentinel;
377
- }
378
-
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);
6
+ import './web.dom.iterable-fdf034f5.js';
7
+ import './core.get-iterator-method-e903ff31.js';
878
8
 
879
9
  var logger = createCommonjsModule(function (module, exports) {
880
10
 
@@ -884,25 +14,39 @@ Object.defineProperty(exports, "__esModule", {
884
14
  exports.setLogger = setLogger;
885
15
  exports.proxyLogger = proxyLogger;
886
16
  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);
17
+ var _logger = {
18
+ error(code) {
19
+ for (var _len = arguments.length, message = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
20
+ message[_key - 1] = arguments[_key];
21
+ }
22
+
23
+ console.error("[next-auth][error][".concat(code.toLowerCase(), "]"), "\nhttps://next-auth.js.org/errors#".concat(code.toLowerCase()), ...message);
890
24
  },
891
25
 
892
- warn(code, ...message) {
893
- console.warn(`[next-auth][warn][${code.toLowerCase()}]`, `\nhttps://next-auth.js.org/warnings#${code.toLowerCase()}`, ...message);
26
+ warn(code) {
27
+ for (var _len2 = arguments.length, message = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
28
+ message[_key2 - 1] = arguments[_key2];
29
+ }
30
+
31
+ console.warn("[next-auth][warn][".concat(code.toLowerCase(), "]"), "\nhttps://next-auth.js.org/warnings#".concat(code.toLowerCase()), ...message);
894
32
  },
895
33
 
896
- debug(code, ...message) {
34
+ debug(code) {
897
35
  var _process, _process$env;
898
36
 
899
37
  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);
38
+
39
+ for (var _len3 = arguments.length, message = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
40
+ message[_key3 - 1] = arguments[_key3];
41
+ }
42
+
43
+ console.log("[next-auth][debug][".concat(code.toLowerCase(), "]"), ...message);
901
44
  }
902
45
 
903
46
  };
904
47
 
905
- function setLogger(newLogger = {}) {
48
+ function setLogger() {
49
+ var newLogger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
906
50
  if (newLogger.error) _logger.error = newLogger.error;
907
51
  if (newLogger.warn) _logger.warn = newLogger.warn;
908
52
  if (newLogger.debug) _logger.debug = newLogger.debug;
@@ -911,20 +55,27 @@ function setLogger(newLogger = {}) {
911
55
  var _default = _logger;
912
56
  exports.default = _default;
913
57
 
914
- function proxyLogger(logger = _logger, basePath) {
58
+ function proxyLogger() {
59
+ var logger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _logger;
60
+ var basePath = arguments.length > 1 ? arguments[1] : undefined;
61
+
915
62
  try {
916
- if (typeof window === "undefined") {
63
+ if (typeof window === 'undefined') {
917
64
  return logger;
918
65
  }
919
66
 
920
- const clientLogger = {};
67
+ var clientLogger = {};
68
+
69
+ var _loop = function _loop(level) {
70
+ clientLogger[level] = function (code) {
71
+ for (var _len4 = arguments.length, message = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
72
+ message[_key4 - 1] = arguments[_key4];
73
+ }
921
74
 
922
- for (const level in logger) {
923
- clientLogger[level] = (code, ...message) => {
924
75
  _logger[level](code, ...message);
925
76
 
926
- const url = `${basePath}/_log`;
927
- const body = new URLSearchParams({
77
+ var url = "".concat(basePath, "/_log");
78
+ var body = new URLSearchParams({
928
79
  level,
929
80
  code,
930
81
  message: JSON.stringify(message.map(m => {
@@ -945,13 +96,17 @@ function proxyLogger(logger = _logger, basePath) {
945
96
  }
946
97
 
947
98
  return fetch(url, {
948
- method: "POST",
99
+ method: 'POST',
949
100
  headers: {
950
- "Content-Type": "application/json"
101
+ 'Content-Type': 'application/json'
951
102
  },
952
103
  body
953
104
  });
954
105
  };
106
+ };
107
+
108
+ for (var level in logger) {
109
+ _loop(level);
955
110
  }
956
111
 
957
112
  return clientLogger;
@@ -973,18 +128,18 @@ Object.defineProperty(exports, "__esModule", {
973
128
  exports.default = parseUrl;
974
129
 
975
130
  function parseUrl(url) {
976
- const defaultHost = 'http://localhost:3000';
977
- const defaultPath = '/api/auth';
131
+ var defaultHost = 'http://localhost:3000';
132
+ var defaultPath = '/api/auth';
978
133
 
979
134
  if (!url) {
980
- url = `${defaultHost}${defaultPath}`;
135
+ url = "".concat(defaultHost).concat(defaultPath);
981
136
  }
982
137
 
983
- const protocol = url.startsWith('http:') ? 'http' : 'https';
138
+ var protocol = url.startsWith('http:') ? 'http' : 'https';
984
139
  url = url.replace(/^https?:\/\//, '').replace(/\/$/, '');
985
- const [_host, ..._path] = url.split('/');
986
- const baseUrl = _host ? `${protocol}://${_host}` : defaultHost;
987
- const basePath = _path.length > 0 ? `/${_path.join('/')}` : defaultPath;
140
+ var [_host, ..._path] = url.split('/');
141
+ var baseUrl = _host ? "".concat(protocol, "://").concat(_host) : defaultHost;
142
+ var basePath = _path.length > 0 ? "/".concat(_path.join('/')) : defaultPath;
988
143
  return {
989
144
  baseUrl,
990
145
  basePath
@@ -996,44 +151,39 @@ unwrapExports(parseUrl_1);
996
151
 
997
152
  var client$1 = createCommonjsModule(function (module, exports) {
998
153
 
999
-
1000
-
1001
-
1002
-
1003
154
  Object.defineProperty(exports, "__esModule", {
1004
155
  value: true
1005
156
  });
1006
157
  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;
158
+ exports.getSession = getSession;
159
+ exports.getProviders = getProviders;
160
+ exports.signIn = signIn;
161
+ exports.signOut = signOut;
162
+ exports.setOptions = setOptions;
1013
163
  exports.Provider = Provider;
1014
164
  exports.default = void 0;
1015
165
 
1016
- var _regenerator = interopRequireDefault(regenerator);
1017
166
 
1018
- var _defineProperty2 = interopRequireDefault(defineProperty);
1019
167
 
1020
- var _asyncToGenerator2 = interopRequireDefault(asyncToGenerator);
168
+ var _logger2 = _interopRequireWildcard(logger);
1021
169
 
1022
- var _slicedToArray2 = interopRequireDefault(slicedToArray);
170
+ var _parseUrl = _interopRequireDefault(parseUrl_1);
1023
171
 
172
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1024
173
 
174
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
1025
175
 
1026
- var _logger2 = _interopRequireWildcard(logger);
176
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
1027
177
 
1028
- var _parseUrl = interopRequireDefault(parseUrl_1);
178
+ 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; }
1029
179
 
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); }
180
+ 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; }
1031
181
 
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; }
182
+ 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; }
1033
183
 
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; }
184
+ 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); } }
1035
185
 
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; }
186
+ 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); }); }; }
1037
187
 
1038
188
  var __NEXTAUTH = {
1039
189
  baseUrl: (0, _parseUrl.default)(process.env.NEXTAUTH_URL || process.env.VERCEL_URL).baseUrl,
@@ -1046,21 +196,19 @@ var __NEXTAUTH = {
1046
196
  _clientSyncTimer: null,
1047
197
  _eventListenersAdded: false,
1048
198
  _clientSession: undefined,
1049
- _getSession: function _getSession() {}
199
+ _getSession: () => {}
1050
200
  };
1051
201
  var logger$1 = (0, _logger2.proxyLogger)(_logger2.default, __NEXTAUTH.basePath);
1052
202
  var broadcast = BroadcastChannel();
1053
203
 
1054
- if (typeof window !== "undefined" && !__NEXTAUTH._eventListenersAdded) {
204
+ if (typeof window !== 'undefined' && !__NEXTAUTH._eventListenersAdded) {
1055
205
  __NEXTAUTH._eventListenersAdded = true;
1056
- broadcast.receive(function () {
1057
- return __NEXTAUTH._getSession({
1058
- event: "storage"
1059
- });
1060
- });
1061
- document.addEventListener("visibilitychange", function () {
206
+ broadcast.receive(() => __NEXTAUTH._getSession({
207
+ event: 'storage'
208
+ }));
209
+ document.addEventListener('visibilitychange', () => {
1062
210
  !document.hidden && __NEXTAUTH._getSession({
1063
- event: "visibilitychange"
211
+ event: 'visibilitychange'
1064
212
  });
1065
213
  }, false);
1066
214
  }
@@ -1074,103 +222,50 @@ function useSession(session) {
1074
222
  }
1075
223
 
1076
224
  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();
225
+ var [data, setData] = (0, React__default.useState)(session);
226
+ var [loading, setLoading] = (0, React__default.useState)(!data);
227
+ (0, React__default.useEffect)(() => {
228
+ __NEXTAUTH._getSession = _asyncToGenerator(function* () {
229
+ var {
230
+ event = null
231
+ } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
232
+
233
+ try {
234
+ var triggredByEvent = event !== null;
235
+ var triggeredByStorageEvent = event === 'storage';
236
+ var clientMaxAge = __NEXTAUTH.clientMaxAge;
237
+ var clientLastSync = parseInt(__NEXTAUTH._clientLastSync);
238
+
239
+ var currentTime = _now();
240
+
241
+ var clientSession = __NEXTAUTH._clientSession;
242
+
243
+ if (!triggeredByStorageEvent && clientSession !== undefined) {
244
+ if (clientMaxAge === 0 && triggredByEvent !== true) {
245
+ return;
246
+ } else if (clientMaxAge > 0 && clientSession === null) {
247
+ return;
248
+ } else if (clientMaxAge > 0 && currentTime < clientLastSync + clientMaxAge) {
249
+ return;
1170
250
  }
1171
251
  }
1172
- }, _callee, null, [[1, 29]]);
1173
- }));
252
+
253
+ if (clientSession === undefined) {
254
+ __NEXTAUTH._clientSession = null;
255
+ }
256
+
257
+ __NEXTAUTH._clientLastSync = _now();
258
+ var newClientSessionData = yield getSession({
259
+ triggerEvent: !triggeredByStorageEvent
260
+ });
261
+ __NEXTAUTH._clientSession = newClientSessionData;
262
+ setData(newClientSessionData);
263
+ setLoading(false);
264
+ } catch (error) {
265
+ logger$1.error('CLIENT_USE_SESSION_ERROR', error);
266
+ setLoading(false);
267
+ }
268
+ });
1174
269
 
1175
270
  __NEXTAUTH._getSession();
1176
271
  });
@@ -1182,38 +277,22 @@ function getSession(_x) {
1182
277
  }
1183
278
 
1184
279
  function _getSession2() {
1185
- _getSession2 = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee4(ctx) {
280
+ _getSession2 = _asyncToGenerator(function* (ctx) {
1186
281
  var _ctx$triggerEvent;
1187
282
 
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
- }
1207
-
1208
- return _context4.abrupt("return", session);
283
+ var session = yield _fetchData('session', ctx);
1209
284
 
1210
- case 5:
1211
- case "end":
1212
- return _context4.stop();
285
+ if ((_ctx$triggerEvent = ctx === null || ctx === void 0 ? void 0 : ctx.triggerEvent) !== null && _ctx$triggerEvent !== void 0 ? _ctx$triggerEvent : true) {
286
+ broadcast.post({
287
+ event: 'session',
288
+ data: {
289
+ trigger: 'getSession'
1213
290
  }
1214
- }
1215
- }, _callee4);
1216
- }));
291
+ });
292
+ }
293
+
294
+ return session;
295
+ });
1217
296
  return _getSession2.apply(this, arguments);
1218
297
  }
1219
298
 
@@ -1222,50 +301,11 @@ function getCsrfToken(_x2) {
1222
301
  }
1223
302
 
1224
303
  function _getCsrfToken() {
1225
- _getCsrfToken = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee5(ctx) {
304
+ _getCsrfToken = _asyncToGenerator(function* (ctx) {
1226
305
  var _yield$_fetchData;
1227
306
 
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
- }
1243
-
1244
- _context5.t0 = _yield$_fetchData === void 0;
1245
-
1246
- case 6:
1247
- if (!_context5.t0) {
1248
- _context5.next = 10;
1249
- break;
1250
- }
1251
-
1252
- _context5.t2 = void 0;
1253
- _context5.next = 11;
1254
- break;
1255
-
1256
- case 10:
1257
- _context5.t2 = _yield$_fetchData.csrfToken;
1258
-
1259
- case 11:
1260
- return _context5.abrupt("return", _context5.t2);
1261
-
1262
- case 12:
1263
- case "end":
1264
- return _context5.stop();
1265
- }
1266
- }
1267
- }, _callee5);
1268
- }));
307
+ return (_yield$_fetchData = yield _fetchData('csrf', ctx)) === null || _yield$_fetchData === void 0 ? void 0 : _yield$_fetchData.csrfToken;
308
+ });
1269
309
  return _getCsrfToken.apply(this, arguments);
1270
310
  }
1271
311
 
@@ -1274,24 +314,9 @@ function getProviders() {
1274
314
  }
1275
315
 
1276
316
  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
- }));
317
+ _getProviders = _asyncToGenerator(function* () {
318
+ return _fetchData('providers');
319
+ });
1295
320
  return _getProviders.apply(this, arguments);
1296
321
  }
1297
322
 
@@ -1300,138 +325,68 @@ function signIn(_x3) {
1300
325
  }
1301
326
 
1302
327
  function _signIn() {
1303
- _signIn = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee7(provider) {
1304
- var options,
1305
- authorizationParams,
1306
- _options$callbackUrl,
328
+ _signIn = _asyncToGenerator(function* (provider) {
329
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
330
+ var authorizationParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
331
+ var {
332
+ callbackUrl = window.location,
333
+ redirect = true
334
+ } = options;
335
+
336
+ var baseUrl = _apiBaseUrl();
337
+
338
+ var providers = yield getProviders();
339
+
340
+ if (!(provider in providers)) {
341
+ window.location = "".concat(baseUrl, "/signin?callbackUrl=").concat(encodeURIComponent(callbackUrl));
342
+ return;
343
+ }
344
+
345
+ var isCredentials = providers[provider].type === 'credentials';
346
+ var isEmail = providers[provider].type === 'email';
347
+ var canRedirectBeDisabled = isCredentials || isEmail;
348
+ var signInUrl = isCredentials ? "".concat(baseUrl, "/callback/").concat(provider) : "".concat(baseUrl, "/signin/").concat(provider);
349
+ var fetchOptions = {
350
+ method: 'post',
351
+ headers: {
352
+ 'Content-Type': 'application/x-www-form-urlencoded'
353
+ },
354
+ body: new URLSearchParams(_objectSpread(_objectSpread({}, options), {}, {
355
+ csrfToken: yield getCsrfToken(),
1307
356
  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
- }
357
+ json: true
358
+ }))
359
+ };
1342
360
 
1343
- return _context7.abrupt("return", window.location.replace("".concat(baseUrl, "/error")));
361
+ var _signInUrl = "".concat(signInUrl, "?").concat(new URLSearchParams(authorizationParams));
1344
362
 
1345
- case 9:
1346
- if (provider in providers) {
1347
- _context7.next = 11;
1348
- break;
1349
- }
363
+ var res = yield fetch(_signInUrl, fetchOptions);
364
+ var data = yield res.json();
1350
365
 
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
- }
366
+ if (redirect || !canRedirectBeDisabled) {
367
+ var _data$url;
1401
368
 
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");
369
+ var url = (_data$url = data.url) !== null && _data$url !== void 0 ? _data$url : callbackUrl;
370
+ window.location = url;
371
+ if (url.includes('#')) window.location.reload();
372
+ return;
373
+ }
1406
374
 
1407
- case 42:
1408
- error = new URL(data.url).searchParams.get("error");
375
+ var error = new URL(data.url).searchParams.get('error');
1409
376
 
1410
- if (!res.ok) {
1411
- _context7.next = 46;
1412
- break;
1413
- }
377
+ if (res.ok) {
378
+ yield __NEXTAUTH._getSession({
379
+ event: 'storage'
380
+ });
381
+ }
1414
382
 
1415
- _context7.next = 46;
1416
- return __NEXTAUTH._getSession({
1417
- event: "storage"
1418
- });
1419
-
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
- });
1427
-
1428
- case 47:
1429
- case "end":
1430
- return _context7.stop();
1431
- }
1432
- }
1433
- }, _callee7);
1434
- }));
383
+ return {
384
+ error,
385
+ status: res.status,
386
+ ok: res.ok,
387
+ url: error ? null : data.url
388
+ };
389
+ });
1435
390
  return _signIn.apply(this, arguments);
1436
391
  }
1437
392
 
@@ -1440,145 +395,86 @@ function signOut() {
1440
395
  }
1441
396
 
1442
397
  function _signOut() {
1443
- _signOut = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee8() {
1444
- var options,
1445
- _options$callbackUrl2,
398
+ _signOut = _asyncToGenerator(function* () {
399
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
400
+ var {
401
+ callbackUrl = window.location,
402
+ redirect = true
403
+ } = options;
404
+
405
+ var baseUrl = _apiBaseUrl();
406
+
407
+ var fetchOptions = {
408
+ method: 'post',
409
+ headers: {
410
+ 'Content-Type': 'application/x-www-form-urlencoded'
411
+ },
412
+ body: new URLSearchParams({
413
+ csrfToken: yield getCsrfToken(),
1446
414
  callbackUrl,
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");
415
+ json: true
416
+ })
417
+ };
418
+ var res = yield fetch("".concat(baseUrl, "/signout"), fetchOptions);
419
+ var data = yield res.json();
420
+ broadcast.post({
421
+ event: 'session',
422
+ data: {
423
+ trigger: 'signout'
424
+ }
425
+ });
1511
426
 
1512
- case 24:
1513
- _context8.next = 26;
1514
- return __NEXTAUTH._getSession({
1515
- event: "storage"
1516
- });
427
+ if (redirect) {
428
+ var _data$url2;
1517
429
 
1518
- case 26:
1519
- return _context8.abrupt("return", data);
430
+ var url = (_data$url2 = data.url) !== null && _data$url2 !== void 0 ? _data$url2 : callbackUrl;
431
+ window.location = url;
432
+ if (url.includes('#')) window.location.reload();
433
+ return;
434
+ }
1520
435
 
1521
- case 27:
1522
- case "end":
1523
- return _context8.stop();
1524
- }
1525
- }
1526
- }, _callee8);
1527
- }));
436
+ yield __NEXTAUTH._getSession({
437
+ event: 'storage'
438
+ });
439
+ return data;
440
+ });
1528
441
  return _signOut.apply(this, arguments);
1529
442
  }
1530
443
 
1531
444
  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;
1537
-
445
+ var {
446
+ baseUrl,
447
+ basePath,
448
+ clientMaxAge,
449
+ keepAlive
450
+ } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1538
451
  if (baseUrl) __NEXTAUTH.baseUrl = baseUrl;
1539
452
  if (basePath) __NEXTAUTH.basePath = basePath;
1540
453
  if (clientMaxAge) __NEXTAUTH.clientMaxAge = clientMaxAge;
1541
454
 
1542
455
  if (keepAlive) {
1543
456
  __NEXTAUTH.keepAlive = keepAlive;
1544
- if (typeof window === "undefined") return;
457
+ if (typeof window === 'undefined') return;
1545
458
 
1546
459
  if (__NEXTAUTH._clientSyncTimer !== null) {
1547
460
  clearTimeout(__NEXTAUTH._clientSyncTimer);
1548
461
  }
1549
462
 
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);
463
+ __NEXTAUTH._clientSyncTimer = setTimeout(_asyncToGenerator(function* () {
464
+ if (!__NEXTAUTH._clientSession) return;
465
+ yield __NEXTAUTH._getSession({
466
+ event: 'timer'
467
+ });
468
+ }), keepAlive * 1000);
1575
469
  }
1576
470
  }
1577
471
 
1578
- function Provider(_ref5) {
1579
- var children = _ref5.children,
1580
- session = _ref5.session,
1581
- options = _ref5.options;
472
+ function Provider(_ref3) {
473
+ var {
474
+ children,
475
+ session,
476
+ options
477
+ } = _ref3;
1582
478
  setOptions(options);
1583
479
  return (0, React__default.createElement)(SessionContext.Provider, {
1584
480
  value: useSession(session)
@@ -1590,74 +486,34 @@ function _fetchData(_x4) {
1590
486
  }
1591
487
 
1592
488
  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
- }
1635
-
1636
- throw data;
489
+ _fetchData2 = _asyncToGenerator(function* (path) {
490
+ var {
491
+ ctx,
492
+ req = ctx === null || ctx === void 0 ? void 0 : ctx.req
493
+ } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1637
494
 
1638
- case 14:
1639
- return _context9.abrupt("return", Object.keys(data).length > 0 ? data : null);
1640
-
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);
1646
-
1647
- case 21:
1648
- case "end":
1649
- return _context9.stop();
495
+ try {
496
+ var baseUrl = yield _apiBaseUrl();
497
+ var options = req ? {
498
+ headers: {
499
+ cookie: req.headers.cookie
1650
500
  }
1651
- }
1652
- }, _callee9, null, [[1, 17]]);
1653
- }));
501
+ } : {};
502
+ var res = yield fetch("".concat(baseUrl, "/").concat(path), options);
503
+ var data = yield res.json();
504
+ return Object.keys(data).length > 0 ? data : null;
505
+ } catch (error) {
506
+ logger$1.error('CLIENT_FETCH_ERROR', path, error);
507
+ return null;
508
+ }
509
+ });
1654
510
  return _fetchData2.apply(this, arguments);
1655
511
  }
1656
512
 
1657
513
  function _apiBaseUrl() {
1658
- if (typeof window === "undefined") {
514
+ if (typeof window === 'undefined') {
1659
515
  if (!process.env.NEXTAUTH_URL) {
1660
- logger$1.warn("NEXTAUTH_URL", "NEXTAUTH_URL environment variable not set");
516
+ logger$1.warn('NEXTAUTH_URL', 'NEXTAUTH_URL environment variable not set');
1661
517
  }
1662
518
 
1663
519
  return "".concat(__NEXTAUTH.baseUrlServer).concat(__NEXTAUTH.basePathServer);
@@ -1671,68 +527,43 @@ function _now() {
1671
527
  }
1672
528
 
1673
529
  function BroadcastChannel() {
1674
- var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "nextauth.message";
530
+ var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'nextauth.message';
1675
531
  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
- }));
532
+ receive(onReceive) {
533
+ if (typeof window === 'undefined') return;
534
+ window.addEventListener('storage', function () {
535
+ var _ref4 = _asyncToGenerator(function* (event) {
536
+ if (event.key !== name) return;
537
+ var message = JSON.parse(event.newValue);
538
+ if ((message === null || message === void 0 ? void 0 : message.event) !== 'session' || !(message !== null && message !== void 0 && message.data)) return;
539
+ onReceive(message);
540
+ });
1712
541
 
1713
542
  return function (_x5) {
1714
- return _ref6.apply(this, arguments);
543
+ return _ref4.apply(this, arguments);
1715
544
  };
1716
545
  }());
1717
546
  },
1718
- post: function post(message) {
1719
- if (typeof localStorage === "undefined") return;
547
+
548
+ post(message) {
549
+ if (typeof localStorage === 'undefined') return;
1720
550
  localStorage.setItem(name, JSON.stringify(_objectSpread(_objectSpread({}, message), {}, {
1721
551
  timestamp: _now()
1722
552
  })));
1723
553
  }
554
+
1724
555
  };
1725
556
  }
1726
557
 
1727
558
  var _default = {
1728
- getSession: getSession,
1729
- getCsrfToken: getCsrfToken,
1730
- getProviders: getProviders,
1731
- useSession: useSession,
1732
- signIn: signIn,
1733
- signOut: signOut,
1734
- Provider: Provider,
1735
- setOptions: setOptions,
559
+ getSession,
560
+ getCsrfToken,
561
+ getProviders,
562
+ useSession,
563
+ signIn,
564
+ signOut,
565
+ Provider,
566
+ setOptions,
1736
567
  options: setOptions,
1737
568
  session: getSession,
1738
569
  providers: getProviders,
@@ -1745,17 +576,10 @@ exports.default = _default;
1745
576
 
1746
577
  unwrapExports(client$1);
1747
578
  client$1.useSession;
1748
- client$1.session;
1749
579
  client$1.getSession;
1750
- client$1.csrfToken;
1751
- client$1.getCsrfToken;
1752
- client$1.providers;
1753
580
  client$1.getProviders;
1754
- client$1.signin;
1755
581
  client$1.signIn;
1756
- client$1.signout;
1757
582
  client$1.signOut;
1758
- client$1.options;
1759
583
  client$1.setOptions;
1760
584
  client$1.Provider;
1761
585