@mjhls/mjh-framework 1.0.1055 → 1.0.1058
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.
- package/README.md +168 -168
- package/dist/cjs/AD300x250.js +1 -1
- package/dist/cjs/AD300x250x600.js +1 -1
- package/dist/cjs/AD728x90.js +1 -1
- package/dist/cjs/ADFloatingFooter.js +1 -1
- package/dist/cjs/ADGutter.js +1 -1
- package/dist/cjs/{ADInfeed-98ee4120.js → ADInfeed-0519664d.js} +1 -1
- package/dist/cjs/ADSkyscraper.js +1 -1
- package/dist/cjs/ADSponsoredResources.js +1 -1
- package/dist/cjs/ADWebcast.js +1 -1
- package/dist/cjs/ADWelcome.js +1 -1
- package/dist/cjs/{ADlgInfeed-55df7d69.js → ADlgInfeed-e544ac1c.js} +1 -1
- package/dist/cjs/AdSlot.js +1 -1
- package/dist/cjs/AdSlotsProvider.js +1 -1
- package/dist/cjs/AlgoliaSearch.js +23 -27
- package/dist/cjs/ArticleCarousel.js +1 -1
- package/dist/cjs/ArticleProgramLandingPage.js +3 -4
- package/dist/cjs/ArticleSeriesLandingPage.js +3 -3
- package/dist/cjs/ArticleSeriesListing.js +1 -1
- package/dist/cjs/AuthWrapper.js +294 -1546
- package/dist/cjs/CEDeckSupabase.js +2 -2
- package/dist/cjs/CMEDeck.js +1 -1
- package/dist/cjs/Column3.js +1 -1
- package/dist/cjs/ConferenceArticleCard.js +15 -15
- package/dist/cjs/ContentCardPaginated.js +3 -3
- package/dist/cjs/DeckContent.js +11 -11
- package/dist/cjs/DeckQueue.js +2 -2
- package/dist/cjs/DeckQueuePaginated.js +2 -2
- package/dist/cjs/EventsDeck.js +18 -18
- package/dist/cjs/ExternalResources.js +3 -4
- package/dist/cjs/Feature.js +1 -1
- package/dist/cjs/GridContent.js +4 -4
- package/dist/cjs/GridContentPaginated.js +4 -4
- package/dist/cjs/GridHero.js +1 -1
- package/dist/cjs/HamMagazine.js +11 -11
- package/dist/cjs/HealthCareProfessionalModal.js +1 -1
- package/dist/cjs/Hero.js +1 -1
- package/dist/cjs/HorizontalArticleListing.js +3 -4
- package/dist/cjs/{ImageSlider-d65bc9c8.js → ImageSlider-62a43659.js} +123 -106
- package/dist/cjs/IssueLanding.js +34 -35
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/LeftNav.js +1 -1
- package/dist/cjs/MasterDeck.js +11 -11
- package/dist/cjs/MasterDeckPaginated.js +11 -11
- package/dist/cjs/{MediaSeriesCard-e54b0b0c.js → MediaSeriesCard-3cf661c7.js} +2 -2
- package/dist/cjs/MediaSeriesLanding.js +13 -14
- package/dist/cjs/MediaSeriesLandingPaginated.js +13 -14
- package/dist/cjs/NavMagazine.js +12 -12
- package/dist/cjs/NavNative.js +10 -10
- package/dist/cjs/OncliveLargeHero.js +1 -1
- package/dist/cjs/PartnerDetailListing.js +6 -7
- package/dist/cjs/PartnerDetailListingPaginated.js +6 -7
- package/dist/cjs/PodcastsLanding.js +6 -7
- package/dist/cjs/PubSection.js +4 -4
- package/dist/cjs/PublicationLanding.js +26 -26
- package/dist/cjs/QueueDeckExpanded.js +4 -4
- package/dist/cjs/QueueDeckExpandedPaginated.js +4 -4
- package/dist/cjs/RelatedContent.js +28 -28
- package/dist/cjs/RelatedTopicsDropdown.js +10 -10
- package/dist/cjs/SeriesListingDeck.js +2 -2
- package/dist/cjs/{SeriesSlider-086a8319.js → SeriesSlider-edcb8e4b.js} +5 -5
- package/dist/cjs/SideFooter.js +2 -2
- package/dist/cjs/{SocialSearchComponent-d7e5d3a6.js → SocialSearchComponent-e9ec9c63.js} +1 -1
- package/dist/cjs/TaxonomyDescription.js +3 -4
- package/dist/cjs/TemplateNormal.js +2 -2
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/{Tooltip-02a841b5.js → Tooltip-980a1d1a.js} +140 -348
- package/dist/cjs/Ustream.js +1 -1
- package/dist/cjs/VideoProgramLandingPage.js +3 -4
- package/dist/cjs/VideoSeriesCard.js +1 -1
- package/dist/cjs/VideoSeriesLandingPage.js +3 -3
- package/dist/cjs/VideoSeriesListing.js +1 -1
- package/dist/cjs/View.js +7 -9
- package/dist/cjs/YahooHero.js +1 -1
- package/dist/cjs/YoutubeGroup.js +5 -5
- package/dist/cjs/{entities-df1aed86.js → entities-3f9d0f2f.js} +0 -4
- package/dist/cjs/faundadb.js +321 -4
- package/dist/cjs/getRelatedArticle.js +211 -6
- package/dist/cjs/getSerializers.js +3 -4
- package/dist/cjs/{getTargeting-5b954783.js → getTargeting-45ffbee8.js} +9 -9
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/{index-9ec837cc.js → index-8041a4eb.js} +10 -0
- package/dist/cjs/{index-40a8d091.js → index-c19999b7.js} +605 -19
- package/dist/cjs/index.js +10 -18
- package/dist/cjs/{main-ae8472f3.js → main-47be4f9f.js} +9 -4
- package/dist/esm/AD300x250.js +1 -1
- package/dist/esm/AD300x250x600.js +1 -1
- package/dist/esm/AD728x90.js +1 -1
- package/dist/esm/ADFloatingFooter.js +1 -1
- package/dist/esm/ADGutter.js +1 -1
- package/dist/esm/{ADInfeed-6d0c0856.js → ADInfeed-c3f5613e.js} +1 -1
- package/dist/esm/ADSkyscraper.js +1 -1
- package/dist/esm/ADSponsoredResources.js +1 -1
- package/dist/esm/ADWebcast.js +1 -1
- package/dist/esm/ADWelcome.js +1 -1
- package/dist/esm/{ADlgInfeed-93bc2250.js → ADlgInfeed-2b148f3f.js} +1 -1
- package/dist/esm/AdSlot.js +1 -1
- package/dist/esm/AdSlotsProvider.js +1 -1
- package/dist/esm/AlgoliaSearch.js +22 -26
- package/dist/esm/ArticleCarousel.js +1 -1
- package/dist/esm/ArticleProgramLandingPage.js +3 -4
- package/dist/esm/ArticleSeriesLandingPage.js +3 -3
- package/dist/esm/ArticleSeriesListing.js +1 -1
- package/dist/esm/AuthWrapper.js +288 -1540
- package/dist/esm/CEDeckSupabase.js +2 -2
- package/dist/esm/CMEDeck.js +1 -1
- package/dist/esm/Column3.js +1 -1
- package/dist/esm/ConferenceArticleCard.js +15 -15
- package/dist/esm/ContentCardPaginated.js +3 -3
- package/dist/esm/DeckContent.js +11 -11
- package/dist/esm/DeckQueue.js +2 -2
- package/dist/esm/DeckQueuePaginated.js +2 -2
- package/dist/esm/EventsDeck.js +18 -18
- package/dist/esm/ExternalResources.js +3 -4
- package/dist/esm/Feature.js +1 -1
- package/dist/esm/GridContent.js +4 -4
- package/dist/esm/GridContentPaginated.js +4 -4
- package/dist/esm/GridHero.js +1 -1
- package/dist/esm/HamMagazine.js +11 -11
- package/dist/esm/HealthCareProfessionalModal.js +1 -1
- package/dist/esm/Hero.js +1 -1
- package/dist/esm/HorizontalArticleListing.js +3 -4
- package/dist/esm/{ImageSlider-da225417.js → ImageSlider-aea3a615.js} +124 -107
- package/dist/esm/IssueLanding.js +34 -35
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/LeftNav.js +1 -1
- package/dist/esm/MasterDeck.js +11 -11
- package/dist/esm/MasterDeckPaginated.js +11 -11
- package/dist/esm/{MediaSeriesCard-3906e9ad.js → MediaSeriesCard-52a2e1ca.js} +2 -2
- package/dist/esm/MediaSeriesLanding.js +13 -14
- package/dist/esm/MediaSeriesLandingPaginated.js +13 -14
- package/dist/esm/NavMagazine.js +12 -12
- package/dist/esm/NavNative.js +10 -10
- package/dist/esm/OncliveLargeHero.js +1 -1
- package/dist/esm/PartnerDetailListing.js +6 -7
- package/dist/esm/PartnerDetailListingPaginated.js +6 -7
- package/dist/esm/PodcastsLanding.js +6 -7
- package/dist/esm/PubSection.js +4 -4
- package/dist/esm/PublicationLanding.js +26 -26
- package/dist/esm/QueueDeckExpanded.js +4 -4
- package/dist/esm/QueueDeckExpandedPaginated.js +4 -4
- package/dist/esm/RelatedContent.js +28 -28
- package/dist/esm/RelatedTopicsDropdown.js +10 -10
- package/dist/esm/SeriesListingDeck.js +2 -2
- package/dist/esm/{SeriesSlider-a6b1d617.js → SeriesSlider-2e83e861.js} +5 -5
- package/dist/esm/SideFooter.js +2 -2
- package/dist/esm/{SocialSearchComponent-6065bff2.js → SocialSearchComponent-020f9e81.js} +1 -1
- package/dist/esm/TaxonomyDescription.js +3 -4
- package/dist/esm/TemplateNormal.js +2 -2
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/{Tooltip-7a093cd4.js → Tooltip-51957f7c.js} +298 -506
- package/dist/esm/Ustream.js +1 -1
- package/dist/esm/VideoProgramLandingPage.js +3 -4
- package/dist/esm/VideoSeriesCard.js +1 -1
- package/dist/esm/VideoSeriesLandingPage.js +3 -3
- package/dist/esm/VideoSeriesListing.js +1 -1
- package/dist/esm/View.js +7 -9
- package/dist/esm/YahooHero.js +1 -1
- package/dist/esm/YoutubeGroup.js +5 -5
- package/dist/esm/{entities-6d9154b4.js → entities-932b50cf.js} +0 -4
- package/dist/esm/faundadb.js +319 -2
- package/dist/esm/getRelatedArticle.js +206 -1
- package/dist/esm/getSerializers.js +3 -4
- package/dist/esm/{getTargeting-5a281334.js → getTargeting-a569a9cc.js} +9 -9
- package/dist/esm/getTargeting.js +1 -1
- package/dist/esm/{index-718f95b2.js → index-588abaff.js} +595 -9
- package/dist/esm/{index-0ce54f8a.js → index-67e1773f.js} +10 -1
- package/dist/esm/index.js +10 -17
- package/dist/esm/{main-754d4992.js → main-f97773b2.js} +9 -4
- package/package.json +116 -116
- package/dist/cjs/Auth.js +0 -3682
- package/dist/cjs/index-bd6c9f56.js +0 -211
- package/dist/cjs/md5-e1ca5797.js +0 -323
- package/dist/cjs/util-93a37fd0.js +0 -587
- package/dist/esm/Auth.js +0 -3661
- package/dist/esm/index-db3bb315.js +0 -207
- package/dist/esm/md5-4e42248e.js +0 -321
- package/dist/esm/util-8ed16d48.js +0 -585
package/dist/cjs/AuthWrapper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var slicedToArray
|
|
3
|
+
var slicedToArray = require('./slicedToArray-067dd3bc.js');
|
|
4
4
|
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var reactBootstrap = require('react-bootstrap');
|
|
@@ -12,952 +12,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
14
|
|
|
15
|
-
var interopRequireDefault = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
16
|
-
function _interopRequireDefault(obj) {
|
|
17
|
-
return obj && obj.__esModule ? obj : {
|
|
18
|
-
"default": obj
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
_commonjsHelpers.unwrapExports(interopRequireDefault);
|
|
26
|
-
|
|
27
|
-
var _typeof_1 = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
28
|
-
function _typeof(obj) {
|
|
29
|
-
"@babel/helpers - typeof";
|
|
30
|
-
|
|
31
|
-
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
32
|
-
return typeof obj;
|
|
33
|
-
} : function (obj) {
|
|
34
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
35
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
_commonjsHelpers.unwrapExports(_typeof_1);
|
|
42
|
-
|
|
43
|
-
var runtime_1 = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
44
|
-
/**
|
|
45
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
46
|
-
*
|
|
47
|
-
* This source code is licensed under the MIT license found in the
|
|
48
|
-
* LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/
|
|
50
|
-
|
|
51
|
-
var runtime = (function (exports) {
|
|
52
|
-
|
|
53
|
-
var Op = Object.prototype;
|
|
54
|
-
var hasOwn = Op.hasOwnProperty;
|
|
55
|
-
var undefined$1; // More compressible than void 0.
|
|
56
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
57
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
58
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
59
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
60
|
-
|
|
61
|
-
function define(obj, key, value) {
|
|
62
|
-
Object.defineProperty(obj, key, {
|
|
63
|
-
value: value,
|
|
64
|
-
enumerable: true,
|
|
65
|
-
configurable: true,
|
|
66
|
-
writable: true
|
|
67
|
-
});
|
|
68
|
-
return obj[key];
|
|
69
|
-
}
|
|
70
|
-
try {
|
|
71
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
72
|
-
define({}, "");
|
|
73
|
-
} catch (err) {
|
|
74
|
-
define = function(obj, key, value) {
|
|
75
|
-
return obj[key] = value;
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
80
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
81
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
82
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
83
|
-
var context = new Context(tryLocsList || []);
|
|
84
|
-
|
|
85
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
86
|
-
// .throw, and .return methods.
|
|
87
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
88
|
-
|
|
89
|
-
return generator;
|
|
90
|
-
}
|
|
91
|
-
exports.wrap = wrap;
|
|
92
|
-
|
|
93
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
94
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
95
|
-
// have been (and was previously) designed to take a closure to be
|
|
96
|
-
// invoked without arguments, but in all the cases we care about we
|
|
97
|
-
// already have an existing method we want to call, so there's no need
|
|
98
|
-
// to create a new function object. We can even get away with assuming
|
|
99
|
-
// the method takes exactly one argument, since that happens to be true
|
|
100
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
101
|
-
// only additional allocation required is the completion record, which
|
|
102
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
103
|
-
function tryCatch(fn, obj, arg) {
|
|
104
|
-
try {
|
|
105
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
106
|
-
} catch (err) {
|
|
107
|
-
return { type: "throw", arg: err };
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
112
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
113
|
-
var GenStateExecuting = "executing";
|
|
114
|
-
var GenStateCompleted = "completed";
|
|
115
|
-
|
|
116
|
-
// Returning this object from the innerFn has the same effect as
|
|
117
|
-
// breaking out of the dispatch switch statement.
|
|
118
|
-
var ContinueSentinel = {};
|
|
119
|
-
|
|
120
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
121
|
-
// .constructor.prototype properties for functions that return Generator
|
|
122
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
123
|
-
// minifier not to mangle the names of these two functions.
|
|
124
|
-
function Generator() {}
|
|
125
|
-
function GeneratorFunction() {}
|
|
126
|
-
function GeneratorFunctionPrototype() {}
|
|
127
|
-
|
|
128
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
129
|
-
// don't natively support it.
|
|
130
|
-
var IteratorPrototype = {};
|
|
131
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
132
|
-
return this;
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
var getProto = Object.getPrototypeOf;
|
|
136
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
137
|
-
if (NativeIteratorPrototype &&
|
|
138
|
-
NativeIteratorPrototype !== Op &&
|
|
139
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
140
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
141
|
-
// of the polyfill.
|
|
142
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
146
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
147
|
-
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
148
|
-
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
149
|
-
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
150
|
-
GeneratorFunction.displayName = define(
|
|
151
|
-
GeneratorFunctionPrototype,
|
|
152
|
-
toStringTagSymbol,
|
|
153
|
-
"GeneratorFunction"
|
|
154
|
-
);
|
|
155
|
-
|
|
156
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
157
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
158
|
-
function defineIteratorMethods(prototype) {
|
|
159
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
160
|
-
define(prototype, method, function(arg) {
|
|
161
|
-
return this._invoke(method, arg);
|
|
162
|
-
});
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
exports.isGeneratorFunction = function(genFun) {
|
|
167
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
168
|
-
return ctor
|
|
169
|
-
? ctor === GeneratorFunction ||
|
|
170
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
171
|
-
// do is to check its .name property.
|
|
172
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
173
|
-
: false;
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
exports.mark = function(genFun) {
|
|
177
|
-
if (Object.setPrototypeOf) {
|
|
178
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
179
|
-
} else {
|
|
180
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
181
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
182
|
-
}
|
|
183
|
-
genFun.prototype = Object.create(Gp);
|
|
184
|
-
return genFun;
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
// Within the body of any async function, `await x` is transformed to
|
|
188
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
189
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
190
|
-
// meant to be awaited.
|
|
191
|
-
exports.awrap = function(arg) {
|
|
192
|
-
return { __await: arg };
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
196
|
-
function invoke(method, arg, resolve, reject) {
|
|
197
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
198
|
-
if (record.type === "throw") {
|
|
199
|
-
reject(record.arg);
|
|
200
|
-
} else {
|
|
201
|
-
var result = record.arg;
|
|
202
|
-
var value = result.value;
|
|
203
|
-
if (value &&
|
|
204
|
-
typeof value === "object" &&
|
|
205
|
-
hasOwn.call(value, "__await")) {
|
|
206
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
207
|
-
invoke("next", value, resolve, reject);
|
|
208
|
-
}, function(err) {
|
|
209
|
-
invoke("throw", err, resolve, reject);
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
214
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
215
|
-
// the .value of the Promise<{value,done}> result for the
|
|
216
|
-
// current iteration.
|
|
217
|
-
result.value = unwrapped;
|
|
218
|
-
resolve(result);
|
|
219
|
-
}, function(error) {
|
|
220
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
221
|
-
// into the async generator function so it can be handled there.
|
|
222
|
-
return invoke("throw", error, resolve, reject);
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
var previousPromise;
|
|
228
|
-
|
|
229
|
-
function enqueue(method, arg) {
|
|
230
|
-
function callInvokeWithMethodAndArg() {
|
|
231
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
232
|
-
invoke(method, arg, resolve, reject);
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
return previousPromise =
|
|
237
|
-
// If enqueue has been called before, then we want to wait until
|
|
238
|
-
// all previous Promises have been resolved before calling invoke,
|
|
239
|
-
// so that results are always delivered in the correct order. If
|
|
240
|
-
// enqueue has not been called before, then it is important to
|
|
241
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
242
|
-
// so that the async generator function has the opportunity to do
|
|
243
|
-
// any necessary setup in a predictable way. This predictability
|
|
244
|
-
// is why the Promise constructor synchronously invokes its
|
|
245
|
-
// executor callback, and why async functions synchronously
|
|
246
|
-
// execute code before the first await. Since we implement simple
|
|
247
|
-
// async functions in terms of async generators, it is especially
|
|
248
|
-
// important to get this right, even though it requires care.
|
|
249
|
-
previousPromise ? previousPromise.then(
|
|
250
|
-
callInvokeWithMethodAndArg,
|
|
251
|
-
// Avoid propagating failures to Promises returned by later
|
|
252
|
-
// invocations of the iterator.
|
|
253
|
-
callInvokeWithMethodAndArg
|
|
254
|
-
) : callInvokeWithMethodAndArg();
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// Define the unified helper method that is used to implement .next,
|
|
258
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
259
|
-
this._invoke = enqueue;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
263
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
264
|
-
return this;
|
|
265
|
-
});
|
|
266
|
-
exports.AsyncIterator = AsyncIterator;
|
|
267
|
-
|
|
268
|
-
// Note that simple async functions are implemented on top of
|
|
269
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
270
|
-
// the final result produced by the iterator.
|
|
271
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
272
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
273
|
-
|
|
274
|
-
var iter = new AsyncIterator(
|
|
275
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
276
|
-
PromiseImpl
|
|
277
|
-
);
|
|
278
|
-
|
|
279
|
-
return exports.isGeneratorFunction(outerFn)
|
|
280
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
281
|
-
: iter.next().then(function(result) {
|
|
282
|
-
return result.done ? result.value : iter.next();
|
|
283
|
-
});
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
287
|
-
var state = GenStateSuspendedStart;
|
|
288
|
-
|
|
289
|
-
return function invoke(method, arg) {
|
|
290
|
-
if (state === GenStateExecuting) {
|
|
291
|
-
throw new Error("Generator is already running");
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
if (state === GenStateCompleted) {
|
|
295
|
-
if (method === "throw") {
|
|
296
|
-
throw arg;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
300
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
301
|
-
return doneResult();
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
context.method = method;
|
|
305
|
-
context.arg = arg;
|
|
306
|
-
|
|
307
|
-
while (true) {
|
|
308
|
-
var delegate = context.delegate;
|
|
309
|
-
if (delegate) {
|
|
310
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
311
|
-
if (delegateResult) {
|
|
312
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
313
|
-
return delegateResult;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
if (context.method === "next") {
|
|
318
|
-
// Setting context._sent for legacy support of Babel's
|
|
319
|
-
// function.sent implementation.
|
|
320
|
-
context.sent = context._sent = context.arg;
|
|
321
|
-
|
|
322
|
-
} else if (context.method === "throw") {
|
|
323
|
-
if (state === GenStateSuspendedStart) {
|
|
324
|
-
state = GenStateCompleted;
|
|
325
|
-
throw context.arg;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
context.dispatchException(context.arg);
|
|
329
|
-
|
|
330
|
-
} else if (context.method === "return") {
|
|
331
|
-
context.abrupt("return", context.arg);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
state = GenStateExecuting;
|
|
335
|
-
|
|
336
|
-
var record = tryCatch(innerFn, self, context);
|
|
337
|
-
if (record.type === "normal") {
|
|
338
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
339
|
-
// GenStateExecuting and loop back for another invocation.
|
|
340
|
-
state = context.done
|
|
341
|
-
? GenStateCompleted
|
|
342
|
-
: GenStateSuspendedYield;
|
|
343
|
-
|
|
344
|
-
if (record.arg === ContinueSentinel) {
|
|
345
|
-
continue;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
return {
|
|
349
|
-
value: record.arg,
|
|
350
|
-
done: context.done
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
} else if (record.type === "throw") {
|
|
354
|
-
state = GenStateCompleted;
|
|
355
|
-
// Dispatch the exception by looping back around to the
|
|
356
|
-
// context.dispatchException(context.arg) call above.
|
|
357
|
-
context.method = "throw";
|
|
358
|
-
context.arg = record.arg;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
365
|
-
// result, either by returning a { value, done } result from the
|
|
366
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
367
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
368
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
369
|
-
var method = delegate.iterator[context.method];
|
|
370
|
-
if (method === undefined$1) {
|
|
371
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
372
|
-
// method always terminates the yield* loop.
|
|
373
|
-
context.delegate = null;
|
|
374
|
-
|
|
375
|
-
if (context.method === "throw") {
|
|
376
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
377
|
-
if (delegate.iterator["return"]) {
|
|
378
|
-
// If the delegate iterator has a return method, give it a
|
|
379
|
-
// chance to clean up.
|
|
380
|
-
context.method = "return";
|
|
381
|
-
context.arg = undefined$1;
|
|
382
|
-
maybeInvokeDelegate(delegate, context);
|
|
383
|
-
|
|
384
|
-
if (context.method === "throw") {
|
|
385
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
386
|
-
// "return" to "throw", let that override the TypeError below.
|
|
387
|
-
return ContinueSentinel;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
context.method = "throw";
|
|
392
|
-
context.arg = new TypeError(
|
|
393
|
-
"The iterator does not provide a 'throw' method");
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
return ContinueSentinel;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
400
|
-
|
|
401
|
-
if (record.type === "throw") {
|
|
402
|
-
context.method = "throw";
|
|
403
|
-
context.arg = record.arg;
|
|
404
|
-
context.delegate = null;
|
|
405
|
-
return ContinueSentinel;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
var info = record.arg;
|
|
409
|
-
|
|
410
|
-
if (! info) {
|
|
411
|
-
context.method = "throw";
|
|
412
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
413
|
-
context.delegate = null;
|
|
414
|
-
return ContinueSentinel;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
if (info.done) {
|
|
418
|
-
// Assign the result of the finished delegate to the temporary
|
|
419
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
420
|
-
context[delegate.resultName] = info.value;
|
|
421
|
-
|
|
422
|
-
// Resume execution at the desired location (see delegateYield).
|
|
423
|
-
context.next = delegate.nextLoc;
|
|
424
|
-
|
|
425
|
-
// If context.method was "throw" but the delegate handled the
|
|
426
|
-
// exception, let the outer generator proceed normally. If
|
|
427
|
-
// context.method was "next", forget context.arg since it has been
|
|
428
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
429
|
-
// "return", allow the original .return call to continue in the
|
|
430
|
-
// outer generator.
|
|
431
|
-
if (context.method !== "return") {
|
|
432
|
-
context.method = "next";
|
|
433
|
-
context.arg = undefined$1;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
} else {
|
|
437
|
-
// Re-yield the result returned by the delegate method.
|
|
438
|
-
return info;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
442
|
-
// the outer generator.
|
|
443
|
-
context.delegate = null;
|
|
444
|
-
return ContinueSentinel;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
448
|
-
// unified ._invoke helper method.
|
|
449
|
-
defineIteratorMethods(Gp);
|
|
450
|
-
|
|
451
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
452
|
-
|
|
453
|
-
// A Generator should always return itself as the iterator object when the
|
|
454
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
455
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
456
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
457
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
458
|
-
define(Gp, iteratorSymbol, function() {
|
|
459
|
-
return this;
|
|
460
|
-
});
|
|
461
|
-
|
|
462
|
-
define(Gp, "toString", function() {
|
|
463
|
-
return "[object Generator]";
|
|
464
|
-
});
|
|
465
|
-
|
|
466
|
-
function pushTryEntry(locs) {
|
|
467
|
-
var entry = { tryLoc: locs[0] };
|
|
468
|
-
|
|
469
|
-
if (1 in locs) {
|
|
470
|
-
entry.catchLoc = locs[1];
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
if (2 in locs) {
|
|
474
|
-
entry.finallyLoc = locs[2];
|
|
475
|
-
entry.afterLoc = locs[3];
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
this.tryEntries.push(entry);
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
function resetTryEntry(entry) {
|
|
482
|
-
var record = entry.completion || {};
|
|
483
|
-
record.type = "normal";
|
|
484
|
-
delete record.arg;
|
|
485
|
-
entry.completion = record;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
function Context(tryLocsList) {
|
|
489
|
-
// The root entry object (effectively a try statement without a catch
|
|
490
|
-
// or a finally block) gives us a place to store values thrown from
|
|
491
|
-
// locations where there is no enclosing try statement.
|
|
492
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
493
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
494
|
-
this.reset(true);
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
exports.keys = function(object) {
|
|
498
|
-
var keys = [];
|
|
499
|
-
for (var key in object) {
|
|
500
|
-
keys.push(key);
|
|
501
|
-
}
|
|
502
|
-
keys.reverse();
|
|
503
|
-
|
|
504
|
-
// Rather than returning an object with a next method, we keep
|
|
505
|
-
// things simple and return the next function itself.
|
|
506
|
-
return function next() {
|
|
507
|
-
while (keys.length) {
|
|
508
|
-
var key = keys.pop();
|
|
509
|
-
if (key in object) {
|
|
510
|
-
next.value = key;
|
|
511
|
-
next.done = false;
|
|
512
|
-
return next;
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
// To avoid creating an additional object, we just hang the .value
|
|
517
|
-
// and .done properties off the next function object itself. This
|
|
518
|
-
// also ensures that the minifier will not anonymize the function.
|
|
519
|
-
next.done = true;
|
|
520
|
-
return next;
|
|
521
|
-
};
|
|
522
|
-
};
|
|
523
|
-
|
|
524
|
-
function values(iterable) {
|
|
525
|
-
if (iterable) {
|
|
526
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
527
|
-
if (iteratorMethod) {
|
|
528
|
-
return iteratorMethod.call(iterable);
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
if (typeof iterable.next === "function") {
|
|
532
|
-
return iterable;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
if (!isNaN(iterable.length)) {
|
|
536
|
-
var i = -1, next = function next() {
|
|
537
|
-
while (++i < iterable.length) {
|
|
538
|
-
if (hasOwn.call(iterable, i)) {
|
|
539
|
-
next.value = iterable[i];
|
|
540
|
-
next.done = false;
|
|
541
|
-
return next;
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
next.value = undefined$1;
|
|
546
|
-
next.done = true;
|
|
547
|
-
|
|
548
|
-
return next;
|
|
549
|
-
};
|
|
550
|
-
|
|
551
|
-
return next.next = next;
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
// Return an iterator with no values.
|
|
556
|
-
return { next: doneResult };
|
|
557
|
-
}
|
|
558
|
-
exports.values = values;
|
|
559
|
-
|
|
560
|
-
function doneResult() {
|
|
561
|
-
return { value: undefined$1, done: true };
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
Context.prototype = {
|
|
565
|
-
constructor: Context,
|
|
566
|
-
|
|
567
|
-
reset: function(skipTempReset) {
|
|
568
|
-
this.prev = 0;
|
|
569
|
-
this.next = 0;
|
|
570
|
-
// Resetting context._sent for legacy support of Babel's
|
|
571
|
-
// function.sent implementation.
|
|
572
|
-
this.sent = this._sent = undefined$1;
|
|
573
|
-
this.done = false;
|
|
574
|
-
this.delegate = null;
|
|
575
|
-
|
|
576
|
-
this.method = "next";
|
|
577
|
-
this.arg = undefined$1;
|
|
578
|
-
|
|
579
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
580
|
-
|
|
581
|
-
if (!skipTempReset) {
|
|
582
|
-
for (var name in this) {
|
|
583
|
-
// Not sure about the optimal order of these conditions:
|
|
584
|
-
if (name.charAt(0) === "t" &&
|
|
585
|
-
hasOwn.call(this, name) &&
|
|
586
|
-
!isNaN(+name.slice(1))) {
|
|
587
|
-
this[name] = undefined$1;
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
},
|
|
592
|
-
|
|
593
|
-
stop: function() {
|
|
594
|
-
this.done = true;
|
|
595
|
-
|
|
596
|
-
var rootEntry = this.tryEntries[0];
|
|
597
|
-
var rootRecord = rootEntry.completion;
|
|
598
|
-
if (rootRecord.type === "throw") {
|
|
599
|
-
throw rootRecord.arg;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
return this.rval;
|
|
603
|
-
},
|
|
604
|
-
|
|
605
|
-
dispatchException: function(exception) {
|
|
606
|
-
if (this.done) {
|
|
607
|
-
throw exception;
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
var context = this;
|
|
611
|
-
function handle(loc, caught) {
|
|
612
|
-
record.type = "throw";
|
|
613
|
-
record.arg = exception;
|
|
614
|
-
context.next = loc;
|
|
615
|
-
|
|
616
|
-
if (caught) {
|
|
617
|
-
// If the dispatched exception was caught by a catch block,
|
|
618
|
-
// then let that catch block handle the exception normally.
|
|
619
|
-
context.method = "next";
|
|
620
|
-
context.arg = undefined$1;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
return !! caught;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
627
|
-
var entry = this.tryEntries[i];
|
|
628
|
-
var record = entry.completion;
|
|
629
|
-
|
|
630
|
-
if (entry.tryLoc === "root") {
|
|
631
|
-
// Exception thrown outside of any try block that could handle
|
|
632
|
-
// it, so set the completion value of the entire function to
|
|
633
|
-
// throw the exception.
|
|
634
|
-
return handle("end");
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
if (entry.tryLoc <= this.prev) {
|
|
638
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
639
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
640
|
-
|
|
641
|
-
if (hasCatch && hasFinally) {
|
|
642
|
-
if (this.prev < entry.catchLoc) {
|
|
643
|
-
return handle(entry.catchLoc, true);
|
|
644
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
645
|
-
return handle(entry.finallyLoc);
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
} else if (hasCatch) {
|
|
649
|
-
if (this.prev < entry.catchLoc) {
|
|
650
|
-
return handle(entry.catchLoc, true);
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
} else if (hasFinally) {
|
|
654
|
-
if (this.prev < entry.finallyLoc) {
|
|
655
|
-
return handle(entry.finallyLoc);
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
} else {
|
|
659
|
-
throw new Error("try statement without catch or finally");
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
},
|
|
664
|
-
|
|
665
|
-
abrupt: function(type, arg) {
|
|
666
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
667
|
-
var entry = this.tryEntries[i];
|
|
668
|
-
if (entry.tryLoc <= this.prev &&
|
|
669
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
670
|
-
this.prev < entry.finallyLoc) {
|
|
671
|
-
var finallyEntry = entry;
|
|
672
|
-
break;
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
if (finallyEntry &&
|
|
677
|
-
(type === "break" ||
|
|
678
|
-
type === "continue") &&
|
|
679
|
-
finallyEntry.tryLoc <= arg &&
|
|
680
|
-
arg <= finallyEntry.finallyLoc) {
|
|
681
|
-
// Ignore the finally entry if control is not jumping to a
|
|
682
|
-
// location outside the try/catch block.
|
|
683
|
-
finallyEntry = null;
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
687
|
-
record.type = type;
|
|
688
|
-
record.arg = arg;
|
|
689
|
-
|
|
690
|
-
if (finallyEntry) {
|
|
691
|
-
this.method = "next";
|
|
692
|
-
this.next = finallyEntry.finallyLoc;
|
|
693
|
-
return ContinueSentinel;
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
return this.complete(record);
|
|
697
|
-
},
|
|
698
|
-
|
|
699
|
-
complete: function(record, afterLoc) {
|
|
700
|
-
if (record.type === "throw") {
|
|
701
|
-
throw record.arg;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
if (record.type === "break" ||
|
|
705
|
-
record.type === "continue") {
|
|
706
|
-
this.next = record.arg;
|
|
707
|
-
} else if (record.type === "return") {
|
|
708
|
-
this.rval = this.arg = record.arg;
|
|
709
|
-
this.method = "return";
|
|
710
|
-
this.next = "end";
|
|
711
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
712
|
-
this.next = afterLoc;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
return ContinueSentinel;
|
|
716
|
-
},
|
|
717
|
-
|
|
718
|
-
finish: function(finallyLoc) {
|
|
719
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
720
|
-
var entry = this.tryEntries[i];
|
|
721
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
722
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
723
|
-
resetTryEntry(entry);
|
|
724
|
-
return ContinueSentinel;
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
},
|
|
728
|
-
|
|
729
|
-
"catch": function(tryLoc) {
|
|
730
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
731
|
-
var entry = this.tryEntries[i];
|
|
732
|
-
if (entry.tryLoc === tryLoc) {
|
|
733
|
-
var record = entry.completion;
|
|
734
|
-
if (record.type === "throw") {
|
|
735
|
-
var thrown = record.arg;
|
|
736
|
-
resetTryEntry(entry);
|
|
737
|
-
}
|
|
738
|
-
return thrown;
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
// The context.catch method must only be called with a location
|
|
743
|
-
// argument that corresponds to a known catch block.
|
|
744
|
-
throw new Error("illegal catch attempt");
|
|
745
|
-
},
|
|
746
|
-
|
|
747
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
748
|
-
this.delegate = {
|
|
749
|
-
iterator: values(iterable),
|
|
750
|
-
resultName: resultName,
|
|
751
|
-
nextLoc: nextLoc
|
|
752
|
-
};
|
|
753
|
-
|
|
754
|
-
if (this.method === "next") {
|
|
755
|
-
// Deliberately forget the last sent value so that we don't
|
|
756
|
-
// accidentally pass it on to the delegate.
|
|
757
|
-
this.arg = undefined$1;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
return ContinueSentinel;
|
|
761
|
-
}
|
|
762
|
-
};
|
|
763
|
-
|
|
764
|
-
// Regardless of whether this script is executing as a CommonJS module
|
|
765
|
-
// or not, return the runtime object so that we can declare the variable
|
|
766
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
767
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
768
|
-
return exports;
|
|
769
|
-
|
|
770
|
-
}(
|
|
771
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
772
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
773
|
-
// object. Either way, the resulting object will be used to initialize
|
|
774
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
775
|
-
module.exports
|
|
776
|
-
));
|
|
777
|
-
|
|
778
|
-
try {
|
|
779
|
-
regeneratorRuntime = runtime;
|
|
780
|
-
} catch (accidentalStrictMode) {
|
|
781
|
-
// This module should not be running in strict mode, so the above
|
|
782
|
-
// assignment should always work unless something is misconfigured. Just
|
|
783
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
784
|
-
// we can explicitly access globalThis. In older engines we can escape
|
|
785
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
786
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
787
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
788
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
789
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
790
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
791
|
-
if (typeof globalThis === "object") {
|
|
792
|
-
globalThis.regeneratorRuntime = runtime;
|
|
793
|
-
} else {
|
|
794
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
});
|
|
798
|
-
|
|
799
|
-
var regenerator = runtime_1;
|
|
800
|
-
|
|
801
|
-
var defineProperty = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
802
|
-
function _defineProperty(obj, key, value) {
|
|
803
|
-
if (key in obj) {
|
|
804
|
-
Object.defineProperty(obj, key, {
|
|
805
|
-
value: value,
|
|
806
|
-
enumerable: true,
|
|
807
|
-
configurable: true,
|
|
808
|
-
writable: true
|
|
809
|
-
});
|
|
810
|
-
} else {
|
|
811
|
-
obj[key] = value;
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
return obj;
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
818
|
-
});
|
|
819
|
-
|
|
820
|
-
_commonjsHelpers.unwrapExports(defineProperty);
|
|
821
|
-
|
|
822
|
-
var asyncToGenerator = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
823
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
824
|
-
try {
|
|
825
|
-
var info = gen[key](arg);
|
|
826
|
-
var value = info.value;
|
|
827
|
-
} catch (error) {
|
|
828
|
-
reject(error);
|
|
829
|
-
return;
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
if (info.done) {
|
|
833
|
-
resolve(value);
|
|
834
|
-
} else {
|
|
835
|
-
Promise.resolve(value).then(_next, _throw);
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
function _asyncToGenerator(fn) {
|
|
840
|
-
return function () {
|
|
841
|
-
var self = this,
|
|
842
|
-
args = arguments;
|
|
843
|
-
return new Promise(function (resolve, reject) {
|
|
844
|
-
var gen = fn.apply(self, args);
|
|
845
|
-
|
|
846
|
-
function _next(value) {
|
|
847
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
function _throw(err) {
|
|
851
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
_next(undefined);
|
|
855
|
-
});
|
|
856
|
-
};
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
860
|
-
});
|
|
861
|
-
|
|
862
|
-
_commonjsHelpers.unwrapExports(asyncToGenerator);
|
|
863
|
-
|
|
864
|
-
var arrayWithHoles = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
865
|
-
function _arrayWithHoles(arr) {
|
|
866
|
-
if (Array.isArray(arr)) return arr;
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
870
|
-
});
|
|
871
|
-
|
|
872
|
-
_commonjsHelpers.unwrapExports(arrayWithHoles);
|
|
873
|
-
|
|
874
|
-
var iterableToArrayLimit = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
875
|
-
function _iterableToArrayLimit(arr, i) {
|
|
876
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
877
|
-
|
|
878
|
-
if (_i == null) return;
|
|
879
|
-
var _arr = [];
|
|
880
|
-
var _n = true;
|
|
881
|
-
var _d = false;
|
|
882
|
-
|
|
883
|
-
var _s, _e;
|
|
884
|
-
|
|
885
|
-
try {
|
|
886
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
887
|
-
_arr.push(_s.value);
|
|
888
|
-
|
|
889
|
-
if (i && _arr.length === i) break;
|
|
890
|
-
}
|
|
891
|
-
} catch (err) {
|
|
892
|
-
_d = true;
|
|
893
|
-
_e = err;
|
|
894
|
-
} finally {
|
|
895
|
-
try {
|
|
896
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
897
|
-
} finally {
|
|
898
|
-
if (_d) throw _e;
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
return _arr;
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
906
|
-
});
|
|
907
|
-
|
|
908
|
-
_commonjsHelpers.unwrapExports(iterableToArrayLimit);
|
|
909
|
-
|
|
910
|
-
var arrayLikeToArray = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
911
|
-
function _arrayLikeToArray(arr, len) {
|
|
912
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
913
|
-
|
|
914
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
915
|
-
arr2[i] = arr[i];
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
return arr2;
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
922
|
-
});
|
|
923
|
-
|
|
924
|
-
_commonjsHelpers.unwrapExports(arrayLikeToArray);
|
|
925
|
-
|
|
926
|
-
var unsupportedIterableToArray = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
927
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
928
|
-
if (!o) return;
|
|
929
|
-
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
|
930
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
931
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
932
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
933
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
937
|
-
});
|
|
938
|
-
|
|
939
|
-
_commonjsHelpers.unwrapExports(unsupportedIterableToArray);
|
|
940
|
-
|
|
941
|
-
var nonIterableRest = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
942
|
-
function _nonIterableRest() {
|
|
943
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
947
|
-
});
|
|
948
|
-
|
|
949
|
-
_commonjsHelpers.unwrapExports(nonIterableRest);
|
|
950
|
-
|
|
951
|
-
var slicedToArray = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
952
|
-
function _slicedToArray(arr, i) {
|
|
953
|
-
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
957
|
-
});
|
|
958
|
-
|
|
959
|
-
_commonjsHelpers.unwrapExports(slicedToArray);
|
|
960
|
-
|
|
961
15
|
var logger = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
962
16
|
|
|
963
17
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -966,25 +20,39 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
966
20
|
exports.setLogger = setLogger;
|
|
967
21
|
exports.proxyLogger = proxyLogger;
|
|
968
22
|
exports.default = void 0;
|
|
969
|
-
|
|
970
|
-
error(code
|
|
971
|
-
|
|
23
|
+
var _logger = {
|
|
24
|
+
error(code) {
|
|
25
|
+
for (var _len = arguments.length, message = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
26
|
+
message[_key - 1] = arguments[_key];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
console.error("[next-auth][error][".concat(code.toLowerCase(), "]"), "\nhttps://next-auth.js.org/errors#".concat(code.toLowerCase()), ...message);
|
|
972
30
|
},
|
|
973
31
|
|
|
974
|
-
warn(code
|
|
975
|
-
|
|
32
|
+
warn(code) {
|
|
33
|
+
for (var _len2 = arguments.length, message = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
34
|
+
message[_key2 - 1] = arguments[_key2];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
console.warn("[next-auth][warn][".concat(code.toLowerCase(), "]"), "\nhttps://next-auth.js.org/warnings#".concat(code.toLowerCase()), ...message);
|
|
976
38
|
},
|
|
977
39
|
|
|
978
|
-
debug(code
|
|
40
|
+
debug(code) {
|
|
979
41
|
var _process, _process$env;
|
|
980
42
|
|
|
981
43
|
if (!((_process = process) !== null && _process !== void 0 && (_process$env = _process.env) !== null && _process$env !== void 0 && _process$env._NEXTAUTH_DEBUG)) return;
|
|
982
|
-
|
|
44
|
+
|
|
45
|
+
for (var _len3 = arguments.length, message = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
46
|
+
message[_key3 - 1] = arguments[_key3];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
console.log("[next-auth][debug][".concat(code.toLowerCase(), "]"), ...message);
|
|
983
50
|
}
|
|
984
51
|
|
|
985
52
|
};
|
|
986
53
|
|
|
987
|
-
function setLogger(
|
|
54
|
+
function setLogger() {
|
|
55
|
+
var newLogger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
988
56
|
if (newLogger.error) _logger.error = newLogger.error;
|
|
989
57
|
if (newLogger.warn) _logger.warn = newLogger.warn;
|
|
990
58
|
if (newLogger.debug) _logger.debug = newLogger.debug;
|
|
@@ -993,20 +61,27 @@ function setLogger(newLogger = {}) {
|
|
|
993
61
|
var _default = _logger;
|
|
994
62
|
exports.default = _default;
|
|
995
63
|
|
|
996
|
-
function proxyLogger(
|
|
64
|
+
function proxyLogger() {
|
|
65
|
+
var logger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _logger;
|
|
66
|
+
var basePath = arguments.length > 1 ? arguments[1] : undefined;
|
|
67
|
+
|
|
997
68
|
try {
|
|
998
|
-
if (typeof window ===
|
|
69
|
+
if (typeof window === 'undefined') {
|
|
999
70
|
return logger;
|
|
1000
71
|
}
|
|
1001
72
|
|
|
1002
|
-
|
|
73
|
+
var clientLogger = {};
|
|
74
|
+
|
|
75
|
+
var _loop = function _loop(level) {
|
|
76
|
+
clientLogger[level] = function (code) {
|
|
77
|
+
for (var _len4 = arguments.length, message = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
|
78
|
+
message[_key4 - 1] = arguments[_key4];
|
|
79
|
+
}
|
|
1003
80
|
|
|
1004
|
-
for (const level in logger) {
|
|
1005
|
-
clientLogger[level] = (code, ...message) => {
|
|
1006
81
|
_logger[level](code, ...message);
|
|
1007
82
|
|
|
1008
|
-
|
|
1009
|
-
|
|
83
|
+
var url = "".concat(basePath, "/_log");
|
|
84
|
+
var body = new URLSearchParams({
|
|
1010
85
|
level,
|
|
1011
86
|
code,
|
|
1012
87
|
message: JSON.stringify(message.map(m => {
|
|
@@ -1027,13 +102,17 @@ function proxyLogger(logger = _logger, basePath) {
|
|
|
1027
102
|
}
|
|
1028
103
|
|
|
1029
104
|
return fetch(url, {
|
|
1030
|
-
method:
|
|
105
|
+
method: 'POST',
|
|
1031
106
|
headers: {
|
|
1032
|
-
|
|
107
|
+
'Content-Type': 'application/json'
|
|
1033
108
|
},
|
|
1034
109
|
body
|
|
1035
110
|
});
|
|
1036
111
|
};
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
for (var level in logger) {
|
|
115
|
+
_loop(level);
|
|
1037
116
|
}
|
|
1038
117
|
|
|
1039
118
|
return clientLogger;
|
|
@@ -1055,18 +134,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1055
134
|
exports.default = parseUrl;
|
|
1056
135
|
|
|
1057
136
|
function parseUrl(url) {
|
|
1058
|
-
|
|
1059
|
-
|
|
137
|
+
var defaultHost = 'http://localhost:3000';
|
|
138
|
+
var defaultPath = '/api/auth';
|
|
1060
139
|
|
|
1061
140
|
if (!url) {
|
|
1062
|
-
url =
|
|
141
|
+
url = "".concat(defaultHost).concat(defaultPath);
|
|
1063
142
|
}
|
|
1064
143
|
|
|
1065
|
-
|
|
144
|
+
var protocol = url.startsWith('http:') ? 'http' : 'https';
|
|
1066
145
|
url = url.replace(/^https?:\/\//, '').replace(/\/$/, '');
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
146
|
+
var [_host, ..._path] = url.split('/');
|
|
147
|
+
var baseUrl = _host ? "".concat(protocol, "://").concat(_host) : defaultHost;
|
|
148
|
+
var basePath = _path.length > 0 ? "/".concat(_path.join('/')) : defaultPath;
|
|
1070
149
|
return {
|
|
1071
150
|
baseUrl,
|
|
1072
151
|
basePath
|
|
@@ -1078,44 +157,39 @@ _commonjsHelpers.unwrapExports(parseUrl_1);
|
|
|
1078
157
|
|
|
1079
158
|
var client$1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
1080
159
|
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
160
|
Object.defineProperty(exports, "__esModule", {
|
|
1086
161
|
value: true
|
|
1087
162
|
});
|
|
1088
163
|
exports.useSession = useSession;
|
|
1089
|
-
exports.
|
|
1090
|
-
exports.
|
|
1091
|
-
exports.
|
|
1092
|
-
exports.
|
|
1093
|
-
exports.
|
|
1094
|
-
exports.options = exports.setOptions = setOptions;
|
|
164
|
+
exports.getSession = getSession;
|
|
165
|
+
exports.getProviders = getProviders;
|
|
166
|
+
exports.signIn = signIn;
|
|
167
|
+
exports.signOut = signOut;
|
|
168
|
+
exports.setOptions = setOptions;
|
|
1095
169
|
exports.Provider = Provider;
|
|
1096
170
|
exports.default = void 0;
|
|
1097
171
|
|
|
1098
|
-
var _regenerator = interopRequireDefault(regenerator);
|
|
1099
172
|
|
|
1100
|
-
var _defineProperty2 = interopRequireDefault(defineProperty);
|
|
1101
173
|
|
|
1102
|
-
var
|
|
174
|
+
var _logger2 = _interopRequireWildcard(logger);
|
|
1103
175
|
|
|
1104
|
-
var
|
|
176
|
+
var _parseUrl = _interopRequireDefault(parseUrl_1);
|
|
1105
177
|
|
|
178
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1106
179
|
|
|
180
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
1107
181
|
|
|
1108
|
-
var
|
|
182
|
+
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; }
|
|
1109
183
|
|
|
1110
|
-
var
|
|
184
|
+
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; }
|
|
1111
185
|
|
|
1112
|
-
function
|
|
186
|
+
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; }
|
|
1113
187
|
|
|
1114
|
-
function
|
|
188
|
+
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; }
|
|
1115
189
|
|
|
1116
|
-
function
|
|
190
|
+
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); } }
|
|
1117
191
|
|
|
1118
|
-
function
|
|
192
|
+
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); }); }; }
|
|
1119
193
|
|
|
1120
194
|
var __NEXTAUTH = {
|
|
1121
195
|
baseUrl: (0, _parseUrl.default)(process.env.NEXTAUTH_URL || process.env.VERCEL_URL).baseUrl,
|
|
@@ -1128,21 +202,19 @@ var __NEXTAUTH = {
|
|
|
1128
202
|
_clientSyncTimer: null,
|
|
1129
203
|
_eventListenersAdded: false,
|
|
1130
204
|
_clientSession: undefined,
|
|
1131
|
-
_getSession:
|
|
205
|
+
_getSession: () => {}
|
|
1132
206
|
};
|
|
1133
207
|
var logger$1 = (0, _logger2.proxyLogger)(_logger2.default, __NEXTAUTH.basePath);
|
|
1134
208
|
var broadcast = BroadcastChannel();
|
|
1135
209
|
|
|
1136
|
-
if (typeof window !==
|
|
210
|
+
if (typeof window !== 'undefined' && !__NEXTAUTH._eventListenersAdded) {
|
|
1137
211
|
__NEXTAUTH._eventListenersAdded = true;
|
|
1138
|
-
broadcast.receive(
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
});
|
|
1143
|
-
document.addEventListener("visibilitychange", function () {
|
|
212
|
+
broadcast.receive(() => __NEXTAUTH._getSession({
|
|
213
|
+
event: 'storage'
|
|
214
|
+
}));
|
|
215
|
+
document.addEventListener('visibilitychange', () => {
|
|
1144
216
|
!document.hidden && __NEXTAUTH._getSession({
|
|
1145
|
-
event:
|
|
217
|
+
event: 'visibilitychange'
|
|
1146
218
|
});
|
|
1147
219
|
}, false);
|
|
1148
220
|
}
|
|
@@ -1156,103 +228,50 @@ function useSession(session) {
|
|
|
1156
228
|
}
|
|
1157
229
|
|
|
1158
230
|
function _useSessionHook(session) {
|
|
1159
|
-
var
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
while (1) {
|
|
1185
|
-
switch (_context.prev = _context.next) {
|
|
1186
|
-
case 0:
|
|
1187
|
-
_ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$event = _ref2.event, event = _ref2$event === void 0 ? null : _ref2$event;
|
|
1188
|
-
_context.prev = 1;
|
|
1189
|
-
triggredByEvent = event !== null;
|
|
1190
|
-
triggeredByStorageEvent = event === "storage";
|
|
1191
|
-
clientMaxAge = __NEXTAUTH.clientMaxAge;
|
|
1192
|
-
clientLastSync = parseInt(__NEXTAUTH._clientLastSync);
|
|
1193
|
-
currentTime = _now();
|
|
1194
|
-
clientSession = __NEXTAUTH._clientSession;
|
|
1195
|
-
|
|
1196
|
-
if (!(!triggeredByStorageEvent && clientSession !== undefined)) {
|
|
1197
|
-
_context.next = 19;
|
|
1198
|
-
break;
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
if (!(clientMaxAge === 0 && triggredByEvent !== true)) {
|
|
1202
|
-
_context.next = 13;
|
|
1203
|
-
break;
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
return _context.abrupt("return");
|
|
1207
|
-
|
|
1208
|
-
case 13:
|
|
1209
|
-
if (!(clientMaxAge > 0 && clientSession === null)) {
|
|
1210
|
-
_context.next = 17;
|
|
1211
|
-
break;
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
return _context.abrupt("return");
|
|
1215
|
-
|
|
1216
|
-
case 17:
|
|
1217
|
-
if (!(clientMaxAge > 0 && currentTime < clientLastSync + clientMaxAge)) {
|
|
1218
|
-
_context.next = 19;
|
|
1219
|
-
break;
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
return _context.abrupt("return");
|
|
1223
|
-
|
|
1224
|
-
case 19:
|
|
1225
|
-
if (clientSession === undefined) {
|
|
1226
|
-
__NEXTAUTH._clientSession = null;
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
__NEXTAUTH._clientLastSync = _now();
|
|
1230
|
-
_context.next = 23;
|
|
1231
|
-
return getSession({
|
|
1232
|
-
triggerEvent: !triggeredByStorageEvent
|
|
1233
|
-
});
|
|
1234
|
-
|
|
1235
|
-
case 23:
|
|
1236
|
-
newClientSessionData = _context.sent;
|
|
1237
|
-
__NEXTAUTH._clientSession = newClientSessionData;
|
|
1238
|
-
setData(newClientSessionData);
|
|
1239
|
-
setLoading(false);
|
|
1240
|
-
_context.next = 33;
|
|
1241
|
-
break;
|
|
1242
|
-
|
|
1243
|
-
case 29:
|
|
1244
|
-
_context.prev = 29;
|
|
1245
|
-
_context.t0 = _context["catch"](1);
|
|
1246
|
-
logger$1.error("CLIENT_USE_SESSION_ERROR", _context.t0);
|
|
1247
|
-
setLoading(false);
|
|
1248
|
-
|
|
1249
|
-
case 33:
|
|
1250
|
-
case "end":
|
|
1251
|
-
return _context.stop();
|
|
231
|
+
var [data, setData] = (0, React__default["default"].useState)(session);
|
|
232
|
+
var [loading, setLoading] = (0, React__default["default"].useState)(!data);
|
|
233
|
+
(0, React__default["default"].useEffect)(() => {
|
|
234
|
+
__NEXTAUTH._getSession = _asyncToGenerator(function* () {
|
|
235
|
+
var {
|
|
236
|
+
event = null
|
|
237
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
238
|
+
|
|
239
|
+
try {
|
|
240
|
+
var triggredByEvent = event !== null;
|
|
241
|
+
var triggeredByStorageEvent = event === 'storage';
|
|
242
|
+
var clientMaxAge = __NEXTAUTH.clientMaxAge;
|
|
243
|
+
var clientLastSync = parseInt(__NEXTAUTH._clientLastSync);
|
|
244
|
+
|
|
245
|
+
var currentTime = _now();
|
|
246
|
+
|
|
247
|
+
var clientSession = __NEXTAUTH._clientSession;
|
|
248
|
+
|
|
249
|
+
if (!triggeredByStorageEvent && clientSession !== undefined) {
|
|
250
|
+
if (clientMaxAge === 0 && triggredByEvent !== true) {
|
|
251
|
+
return;
|
|
252
|
+
} else if (clientMaxAge > 0 && clientSession === null) {
|
|
253
|
+
return;
|
|
254
|
+
} else if (clientMaxAge > 0 && currentTime < clientLastSync + clientMaxAge) {
|
|
255
|
+
return;
|
|
1252
256
|
}
|
|
1253
257
|
}
|
|
1254
|
-
|
|
1255
|
-
|
|
258
|
+
|
|
259
|
+
if (clientSession === undefined) {
|
|
260
|
+
__NEXTAUTH._clientSession = null;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
__NEXTAUTH._clientLastSync = _now();
|
|
264
|
+
var newClientSessionData = yield getSession({
|
|
265
|
+
triggerEvent: !triggeredByStorageEvent
|
|
266
|
+
});
|
|
267
|
+
__NEXTAUTH._clientSession = newClientSessionData;
|
|
268
|
+
setData(newClientSessionData);
|
|
269
|
+
setLoading(false);
|
|
270
|
+
} catch (error) {
|
|
271
|
+
logger$1.error('CLIENT_USE_SESSION_ERROR', error);
|
|
272
|
+
setLoading(false);
|
|
273
|
+
}
|
|
274
|
+
});
|
|
1256
275
|
|
|
1257
276
|
__NEXTAUTH._getSession();
|
|
1258
277
|
});
|
|
@@ -1264,38 +283,22 @@ function getSession(_x) {
|
|
|
1264
283
|
}
|
|
1265
284
|
|
|
1266
285
|
function _getSession2() {
|
|
1267
|
-
_getSession2 = (
|
|
286
|
+
_getSession2 = _asyncToGenerator(function* (ctx) {
|
|
1268
287
|
var _ctx$triggerEvent;
|
|
1269
288
|
|
|
1270
|
-
var session;
|
|
1271
|
-
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
1272
|
-
while (1) {
|
|
1273
|
-
switch (_context4.prev = _context4.next) {
|
|
1274
|
-
case 0:
|
|
1275
|
-
_context4.next = 2;
|
|
1276
|
-
return _fetchData("session", ctx);
|
|
1277
|
-
|
|
1278
|
-
case 2:
|
|
1279
|
-
session = _context4.sent;
|
|
1280
|
-
|
|
1281
|
-
if ((_ctx$triggerEvent = ctx === null || ctx === void 0 ? void 0 : ctx.triggerEvent) !== null && _ctx$triggerEvent !== void 0 ? _ctx$triggerEvent : true) {
|
|
1282
|
-
broadcast.post({
|
|
1283
|
-
event: "session",
|
|
1284
|
-
data: {
|
|
1285
|
-
trigger: "getSession"
|
|
1286
|
-
}
|
|
1287
|
-
});
|
|
1288
|
-
}
|
|
289
|
+
var session = yield _fetchData('session', ctx);
|
|
1289
290
|
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
291
|
+
if ((_ctx$triggerEvent = ctx === null || ctx === void 0 ? void 0 : ctx.triggerEvent) !== null && _ctx$triggerEvent !== void 0 ? _ctx$triggerEvent : true) {
|
|
292
|
+
broadcast.post({
|
|
293
|
+
event: 'session',
|
|
294
|
+
data: {
|
|
295
|
+
trigger: 'getSession'
|
|
1295
296
|
}
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
return session;
|
|
301
|
+
});
|
|
1299
302
|
return _getSession2.apply(this, arguments);
|
|
1300
303
|
}
|
|
1301
304
|
|
|
@@ -1304,50 +307,11 @@ function getCsrfToken(_x2) {
|
|
|
1304
307
|
}
|
|
1305
308
|
|
|
1306
309
|
function _getCsrfToken() {
|
|
1307
|
-
_getCsrfToken = (
|
|
310
|
+
_getCsrfToken = _asyncToGenerator(function* (ctx) {
|
|
1308
311
|
var _yield$_fetchData;
|
|
1309
312
|
|
|
1310
|
-
return
|
|
1311
|
-
|
|
1312
|
-
switch (_context5.prev = _context5.next) {
|
|
1313
|
-
case 0:
|
|
1314
|
-
_context5.next = 2;
|
|
1315
|
-
return _fetchData("csrf", ctx);
|
|
1316
|
-
|
|
1317
|
-
case 2:
|
|
1318
|
-
_context5.t1 = _yield$_fetchData = _context5.sent;
|
|
1319
|
-
_context5.t0 = _context5.t1 === null;
|
|
1320
|
-
|
|
1321
|
-
if (_context5.t0) {
|
|
1322
|
-
_context5.next = 6;
|
|
1323
|
-
break;
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
_context5.t0 = _yield$_fetchData === void 0;
|
|
1327
|
-
|
|
1328
|
-
case 6:
|
|
1329
|
-
if (!_context5.t0) {
|
|
1330
|
-
_context5.next = 10;
|
|
1331
|
-
break;
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
_context5.t2 = void 0;
|
|
1335
|
-
_context5.next = 11;
|
|
1336
|
-
break;
|
|
1337
|
-
|
|
1338
|
-
case 10:
|
|
1339
|
-
_context5.t2 = _yield$_fetchData.csrfToken;
|
|
1340
|
-
|
|
1341
|
-
case 11:
|
|
1342
|
-
return _context5.abrupt("return", _context5.t2);
|
|
1343
|
-
|
|
1344
|
-
case 12:
|
|
1345
|
-
case "end":
|
|
1346
|
-
return _context5.stop();
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
}, _callee5);
|
|
1350
|
-
}));
|
|
313
|
+
return (_yield$_fetchData = yield _fetchData('csrf', ctx)) === null || _yield$_fetchData === void 0 ? void 0 : _yield$_fetchData.csrfToken;
|
|
314
|
+
});
|
|
1351
315
|
return _getCsrfToken.apply(this, arguments);
|
|
1352
316
|
}
|
|
1353
317
|
|
|
@@ -1356,24 +320,9 @@ function getProviders() {
|
|
|
1356
320
|
}
|
|
1357
321
|
|
|
1358
322
|
function _getProviders() {
|
|
1359
|
-
_getProviders = (
|
|
1360
|
-
return
|
|
1361
|
-
|
|
1362
|
-
switch (_context6.prev = _context6.next) {
|
|
1363
|
-
case 0:
|
|
1364
|
-
_context6.next = 2;
|
|
1365
|
-
return _fetchData("providers");
|
|
1366
|
-
|
|
1367
|
-
case 2:
|
|
1368
|
-
return _context6.abrupt("return", _context6.sent);
|
|
1369
|
-
|
|
1370
|
-
case 3:
|
|
1371
|
-
case "end":
|
|
1372
|
-
return _context6.stop();
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
|
-
}, _callee6);
|
|
1376
|
-
}));
|
|
323
|
+
_getProviders = _asyncToGenerator(function* () {
|
|
324
|
+
return _fetchData('providers');
|
|
325
|
+
});
|
|
1377
326
|
return _getProviders.apply(this, arguments);
|
|
1378
327
|
}
|
|
1379
328
|
|
|
@@ -1382,138 +331,68 @@ function signIn(_x3) {
|
|
|
1382
331
|
}
|
|
1383
332
|
|
|
1384
333
|
function _signIn() {
|
|
1385
|
-
_signIn = (
|
|
1386
|
-
var options
|
|
1387
|
-
|
|
1388
|
-
|
|
334
|
+
_signIn = _asyncToGenerator(function* (provider) {
|
|
335
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
336
|
+
var authorizationParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
337
|
+
var {
|
|
338
|
+
callbackUrl = window.location,
|
|
339
|
+
redirect = true
|
|
340
|
+
} = options;
|
|
341
|
+
|
|
342
|
+
var baseUrl = _apiBaseUrl();
|
|
343
|
+
|
|
344
|
+
var providers = yield getProviders();
|
|
345
|
+
|
|
346
|
+
if (!(provider in providers)) {
|
|
347
|
+
window.location = "".concat(baseUrl, "/signin?callbackUrl=").concat(encodeURIComponent(callbackUrl));
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
var isCredentials = providers[provider].type === 'credentials';
|
|
352
|
+
var isEmail = providers[provider].type === 'email';
|
|
353
|
+
var canRedirectBeDisabled = isCredentials || isEmail;
|
|
354
|
+
var signInUrl = isCredentials ? "".concat(baseUrl, "/callback/").concat(provider) : "".concat(baseUrl, "/signin/").concat(provider);
|
|
355
|
+
var fetchOptions = {
|
|
356
|
+
method: 'post',
|
|
357
|
+
headers: {
|
|
358
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
359
|
+
},
|
|
360
|
+
body: new URLSearchParams(_objectSpread(_objectSpread({}, options), {}, {
|
|
361
|
+
csrfToken: yield getCsrfToken(),
|
|
1389
362
|
callbackUrl,
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
providers,
|
|
1394
|
-
isCredentials,
|
|
1395
|
-
isEmail,
|
|
1396
|
-
isSupportingReturn,
|
|
1397
|
-
signInUrl,
|
|
1398
|
-
_signInUrl,
|
|
1399
|
-
res,
|
|
1400
|
-
data,
|
|
1401
|
-
_data$url,
|
|
1402
|
-
url,
|
|
1403
|
-
error,
|
|
1404
|
-
_args7 = arguments;
|
|
1405
|
-
|
|
1406
|
-
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
1407
|
-
while (1) {
|
|
1408
|
-
switch (_context7.prev = _context7.next) {
|
|
1409
|
-
case 0:
|
|
1410
|
-
options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
|
|
1411
|
-
authorizationParams = _args7.length > 2 && _args7[2] !== undefined ? _args7[2] : {};
|
|
1412
|
-
_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;
|
|
1413
|
-
baseUrl = _apiBaseUrl();
|
|
1414
|
-
_context7.next = 6;
|
|
1415
|
-
return getProviders();
|
|
1416
|
-
|
|
1417
|
-
case 6:
|
|
1418
|
-
providers = _context7.sent;
|
|
1419
|
-
|
|
1420
|
-
if (providers) {
|
|
1421
|
-
_context7.next = 9;
|
|
1422
|
-
break;
|
|
1423
|
-
}
|
|
363
|
+
json: true
|
|
364
|
+
}))
|
|
365
|
+
};
|
|
1424
366
|
|
|
1425
|
-
|
|
367
|
+
var _signInUrl = "".concat(signInUrl, "?").concat(new URLSearchParams(authorizationParams));
|
|
1426
368
|
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
_context7.next = 11;
|
|
1430
|
-
break;
|
|
1431
|
-
}
|
|
369
|
+
var res = yield fetch(_signInUrl, fetchOptions);
|
|
370
|
+
var data = yield res.json();
|
|
1432
371
|
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
case 11:
|
|
1436
|
-
isCredentials = providers[provider].type === "credentials";
|
|
1437
|
-
isEmail = providers[provider].type === "email";
|
|
1438
|
-
isSupportingReturn = isCredentials || isEmail;
|
|
1439
|
-
signInUrl = isCredentials ? "".concat(baseUrl, "/callback/").concat(provider) : "".concat(baseUrl, "/signin/").concat(provider);
|
|
1440
|
-
_signInUrl = "".concat(signInUrl, "?").concat(new URLSearchParams(authorizationParams));
|
|
1441
|
-
_context7.t0 = fetch;
|
|
1442
|
-
_context7.t1 = _signInUrl;
|
|
1443
|
-
_context7.t2 = {
|
|
1444
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
1445
|
-
};
|
|
1446
|
-
_context7.t3 = URLSearchParams;
|
|
1447
|
-
_context7.t4 = _objectSpread;
|
|
1448
|
-
_context7.t5 = _objectSpread({}, options);
|
|
1449
|
-
_context7.t6 = {};
|
|
1450
|
-
_context7.next = 25;
|
|
1451
|
-
return getCsrfToken();
|
|
1452
|
-
|
|
1453
|
-
case 25:
|
|
1454
|
-
_context7.t7 = _context7.sent;
|
|
1455
|
-
_context7.t8 = callbackUrl;
|
|
1456
|
-
_context7.t9 = {
|
|
1457
|
-
csrfToken: _context7.t7,
|
|
1458
|
-
callbackUrl: _context7.t8,
|
|
1459
|
-
json: true
|
|
1460
|
-
};
|
|
1461
|
-
_context7.t10 = (0, _context7.t4)(_context7.t5, _context7.t6, _context7.t9);
|
|
1462
|
-
_context7.t11 = new _context7.t3(_context7.t10);
|
|
1463
|
-
_context7.t12 = {
|
|
1464
|
-
method: "post",
|
|
1465
|
-
headers: _context7.t2,
|
|
1466
|
-
body: _context7.t11
|
|
1467
|
-
};
|
|
1468
|
-
_context7.next = 33;
|
|
1469
|
-
return (0, _context7.t0)(_context7.t1, _context7.t12);
|
|
1470
|
-
|
|
1471
|
-
case 33:
|
|
1472
|
-
res = _context7.sent;
|
|
1473
|
-
_context7.next = 36;
|
|
1474
|
-
return res.json();
|
|
1475
|
-
|
|
1476
|
-
case 36:
|
|
1477
|
-
data = _context7.sent;
|
|
1478
|
-
|
|
1479
|
-
if (!(redirect || !isSupportingReturn)) {
|
|
1480
|
-
_context7.next = 42;
|
|
1481
|
-
break;
|
|
1482
|
-
}
|
|
372
|
+
if (redirect || !canRedirectBeDisabled) {
|
|
373
|
+
var _data$url;
|
|
1483
374
|
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
375
|
+
var url = (_data$url = data.url) !== null && _data$url !== void 0 ? _data$url : callbackUrl;
|
|
376
|
+
window.location = url;
|
|
377
|
+
if (url.includes('#')) window.location.reload();
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
1488
380
|
|
|
1489
|
-
|
|
1490
|
-
error = new URL(data.url).searchParams.get("error");
|
|
381
|
+
var error = new URL(data.url).searchParams.get('error');
|
|
1491
382
|
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
383
|
+
if (res.ok) {
|
|
384
|
+
yield __NEXTAUTH._getSession({
|
|
385
|
+
event: 'storage'
|
|
386
|
+
});
|
|
387
|
+
}
|
|
1496
388
|
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
error: error,
|
|
1505
|
-
status: res.status,
|
|
1506
|
-
ok: res.ok,
|
|
1507
|
-
url: error ? null : data.url
|
|
1508
|
-
});
|
|
1509
|
-
|
|
1510
|
-
case 47:
|
|
1511
|
-
case "end":
|
|
1512
|
-
return _context7.stop();
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1515
|
-
}, _callee7);
|
|
1516
|
-
}));
|
|
389
|
+
return {
|
|
390
|
+
error,
|
|
391
|
+
status: res.status,
|
|
392
|
+
ok: res.ok,
|
|
393
|
+
url: error ? null : data.url
|
|
394
|
+
};
|
|
395
|
+
});
|
|
1517
396
|
return _signIn.apply(this, arguments);
|
|
1518
397
|
}
|
|
1519
398
|
|
|
@@ -1522,145 +401,86 @@ function signOut() {
|
|
|
1522
401
|
}
|
|
1523
402
|
|
|
1524
403
|
function _signOut() {
|
|
1525
|
-
_signOut = (
|
|
1526
|
-
var options
|
|
1527
|
-
|
|
404
|
+
_signOut = _asyncToGenerator(function* () {
|
|
405
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
406
|
+
var {
|
|
407
|
+
callbackUrl = window.location,
|
|
408
|
+
redirect = true
|
|
409
|
+
} = options;
|
|
410
|
+
|
|
411
|
+
var baseUrl = _apiBaseUrl();
|
|
412
|
+
|
|
413
|
+
var fetchOptions = {
|
|
414
|
+
method: 'post',
|
|
415
|
+
headers: {
|
|
416
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
417
|
+
},
|
|
418
|
+
body: new URLSearchParams({
|
|
419
|
+
csrfToken: yield getCsrfToken(),
|
|
1528
420
|
callbackUrl,
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
while (1) {
|
|
1541
|
-
switch (_context8.prev = _context8.next) {
|
|
1542
|
-
case 0:
|
|
1543
|
-
options = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
|
1544
|
-
_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;
|
|
1545
|
-
baseUrl = _apiBaseUrl();
|
|
1546
|
-
_context8.t0 = {
|
|
1547
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
1548
|
-
};
|
|
1549
|
-
_context8.t1 = URLSearchParams;
|
|
1550
|
-
_context8.next = 7;
|
|
1551
|
-
return getCsrfToken();
|
|
1552
|
-
|
|
1553
|
-
case 7:
|
|
1554
|
-
_context8.t2 = _context8.sent;
|
|
1555
|
-
_context8.t3 = callbackUrl;
|
|
1556
|
-
_context8.t4 = {
|
|
1557
|
-
csrfToken: _context8.t2,
|
|
1558
|
-
callbackUrl: _context8.t3,
|
|
1559
|
-
json: true
|
|
1560
|
-
};
|
|
1561
|
-
_context8.t5 = new _context8.t1(_context8.t4);
|
|
1562
|
-
fetchOptions = {
|
|
1563
|
-
method: "post",
|
|
1564
|
-
headers: _context8.t0,
|
|
1565
|
-
body: _context8.t5
|
|
1566
|
-
};
|
|
1567
|
-
_context8.next = 14;
|
|
1568
|
-
return fetch("".concat(baseUrl, "/signout"), fetchOptions);
|
|
1569
|
-
|
|
1570
|
-
case 14:
|
|
1571
|
-
res = _context8.sent;
|
|
1572
|
-
_context8.next = 17;
|
|
1573
|
-
return res.json();
|
|
1574
|
-
|
|
1575
|
-
case 17:
|
|
1576
|
-
data = _context8.sent;
|
|
1577
|
-
broadcast.post({
|
|
1578
|
-
event: "session",
|
|
1579
|
-
data: {
|
|
1580
|
-
trigger: "signout"
|
|
1581
|
-
}
|
|
1582
|
-
});
|
|
1583
|
-
|
|
1584
|
-
if (!redirect) {
|
|
1585
|
-
_context8.next = 24;
|
|
1586
|
-
break;
|
|
1587
|
-
}
|
|
1588
|
-
|
|
1589
|
-
url = (_data$url2 = data.url) !== null && _data$url2 !== void 0 ? _data$url2 : callbackUrl;
|
|
1590
|
-
window.location.replace(url);
|
|
1591
|
-
if (url.includes("#")) window.location.reload();
|
|
1592
|
-
return _context8.abrupt("return");
|
|
421
|
+
json: true
|
|
422
|
+
})
|
|
423
|
+
};
|
|
424
|
+
var res = yield fetch("".concat(baseUrl, "/signout"), fetchOptions);
|
|
425
|
+
var data = yield res.json();
|
|
426
|
+
broadcast.post({
|
|
427
|
+
event: 'session',
|
|
428
|
+
data: {
|
|
429
|
+
trigger: 'signout'
|
|
430
|
+
}
|
|
431
|
+
});
|
|
1593
432
|
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
return __NEXTAUTH._getSession({
|
|
1597
|
-
event: "storage"
|
|
1598
|
-
});
|
|
433
|
+
if (redirect) {
|
|
434
|
+
var _data$url2;
|
|
1599
435
|
|
|
1600
|
-
|
|
1601
|
-
|
|
436
|
+
var url = (_data$url2 = data.url) !== null && _data$url2 !== void 0 ? _data$url2 : callbackUrl;
|
|
437
|
+
window.location = url;
|
|
438
|
+
if (url.includes('#')) window.location.reload();
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
1602
441
|
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
}, _callee8);
|
|
1609
|
-
}));
|
|
442
|
+
yield __NEXTAUTH._getSession({
|
|
443
|
+
event: 'storage'
|
|
444
|
+
});
|
|
445
|
+
return data;
|
|
446
|
+
});
|
|
1610
447
|
return _signOut.apply(this, arguments);
|
|
1611
448
|
}
|
|
1612
449
|
|
|
1613
450
|
function setOptions() {
|
|
1614
|
-
var
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
451
|
+
var {
|
|
452
|
+
baseUrl,
|
|
453
|
+
basePath,
|
|
454
|
+
clientMaxAge,
|
|
455
|
+
keepAlive
|
|
456
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1620
457
|
if (baseUrl) __NEXTAUTH.baseUrl = baseUrl;
|
|
1621
458
|
if (basePath) __NEXTAUTH.basePath = basePath;
|
|
1622
459
|
if (clientMaxAge) __NEXTAUTH.clientMaxAge = clientMaxAge;
|
|
1623
460
|
|
|
1624
461
|
if (keepAlive) {
|
|
1625
462
|
__NEXTAUTH.keepAlive = keepAlive;
|
|
1626
|
-
if (typeof window ===
|
|
463
|
+
if (typeof window === 'undefined') return;
|
|
1627
464
|
|
|
1628
465
|
if (__NEXTAUTH._clientSyncTimer !== null) {
|
|
1629
466
|
clearTimeout(__NEXTAUTH._clientSyncTimer);
|
|
1630
467
|
}
|
|
1631
468
|
|
|
1632
|
-
__NEXTAUTH._clientSyncTimer = setTimeout((
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
_context2.next = 2;
|
|
1639
|
-
break;
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
return _context2.abrupt("return");
|
|
1643
|
-
|
|
1644
|
-
case 2:
|
|
1645
|
-
_context2.next = 4;
|
|
1646
|
-
return __NEXTAUTH._getSession({
|
|
1647
|
-
event: "timer"
|
|
1648
|
-
});
|
|
1649
|
-
|
|
1650
|
-
case 4:
|
|
1651
|
-
case "end":
|
|
1652
|
-
return _context2.stop();
|
|
1653
|
-
}
|
|
1654
|
-
}
|
|
1655
|
-
}, _callee2);
|
|
1656
|
-
})), keepAlive * 1000);
|
|
469
|
+
__NEXTAUTH._clientSyncTimer = setTimeout(_asyncToGenerator(function* () {
|
|
470
|
+
if (!__NEXTAUTH._clientSession) return;
|
|
471
|
+
yield __NEXTAUTH._getSession({
|
|
472
|
+
event: 'timer'
|
|
473
|
+
});
|
|
474
|
+
}), keepAlive * 1000);
|
|
1657
475
|
}
|
|
1658
476
|
}
|
|
1659
477
|
|
|
1660
|
-
function Provider(
|
|
1661
|
-
var
|
|
1662
|
-
|
|
1663
|
-
|
|
478
|
+
function Provider(_ref3) {
|
|
479
|
+
var {
|
|
480
|
+
children,
|
|
481
|
+
session,
|
|
482
|
+
options
|
|
483
|
+
} = _ref3;
|
|
1664
484
|
setOptions(options);
|
|
1665
485
|
return (0, React__default["default"].createElement)(SessionContext.Provider, {
|
|
1666
486
|
value: useSession(session)
|
|
@@ -1672,74 +492,34 @@ function _fetchData(_x4) {
|
|
|
1672
492
|
}
|
|
1673
493
|
|
|
1674
494
|
function _fetchData2() {
|
|
1675
|
-
_fetchData2 = (
|
|
1676
|
-
var
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
baseUrl,
|
|
1681
|
-
options,
|
|
1682
|
-
res,
|
|
1683
|
-
data,
|
|
1684
|
-
_args9 = arguments;
|
|
1685
|
-
|
|
1686
|
-
return _regenerator.default.wrap(function _callee9$(_context9) {
|
|
1687
|
-
while (1) {
|
|
1688
|
-
switch (_context9.prev = _context9.next) {
|
|
1689
|
-
case 0:
|
|
1690
|
-
_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;
|
|
1691
|
-
_context9.prev = 1;
|
|
1692
|
-
_context9.next = 4;
|
|
1693
|
-
return _apiBaseUrl();
|
|
1694
|
-
|
|
1695
|
-
case 4:
|
|
1696
|
-
baseUrl = _context9.sent;
|
|
1697
|
-
options = req ? {
|
|
1698
|
-
headers: {
|
|
1699
|
-
cookie: req.headers.cookie
|
|
1700
|
-
}
|
|
1701
|
-
} : {};
|
|
1702
|
-
_context9.next = 8;
|
|
1703
|
-
return fetch("".concat(baseUrl, "/").concat(path), options);
|
|
1704
|
-
|
|
1705
|
-
case 8:
|
|
1706
|
-
res = _context9.sent;
|
|
1707
|
-
_context9.next = 11;
|
|
1708
|
-
return res.json();
|
|
1709
|
-
|
|
1710
|
-
case 11:
|
|
1711
|
-
data = _context9.sent;
|
|
1712
|
-
|
|
1713
|
-
if (res.ok) {
|
|
1714
|
-
_context9.next = 14;
|
|
1715
|
-
break;
|
|
1716
|
-
}
|
|
495
|
+
_fetchData2 = _asyncToGenerator(function* (path) {
|
|
496
|
+
var {
|
|
497
|
+
ctx,
|
|
498
|
+
req = ctx === null || ctx === void 0 ? void 0 : ctx.req
|
|
499
|
+
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1717
500
|
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
case 17:
|
|
1724
|
-
_context9.prev = 17;
|
|
1725
|
-
_context9.t0 = _context9["catch"](1);
|
|
1726
|
-
logger$1.error("CLIENT_FETCH_ERROR", path, _context9.t0);
|
|
1727
|
-
return _context9.abrupt("return", null);
|
|
1728
|
-
|
|
1729
|
-
case 21:
|
|
1730
|
-
case "end":
|
|
1731
|
-
return _context9.stop();
|
|
501
|
+
try {
|
|
502
|
+
var baseUrl = yield _apiBaseUrl();
|
|
503
|
+
var options = req ? {
|
|
504
|
+
headers: {
|
|
505
|
+
cookie: req.headers.cookie
|
|
1732
506
|
}
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
|
|
507
|
+
} : {};
|
|
508
|
+
var res = yield fetch("".concat(baseUrl, "/").concat(path), options);
|
|
509
|
+
var data = yield res.json();
|
|
510
|
+
return Object.keys(data).length > 0 ? data : null;
|
|
511
|
+
} catch (error) {
|
|
512
|
+
logger$1.error('CLIENT_FETCH_ERROR', path, error);
|
|
513
|
+
return null;
|
|
514
|
+
}
|
|
515
|
+
});
|
|
1736
516
|
return _fetchData2.apply(this, arguments);
|
|
1737
517
|
}
|
|
1738
518
|
|
|
1739
519
|
function _apiBaseUrl() {
|
|
1740
|
-
if (typeof window ===
|
|
520
|
+
if (typeof window === 'undefined') {
|
|
1741
521
|
if (!process.env.NEXTAUTH_URL) {
|
|
1742
|
-
logger$1.warn(
|
|
522
|
+
logger$1.warn('NEXTAUTH_URL', 'NEXTAUTH_URL environment variable not set');
|
|
1743
523
|
}
|
|
1744
524
|
|
|
1745
525
|
return "".concat(__NEXTAUTH.baseUrlServer).concat(__NEXTAUTH.basePathServer);
|
|
@@ -1753,68 +533,43 @@ function _now() {
|
|
|
1753
533
|
}
|
|
1754
534
|
|
|
1755
535
|
function BroadcastChannel() {
|
|
1756
|
-
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
536
|
+
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'nextauth.message';
|
|
1757
537
|
return {
|
|
1758
|
-
receive
|
|
1759
|
-
if (typeof window ===
|
|
1760
|
-
window.addEventListener(
|
|
1761
|
-
var
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
if (!(event.key !== name)) {
|
|
1768
|
-
_context3.next = 2;
|
|
1769
|
-
break;
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
return _context3.abrupt("return");
|
|
1773
|
-
|
|
1774
|
-
case 2:
|
|
1775
|
-
message = JSON.parse(event.newValue);
|
|
1776
|
-
|
|
1777
|
-
if (!((message === null || message === void 0 ? void 0 : message.event) !== "session" || !(message !== null && message !== void 0 && message.data))) {
|
|
1778
|
-
_context3.next = 5;
|
|
1779
|
-
break;
|
|
1780
|
-
}
|
|
1781
|
-
|
|
1782
|
-
return _context3.abrupt("return");
|
|
1783
|
-
|
|
1784
|
-
case 5:
|
|
1785
|
-
onReceive(message);
|
|
1786
|
-
|
|
1787
|
-
case 6:
|
|
1788
|
-
case "end":
|
|
1789
|
-
return _context3.stop();
|
|
1790
|
-
}
|
|
1791
|
-
}
|
|
1792
|
-
}, _callee3);
|
|
1793
|
-
}));
|
|
538
|
+
receive(onReceive) {
|
|
539
|
+
if (typeof window === 'undefined') return;
|
|
540
|
+
window.addEventListener('storage', function () {
|
|
541
|
+
var _ref4 = _asyncToGenerator(function* (event) {
|
|
542
|
+
if (event.key !== name) return;
|
|
543
|
+
var message = JSON.parse(event.newValue);
|
|
544
|
+
if ((message === null || message === void 0 ? void 0 : message.event) !== 'session' || !(message !== null && message !== void 0 && message.data)) return;
|
|
545
|
+
onReceive(message);
|
|
546
|
+
});
|
|
1794
547
|
|
|
1795
548
|
return function (_x5) {
|
|
1796
|
-
return
|
|
549
|
+
return _ref4.apply(this, arguments);
|
|
1797
550
|
};
|
|
1798
551
|
}());
|
|
1799
552
|
},
|
|
1800
|
-
|
|
1801
|
-
|
|
553
|
+
|
|
554
|
+
post(message) {
|
|
555
|
+
if (typeof localStorage === 'undefined') return;
|
|
1802
556
|
localStorage.setItem(name, JSON.stringify(_objectSpread(_objectSpread({}, message), {}, {
|
|
1803
557
|
timestamp: _now()
|
|
1804
558
|
})));
|
|
1805
559
|
}
|
|
560
|
+
|
|
1806
561
|
};
|
|
1807
562
|
}
|
|
1808
563
|
|
|
1809
564
|
var _default = {
|
|
1810
|
-
getSession
|
|
1811
|
-
getCsrfToken
|
|
1812
|
-
getProviders
|
|
1813
|
-
useSession
|
|
1814
|
-
signIn
|
|
1815
|
-
signOut
|
|
1816
|
-
Provider
|
|
1817
|
-
setOptions
|
|
565
|
+
getSession,
|
|
566
|
+
getCsrfToken,
|
|
567
|
+
getProviders,
|
|
568
|
+
useSession,
|
|
569
|
+
signIn,
|
|
570
|
+
signOut,
|
|
571
|
+
Provider,
|
|
572
|
+
setOptions,
|
|
1818
573
|
options: setOptions,
|
|
1819
574
|
session: getSession,
|
|
1820
575
|
providers: getProviders,
|
|
@@ -1827,23 +582,16 @@ exports.default = _default;
|
|
|
1827
582
|
|
|
1828
583
|
_commonjsHelpers.unwrapExports(client$1);
|
|
1829
584
|
client$1.useSession;
|
|
1830
|
-
client$1.session;
|
|
1831
585
|
client$1.getSession;
|
|
1832
|
-
client$1.csrfToken;
|
|
1833
|
-
client$1.getCsrfToken;
|
|
1834
|
-
client$1.providers;
|
|
1835
586
|
client$1.getProviders;
|
|
1836
|
-
client$1.signin;
|
|
1837
587
|
client$1.signIn;
|
|
1838
|
-
client$1.signout;
|
|
1839
588
|
client$1.signOut;
|
|
1840
|
-
client$1.options;
|
|
1841
589
|
client$1.setOptions;
|
|
1842
590
|
client$1.Provider;
|
|
1843
591
|
|
|
1844
592
|
var client = client$1.default;
|
|
1845
593
|
|
|
1846
|
-
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}";
|
|
594
|
+
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}";
|
|
1847
595
|
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" };
|
|
1848
596
|
styleInject_es.styleInject(css);
|
|
1849
597
|
|
|
@@ -1854,27 +602,27 @@ var AuthWrapper = function AuthWrapper(_ref) {
|
|
|
1854
602
|
formUrl = _ref$formUrl === undefined ? '' : _ref$formUrl;
|
|
1855
603
|
|
|
1856
604
|
var _nextAuth$useSession = client.useSession(),
|
|
1857
|
-
_nextAuth$useSession2 = slicedToArray
|
|
605
|
+
_nextAuth$useSession2 = slicedToArray._slicedToArray(_nextAuth$useSession, 2),
|
|
1858
606
|
session = _nextAuth$useSession2[0],
|
|
1859
607
|
loading = _nextAuth$useSession2[1];
|
|
1860
608
|
|
|
1861
609
|
var _useState = React.useState(null),
|
|
1862
|
-
_useState2 = slicedToArray
|
|
610
|
+
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
1863
611
|
callbackUrl = _useState2[0],
|
|
1864
612
|
setCallbackUrl = _useState2[1];
|
|
1865
613
|
|
|
1866
614
|
var _useState3 = React.useState(),
|
|
1867
|
-
_useState4 = slicedToArray
|
|
615
|
+
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
1868
616
|
email = _useState4[0],
|
|
1869
617
|
setEmail = _useState4[1];
|
|
1870
618
|
|
|
1871
619
|
var _useState5 = React.useState(false),
|
|
1872
|
-
_useState6 = slicedToArray
|
|
620
|
+
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
1873
621
|
showForm = _useState6[0],
|
|
1874
622
|
setShowForm = _useState6[1];
|
|
1875
623
|
|
|
1876
624
|
var _useState7 = React.useState(),
|
|
1877
|
-
_useState8 = slicedToArray
|
|
625
|
+
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
1878
626
|
password = _useState8[0],
|
|
1879
627
|
setPassword = _useState8[1];
|
|
1880
628
|
|