UNPKG

819 kBJavaScriptView Raw
1/******/ (function(modules) { // webpackBootstrap
2/******/ function hotDisposeChunk(chunkId) {
3/******/ delete installedChunks[chunkId];
4/******/ }
5/******/ var parentHotUpdateCallback = window["webpackHotUpdate"];
6/******/ window["webpackHotUpdate"] = // eslint-disable-next-line no-unused-vars
7/******/ function webpackHotUpdateCallback(chunkId, moreModules) {
8/******/ hotAddUpdateChunk(chunkId, moreModules);
9/******/ if (parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules);
10/******/ } ;
11/******/
12/******/ // eslint-disable-next-line no-unused-vars
13/******/ function hotDownloadUpdateChunk(chunkId) {
14/******/ var head = document.getElementsByTagName("head")[0];
15/******/ var script = document.createElement("script");
16/******/ script.charset = "utf-8";
17/******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js";
18/******/ ;
19/******/ head.appendChild(script);
20/******/ }
21/******/
22/******/ // eslint-disable-next-line no-unused-vars
23/******/ function hotDownloadManifest(requestTimeout) {
24/******/ requestTimeout = requestTimeout || 10000;
25/******/ return new Promise(function(resolve, reject) {
26/******/ if (typeof XMLHttpRequest === "undefined") {
27/******/ return reject(new Error("No browser support"));
28/******/ }
29/******/ try {
30/******/ var request = new XMLHttpRequest();
31/******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json";
32/******/ request.open("GET", requestPath, true);
33/******/ request.timeout = requestTimeout;
34/******/ request.send(null);
35/******/ } catch (err) {
36/******/ return reject(err);
37/******/ }
38/******/ request.onreadystatechange = function() {
39/******/ if (request.readyState !== 4) return;
40/******/ if (request.status === 0) {
41/******/ // timeout
42/******/ reject(
43/******/ new Error("Manifest request to " + requestPath + " timed out.")
44/******/ );
45/******/ } else if (request.status === 404) {
46/******/ // no update available
47/******/ resolve();
48/******/ } else if (request.status !== 200 && request.status !== 304) {
49/******/ // other failure
50/******/ reject(new Error("Manifest request to " + requestPath + " failed."));
51/******/ } else {
52/******/ // success
53/******/ try {
54/******/ var update = JSON.parse(request.responseText);
55/******/ } catch (e) {
56/******/ reject(e);
57/******/ return;
58/******/ }
59/******/ resolve(update);
60/******/ }
61/******/ };
62/******/ });
63/******/ }
64/******/
65/******/ var hotApplyOnUpdate = true;
66/******/ // eslint-disable-next-line no-unused-vars
67/******/ var hotCurrentHash = "753c3a2ce59f934694a9";
68/******/ var hotRequestTimeout = 10000;
69/******/ var hotCurrentModuleData = {};
70/******/ var hotCurrentChildModule;
71/******/ // eslint-disable-next-line no-unused-vars
72/******/ var hotCurrentParents = [];
73/******/ // eslint-disable-next-line no-unused-vars
74/******/ var hotCurrentParentsTemp = [];
75/******/
76/******/ // eslint-disable-next-line no-unused-vars
77/******/ function hotCreateRequire(moduleId) {
78/******/ var me = installedModules[moduleId];
79/******/ if (!me) return __webpack_require__;
80/******/ var fn = function(request) {
81/******/ if (me.hot.active) {
82/******/ if (installedModules[request]) {
83/******/ if (installedModules[request].parents.indexOf(moduleId) === -1) {
84/******/ installedModules[request].parents.push(moduleId);
85/******/ }
86/******/ } else {
87/******/ hotCurrentParents = [moduleId];
88/******/ hotCurrentChildModule = request;
89/******/ }
90/******/ if (me.children.indexOf(request) === -1) {
91/******/ me.children.push(request);
92/******/ }
93/******/ } else {
94/******/ console.warn(
95/******/ "[HMR] unexpected require(" +
96/******/ request +
97/******/ ") from disposed module " +
98/******/ moduleId
99/******/ );
100/******/ hotCurrentParents = [];
101/******/ }
102/******/ return __webpack_require__(request);
103/******/ };
104/******/ var ObjectFactory = function ObjectFactory(name) {
105/******/ return {
106/******/ configurable: true,
107/******/ enumerable: true,
108/******/ get: function() {
109/******/ return __webpack_require__[name];
110/******/ },
111/******/ set: function(value) {
112/******/ __webpack_require__[name] = value;
113/******/ }
114/******/ };
115/******/ };
116/******/ for (var name in __webpack_require__) {
117/******/ if (
118/******/ Object.prototype.hasOwnProperty.call(__webpack_require__, name) &&
119/******/ name !== "e" &&
120/******/ name !== "t"
121/******/ ) {
122/******/ Object.defineProperty(fn, name, ObjectFactory(name));
123/******/ }
124/******/ }
125/******/ fn.e = function(chunkId) {
126/******/ if (hotStatus === "ready") hotSetStatus("prepare");
127/******/ hotChunksLoading++;
128/******/ return __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {
129/******/ finishChunkLoading();
130/******/ throw err;
131/******/ });
132/******/
133/******/ function finishChunkLoading() {
134/******/ hotChunksLoading--;
135/******/ if (hotStatus === "prepare") {
136/******/ if (!hotWaitingFilesMap[chunkId]) {
137/******/ hotEnsureUpdateChunk(chunkId);
138/******/ }
139/******/ if (hotChunksLoading === 0 && hotWaitingFiles === 0) {
140/******/ hotUpdateDownloaded();
141/******/ }
142/******/ }
143/******/ }
144/******/ };
145/******/ fn.t = function(value, mode) {
146/******/ if (mode & 1) value = fn(value);
147/******/ return __webpack_require__.t(value, mode & ~1);
148/******/ };
149/******/ return fn;
150/******/ }
151/******/
152/******/ // eslint-disable-next-line no-unused-vars
153/******/ function hotCreateModule(moduleId) {
154/******/ var hot = {
155/******/ // private stuff
156/******/ _acceptedDependencies: {},
157/******/ _declinedDependencies: {},
158/******/ _selfAccepted: false,
159/******/ _selfDeclined: false,
160/******/ _disposeHandlers: [],
161/******/ _main: hotCurrentChildModule !== moduleId,
162/******/
163/******/ // Module API
164/******/ active: true,
165/******/ accept: function(dep, callback) {
166/******/ if (dep === undefined) hot._selfAccepted = true;
167/******/ else if (typeof dep === "function") hot._selfAccepted = dep;
168/******/ else if (typeof dep === "object")
169/******/ for (var i = 0; i < dep.length; i++)
170/******/ hot._acceptedDependencies[dep[i]] = callback || function() {};
171/******/ else hot._acceptedDependencies[dep] = callback || function() {};
172/******/ },
173/******/ decline: function(dep) {
174/******/ if (dep === undefined) hot._selfDeclined = true;
175/******/ else if (typeof dep === "object")
176/******/ for (var i = 0; i < dep.length; i++)
177/******/ hot._declinedDependencies[dep[i]] = true;
178/******/ else hot._declinedDependencies[dep] = true;
179/******/ },
180/******/ dispose: function(callback) {
181/******/ hot._disposeHandlers.push(callback);
182/******/ },
183/******/ addDisposeHandler: function(callback) {
184/******/ hot._disposeHandlers.push(callback);
185/******/ },
186/******/ removeDisposeHandler: function(callback) {
187/******/ var idx = hot._disposeHandlers.indexOf(callback);
188/******/ if (idx >= 0) hot._disposeHandlers.splice(idx, 1);
189/******/ },
190/******/
191/******/ // Management API
192/******/ check: hotCheck,
193/******/ apply: hotApply,
194/******/ status: function(l) {
195/******/ if (!l) return hotStatus;
196/******/ hotStatusHandlers.push(l);
197/******/ },
198/******/ addStatusHandler: function(l) {
199/******/ hotStatusHandlers.push(l);
200/******/ },
201/******/ removeStatusHandler: function(l) {
202/******/ var idx = hotStatusHandlers.indexOf(l);
203/******/ if (idx >= 0) hotStatusHandlers.splice(idx, 1);
204/******/ },
205/******/
206/******/ //inherit from previous dispose call
207/******/ data: hotCurrentModuleData[moduleId]
208/******/ };
209/******/ hotCurrentChildModule = undefined;
210/******/ return hot;
211/******/ }
212/******/
213/******/ var hotStatusHandlers = [];
214/******/ var hotStatus = "idle";
215/******/
216/******/ function hotSetStatus(newStatus) {
217/******/ hotStatus = newStatus;
218/******/ for (var i = 0; i < hotStatusHandlers.length; i++)
219/******/ hotStatusHandlers[i].call(null, newStatus);
220/******/ }
221/******/
222/******/ // while downloading
223/******/ var hotWaitingFiles = 0;
224/******/ var hotChunksLoading = 0;
225/******/ var hotWaitingFilesMap = {};
226/******/ var hotRequestedFilesMap = {};
227/******/ var hotAvailableFilesMap = {};
228/******/ var hotDeferred;
229/******/
230/******/ // The update info
231/******/ var hotUpdate, hotUpdateNewHash;
232/******/
233/******/ function toModuleId(id) {
234/******/ var isNumber = +id + "" === id;
235/******/ return isNumber ? +id : id;
236/******/ }
237/******/
238/******/ function hotCheck(apply) {
239/******/ if (hotStatus !== "idle") {
240/******/ throw new Error("check() is only allowed in idle status");
241/******/ }
242/******/ hotApplyOnUpdate = apply;
243/******/ hotSetStatus("check");
244/******/ return hotDownloadManifest(hotRequestTimeout).then(function(update) {
245/******/ if (!update) {
246/******/ hotSetStatus("idle");
247/******/ return null;
248/******/ }
249/******/ hotRequestedFilesMap = {};
250/******/ hotWaitingFilesMap = {};
251/******/ hotAvailableFilesMap = update.c;
252/******/ hotUpdateNewHash = update.h;
253/******/
254/******/ hotSetStatus("prepare");
255/******/ var promise = new Promise(function(resolve, reject) {
256/******/ hotDeferred = {
257/******/ resolve: resolve,
258/******/ reject: reject
259/******/ };
260/******/ });
261/******/ hotUpdate = {};
262/******/ var chunkId = "main";
263/******/ // eslint-disable-next-line no-lone-blocks
264/******/ {
265/******/ /*globals chunkId */
266/******/ hotEnsureUpdateChunk(chunkId);
267/******/ }
268/******/ if (
269/******/ hotStatus === "prepare" &&
270/******/ hotChunksLoading === 0 &&
271/******/ hotWaitingFiles === 0
272/******/ ) {
273/******/ hotUpdateDownloaded();
274/******/ }
275/******/ return promise;
276/******/ });
277/******/ }
278/******/
279/******/ // eslint-disable-next-line no-unused-vars
280/******/ function hotAddUpdateChunk(chunkId, moreModules) {
281/******/ if (!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])
282/******/ return;
283/******/ hotRequestedFilesMap[chunkId] = false;
284/******/ for (var moduleId in moreModules) {
285/******/ if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
286/******/ hotUpdate[moduleId] = moreModules[moduleId];
287/******/ }
288/******/ }
289/******/ if (--hotWaitingFiles === 0 && hotChunksLoading === 0) {
290/******/ hotUpdateDownloaded();
291/******/ }
292/******/ }
293/******/
294/******/ function hotEnsureUpdateChunk(chunkId) {
295/******/ if (!hotAvailableFilesMap[chunkId]) {
296/******/ hotWaitingFilesMap[chunkId] = true;
297/******/ } else {
298/******/ hotRequestedFilesMap[chunkId] = true;
299/******/ hotWaitingFiles++;
300/******/ hotDownloadUpdateChunk(chunkId);
301/******/ }
302/******/ }
303/******/
304/******/ function hotUpdateDownloaded() {
305/******/ hotSetStatus("ready");
306/******/ var deferred = hotDeferred;
307/******/ hotDeferred = null;
308/******/ if (!deferred) return;
309/******/ if (hotApplyOnUpdate) {
310/******/ // Wrap deferred object in Promise to mark it as a well-handled Promise to
311/******/ // avoid triggering uncaught exception warning in Chrome.
312/******/ // See https://bugs.chromium.org/p/chromium/issues/detail?id=465666
313/******/ Promise.resolve()
314/******/ .then(function() {
315/******/ return hotApply(hotApplyOnUpdate);
316/******/ })
317/******/ .then(
318/******/ function(result) {
319/******/ deferred.resolve(result);
320/******/ },
321/******/ function(err) {
322/******/ deferred.reject(err);
323/******/ }
324/******/ );
325/******/ } else {
326/******/ var outdatedModules = [];
327/******/ for (var id in hotUpdate) {
328/******/ if (Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
329/******/ outdatedModules.push(toModuleId(id));
330/******/ }
331/******/ }
332/******/ deferred.resolve(outdatedModules);
333/******/ }
334/******/ }
335/******/
336/******/ function hotApply(options) {
337/******/ if (hotStatus !== "ready")
338/******/ throw new Error("apply() is only allowed in ready status");
339/******/ options = options || {};
340/******/
341/******/ var cb;
342/******/ var i;
343/******/ var j;
344/******/ var module;
345/******/ var moduleId;
346/******/
347/******/ function getAffectedStuff(updateModuleId) {
348/******/ var outdatedModules = [updateModuleId];
349/******/ var outdatedDependencies = {};
350/******/
351/******/ var queue = outdatedModules.slice().map(function(id) {
352/******/ return {
353/******/ chain: [id],
354/******/ id: id
355/******/ };
356/******/ });
357/******/ while (queue.length > 0) {
358/******/ var queueItem = queue.pop();
359/******/ var moduleId = queueItem.id;
360/******/ var chain = queueItem.chain;
361/******/ module = installedModules[moduleId];
362/******/ if (!module || module.hot._selfAccepted) continue;
363/******/ if (module.hot._selfDeclined) {
364/******/ return {
365/******/ type: "self-declined",
366/******/ chain: chain,
367/******/ moduleId: moduleId
368/******/ };
369/******/ }
370/******/ if (module.hot._main) {
371/******/ return {
372/******/ type: "unaccepted",
373/******/ chain: chain,
374/******/ moduleId: moduleId
375/******/ };
376/******/ }
377/******/ for (var i = 0; i < module.parents.length; i++) {
378/******/ var parentId = module.parents[i];
379/******/ var parent = installedModules[parentId];
380/******/ if (!parent) continue;
381/******/ if (parent.hot._declinedDependencies[moduleId]) {
382/******/ return {
383/******/ type: "declined",
384/******/ chain: chain.concat([parentId]),
385/******/ moduleId: moduleId,
386/******/ parentId: parentId
387/******/ };
388/******/ }
389/******/ if (outdatedModules.indexOf(parentId) !== -1) continue;
390/******/ if (parent.hot._acceptedDependencies[moduleId]) {
391/******/ if (!outdatedDependencies[parentId])
392/******/ outdatedDependencies[parentId] = [];
393/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]);
394/******/ continue;
395/******/ }
396/******/ delete outdatedDependencies[parentId];
397/******/ outdatedModules.push(parentId);
398/******/ queue.push({
399/******/ chain: chain.concat([parentId]),
400/******/ id: parentId
401/******/ });
402/******/ }
403/******/ }
404/******/
405/******/ return {
406/******/ type: "accepted",
407/******/ moduleId: updateModuleId,
408/******/ outdatedModules: outdatedModules,
409/******/ outdatedDependencies: outdatedDependencies
410/******/ };
411/******/ }
412/******/
413/******/ function addAllToSet(a, b) {
414/******/ for (var i = 0; i < b.length; i++) {
415/******/ var item = b[i];
416/******/ if (a.indexOf(item) === -1) a.push(item);
417/******/ }
418/******/ }
419/******/
420/******/ // at begin all updates modules are outdated
421/******/ // the "outdated" status can propagate to parents if they don't accept the children
422/******/ var outdatedDependencies = {};
423/******/ var outdatedModules = [];
424/******/ var appliedUpdate = {};
425/******/
426/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() {
427/******/ console.warn(
428/******/ "[HMR] unexpected require(" + result.moduleId + ") to disposed module"
429/******/ );
430/******/ };
431/******/
432/******/ for (var id in hotUpdate) {
433/******/ if (Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
434/******/ moduleId = toModuleId(id);
435/******/ /** @type {TODO} */
436/******/ var result;
437/******/ if (hotUpdate[id]) {
438/******/ result = getAffectedStuff(moduleId);
439/******/ } else {
440/******/ result = {
441/******/ type: "disposed",
442/******/ moduleId: id
443/******/ };
444/******/ }
445/******/ /** @type {Error|false} */
446/******/ var abortError = false;
447/******/ var doApply = false;
448/******/ var doDispose = false;
449/******/ var chainInfo = "";
450/******/ if (result.chain) {
451/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
452/******/ }
453/******/ switch (result.type) {
454/******/ case "self-declined":
455/******/ if (options.onDeclined) options.onDeclined(result);
456/******/ if (!options.ignoreDeclined)
457/******/ abortError = new Error(
458/******/ "Aborted because of self decline: " +
459/******/ result.moduleId +
460/******/ chainInfo
461/******/ );
462/******/ break;
463/******/ case "declined":
464/******/ if (options.onDeclined) options.onDeclined(result);
465/******/ if (!options.ignoreDeclined)
466/******/ abortError = new Error(
467/******/ "Aborted because of declined dependency: " +
468/******/ result.moduleId +
469/******/ " in " +
470/******/ result.parentId +
471/******/ chainInfo
472/******/ );
473/******/ break;
474/******/ case "unaccepted":
475/******/ if (options.onUnaccepted) options.onUnaccepted(result);
476/******/ if (!options.ignoreUnaccepted)
477/******/ abortError = new Error(
478/******/ "Aborted because " + moduleId + " is not accepted" + chainInfo
479/******/ );
480/******/ break;
481/******/ case "accepted":
482/******/ if (options.onAccepted) options.onAccepted(result);
483/******/ doApply = true;
484/******/ break;
485/******/ case "disposed":
486/******/ if (options.onDisposed) options.onDisposed(result);
487/******/ doDispose = true;
488/******/ break;
489/******/ default:
490/******/ throw new Error("Unexception type " + result.type);
491/******/ }
492/******/ if (abortError) {
493/******/ hotSetStatus("abort");
494/******/ return Promise.reject(abortError);
495/******/ }
496/******/ if (doApply) {
497/******/ appliedUpdate[moduleId] = hotUpdate[moduleId];
498/******/ addAllToSet(outdatedModules, result.outdatedModules);
499/******/ for (moduleId in result.outdatedDependencies) {
500/******/ if (
501/******/ Object.prototype.hasOwnProperty.call(
502/******/ result.outdatedDependencies,
503/******/ moduleId
504/******/ )
505/******/ ) {
506/******/ if (!outdatedDependencies[moduleId])
507/******/ outdatedDependencies[moduleId] = [];
508/******/ addAllToSet(
509/******/ outdatedDependencies[moduleId],
510/******/ result.outdatedDependencies[moduleId]
511/******/ );
512/******/ }
513/******/ }
514/******/ }
515/******/ if (doDispose) {
516/******/ addAllToSet(outdatedModules, [result.moduleId]);
517/******/ appliedUpdate[moduleId] = warnUnexpectedRequire;
518/******/ }
519/******/ }
520/******/ }
521/******/
522/******/ // Store self accepted outdated modules to require them later by the module system
523/******/ var outdatedSelfAcceptedModules = [];
524/******/ for (i = 0; i < outdatedModules.length; i++) {
525/******/ moduleId = outdatedModules[i];
526/******/ if (
527/******/ installedModules[moduleId] &&
528/******/ installedModules[moduleId].hot._selfAccepted
529/******/ )
530/******/ outdatedSelfAcceptedModules.push({
531/******/ module: moduleId,
532/******/ errorHandler: installedModules[moduleId].hot._selfAccepted
533/******/ });
534/******/ }
535/******/
536/******/ // Now in "dispose" phase
537/******/ hotSetStatus("dispose");
538/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) {
539/******/ if (hotAvailableFilesMap[chunkId] === false) {
540/******/ hotDisposeChunk(chunkId);
541/******/ }
542/******/ });
543/******/
544/******/ var idx;
545/******/ var queue = outdatedModules.slice();
546/******/ while (queue.length > 0) {
547/******/ moduleId = queue.pop();
548/******/ module = installedModules[moduleId];
549/******/ if (!module) continue;
550/******/
551/******/ var data = {};
552/******/
553/******/ // Call dispose handlers
554/******/ var disposeHandlers = module.hot._disposeHandlers;
555/******/ for (j = 0; j < disposeHandlers.length; j++) {
556/******/ cb = disposeHandlers[j];
557/******/ cb(data);
558/******/ }
559/******/ hotCurrentModuleData[moduleId] = data;
560/******/
561/******/ // disable module (this disables requires from this module)
562/******/ module.hot.active = false;
563/******/
564/******/ // remove module from cache
565/******/ delete installedModules[moduleId];
566/******/
567/******/ // when disposing there is no need to call dispose handler
568/******/ delete outdatedDependencies[moduleId];
569/******/
570/******/ // remove "parents" references from all children
571/******/ for (j = 0; j < module.children.length; j++) {
572/******/ var child = installedModules[module.children[j]];
573/******/ if (!child) continue;
574/******/ idx = child.parents.indexOf(moduleId);
575/******/ if (idx >= 0) {
576/******/ child.parents.splice(idx, 1);
577/******/ }
578/******/ }
579/******/ }
580/******/
581/******/ // remove outdated dependency from module children
582/******/ var dependency;
583/******/ var moduleOutdatedDependencies;
584/******/ for (moduleId in outdatedDependencies) {
585/******/ if (
586/******/ Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)
587/******/ ) {
588/******/ module = installedModules[moduleId];
589/******/ if (module) {
590/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
591/******/ for (j = 0; j < moduleOutdatedDependencies.length; j++) {
592/******/ dependency = moduleOutdatedDependencies[j];
593/******/ idx = module.children.indexOf(dependency);
594/******/ if (idx >= 0) module.children.splice(idx, 1);
595/******/ }
596/******/ }
597/******/ }
598/******/ }
599/******/
600/******/ // Not in "apply" phase
601/******/ hotSetStatus("apply");
602/******/
603/******/ hotCurrentHash = hotUpdateNewHash;
604/******/
605/******/ // insert new code
606/******/ for (moduleId in appliedUpdate) {
607/******/ if (Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {
608/******/ modules[moduleId] = appliedUpdate[moduleId];
609/******/ }
610/******/ }
611/******/
612/******/ // call accept handlers
613/******/ var error = null;
614/******/ for (moduleId in outdatedDependencies) {
615/******/ if (
616/******/ Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)
617/******/ ) {
618/******/ module = installedModules[moduleId];
619/******/ if (module) {
620/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
621/******/ var callbacks = [];
622/******/ for (i = 0; i < moduleOutdatedDependencies.length; i++) {
623/******/ dependency = moduleOutdatedDependencies[i];
624/******/ cb = module.hot._acceptedDependencies[dependency];
625/******/ if (cb) {
626/******/ if (callbacks.indexOf(cb) !== -1) continue;
627/******/ callbacks.push(cb);
628/******/ }
629/******/ }
630/******/ for (i = 0; i < callbacks.length; i++) {
631/******/ cb = callbacks[i];
632/******/ try {
633/******/ cb(moduleOutdatedDependencies);
634/******/ } catch (err) {
635/******/ if (options.onErrored) {
636/******/ options.onErrored({
637/******/ type: "accept-errored",
638/******/ moduleId: moduleId,
639/******/ dependencyId: moduleOutdatedDependencies[i],
640/******/ error: err
641/******/ });
642/******/ }
643/******/ if (!options.ignoreErrored) {
644/******/ if (!error) error = err;
645/******/ }
646/******/ }
647/******/ }
648/******/ }
649/******/ }
650/******/ }
651/******/
652/******/ // Load self accepted modules
653/******/ for (i = 0; i < outdatedSelfAcceptedModules.length; i++) {
654/******/ var item = outdatedSelfAcceptedModules[i];
655/******/ moduleId = item.module;
656/******/ hotCurrentParents = [moduleId];
657/******/ try {
658/******/ __webpack_require__(moduleId);
659/******/ } catch (err) {
660/******/ if (typeof item.errorHandler === "function") {
661/******/ try {
662/******/ item.errorHandler(err);
663/******/ } catch (err2) {
664/******/ if (options.onErrored) {
665/******/ options.onErrored({
666/******/ type: "self-accept-error-handler-errored",
667/******/ moduleId: moduleId,
668/******/ error: err2,
669/******/ originalError: err
670/******/ });
671/******/ }
672/******/ if (!options.ignoreErrored) {
673/******/ if (!error) error = err2;
674/******/ }
675/******/ if (!error) error = err;
676/******/ }
677/******/ } else {
678/******/ if (options.onErrored) {
679/******/ options.onErrored({
680/******/ type: "self-accept-errored",
681/******/ moduleId: moduleId,
682/******/ error: err
683/******/ });
684/******/ }
685/******/ if (!options.ignoreErrored) {
686/******/ if (!error) error = err;
687/******/ }
688/******/ }
689/******/ }
690/******/ }
691/******/
692/******/ // handle errors in accept handlers and self accepted module load
693/******/ if (error) {
694/******/ hotSetStatus("fail");
695/******/ return Promise.reject(error);
696/******/ }
697/******/
698/******/ hotSetStatus("idle");
699/******/ return new Promise(function(resolve) {
700/******/ resolve(outdatedModules);
701/******/ });
702/******/ }
703/******/
704/******/ // The module cache
705/******/ var installedModules = {};
706/******/
707/******/ // The require function
708/******/ function __webpack_require__(moduleId) {
709/******/
710/******/ // Check if module is in cache
711/******/ if(installedModules[moduleId]) {
712/******/ return installedModules[moduleId].exports;
713/******/ }
714/******/ // Create a new module (and put it into the cache)
715/******/ var module = installedModules[moduleId] = {
716/******/ i: moduleId,
717/******/ l: false,
718/******/ exports: {},
719/******/ hot: hotCreateModule(moduleId),
720/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),
721/******/ children: []
722/******/ };
723/******/
724/******/ // Execute the module function
725/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
726/******/
727/******/ // Flag the module as loaded
728/******/ module.l = true;
729/******/
730/******/ // Return the exports of the module
731/******/ return module.exports;
732/******/ }
733/******/
734/******/
735/******/ // expose the modules object (__webpack_modules__)
736/******/ __webpack_require__.m = modules;
737/******/
738/******/ // expose the module cache
739/******/ __webpack_require__.c = installedModules;
740/******/
741/******/ // define getter function for harmony exports
742/******/ __webpack_require__.d = function(exports, name, getter) {
743/******/ if(!__webpack_require__.o(exports, name)) {
744/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
745/******/ }
746/******/ };
747/******/
748/******/ // define __esModule on exports
749/******/ __webpack_require__.r = function(exports) {
750/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
751/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
752/******/ }
753/******/ Object.defineProperty(exports, '__esModule', { value: true });
754/******/ };
755/******/
756/******/ // create a fake namespace object
757/******/ // mode & 1: value is a module id, require it
758/******/ // mode & 2: merge all properties of value into the ns
759/******/ // mode & 4: return value when already ns object
760/******/ // mode & 8|1: behave like require
761/******/ __webpack_require__.t = function(value, mode) {
762/******/ if(mode & 1) value = __webpack_require__(value);
763/******/ if(mode & 8) return value;
764/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
765/******/ var ns = Object.create(null);
766/******/ __webpack_require__.r(ns);
767/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
768/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
769/******/ return ns;
770/******/ };
771/******/
772/******/ // getDefaultExport function for compatibility with non-harmony modules
773/******/ __webpack_require__.n = function(module) {
774/******/ var getter = module && module.__esModule ?
775/******/ function getDefault() { return module['default']; } :
776/******/ function getModuleExports() { return module; };
777/******/ __webpack_require__.d(getter, 'a', getter);
778/******/ return getter;
779/******/ };
780/******/
781/******/ // Object.prototype.hasOwnProperty.call
782/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
783/******/
784/******/ // __webpack_public_path__
785/******/ __webpack_require__.p = "";
786/******/
787/******/ // __webpack_hash__
788/******/ __webpack_require__.h = function() { return hotCurrentHash; };
789/******/
790/******/
791/******/ // Load entry module and return exports
792/******/ return hotCreateRequire(0)(__webpack_require__.s = 0);
793/******/ })
794/************************************************************************/
795/******/ ({
796
797/***/ "./app.css":
798/*!*****************!*\
799 !*** ./app.css ***!
800 \*****************/
801/*! exports provided: abcdef, xxx */
802/*! exports used: notExist, xxx */
803/***/ (function(module, __webpack_exports__, __webpack_require__) {
804
805"use strict";
806/* unused harmony export abcdef */
807/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return xxx; });
808
809var _content = __webpack_require__(/*! !./node_modules/css-loader??ref--5-1!./app.css */ "./node_modules/css-loader/index.js?!./app.css");
810
811if(typeof _content === 'string') _content = [[module.i, _content, '']];
812
813var _transform;
814var _insertInto;
815
816
817
818var _options = {"hmr":true}
819
820_options.transform = _transform
821_options.insertInto = undefined;
822
823var _update = __webpack_require__(/*! ./node_modules/es6-css-loader/src/style-loader/lib/addStyles.js */ "./node_modules/es6-css-loader/src/style-loader/lib/addStyles.js")(_content, _options);
824
825if(true) {
826 module.hot.accept(/*! !./node_modules/css-loader??ref--5-1!./app.css */ "./node_modules/css-loader/index.js?!./app.css", function(__WEBPACK_OUTDATED_DEPENDENCIES__) { (function() {
827 var newContent = __webpack_require__(/*! !./node_modules/css-loader??ref--5-1!./app.css */ "./node_modules/css-loader/index.js?!./app.css");
828
829 if(typeof newContent === 'string') newContent = [[module.i, newContent, '']];
830
831 var locals = (function(a, b) {
832 var key, idx = 0;
833
834 for(key in a) {
835 if(!b || a[key] !== b[key]) return false;
836 idx++;
837 }
838
839 for(key in b) idx--;
840
841 return idx === 0;
842 }(_content.locals, newContent.locals));
843
844 if(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');
845
846 _update(newContent);
847 })(__WEBPACK_OUTDATED_DEPENDENCIES__); });
848
849 module.hot.dispose(function() { _update(); });
850}
851// extracted by style-loader
852const abcdef = "_1DbMug7DVSpXvNLyPQ-kjP";
853const xxx = "GlPQplUrnlvsck4QEoOs4 gkFEy45fBh7FLpvCb4CV3";
854
855/***/ }),
856
857/***/ "./app.js":
858/*!****************!*\
859 !*** ./app.js ***!
860 \****************/
861/*! exports provided: reload */
862/*! all exports used */
863/***/ (function(module, __webpack_exports__, __webpack_require__) {
864
865"use strict";
866__webpack_require__.r(__webpack_exports__);
867/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reload", function() { return reload; });
868/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
869/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
870/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
871/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
872/* harmony import */ var _unused__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unused */ "./unused.js");
873/* harmony import */ var _app_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./app.css */ "./app.css");
874function _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; }
875
876
877
878
879
880Object(_unused__WEBPACK_IMPORTED_MODULE_2__[/* demo */ "a"])();
881Object(_unused__WEBPACK_IMPORTED_MODULE_2__[/* xyz */ "b"])();
882
883class App extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
884 constructor(props) {
885 super(props);
886
887 _defineProperty(this, "removeStory", story => () => {
888 const {
889 stories
890 } = this.state;
891 const index = stories.findIndex(s => s.id == story.id);
892 stories.splice(index, 1);
893 this.setState(stories);
894 });
895
896 this.state = {
897 stories: [{
898 id: 1,
899 name: "[Webpack] — Smart Loading Assets For Production",
900 url: "https://hackernoon.com/webpack-smart-loading-assets-for-production-3571e0a29c2e"
901 }, {
902 id: 2,
903 name: "V8 Engine Overview",
904 url: "https://medium.com/@MQuy90/v8-engine-overview-7c965731ced4"
905 }]
906 };
907 }
908
909 render() {
910 const {
911 stories
912 } = this.state;
913 return Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", null, Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])("ul", null, stories.map((story, index) => Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])(Story, {
914 key: index,
915 story: story,
916 onRemove: this.removeStory
917 }))));
918 }
919
920}
921
922class Story extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
923 constructor(props) {
924 super(props);
925
926 _defineProperty(this, "handleClick", () => {
927 this.setState({
928 likes: this.state.likes + 1
929 });
930 });
931
932 this.state = {
933 likes: Math.ceil(Math.random() * 100)
934 };
935 }
936
937 render() {
938 const {
939 story,
940 onRemove
941 } = this.props;
942 const {
943 likes
944 } = this.state;
945 return Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])("li", {
946 className: _app_css__WEBPACK_IMPORTED_MODULE_3__["notExist"]
947 }, Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])("button", {
948 onClick: this.handleClick
949 }, likes, "\u2764\uFE0F"), Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])("a", {
950 className: _app_css__WEBPACK_IMPORTED_MODULE_3__[/* xxx */ "b"],
951 href: story.url
952 }, story.name), Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])("button", {
953 onClick: onRemove(story)
954 }, "Remove"));
955 }
956
957}
958
959function reload() {
960 Object(react_dom__WEBPACK_IMPORTED_MODULE_1__["render"])(Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])(App, null), document.getElementById("root"));
961}
962
963/***/ }),
964
965/***/ "./index.js":
966/*!******************!*\
967 !*** ./index.js ***!
968 \******************/
969/*! no exports provided */
970/*! all exports used */
971/***/ (function(module, __webpack_exports__, __webpack_require__) {
972
973"use strict";
974__webpack_require__.r(__webpack_exports__);
975/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./app */ "./app.js");
976
977Object(_app__WEBPACK_IMPORTED_MODULE_0__["reload"])();
978
979if (true) {
980 module.hot.accept(/*! ./app */ "./app.js", function(__WEBPACK_OUTDATED_DEPENDENCIES__) { /* harmony import */ _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./app */ "./app.js");
981(() => Object(_app__WEBPACK_IMPORTED_MODULE_0__["reload"])())(__WEBPACK_OUTDATED_DEPENDENCIES__); });
982}
983
984/***/ }),
985
986/***/ "./node_modules/ansi-html/index.js":
987/*!*****************************************!*\
988 !*** ./node_modules/ansi-html/index.js ***!
989 \*****************************************/
990/*! no static exports found */
991/*! all exports used */
992/***/ (function(module, exports, __webpack_require__) {
993
994"use strict";
995
996
997module.exports = ansiHTML; // Reference to https://github.com/sindresorhus/ansi-regex
998
999var _regANSI = /(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/;
1000var _defColors = {
1001 reset: ['fff', '000'],
1002 // [FOREGROUD_COLOR, BACKGROUND_COLOR]
1003 black: '000',
1004 red: 'ff0000',
1005 green: '209805',
1006 yellow: 'e8bf03',
1007 blue: '0000ff',
1008 magenta: 'ff00ff',
1009 cyan: '00ffee',
1010 lightgrey: 'f0f0f0',
1011 darkgrey: '888'
1012};
1013var _styles = {
1014 30: 'black',
1015 31: 'red',
1016 32: 'green',
1017 33: 'yellow',
1018 34: 'blue',
1019 35: 'magenta',
1020 36: 'cyan',
1021 37: 'lightgrey'
1022};
1023var _openTags = {
1024 '1': 'font-weight:bold',
1025 // bold
1026 '2': 'opacity:0.5',
1027 // dim
1028 '3': '<i>',
1029 // italic
1030 '4': '<u>',
1031 // underscore
1032 '8': 'display:none',
1033 // hidden
1034 '9': '<del>' // delete
1035
1036};
1037var _closeTags = {
1038 '23': '</i>',
1039 // reset italic
1040 '24': '</u>',
1041 // reset underscore
1042 '29': '</del>' // reset delete
1043
1044};
1045[0, 21, 22, 27, 28, 39, 49].forEach(function (n) {
1046 _closeTags[n] = '</span>';
1047});
1048/**
1049 * Converts text with ANSI color codes to HTML markup.
1050 * @param {String} text
1051 * @returns {*}
1052 */
1053
1054function ansiHTML(text) {
1055 // Returns the text if the string has no ANSI escape code.
1056 if (!_regANSI.test(text)) {
1057 return text;
1058 } // Cache opened sequence.
1059
1060
1061 var ansiCodes = []; // Replace with markup.
1062
1063 var ret = text.replace(/\033\[(\d+)*m/g, function (match, seq) {
1064 var ot = _openTags[seq];
1065
1066 if (ot) {
1067 // If current sequence has been opened, close it.
1068 if (!!~ansiCodes.indexOf(seq)) {
1069 // eslint-disable-line no-extra-boolean-cast
1070 ansiCodes.pop();
1071 return '</span>';
1072 } // Open tag.
1073
1074
1075 ansiCodes.push(seq);
1076 return ot[0] === '<' ? ot : '<span style="' + ot + ';">';
1077 }
1078
1079 var ct = _closeTags[seq];
1080
1081 if (ct) {
1082 // Pop sequence
1083 ansiCodes.pop();
1084 return ct;
1085 }
1086
1087 return '';
1088 }); // Make sure tags are closed.
1089
1090 var l = ansiCodes.length;
1091 l > 0 && (ret += Array(l + 1).join('</span>'));
1092 return ret;
1093}
1094/**
1095 * Customize colors.
1096 * @param {Object} colors reference to _defColors
1097 */
1098
1099
1100ansiHTML.setColors = function (colors) {
1101 if (typeof colors !== 'object') {
1102 throw new Error('`colors` parameter must be an Object.');
1103 }
1104
1105 var _finalColors = {};
1106
1107 for (var key in _defColors) {
1108 var hex = colors.hasOwnProperty(key) ? colors[key] : null;
1109
1110 if (!hex) {
1111 _finalColors[key] = _defColors[key];
1112 continue;
1113 }
1114
1115 if ('reset' === key) {
1116 if (typeof hex === 'string') {
1117 hex = [hex];
1118 }
1119
1120 if (!Array.isArray(hex) || hex.length === 0 || hex.some(function (h) {
1121 return typeof h !== 'string';
1122 })) {
1123 throw new Error('The value of `' + key + '` property must be an Array and each item could only be a hex string, e.g.: FF0000');
1124 }
1125
1126 var defHexColor = _defColors[key];
1127
1128 if (!hex[0]) {
1129 hex[0] = defHexColor[0];
1130 }
1131
1132 if (hex.length === 1 || !hex[1]) {
1133 hex = [hex[0]];
1134 hex.push(defHexColor[1]);
1135 }
1136
1137 hex = hex.slice(0, 2);
1138 } else if (typeof hex !== 'string') {
1139 throw new Error('The value of `' + key + '` property must be a hex string, e.g.: FF0000');
1140 }
1141
1142 _finalColors[key] = hex;
1143 }
1144
1145 _setTags(_finalColors);
1146};
1147/**
1148 * Reset colors.
1149 */
1150
1151
1152ansiHTML.reset = function () {
1153 _setTags(_defColors);
1154};
1155/**
1156 * Expose tags, including open and close.
1157 * @type {Object}
1158 */
1159
1160
1161ansiHTML.tags = {};
1162
1163if (Object.defineProperty) {
1164 Object.defineProperty(ansiHTML.tags, 'open', {
1165 get: function () {
1166 return _openTags;
1167 }
1168 });
1169 Object.defineProperty(ansiHTML.tags, 'close', {
1170 get: function () {
1171 return _closeTags;
1172 }
1173 });
1174} else {
1175 ansiHTML.tags.open = _openTags;
1176 ansiHTML.tags.close = _closeTags;
1177}
1178
1179function _setTags(colors) {
1180 // reset all
1181 _openTags['0'] = 'font-weight:normal;opacity:1;color:#' + colors.reset[0] + ';background:#' + colors.reset[1]; // inverse
1182
1183 _openTags['7'] = 'color:#' + colors.reset[1] + ';background:#' + colors.reset[0]; // dark grey
1184
1185 _openTags['90'] = 'color:#' + colors.darkgrey;
1186
1187 for (var code in _styles) {
1188 var color = _styles[code];
1189 var oriColor = colors[color] || '000';
1190 _openTags[code] = 'color:#' + oriColor;
1191 code = parseInt(code);
1192 _openTags[(code + 10).toString()] = 'background:#' + oriColor;
1193 }
1194}
1195
1196ansiHTML.reset();
1197
1198/***/ }),
1199
1200/***/ "./node_modules/ansi-regex/index.js":
1201/*!******************************************!*\
1202 !*** ./node_modules/ansi-regex/index.js ***!
1203 \******************************************/
1204/*! no static exports found */
1205/*! all exports used */
1206/***/ (function(module, exports, __webpack_require__) {
1207
1208"use strict";
1209
1210
1211module.exports = function () {
1212 return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
1213};
1214
1215/***/ }),
1216
1217/***/ "./node_modules/css-loader/index.js?!./app.css":
1218/*!*****************************************************!*\
1219 !*** ./node_modules/css-loader??ref--5-1!./app.css ***!
1220 \*****************************************************/
1221/*! no static exports found */
1222/*! all exports used */
1223/***/ (function(module, exports, __webpack_require__) {
1224
1225exports = module.exports = __webpack_require__(/*! ./node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
1226// imports
1227exports.i(__webpack_require__(/*! -!./node_modules/css-loader??ref--5-1!./vendor.css */ "./node_modules/css-loader/index.js?!./vendor.css"), undefined);
1228
1229// module
1230exports.push([module.i, "._1DbMug7DVSpXvNLyPQ-kjP {\r\n display: inline;\r\n}\r\n\r\n.GlPQplUrnlvsck4QEoOs4 {\r\n float: left;\r\n}", ""]);
1231
1232// exports
1233exports.locals = {
1234 "abcdef": "_1DbMug7DVSpXvNLyPQ-kjP",
1235 "xxx": "GlPQplUrnlvsck4QEoOs4 " + __webpack_require__(/*! -!./node_modules/css-loader??ref--5-1!./vendor.css */ "./node_modules/css-loader/index.js?!./vendor.css").locals["zzzz"] + ""
1236};
1237
1238/***/ }),
1239
1240/***/ "./node_modules/css-loader/index.js?!./vendor.css":
1241/*!********************************************************!*\
1242 !*** ./node_modules/css-loader??ref--5-1!./vendor.css ***!
1243 \********************************************************/
1244/*! no static exports found */
1245/*! all exports used */
1246/***/ (function(module, exports, __webpack_require__) {
1247
1248exports = module.exports = __webpack_require__(/*! ./node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
1249// imports
1250
1251
1252// module
1253exports.push([module.i, ".gkFEy45fBh7FLpvCb4CV3 {\r\n margin: auto;\r\n}\r\n\r\n._3D_Pdj4iGUsoIk5UUgtjZp {\r\n padding: auto;\r\n}", ""]);
1254
1255// exports
1256exports.locals = {
1257 "zzzz": "gkFEy45fBh7FLpvCb4CV3",
1258 "kkkk": "_3D_Pdj4iGUsoIk5UUgtjZp"
1259};
1260
1261/***/ }),
1262
1263/***/ "./node_modules/css-loader/lib/css-base.js":
1264/*!*************************************************!*\
1265 !*** ./node_modules/css-loader/lib/css-base.js ***!
1266 \*************************************************/
1267/*! no static exports found */
1268/*! all exports used */
1269/***/ (function(module, exports) {
1270
1271/*
1272 MIT License http://www.opensource.org/licenses/mit-license.php
1273 Author Tobias Koppers @sokra
1274*/
1275// css base code, injected by the css-loader
1276module.exports = function (useSourceMap) {
1277 var list = []; // return the list of modules as css string
1278
1279 list.toString = function toString() {
1280 return this.map(function (item) {
1281 var content = cssWithMappingToString(item, useSourceMap);
1282
1283 if (item[2]) {
1284 return "@media " + item[2] + "{" + content + "}";
1285 } else {
1286 return content;
1287 }
1288 }).join("");
1289 }; // import a list of modules into the list
1290
1291
1292 list.i = function (modules, mediaQuery) {
1293 if (typeof modules === "string") modules = [[null, modules, ""]];
1294 var alreadyImportedModules = {};
1295
1296 for (var i = 0; i < this.length; i++) {
1297 var id = this[i][0];
1298 if (typeof id === "number") alreadyImportedModules[id] = true;
1299 }
1300
1301 for (i = 0; i < modules.length; i++) {
1302 var item = modules[i]; // skip already imported module
1303 // this implementation is not 100% perfect for weird media query combinations
1304 // when a module is imported multiple times with different media queries.
1305 // I hope this will never occur (Hey this way we have smaller bundles)
1306
1307 if (typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
1308 if (mediaQuery && !item[2]) {
1309 item[2] = mediaQuery;
1310 } else if (mediaQuery) {
1311 item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
1312 }
1313
1314 list.push(item);
1315 }
1316 }
1317 };
1318
1319 return list;
1320};
1321
1322function cssWithMappingToString(item, useSourceMap) {
1323 var content = item[1] || '';
1324 var cssMapping = item[3];
1325
1326 if (!cssMapping) {
1327 return content;
1328 }
1329
1330 if (useSourceMap && typeof btoa === 'function') {
1331 var sourceMapping = toComment(cssMapping);
1332 var sourceURLs = cssMapping.sources.map(function (source) {
1333 return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
1334 });
1335 return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
1336 }
1337
1338 return [content].join('\n');
1339} // Adapted from convert-source-map (MIT)
1340
1341
1342function toComment(sourceMap) {
1343 // eslint-disable-next-line no-undef
1344 var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
1345 var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
1346 return '/*# ' + data + ' */';
1347}
1348
1349/***/ }),
1350
1351/***/ "./node_modules/es6-css-loader/src/style-loader/lib/addStyles.js":
1352/*!***********************************************************************!*\
1353 !*** ./node_modules/es6-css-loader/src/style-loader/lib/addStyles.js ***!
1354 \***********************************************************************/
1355/*! no static exports found */
1356/*! all exports used */
1357/***/ (function(module, exports, __webpack_require__) {
1358
1359/*
1360 MIT License http://www.opensource.org/licenses/mit-license.php
1361 Author Tobias Koppers @sokra
1362*/
1363
1364var stylesInDom = {};
1365
1366var memoize = function (fn) {
1367 var memo;
1368
1369 return function () {
1370 if (typeof memo === "undefined") memo = fn.apply(this, arguments);
1371 return memo;
1372 };
1373};
1374
1375var isOldIE = memoize(function () {
1376 // Test for IE <= 9 as proposed by Browserhacks
1377 // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
1378 // Tests for existence of standard globals is to allow style-loader
1379 // to operate correctly into non-standard environments
1380 // @see https://github.com/webpack-contrib/style-loader/issues/177
1381 return window && document && document.all && !window.atob;
1382});
1383
1384var getTarget = function (target, parent) {
1385 if (parent){
1386 return parent.querySelector(target);
1387 }
1388 return document.querySelector(target);
1389};
1390
1391var getElement = (function (fn) {
1392 var memo = {};
1393
1394 return function(target, parent) {
1395 // If passing function in options, then use it for resolve "head" element.
1396 // Useful for Shadow Root style i.e
1397 // {
1398 // insertInto: function () { return document.querySelector("#foo").shadowRoot }
1399 // }
1400 if (typeof target === 'function') {
1401 return target();
1402 }
1403 if (typeof memo[target] === "undefined") {
1404 var styleTarget = getTarget.call(this, target, parent);
1405 // Special case to return head of iframe instead of iframe itself
1406 if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
1407 try {
1408 // This will throw an exception if access to iframe is blocked
1409 // due to cross-origin restrictions
1410 styleTarget = styleTarget.contentDocument.head;
1411 } catch(e) {
1412 styleTarget = null;
1413 }
1414 }
1415 memo[target] = styleTarget;
1416 }
1417 return memo[target]
1418 };
1419})();
1420
1421var singleton = null;
1422var singletonCounter = 0;
1423var stylesInsertedAtTop = [];
1424
1425var fixUrls = __webpack_require__(/*! ./urls */ "./node_modules/es6-css-loader/src/style-loader/lib/urls.js");
1426
1427module.exports = function(list, options) {
1428 if (typeof DEBUG !== "undefined" && DEBUG) {
1429 if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
1430 }
1431
1432 options = options || {};
1433
1434 options.attrs = typeof options.attrs === "object" ? options.attrs : {};
1435
1436 // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
1437 // tags it will allow on a page
1438 if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();
1439
1440 // By default, add <style> tags to the <head> element
1441 if (!options.insertInto) options.insertInto = "head";
1442
1443 // By default, add <style> tags to the bottom of the target
1444 if (!options.insertAt) options.insertAt = "bottom";
1445
1446 var styles = listToStyles(list, options);
1447
1448 addStylesToDom(styles, options);
1449
1450 return function update (newList) {
1451 var mayRemove = [];
1452
1453 for (var i = 0; i < styles.length; i++) {
1454 var item = styles[i];
1455 var domStyle = stylesInDom[item.id];
1456
1457 domStyle.refs--;
1458 mayRemove.push(domStyle);
1459 }
1460
1461 if(newList) {
1462 var newStyles = listToStyles(newList, options);
1463 addStylesToDom(newStyles, options);
1464 }
1465
1466 for (var i = 0; i < mayRemove.length; i++) {
1467 var domStyle = mayRemove[i];
1468
1469 if(domStyle.refs === 0) {
1470 for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
1471
1472 delete stylesInDom[domStyle.id];
1473 }
1474 }
1475 };
1476};
1477
1478function addStylesToDom (styles, options) {
1479 for (var i = 0; i < styles.length; i++) {
1480 var item = styles[i];
1481 var domStyle = stylesInDom[item.id];
1482
1483 if(domStyle) {
1484 domStyle.refs++;
1485
1486 for(var j = 0; j < domStyle.parts.length; j++) {
1487 domStyle.parts[j](item.parts[j]);
1488 }
1489
1490 for(; j < item.parts.length; j++) {
1491 domStyle.parts.push(addStyle(item.parts[j], options));
1492 }
1493 } else {
1494 var parts = [];
1495
1496 for(var j = 0; j < item.parts.length; j++) {
1497 parts.push(addStyle(item.parts[j], options));
1498 }
1499
1500 stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
1501 }
1502 }
1503}
1504
1505function listToStyles (list, options) {
1506 var styles = [];
1507 var newStyles = {};
1508
1509 for (var i = 0; i < list.length; i++) {
1510 var item = list[i];
1511 var id = options.base ? item[0] + options.base : item[0];
1512 var css = item[1];
1513 var media = item[2];
1514 var sourceMap = item[3];
1515 var part = {css: css, media: media, sourceMap: sourceMap};
1516
1517 if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
1518 else newStyles[id].parts.push(part);
1519 }
1520
1521 return styles;
1522}
1523
1524function insertStyleElement (options, style) {
1525 var target = getElement(options.insertInto)
1526
1527 if (!target) {
1528 throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
1529 }
1530
1531 var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
1532
1533 if (options.insertAt === "top") {
1534 if (!lastStyleElementInsertedAtTop) {
1535 target.insertBefore(style, target.firstChild);
1536 } else if (lastStyleElementInsertedAtTop.nextSibling) {
1537 target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
1538 } else {
1539 target.appendChild(style);
1540 }
1541 stylesInsertedAtTop.push(style);
1542 } else if (options.insertAt === "bottom") {
1543 target.appendChild(style);
1544 } else if (typeof options.insertAt === "object" && options.insertAt.before) {
1545 var nextSibling = getElement(options.insertAt.before, target);
1546 target.insertBefore(style, nextSibling);
1547 } else {
1548 throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
1549 }
1550}
1551
1552function removeStyleElement (style) {
1553 if (style.parentNode === null) return false;
1554 style.parentNode.removeChild(style);
1555
1556 var idx = stylesInsertedAtTop.indexOf(style);
1557 if(idx >= 0) {
1558 stylesInsertedAtTop.splice(idx, 1);
1559 }
1560}
1561
1562function createStyleElement (options) {
1563 var style = document.createElement("style");
1564
1565 if(options.attrs.type === undefined) {
1566 options.attrs.type = "text/css";
1567 }
1568
1569 if(options.attrs.nonce === undefined) {
1570 var nonce = getNonce();
1571 if (nonce) {
1572 options.attrs.nonce = nonce;
1573 }
1574 }
1575
1576 addAttrs(style, options.attrs);
1577 insertStyleElement(options, style);
1578
1579 return style;
1580}
1581
1582function createLinkElement (options) {
1583 var link = document.createElement("link");
1584
1585 if(options.attrs.type === undefined) {
1586 options.attrs.type = "text/css";
1587 }
1588 options.attrs.rel = "stylesheet";
1589
1590 addAttrs(link, options.attrs);
1591 insertStyleElement(options, link);
1592
1593 return link;
1594}
1595
1596function addAttrs (el, attrs) {
1597 Object.keys(attrs).forEach(function (key) {
1598 el.setAttribute(key, attrs[key]);
1599 });
1600}
1601
1602function getNonce() {
1603 if (false) {}
1604
1605 return __webpack_require__.nc;
1606}
1607
1608function addStyle (obj, options) {
1609 var style, update, remove, result;
1610
1611 // If a transform function was defined, run it on the css
1612 if (options.transform && obj.css) {
1613 result = options.transform(obj.css);
1614
1615 if (result) {
1616 // If transform returns a value, use that instead of the original css.
1617 // This allows running runtime transformations on the css.
1618 obj.css = result;
1619 } else {
1620 // If the transform function returns a falsy value, don't add this css.
1621 // This allows conditional loading of css
1622 return function() {
1623 // noop
1624 };
1625 }
1626 }
1627
1628 if (options.singleton) {
1629 var styleIndex = singletonCounter++;
1630
1631 style = singleton || (singleton = createStyleElement(options));
1632
1633 update = applyToSingletonTag.bind(null, style, styleIndex, false);
1634 remove = applyToSingletonTag.bind(null, style, styleIndex, true);
1635
1636 } else if (
1637 obj.sourceMap &&
1638 typeof URL === "function" &&
1639 typeof URL.createObjectURL === "function" &&
1640 typeof URL.revokeObjectURL === "function" &&
1641 typeof Blob === "function" &&
1642 typeof btoa === "function"
1643 ) {
1644 style = createLinkElement(options);
1645 update = updateLink.bind(null, style, options);
1646 remove = function () {
1647 removeStyleElement(style);
1648
1649 if(style.href) URL.revokeObjectURL(style.href);
1650 };
1651 } else {
1652 style = createStyleElement(options);
1653 update = applyToTag.bind(null, style);
1654 remove = function () {
1655 removeStyleElement(style);
1656 };
1657 }
1658
1659 update(obj);
1660
1661 return function updateStyle (newObj) {
1662 if (newObj) {
1663 if (
1664 newObj.css === obj.css &&
1665 newObj.media === obj.media &&
1666 newObj.sourceMap === obj.sourceMap
1667 ) {
1668 return;
1669 }
1670
1671 update(obj = newObj);
1672 } else {
1673 remove();
1674 }
1675 };
1676}
1677
1678var replaceText = (function () {
1679 var textStore = [];
1680
1681 return function (index, replacement) {
1682 textStore[index] = replacement;
1683
1684 return textStore.filter(Boolean).join('\n');
1685 };
1686})();
1687
1688function applyToSingletonTag (style, index, remove, obj) {
1689 var css = remove ? "" : obj.css;
1690
1691 if (style.styleSheet) {
1692 style.styleSheet.cssText = replaceText(index, css);
1693 } else {
1694 var cssNode = document.createTextNode(css);
1695 var childNodes = style.childNodes;
1696
1697 if (childNodes[index]) style.removeChild(childNodes[index]);
1698
1699 if (childNodes.length) {
1700 style.insertBefore(cssNode, childNodes[index]);
1701 } else {
1702 style.appendChild(cssNode);
1703 }
1704 }
1705}
1706
1707function applyToTag (style, obj) {
1708 var css = obj.css;
1709 var media = obj.media;
1710
1711 if(media) {
1712 style.setAttribute("media", media)
1713 }
1714
1715 if(style.styleSheet) {
1716 style.styleSheet.cssText = css;
1717 } else {
1718 while(style.firstChild) {
1719 style.removeChild(style.firstChild);
1720 }
1721
1722 style.appendChild(document.createTextNode(css));
1723 }
1724}
1725
1726function updateLink (link, options, obj) {
1727 var css = obj.css;
1728 var sourceMap = obj.sourceMap;
1729
1730 /*
1731 If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
1732 and there is no publicPath defined then lets turn convertToAbsoluteUrls
1733 on by default. Otherwise default to the convertToAbsoluteUrls option
1734 directly
1735 */
1736 var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
1737
1738 if (options.convertToAbsoluteUrls || autoFixUrls) {
1739 css = fixUrls(css);
1740 }
1741
1742 if (sourceMap) {
1743 // http://stackoverflow.com/a/26603875
1744 css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
1745 }
1746
1747 var blob = new Blob([css], { type: "text/css" });
1748
1749 var oldSrc = link.href;
1750
1751 link.href = URL.createObjectURL(blob);
1752
1753 if(oldSrc) URL.revokeObjectURL(oldSrc);
1754}
1755
1756/***/ }),
1757
1758/***/ "./node_modules/es6-css-loader/src/style-loader/lib/urls.js":
1759/*!******************************************************************!*\
1760 !*** ./node_modules/es6-css-loader/src/style-loader/lib/urls.js ***!
1761 \******************************************************************/
1762/*! no static exports found */
1763/*! all exports used */
1764/***/ (function(module, exports) {
1765
1766/**
1767 * When source maps are enabled, `style-loader` uses a link element with a data-uri to
1768 * embed the css on the page. This breaks all relative urls because now they are relative to a
1769 * bundle instead of the current page.
1770 *
1771 * One solution is to only use full urls, but that may be impossible.
1772 *
1773 * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
1774 *
1775 * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
1776 *
1777 */
1778module.exports = function (css) {
1779 // get current location
1780 var location = typeof window !== "undefined" && window.location;
1781
1782 if (!location) {
1783 throw new Error("fixUrls requires window.location");
1784 } // blank or null?
1785
1786
1787 if (!css || typeof css !== "string") {
1788 return css;
1789 }
1790
1791 var baseUrl = location.protocol + "//" + location.host;
1792 var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/"); // convert each url(...)
1793
1794 /*
1795 This regular expression is just a way to recursively match brackets within
1796 a string.
1797 /url\s*\( = Match on the word "url" with any whitespace after it and then a parens
1798 ( = Start a capturing group
1799 (?: = Start a non-capturing group
1800 [^)(] = Match anything that isn't a parentheses
1801 | = OR
1802 \( = Match a start parentheses
1803 (?: = Start another non-capturing groups
1804 [^)(]+ = Match anything that isn't a parentheses
1805 | = OR
1806 \( = Match a start parentheses
1807 [^)(]* = Match anything that isn't a parentheses
1808 \) = Match a end parentheses
1809 ) = End Group
1810 *\) = Match anything and then a close parens
1811 ) = Close non-capturing group
1812 * = Match anything
1813 ) = Close capturing group
1814 \) = Match a close parens
1815 /gi = Get all matches, not the first. Be case insensitive.
1816 */
1817
1818 var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function (fullMatch, origUrl) {
1819 // strip quotes (if they exist)
1820 var unquotedOrigUrl = origUrl.trim().replace(/^"(.*)"$/, function (o, $1) {
1821 return $1;
1822 }).replace(/^'(.*)'$/, function (o, $1) {
1823 return $1;
1824 }); // already a full url? no change
1825
1826 if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
1827 return fullMatch;
1828 } // convert the url to a full url
1829
1830
1831 var newUrl;
1832
1833 if (unquotedOrigUrl.indexOf("//") === 0) {
1834 //TODO: should we add protocol?
1835 newUrl = unquotedOrigUrl;
1836 } else if (unquotedOrigUrl.indexOf("/") === 0) {
1837 // path should be relative to the base url
1838 newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
1839 } else {
1840 // path should be relative to current directory
1841 newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
1842 } // send back the fixed url(...)
1843
1844
1845 return "url(" + JSON.stringify(newUrl) + ")";
1846 }); // send back the fixed css
1847
1848 return fixedCss;
1849};
1850
1851/***/ }),
1852
1853/***/ "./node_modules/html-entities/index.js":
1854/*!*********************************************!*\
1855 !*** ./node_modules/html-entities/index.js ***!
1856 \*********************************************/
1857/*! no static exports found */
1858/*! all exports used */
1859/***/ (function(module, exports, __webpack_require__) {
1860
1861module.exports = {
1862 XmlEntities: __webpack_require__(/*! ./lib/xml-entities.js */ "./node_modules/html-entities/lib/xml-entities.js"),
1863 Html4Entities: __webpack_require__(/*! ./lib/html4-entities.js */ "./node_modules/html-entities/lib/html4-entities.js"),
1864 Html5Entities: __webpack_require__(/*! ./lib/html5-entities.js */ "./node_modules/html-entities/lib/html5-entities.js"),
1865 AllHtmlEntities: __webpack_require__(/*! ./lib/html5-entities.js */ "./node_modules/html-entities/lib/html5-entities.js")
1866};
1867
1868/***/ }),
1869
1870/***/ "./node_modules/html-entities/lib/html4-entities.js":
1871/*!**********************************************************!*\
1872 !*** ./node_modules/html-entities/lib/html4-entities.js ***!
1873 \**********************************************************/
1874/*! no static exports found */
1875/*! all exports used */
1876/***/ (function(module, exports) {
1877
1878var HTML_ALPHA = ['apos', 'nbsp', 'iexcl', 'cent', 'pound', 'curren', 'yen', 'brvbar', 'sect', 'uml', 'copy', 'ordf', 'laquo', 'not', 'shy', 'reg', 'macr', 'deg', 'plusmn', 'sup2', 'sup3', 'acute', 'micro', 'para', 'middot', 'cedil', 'sup1', 'ordm', 'raquo', 'frac14', 'frac12', 'frac34', 'iquest', 'Agrave', 'Aacute', 'Acirc', 'Atilde', 'Auml', 'Aring', 'Aelig', 'Ccedil', 'Egrave', 'Eacute', 'Ecirc', 'Euml', 'Igrave', 'Iacute', 'Icirc', 'Iuml', 'ETH', 'Ntilde', 'Ograve', 'Oacute', 'Ocirc', 'Otilde', 'Ouml', 'times', 'Oslash', 'Ugrave', 'Uacute', 'Ucirc', 'Uuml', 'Yacute', 'THORN', 'szlig', 'agrave', 'aacute', 'acirc', 'atilde', 'auml', 'aring', 'aelig', 'ccedil', 'egrave', 'eacute', 'ecirc', 'euml', 'igrave', 'iacute', 'icirc', 'iuml', 'eth', 'ntilde', 'ograve', 'oacute', 'ocirc', 'otilde', 'ouml', 'divide', 'oslash', 'ugrave', 'uacute', 'ucirc', 'uuml', 'yacute', 'thorn', 'yuml', 'quot', 'amp', 'lt', 'gt', 'OElig', 'oelig', 'Scaron', 'scaron', 'Yuml', 'circ', 'tilde', 'ensp', 'emsp', 'thinsp', 'zwnj', 'zwj', 'lrm', 'rlm', 'ndash', 'mdash', 'lsquo', 'rsquo', 'sbquo', 'ldquo', 'rdquo', 'bdquo', 'dagger', 'Dagger', 'permil', 'lsaquo', 'rsaquo', 'euro', 'fnof', 'Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon', 'Zeta', 'Eta', 'Theta', 'Iota', 'Kappa', 'Lambda', 'Mu', 'Nu', 'Xi', 'Omicron', 'Pi', 'Rho', 'Sigma', 'Tau', 'Upsilon', 'Phi', 'Chi', 'Psi', 'Omega', 'alpha', 'beta', 'gamma', 'delta', 'epsilon', 'zeta', 'eta', 'theta', 'iota', 'kappa', 'lambda', 'mu', 'nu', 'xi', 'omicron', 'pi', 'rho', 'sigmaf', 'sigma', 'tau', 'upsilon', 'phi', 'chi', 'psi', 'omega', 'thetasym', 'upsih', 'piv', 'bull', 'hellip', 'prime', 'Prime', 'oline', 'frasl', 'weierp', 'image', 'real', 'trade', 'alefsym', 'larr', 'uarr', 'rarr', 'darr', 'harr', 'crarr', 'lArr', 'uArr', 'rArr', 'dArr', 'hArr', 'forall', 'part', 'exist', 'empty', 'nabla', 'isin', 'notin', 'ni', 'prod', 'sum', 'minus', 'lowast', 'radic', 'prop', 'infin', 'ang', 'and', 'or', 'cap', 'cup', 'int', 'there4', 'sim', 'cong', 'asymp', 'ne', 'equiv', 'le', 'ge', 'sub', 'sup', 'nsub', 'sube', 'supe', 'oplus', 'otimes', 'perp', 'sdot', 'lceil', 'rceil', 'lfloor', 'rfloor', 'lang', 'rang', 'loz', 'spades', 'clubs', 'hearts', 'diams'];
1879var HTML_CODES = [39, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 34, 38, 60, 62, 338, 339, 352, 353, 376, 710, 732, 8194, 8195, 8201, 8204, 8205, 8206, 8207, 8211, 8212, 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8240, 8249, 8250, 8364, 402, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 977, 978, 982, 8226, 8230, 8242, 8243, 8254, 8260, 8472, 8465, 8476, 8482, 8501, 8592, 8593, 8594, 8595, 8596, 8629, 8656, 8657, 8658, 8659, 8660, 8704, 8706, 8707, 8709, 8711, 8712, 8713, 8715, 8719, 8721, 8722, 8727, 8730, 8733, 8734, 8736, 8743, 8744, 8745, 8746, 8747, 8756, 8764, 8773, 8776, 8800, 8801, 8804, 8805, 8834, 8835, 8836, 8838, 8839, 8853, 8855, 8869, 8901, 8968, 8969, 8970, 8971, 9001, 9002, 9674, 9824, 9827, 9829, 9830];
1880var alphaIndex = {};
1881var numIndex = {};
1882var i = 0;
1883var length = HTML_ALPHA.length;
1884
1885while (i < length) {
1886 var a = HTML_ALPHA[i];
1887 var c = HTML_CODES[i];
1888 alphaIndex[a] = String.fromCharCode(c);
1889 numIndex[c] = a;
1890 i++;
1891}
1892/**
1893 * @constructor
1894 */
1895
1896
1897function Html4Entities() {}
1898/**
1899 * @param {String} str
1900 * @returns {String}
1901 */
1902
1903
1904Html4Entities.prototype.decode = function (str) {
1905 if (!str || !str.length) {
1906 return '';
1907 }
1908
1909 return str.replace(/&(#?[\w\d]+);?/g, function (s, entity) {
1910 var chr;
1911
1912 if (entity.charAt(0) === "#") {
1913 var code = entity.charAt(1).toLowerCase() === 'x' ? parseInt(entity.substr(2), 16) : parseInt(entity.substr(1));
1914
1915 if (!(isNaN(code) || code < -32768 || code > 65535)) {
1916 chr = String.fromCharCode(code);
1917 }
1918 } else {
1919 chr = alphaIndex[entity];
1920 }
1921
1922 return chr || s;
1923 });
1924};
1925/**
1926 * @param {String} str
1927 * @returns {String}
1928 */
1929
1930
1931Html4Entities.decode = function (str) {
1932 return new Html4Entities().decode(str);
1933};
1934/**
1935 * @param {String} str
1936 * @returns {String}
1937 */
1938
1939
1940Html4Entities.prototype.encode = function (str) {
1941 if (!str || !str.length) {
1942 return '';
1943 }
1944
1945 var strLength = str.length;
1946 var result = '';
1947 var i = 0;
1948
1949 while (i < strLength) {
1950 var alpha = numIndex[str.charCodeAt(i)];
1951 result += alpha ? "&" + alpha + ";" : str.charAt(i);
1952 i++;
1953 }
1954
1955 return result;
1956};
1957/**
1958 * @param {String} str
1959 * @returns {String}
1960 */
1961
1962
1963Html4Entities.encode = function (str) {
1964 return new Html4Entities().encode(str);
1965};
1966/**
1967 * @param {String} str
1968 * @returns {String}
1969 */
1970
1971
1972Html4Entities.prototype.encodeNonUTF = function (str) {
1973 if (!str || !str.length) {
1974 return '';
1975 }
1976
1977 var strLength = str.length;
1978 var result = '';
1979 var i = 0;
1980
1981 while (i < strLength) {
1982 var cc = str.charCodeAt(i);
1983 var alpha = numIndex[cc];
1984
1985 if (alpha) {
1986 result += "&" + alpha + ";";
1987 } else if (cc < 32 || cc > 126) {
1988 result += "&#" + cc + ";";
1989 } else {
1990 result += str.charAt(i);
1991 }
1992
1993 i++;
1994 }
1995
1996 return result;
1997};
1998/**
1999 * @param {String} str
2000 * @returns {String}
2001 */
2002
2003
2004Html4Entities.encodeNonUTF = function (str) {
2005 return new Html4Entities().encodeNonUTF(str);
2006};
2007/**
2008 * @param {String} str
2009 * @returns {String}
2010 */
2011
2012
2013Html4Entities.prototype.encodeNonASCII = function (str) {
2014 if (!str || !str.length) {
2015 return '';
2016 }
2017
2018 var strLength = str.length;
2019 var result = '';
2020 var i = 0;
2021
2022 while (i < strLength) {
2023 var c = str.charCodeAt(i);
2024
2025 if (c <= 255) {
2026 result += str[i++];
2027 continue;
2028 }
2029
2030 result += '&#' + c + ';';
2031 i++;
2032 }
2033
2034 return result;
2035};
2036/**
2037 * @param {String} str
2038 * @returns {String}
2039 */
2040
2041
2042Html4Entities.encodeNonASCII = function (str) {
2043 return new Html4Entities().encodeNonASCII(str);
2044};
2045
2046module.exports = Html4Entities;
2047
2048/***/ }),
2049
2050/***/ "./node_modules/html-entities/lib/html5-entities.js":
2051/*!**********************************************************!*\
2052 !*** ./node_modules/html-entities/lib/html5-entities.js ***!
2053 \**********************************************************/
2054/*! no static exports found */
2055/*! all exports used */
2056/***/ (function(module, exports) {
2057
2058var ENTITIES = [['Aacute', [193]], ['aacute', [225]], ['Abreve', [258]], ['abreve', [259]], ['ac', [8766]], ['acd', [8767]], ['acE', [8766, 819]], ['Acirc', [194]], ['acirc', [226]], ['acute', [180]], ['Acy', [1040]], ['acy', [1072]], ['AElig', [198]], ['aelig', [230]], ['af', [8289]], ['Afr', [120068]], ['afr', [120094]], ['Agrave', [192]], ['agrave', [224]], ['alefsym', [8501]], ['aleph', [8501]], ['Alpha', [913]], ['alpha', [945]], ['Amacr', [256]], ['amacr', [257]], ['amalg', [10815]], ['amp', [38]], ['AMP', [38]], ['andand', [10837]], ['And', [10835]], ['and', [8743]], ['andd', [10844]], ['andslope', [10840]], ['andv', [10842]], ['ang', [8736]], ['ange', [10660]], ['angle', [8736]], ['angmsdaa', [10664]], ['angmsdab', [10665]], ['angmsdac', [10666]], ['angmsdad', [10667]], ['angmsdae', [10668]], ['angmsdaf', [10669]], ['angmsdag', [10670]], ['angmsdah', [10671]], ['angmsd', [8737]], ['angrt', [8735]], ['angrtvb', [8894]], ['angrtvbd', [10653]], ['angsph', [8738]], ['angst', [197]], ['angzarr', [9084]], ['Aogon', [260]], ['aogon', [261]], ['Aopf', [120120]], ['aopf', [120146]], ['apacir', [10863]], ['ap', [8776]], ['apE', [10864]], ['ape', [8778]], ['apid', [8779]], ['apos', [39]], ['ApplyFunction', [8289]], ['approx', [8776]], ['approxeq', [8778]], ['Aring', [197]], ['aring', [229]], ['Ascr', [119964]], ['ascr', [119990]], ['Assign', [8788]], ['ast', [42]], ['asymp', [8776]], ['asympeq', [8781]], ['Atilde', [195]], ['atilde', [227]], ['Auml', [196]], ['auml', [228]], ['awconint', [8755]], ['awint', [10769]], ['backcong', [8780]], ['backepsilon', [1014]], ['backprime', [8245]], ['backsim', [8765]], ['backsimeq', [8909]], ['Backslash', [8726]], ['Barv', [10983]], ['barvee', [8893]], ['barwed', [8965]], ['Barwed', [8966]], ['barwedge', [8965]], ['bbrk', [9141]], ['bbrktbrk', [9142]], ['bcong', [8780]], ['Bcy', [1041]], ['bcy', [1073]], ['bdquo', [8222]], ['becaus', [8757]], ['because', [8757]], ['Because', [8757]], ['bemptyv', [10672]], ['bepsi', [1014]], ['bernou', [8492]], ['Bernoullis', [8492]], ['Beta', [914]], ['beta', [946]], ['beth', [8502]], ['between', [8812]], ['Bfr', [120069]], ['bfr', [120095]], ['bigcap', [8898]], ['bigcirc', [9711]], ['bigcup', [8899]], ['bigodot', [10752]], ['bigoplus', [10753]], ['bigotimes', [10754]], ['bigsqcup', [10758]], ['bigstar', [9733]], ['bigtriangledown', [9661]], ['bigtriangleup', [9651]], ['biguplus', [10756]], ['bigvee', [8897]], ['bigwedge', [8896]], ['bkarow', [10509]], ['blacklozenge', [10731]], ['blacksquare', [9642]], ['blacktriangle', [9652]], ['blacktriangledown', [9662]], ['blacktriangleleft', [9666]], ['blacktriangleright', [9656]], ['blank', [9251]], ['blk12', [9618]], ['blk14', [9617]], ['blk34', [9619]], ['block', [9608]], ['bne', [61, 8421]], ['bnequiv', [8801, 8421]], ['bNot', [10989]], ['bnot', [8976]], ['Bopf', [120121]], ['bopf', [120147]], ['bot', [8869]], ['bottom', [8869]], ['bowtie', [8904]], ['boxbox', [10697]], ['boxdl', [9488]], ['boxdL', [9557]], ['boxDl', [9558]], ['boxDL', [9559]], ['boxdr', [9484]], ['boxdR', [9554]], ['boxDr', [9555]], ['boxDR', [9556]], ['boxh', [9472]], ['boxH', [9552]], ['boxhd', [9516]], ['boxHd', [9572]], ['boxhD', [9573]], ['boxHD', [9574]], ['boxhu', [9524]], ['boxHu', [9575]], ['boxhU', [9576]], ['boxHU', [9577]], ['boxminus', [8863]], ['boxplus', [8862]], ['boxtimes', [8864]], ['boxul', [9496]], ['boxuL', [9563]], ['boxUl', [9564]], ['boxUL', [9565]], ['boxur', [9492]], ['boxuR', [9560]], ['boxUr', [9561]], ['boxUR', [9562]], ['boxv', [9474]], ['boxV', [9553]], ['boxvh', [9532]], ['boxvH', [9578]], ['boxVh', [9579]], ['boxVH', [9580]], ['boxvl', [9508]], ['boxvL', [9569]], ['boxVl', [9570]], ['boxVL', [9571]], ['boxvr', [9500]], ['boxvR', [9566]], ['boxVr', [9567]], ['boxVR', [9568]], ['bprime', [8245]], ['breve', [728]], ['Breve', [728]], ['brvbar', [166]], ['bscr', [119991]], ['Bscr', [8492]], ['bsemi', [8271]], ['bsim', [8765]], ['bsime', [8909]], ['bsolb', [10693]], ['bsol', [92]], ['bsolhsub', [10184]], ['bull', [8226]], ['bullet', [8226]], ['bump', [8782]], ['bumpE', [10926]], ['bumpe', [8783]], ['Bumpeq', [8782]], ['bumpeq', [8783]], ['Cacute', [262]], ['cacute', [263]], ['capand', [10820]], ['capbrcup', [10825]], ['capcap', [10827]], ['cap', [8745]], ['Cap', [8914]], ['capcup', [10823]], ['capdot', [10816]], ['CapitalDifferentialD', [8517]], ['caps', [8745, 65024]], ['caret', [8257]], ['caron', [711]], ['Cayleys', [8493]], ['ccaps', [10829]], ['Ccaron', [268]], ['ccaron', [269]], ['Ccedil', [199]], ['ccedil', [231]], ['Ccirc', [264]], ['ccirc', [265]], ['Cconint', [8752]], ['ccups', [10828]], ['ccupssm', [10832]], ['Cdot', [266]], ['cdot', [267]], ['cedil', [184]], ['Cedilla', [184]], ['cemptyv', [10674]], ['cent', [162]], ['centerdot', [183]], ['CenterDot', [183]], ['cfr', [120096]], ['Cfr', [8493]], ['CHcy', [1063]], ['chcy', [1095]], ['check', [10003]], ['checkmark', [10003]], ['Chi', [935]], ['chi', [967]], ['circ', [710]], ['circeq', [8791]], ['circlearrowleft', [8634]], ['circlearrowright', [8635]], ['circledast', [8859]], ['circledcirc', [8858]], ['circleddash', [8861]], ['CircleDot', [8857]], ['circledR', [174]], ['circledS', [9416]], ['CircleMinus', [8854]], ['CirclePlus', [8853]], ['CircleTimes', [8855]], ['cir', [9675]], ['cirE', [10691]], ['cire', [8791]], ['cirfnint', [10768]], ['cirmid', [10991]], ['cirscir', [10690]], ['ClockwiseContourIntegral', [8754]], ['clubs', [9827]], ['clubsuit', [9827]], ['colon', [58]], ['Colon', [8759]], ['Colone', [10868]], ['colone', [8788]], ['coloneq', [8788]], ['comma', [44]], ['commat', [64]], ['comp', [8705]], ['compfn', [8728]], ['complement', [8705]], ['complexes', [8450]], ['cong', [8773]], ['congdot', [10861]], ['Congruent', [8801]], ['conint', [8750]], ['Conint', [8751]], ['ContourIntegral', [8750]], ['copf', [120148]], ['Copf', [8450]], ['coprod', [8720]], ['Coproduct', [8720]], ['copy', [169]], ['COPY', [169]], ['copysr', [8471]], ['CounterClockwiseContourIntegral', [8755]], ['crarr', [8629]], ['cross', [10007]], ['Cross', [10799]], ['Cscr', [119966]], ['cscr', [119992]], ['csub', [10959]], ['csube', [10961]], ['csup', [10960]], ['csupe', [10962]], ['ctdot', [8943]], ['cudarrl', [10552]], ['cudarrr', [10549]], ['cuepr', [8926]], ['cuesc', [8927]], ['cularr', [8630]], ['cularrp', [10557]], ['cupbrcap', [10824]], ['cupcap', [10822]], ['CupCap', [8781]], ['cup', [8746]], ['Cup', [8915]], ['cupcup', [10826]], ['cupdot', [8845]], ['cupor', [10821]], ['cups', [8746, 65024]], ['curarr', [8631]], ['curarrm', [10556]], ['curlyeqprec', [8926]], ['curlyeqsucc', [8927]], ['curlyvee', [8910]], ['curlywedge', [8911]], ['curren', [164]], ['curvearrowleft', [8630]], ['curvearrowright', [8631]], ['cuvee', [8910]], ['cuwed', [8911]], ['cwconint', [8754]], ['cwint', [8753]], ['cylcty', [9005]], ['dagger', [8224]], ['Dagger', [8225]], ['daleth', [8504]], ['darr', [8595]], ['Darr', [8609]], ['dArr', [8659]], ['dash', [8208]], ['Dashv', [10980]], ['dashv', [8867]], ['dbkarow', [10511]], ['dblac', [733]], ['Dcaron', [270]], ['dcaron', [271]], ['Dcy', [1044]], ['dcy', [1076]], ['ddagger', [8225]], ['ddarr', [8650]], ['DD', [8517]], ['dd', [8518]], ['DDotrahd', [10513]], ['ddotseq', [10871]], ['deg', [176]], ['Del', [8711]], ['Delta', [916]], ['delta', [948]], ['demptyv', [10673]], ['dfisht', [10623]], ['Dfr', [120071]], ['dfr', [120097]], ['dHar', [10597]], ['dharl', [8643]], ['dharr', [8642]], ['DiacriticalAcute', [180]], ['DiacriticalDot', [729]], ['DiacriticalDoubleAcute', [733]], ['DiacriticalGrave', [96]], ['DiacriticalTilde', [732]], ['diam', [8900]], ['diamond', [8900]], ['Diamond', [8900]], ['diamondsuit', [9830]], ['diams', [9830]], ['die', [168]], ['DifferentialD', [8518]], ['digamma', [989]], ['disin', [8946]], ['div', [247]], ['divide', [247]], ['divideontimes', [8903]], ['divonx', [8903]], ['DJcy', [1026]], ['djcy', [1106]], ['dlcorn', [8990]], ['dlcrop', [8973]], ['dollar', [36]], ['Dopf', [120123]], ['dopf', [120149]], ['Dot', [168]], ['dot', [729]], ['DotDot', [8412]], ['doteq', [8784]], ['doteqdot', [8785]], ['DotEqual', [8784]], ['dotminus', [8760]], ['dotplus', [8724]], ['dotsquare', [8865]], ['doublebarwedge', [8966]], ['DoubleContourIntegral', [8751]], ['DoubleDot', [168]], ['DoubleDownArrow', [8659]], ['DoubleLeftArrow', [8656]], ['DoubleLeftRightArrow', [8660]], ['DoubleLeftTee', [10980]], ['DoubleLongLeftArrow', [10232]], ['DoubleLongLeftRightArrow', [10234]], ['DoubleLongRightArrow', [10233]], ['DoubleRightArrow', [8658]], ['DoubleRightTee', [8872]], ['DoubleUpArrow', [8657]], ['DoubleUpDownArrow', [8661]], ['DoubleVerticalBar', [8741]], ['DownArrowBar', [10515]], ['downarrow', [8595]], ['DownArrow', [8595]], ['Downarrow', [8659]], ['DownArrowUpArrow', [8693]], ['DownBreve', [785]], ['downdownarrows', [8650]], ['downharpoonleft', [8643]], ['downharpoonright', [8642]], ['DownLeftRightVector', [10576]], ['DownLeftTeeVector', [10590]], ['DownLeftVectorBar', [10582]], ['DownLeftVector', [8637]], ['DownRightTeeVector', [10591]], ['DownRightVectorBar', [10583]], ['DownRightVector', [8641]], ['DownTeeArrow', [8615]], ['DownTee', [8868]], ['drbkarow', [10512]], ['drcorn', [8991]], ['drcrop', [8972]], ['Dscr', [119967]], ['dscr', [119993]], ['DScy', [1029]], ['dscy', [1109]], ['dsol', [10742]], ['Dstrok', [272]], ['dstrok', [273]], ['dtdot', [8945]], ['dtri', [9663]], ['dtrif', [9662]], ['duarr', [8693]], ['duhar', [10607]], ['dwangle', [10662]], ['DZcy', [1039]], ['dzcy', [1119]], ['dzigrarr', [10239]], ['Eacute', [201]], ['eacute', [233]], ['easter', [10862]], ['Ecaron', [282]], ['ecaron', [283]], ['Ecirc', [202]], ['ecirc', [234]], ['ecir', [8790]], ['ecolon', [8789]], ['Ecy', [1069]], ['ecy', [1101]], ['eDDot', [10871]], ['Edot', [278]], ['edot', [279]], ['eDot', [8785]], ['ee', [8519]], ['efDot', [8786]], ['Efr', [120072]], ['efr', [120098]], ['eg', [10906]], ['Egrave', [200]], ['egrave', [232]], ['egs', [10902]], ['egsdot', [10904]], ['el', [10905]], ['Element', [8712]], ['elinters', [9191]], ['ell', [8467]], ['els', [10901]], ['elsdot', [10903]], ['Emacr', [274]], ['emacr', [275]], ['empty', [8709]], ['emptyset', [8709]], ['EmptySmallSquare', [9723]], ['emptyv', [8709]], ['EmptyVerySmallSquare', [9643]], ['emsp13', [8196]], ['emsp14', [8197]], ['emsp', [8195]], ['ENG', [330]], ['eng', [331]], ['ensp', [8194]], ['Eogon', [280]], ['eogon', [281]], ['Eopf', [120124]], ['eopf', [120150]], ['epar', [8917]], ['eparsl', [10723]], ['eplus', [10865]], ['epsi', [949]], ['Epsilon', [917]], ['epsilon', [949]], ['epsiv', [1013]], ['eqcirc', [8790]], ['eqcolon', [8789]], ['eqsim', [8770]], ['eqslantgtr', [10902]], ['eqslantless', [10901]], ['Equal', [10869]], ['equals', [61]], ['EqualTilde', [8770]], ['equest', [8799]], ['Equilibrium', [8652]], ['equiv', [8801]], ['equivDD', [10872]], ['eqvparsl', [10725]], ['erarr', [10609]], ['erDot', [8787]], ['escr', [8495]], ['Escr', [8496]], ['esdot', [8784]], ['Esim', [10867]], ['esim', [8770]], ['Eta', [919]], ['eta', [951]], ['ETH', [208]], ['eth', [240]], ['Euml', [203]], ['euml', [235]], ['euro', [8364]], ['excl', [33]], ['exist', [8707]], ['Exists', [8707]], ['expectation', [8496]], ['exponentiale', [8519]], ['ExponentialE', [8519]], ['fallingdotseq', [8786]], ['Fcy', [1060]], ['fcy', [1092]], ['female', [9792]], ['ffilig', [64259]], ['fflig', [64256]], ['ffllig', [64260]], ['Ffr', [120073]], ['ffr', [120099]], ['filig', [64257]], ['FilledSmallSquare', [9724]], ['FilledVerySmallSquare', [9642]], ['fjlig', [102, 106]], ['flat', [9837]], ['fllig', [64258]], ['fltns', [9649]], ['fnof', [402]], ['Fopf', [120125]], ['fopf', [120151]], ['forall', [8704]], ['ForAll', [8704]], ['fork', [8916]], ['forkv', [10969]], ['Fouriertrf', [8497]], ['fpartint', [10765]], ['frac12', [189]], ['frac13', [8531]], ['frac14', [188]], ['frac15', [8533]], ['frac16', [8537]], ['frac18', [8539]], ['frac23', [8532]], ['frac25', [8534]], ['frac34', [190]], ['frac35', [8535]], ['frac38', [8540]], ['frac45', [8536]], ['frac56', [8538]], ['frac58', [8541]], ['frac78', [8542]], ['frasl', [8260]], ['frown', [8994]], ['fscr', [119995]], ['Fscr', [8497]], ['gacute', [501]], ['Gamma', [915]], ['gamma', [947]], ['Gammad', [988]], ['gammad', [989]], ['gap', [10886]], ['Gbreve', [286]], ['gbreve', [287]], ['Gcedil', [290]], ['Gcirc', [284]], ['gcirc', [285]], ['Gcy', [1043]], ['gcy', [1075]], ['Gdot', [288]], ['gdot', [289]], ['ge', [8805]], ['gE', [8807]], ['gEl', [10892]], ['gel', [8923]], ['geq', [8805]], ['geqq', [8807]], ['geqslant', [10878]], ['gescc', [10921]], ['ges', [10878]], ['gesdot', [10880]], ['gesdoto', [10882]], ['gesdotol', [10884]], ['gesl', [8923, 65024]], ['gesles', [10900]], ['Gfr', [120074]], ['gfr', [120100]], ['gg', [8811]], ['Gg', [8921]], ['ggg', [8921]], ['gimel', [8503]], ['GJcy', [1027]], ['gjcy', [1107]], ['gla', [10917]], ['gl', [8823]], ['glE', [10898]], ['glj', [10916]], ['gnap', [10890]], ['gnapprox', [10890]], ['gne', [10888]], ['gnE', [8809]], ['gneq', [10888]], ['gneqq', [8809]], ['gnsim', [8935]], ['Gopf', [120126]], ['gopf', [120152]], ['grave', [96]], ['GreaterEqual', [8805]], ['GreaterEqualLess', [8923]], ['GreaterFullEqual', [8807]], ['GreaterGreater', [10914]], ['GreaterLess', [8823]], ['GreaterSlantEqual', [10878]], ['GreaterTilde', [8819]], ['Gscr', [119970]], ['gscr', [8458]], ['gsim', [8819]], ['gsime', [10894]], ['gsiml', [10896]], ['gtcc', [10919]], ['gtcir', [10874]], ['gt', [62]], ['GT', [62]], ['Gt', [8811]], ['gtdot', [8919]], ['gtlPar', [10645]], ['gtquest', [10876]], ['gtrapprox', [10886]], ['gtrarr', [10616]], ['gtrdot', [8919]], ['gtreqless', [8923]], ['gtreqqless', [10892]], ['gtrless', [8823]], ['gtrsim', [8819]], ['gvertneqq', [8809, 65024]], ['gvnE', [8809, 65024]], ['Hacek', [711]], ['hairsp', [8202]], ['half', [189]], ['hamilt', [8459]], ['HARDcy', [1066]], ['hardcy', [1098]], ['harrcir', [10568]], ['harr', [8596]], ['hArr', [8660]], ['harrw', [8621]], ['Hat', [94]], ['hbar', [8463]], ['Hcirc', [292]], ['hcirc', [293]], ['hearts', [9829]], ['heartsuit', [9829]], ['hellip', [8230]], ['hercon', [8889]], ['hfr', [120101]], ['Hfr', [8460]], ['HilbertSpace', [8459]], ['hksearow', [10533]], ['hkswarow', [10534]], ['hoarr', [8703]], ['homtht', [8763]], ['hookleftarrow', [8617]], ['hookrightarrow', [8618]], ['hopf', [120153]], ['Hopf', [8461]], ['horbar', [8213]], ['HorizontalLine', [9472]], ['hscr', [119997]], ['Hscr', [8459]], ['hslash', [8463]], ['Hstrok', [294]], ['hstrok', [295]], ['HumpDownHump', [8782]], ['HumpEqual', [8783]], ['hybull', [8259]], ['hyphen', [8208]], ['Iacute', [205]], ['iacute', [237]], ['ic', [8291]], ['Icirc', [206]], ['icirc', [238]], ['Icy', [1048]], ['icy', [1080]], ['Idot', [304]], ['IEcy', [1045]], ['iecy', [1077]], ['iexcl', [161]], ['iff', [8660]], ['ifr', [120102]], ['Ifr', [8465]], ['Igrave', [204]], ['igrave', [236]], ['ii', [8520]], ['iiiint', [10764]], ['iiint', [8749]], ['iinfin', [10716]], ['iiota', [8489]], ['IJlig', [306]], ['ijlig', [307]], ['Imacr', [298]], ['imacr', [299]], ['image', [8465]], ['ImaginaryI', [8520]], ['imagline', [8464]], ['imagpart', [8465]], ['imath', [305]], ['Im', [8465]], ['imof', [8887]], ['imped', [437]], ['Implies', [8658]], ['incare', [8453]], ['in', [8712]], ['infin', [8734]], ['infintie', [10717]], ['inodot', [305]], ['intcal', [8890]], ['int', [8747]], ['Int', [8748]], ['integers', [8484]], ['Integral', [8747]], ['intercal', [8890]], ['Intersection', [8898]], ['intlarhk', [10775]], ['intprod', [10812]], ['InvisibleComma', [8291]], ['InvisibleTimes', [8290]], ['IOcy', [1025]], ['iocy', [1105]], ['Iogon', [302]], ['iogon', [303]], ['Iopf', [120128]], ['iopf', [120154]], ['Iota', [921]], ['iota', [953]], ['iprod', [10812]], ['iquest', [191]], ['iscr', [119998]], ['Iscr', [8464]], ['isin', [8712]], ['isindot', [8949]], ['isinE', [8953]], ['isins', [8948]], ['isinsv', [8947]], ['isinv', [8712]], ['it', [8290]], ['Itilde', [296]], ['itilde', [297]], ['Iukcy', [1030]], ['iukcy', [1110]], ['Iuml', [207]], ['iuml', [239]], ['Jcirc', [308]], ['jcirc', [309]], ['Jcy', [1049]], ['jcy', [1081]], ['Jfr', [120077]], ['jfr', [120103]], ['jmath', [567]], ['Jopf', [120129]], ['jopf', [120155]], ['Jscr', [119973]], ['jscr', [119999]], ['Jsercy', [1032]], ['jsercy', [1112]], ['Jukcy', [1028]], ['jukcy', [1108]], ['Kappa', [922]], ['kappa', [954]], ['kappav', [1008]], ['Kcedil', [310]], ['kcedil', [311]], ['Kcy', [1050]], ['kcy', [1082]], ['Kfr', [120078]], ['kfr', [120104]], ['kgreen', [312]], ['KHcy', [1061]], ['khcy', [1093]], ['KJcy', [1036]], ['kjcy', [1116]], ['Kopf', [120130]], ['kopf', [120156]], ['Kscr', [119974]], ['kscr', [120000]], ['lAarr', [8666]], ['Lacute', [313]], ['lacute', [314]], ['laemptyv', [10676]], ['lagran', [8466]], ['Lambda', [923]], ['lambda', [955]], ['lang', [10216]], ['Lang', [10218]], ['langd', [10641]], ['langle', [10216]], ['lap', [10885]], ['Laplacetrf', [8466]], ['laquo', [171]], ['larrb', [8676]], ['larrbfs', [10527]], ['larr', [8592]], ['Larr', [8606]], ['lArr', [8656]], ['larrfs', [10525]], ['larrhk', [8617]], ['larrlp', [8619]], ['larrpl', [10553]], ['larrsim', [10611]], ['larrtl', [8610]], ['latail', [10521]], ['lAtail', [10523]], ['lat', [10923]], ['late', [10925]], ['lates', [10925, 65024]], ['lbarr', [10508]], ['lBarr', [10510]], ['lbbrk', [10098]], ['lbrace', [123]], ['lbrack', [91]], ['lbrke', [10635]], ['lbrksld', [10639]], ['lbrkslu', [10637]], ['Lcaron', [317]], ['lcaron', [318]], ['Lcedil', [315]], ['lcedil', [316]], ['lceil', [8968]], ['lcub', [123]], ['Lcy', [1051]], ['lcy', [1083]], ['ldca', [10550]], ['ldquo', [8220]], ['ldquor', [8222]], ['ldrdhar', [10599]], ['ldrushar', [10571]], ['ldsh', [8626]], ['le', [8804]], ['lE', [8806]], ['LeftAngleBracket', [10216]], ['LeftArrowBar', [8676]], ['leftarrow', [8592]], ['LeftArrow', [8592]], ['Leftarrow', [8656]], ['LeftArrowRightArrow', [8646]], ['leftarrowtail', [8610]], ['LeftCeiling', [8968]], ['LeftDoubleBracket', [10214]], ['LeftDownTeeVector', [10593]], ['LeftDownVectorBar', [10585]], ['LeftDownVector', [8643]], ['LeftFloor', [8970]], ['leftharpoondown', [8637]], ['leftharpoonup', [8636]], ['leftleftarrows', [8647]], ['leftrightarrow', [8596]], ['LeftRightArrow', [8596]], ['Leftrightarrow', [8660]], ['leftrightarrows', [8646]], ['leftrightharpoons', [8651]], ['leftrightsquigarrow', [8621]], ['LeftRightVector', [10574]], ['LeftTeeArrow', [8612]], ['LeftTee', [8867]], ['LeftTeeVector', [10586]], ['leftthreetimes', [8907]], ['LeftTriangleBar', [10703]], ['LeftTriangle', [8882]], ['LeftTriangleEqual', [8884]], ['LeftUpDownVector', [10577]], ['LeftUpTeeVector', [10592]], ['LeftUpVectorBar', [10584]], ['LeftUpVector', [8639]], ['LeftVectorBar', [10578]], ['LeftVector', [8636]], ['lEg', [10891]], ['leg', [8922]], ['leq', [8804]], ['leqq', [8806]], ['leqslant', [10877]], ['lescc', [10920]], ['les', [10877]], ['lesdot', [10879]], ['lesdoto', [10881]], ['lesdotor', [10883]], ['lesg', [8922, 65024]], ['lesges', [10899]], ['lessapprox', [10885]], ['lessdot', [8918]], ['lesseqgtr', [8922]], ['lesseqqgtr', [10891]], ['LessEqualGreater', [8922]], ['LessFullEqual', [8806]], ['LessGreater', [8822]], ['lessgtr', [8822]], ['LessLess', [10913]], ['lesssim', [8818]], ['LessSlantEqual', [10877]], ['LessTilde', [8818]], ['lfisht', [10620]], ['lfloor', [8970]], ['Lfr', [120079]], ['lfr', [120105]], ['lg', [8822]], ['lgE', [10897]], ['lHar', [10594]], ['lhard', [8637]], ['lharu', [8636]], ['lharul', [10602]], ['lhblk', [9604]], ['LJcy', [1033]], ['ljcy', [1113]], ['llarr', [8647]], ['ll', [8810]], ['Ll', [8920]], ['llcorner', [8990]], ['Lleftarrow', [8666]], ['llhard', [10603]], ['lltri', [9722]], ['Lmidot', [319]], ['lmidot', [320]], ['lmoustache', [9136]], ['lmoust', [9136]], ['lnap', [10889]], ['lnapprox', [10889]], ['lne', [10887]], ['lnE', [8808]], ['lneq', [10887]], ['lneqq', [8808]], ['lnsim', [8934]], ['loang', [10220]], ['loarr', [8701]], ['lobrk', [10214]], ['longleftarrow', [10229]], ['LongLeftArrow', [10229]], ['Longleftarrow', [10232]], ['longleftrightarrow', [10231]], ['LongLeftRightArrow', [10231]], ['Longleftrightarrow', [10234]], ['longmapsto', [10236]], ['longrightarrow', [10230]], ['LongRightArrow', [10230]], ['Longrightarrow', [10233]], ['looparrowleft', [8619]], ['looparrowright', [8620]], ['lopar', [10629]], ['Lopf', [120131]], ['lopf', [120157]], ['loplus', [10797]], ['lotimes', [10804]], ['lowast', [8727]], ['lowbar', [95]], ['LowerLeftArrow', [8601]], ['LowerRightArrow', [8600]], ['loz', [9674]], ['lozenge', [9674]], ['lozf', [10731]], ['lpar', [40]], ['lparlt', [10643]], ['lrarr', [8646]], ['lrcorner', [8991]], ['lrhar', [8651]], ['lrhard', [10605]], ['lrm', [8206]], ['lrtri', [8895]], ['lsaquo', [8249]], ['lscr', [120001]], ['Lscr', [8466]], ['lsh', [8624]], ['Lsh', [8624]], ['lsim', [8818]], ['lsime', [10893]], ['lsimg', [10895]], ['lsqb', [91]], ['lsquo', [8216]], ['lsquor', [8218]], ['Lstrok', [321]], ['lstrok', [322]], ['ltcc', [10918]], ['ltcir', [10873]], ['lt', [60]], ['LT', [60]], ['Lt', [8810]], ['ltdot', [8918]], ['lthree', [8907]], ['ltimes', [8905]], ['ltlarr', [10614]], ['ltquest', [10875]], ['ltri', [9667]], ['ltrie', [8884]], ['ltrif', [9666]], ['ltrPar', [10646]], ['lurdshar', [10570]], ['luruhar', [10598]], ['lvertneqq', [8808, 65024]], ['lvnE', [8808, 65024]], ['macr', [175]], ['male', [9794]], ['malt', [10016]], ['maltese', [10016]], ['Map', [10501]], ['map', [8614]], ['mapsto', [8614]], ['mapstodown', [8615]], ['mapstoleft', [8612]], ['mapstoup', [8613]], ['marker', [9646]], ['mcomma', [10793]], ['Mcy', [1052]], ['mcy', [1084]], ['mdash', [8212]], ['mDDot', [8762]], ['measuredangle', [8737]], ['MediumSpace', [8287]], ['Mellintrf', [8499]], ['Mfr', [120080]], ['mfr', [120106]], ['mho', [8487]], ['micro', [181]], ['midast', [42]], ['midcir', [10992]], ['mid', [8739]], ['middot', [183]], ['minusb', [8863]], ['minus', [8722]], ['minusd', [8760]], ['minusdu', [10794]], ['MinusPlus', [8723]], ['mlcp', [10971]], ['mldr', [8230]], ['mnplus', [8723]], ['models', [8871]], ['Mopf', [120132]], ['mopf', [120158]], ['mp', [8723]], ['mscr', [120002]], ['Mscr', [8499]], ['mstpos', [8766]], ['Mu', [924]], ['mu', [956]], ['multimap', [8888]], ['mumap', [8888]], ['nabla', [8711]], ['Nacute', [323]], ['nacute', [324]], ['nang', [8736, 8402]], ['nap', [8777]], ['napE', [10864, 824]], ['napid', [8779, 824]], ['napos', [329]], ['napprox', [8777]], ['natural', [9838]], ['naturals', [8469]], ['natur', [9838]], ['nbsp', [160]], ['nbump', [8782, 824]], ['nbumpe', [8783, 824]], ['ncap', [10819]], ['Ncaron', [327]], ['ncaron', [328]], ['Ncedil', [325]], ['ncedil', [326]], ['ncong', [8775]], ['ncongdot', [10861, 824]], ['ncup', [10818]], ['Ncy', [1053]], ['ncy', [1085]], ['ndash', [8211]], ['nearhk', [10532]], ['nearr', [8599]], ['neArr', [8663]], ['nearrow', [8599]], ['ne', [8800]], ['nedot', [8784, 824]], ['NegativeMediumSpace', [8203]], ['NegativeThickSpace', [8203]], ['NegativeThinSpace', [8203]], ['NegativeVeryThinSpace', [8203]], ['nequiv', [8802]], ['nesear', [10536]], ['nesim', [8770, 824]], ['NestedGreaterGreater', [8811]], ['NestedLessLess', [8810]], ['nexist', [8708]], ['nexists', [8708]], ['Nfr', [120081]], ['nfr', [120107]], ['ngE', [8807, 824]], ['nge', [8817]], ['ngeq', [8817]], ['ngeqq', [8807, 824]], ['ngeqslant', [10878, 824]], ['nges', [10878, 824]], ['nGg', [8921, 824]], ['ngsim', [8821]], ['nGt', [8811, 8402]], ['ngt', [8815]], ['ngtr', [8815]], ['nGtv', [8811, 824]], ['nharr', [8622]], ['nhArr', [8654]], ['nhpar', [10994]], ['ni', [8715]], ['nis', [8956]], ['nisd', [8954]], ['niv', [8715]], ['NJcy', [1034]], ['njcy', [1114]], ['nlarr', [8602]], ['nlArr', [8653]], ['nldr', [8229]], ['nlE', [8806, 824]], ['nle', [8816]], ['nleftarrow', [8602]], ['nLeftarrow', [8653]], ['nleftrightarrow', [8622]], ['nLeftrightarrow', [8654]], ['nleq', [8816]], ['nleqq', [8806, 824]], ['nleqslant', [10877, 824]], ['nles', [10877, 824]], ['nless', [8814]], ['nLl', [8920, 824]], ['nlsim', [8820]], ['nLt', [8810, 8402]], ['nlt', [8814]], ['nltri', [8938]], ['nltrie', [8940]], ['nLtv', [8810, 824]], ['nmid', [8740]], ['NoBreak', [8288]], ['NonBreakingSpace', [160]], ['nopf', [120159]], ['Nopf', [8469]], ['Not', [10988]], ['not', [172]], ['NotCongruent', [8802]], ['NotCupCap', [8813]], ['NotDoubleVerticalBar', [8742]], ['NotElement', [8713]], ['NotEqual', [8800]], ['NotEqualTilde', [8770, 824]], ['NotExists', [8708]], ['NotGreater', [8815]], ['NotGreaterEqual', [8817]], ['NotGreaterFullEqual', [8807, 824]], ['NotGreaterGreater', [8811, 824]], ['NotGreaterLess', [8825]], ['NotGreaterSlantEqual', [10878, 824]], ['NotGreaterTilde', [8821]], ['NotHumpDownHump', [8782, 824]], ['NotHumpEqual', [8783, 824]], ['notin', [8713]], ['notindot', [8949, 824]], ['notinE', [8953, 824]], ['notinva', [8713]], ['notinvb', [8951]], ['notinvc', [8950]], ['NotLeftTriangleBar', [10703, 824]], ['NotLeftTriangle', [8938]], ['NotLeftTriangleEqual', [8940]], ['NotLess', [8814]], ['NotLessEqual', [8816]], ['NotLessGreater', [8824]], ['NotLessLess', [8810, 824]], ['NotLessSlantEqual', [10877, 824]], ['NotLessTilde', [8820]], ['NotNestedGreaterGreater', [10914, 824]], ['NotNestedLessLess', [10913, 824]], ['notni', [8716]], ['notniva', [8716]], ['notnivb', [8958]], ['notnivc', [8957]], ['NotPrecedes', [8832]], ['NotPrecedesEqual', [10927, 824]], ['NotPrecedesSlantEqual', [8928]], ['NotReverseElement', [8716]], ['NotRightTriangleBar', [10704, 824]], ['NotRightTriangle', [8939]], ['NotRightTriangleEqual', [8941]], ['NotSquareSubset', [8847, 824]], ['NotSquareSubsetEqual', [8930]], ['NotSquareSuperset', [8848, 824]], ['NotSquareSupersetEqual', [8931]], ['NotSubset', [8834, 8402]], ['NotSubsetEqual', [8840]], ['NotSucceeds', [8833]], ['NotSucceedsEqual', [10928, 824]], ['NotSucceedsSlantEqual', [8929]], ['NotSucceedsTilde', [8831, 824]], ['NotSuperset', [8835, 8402]], ['NotSupersetEqual', [8841]], ['NotTilde', [8769]], ['NotTildeEqual', [8772]], ['NotTildeFullEqual', [8775]], ['NotTildeTilde', [8777]], ['NotVerticalBar', [8740]], ['nparallel', [8742]], ['npar', [8742]], ['nparsl', [11005, 8421]], ['npart', [8706, 824]], ['npolint', [10772]], ['npr', [8832]], ['nprcue', [8928]], ['nprec', [8832]], ['npreceq', [10927, 824]], ['npre', [10927, 824]], ['nrarrc', [10547, 824]], ['nrarr', [8603]], ['nrArr', [8655]], ['nrarrw', [8605, 824]], ['nrightarrow', [8603]], ['nRightarrow', [8655]], ['nrtri', [8939]], ['nrtrie', [8941]], ['nsc', [8833]], ['nsccue', [8929]], ['nsce', [10928, 824]], ['Nscr', [119977]], ['nscr', [120003]], ['nshortmid', [8740]], ['nshortparallel', [8742]], ['nsim', [8769]], ['nsime', [8772]], ['nsimeq', [8772]], ['nsmid', [8740]], ['nspar', [8742]], ['nsqsube', [8930]], ['nsqsupe', [8931]], ['nsub', [8836]], ['nsubE', [10949, 824]], ['nsube', [8840]], ['nsubset', [8834, 8402]], ['nsubseteq', [8840]], ['nsubseteqq', [10949, 824]], ['nsucc', [8833]], ['nsucceq', [10928, 824]], ['nsup', [8837]], ['nsupE', [10950, 824]], ['nsupe', [8841]], ['nsupset', [8835, 8402]], ['nsupseteq', [8841]], ['nsupseteqq', [10950, 824]], ['ntgl', [8825]], ['Ntilde', [209]], ['ntilde', [241]], ['ntlg', [8824]], ['ntriangleleft', [8938]], ['ntrianglelefteq', [8940]], ['ntriangleright', [8939]], ['ntrianglerighteq', [8941]], ['Nu', [925]], ['nu', [957]], ['num', [35]], ['numero', [8470]], ['numsp', [8199]], ['nvap', [8781, 8402]], ['nvdash', [8876]], ['nvDash', [8877]], ['nVdash', [8878]], ['nVDash', [8879]], ['nvge', [8805, 8402]], ['nvgt', [62, 8402]], ['nvHarr', [10500]], ['nvinfin', [10718]], ['nvlArr', [10498]], ['nvle', [8804, 8402]], ['nvlt', [60, 8402]], ['nvltrie', [8884, 8402]], ['nvrArr', [10499]], ['nvrtrie', [8885, 8402]], ['nvsim', [8764, 8402]], ['nwarhk', [10531]], ['nwarr', [8598]], ['nwArr', [8662]], ['nwarrow', [8598]], ['nwnear', [10535]], ['Oacute', [211]], ['oacute', [243]], ['oast', [8859]], ['Ocirc', [212]], ['ocirc', [244]], ['ocir', [8858]], ['Ocy', [1054]], ['ocy', [1086]], ['odash', [8861]], ['Odblac', [336]], ['odblac', [337]], ['odiv', [10808]], ['odot', [8857]], ['odsold', [10684]], ['OElig', [338]], ['oelig', [339]], ['ofcir', [10687]], ['Ofr', [120082]], ['ofr', [120108]], ['ogon', [731]], ['Ograve', [210]], ['ograve', [242]], ['ogt', [10689]], ['ohbar', [10677]], ['ohm', [937]], ['oint', [8750]], ['olarr', [8634]], ['olcir', [10686]], ['olcross', [10683]], ['oline', [8254]], ['olt', [10688]], ['Omacr', [332]], ['omacr', [333]], ['Omega', [937]], ['omega', [969]], ['Omicron', [927]], ['omicron', [959]], ['omid', [10678]], ['ominus', [8854]], ['Oopf', [120134]], ['oopf', [120160]], ['opar', [10679]], ['OpenCurlyDoubleQuote', [8220]], ['OpenCurlyQuote', [8216]], ['operp', [10681]], ['oplus', [8853]], ['orarr', [8635]], ['Or', [10836]], ['or', [8744]], ['ord', [10845]], ['order', [8500]], ['orderof', [8500]], ['ordf', [170]], ['ordm', [186]], ['origof', [8886]], ['oror', [10838]], ['orslope', [10839]], ['orv', [10843]], ['oS', [9416]], ['Oscr', [119978]], ['oscr', [8500]], ['Oslash', [216]], ['oslash', [248]], ['osol', [8856]], ['Otilde', [213]], ['otilde', [245]], ['otimesas', [10806]], ['Otimes', [10807]], ['otimes', [8855]], ['Ouml', [214]], ['ouml', [246]], ['ovbar', [9021]], ['OverBar', [8254]], ['OverBrace', [9182]], ['OverBracket', [9140]], ['OverParenthesis', [9180]], ['para', [182]], ['parallel', [8741]], ['par', [8741]], ['parsim', [10995]], ['parsl', [11005]], ['part', [8706]], ['PartialD', [8706]], ['Pcy', [1055]], ['pcy', [1087]], ['percnt', [37]], ['period', [46]], ['permil', [8240]], ['perp', [8869]], ['pertenk', [8241]], ['Pfr', [120083]], ['pfr', [120109]], ['Phi', [934]], ['phi', [966]], ['phiv', [981]], ['phmmat', [8499]], ['phone', [9742]], ['Pi', [928]], ['pi', [960]], ['pitchfork', [8916]], ['piv', [982]], ['planck', [8463]], ['planckh', [8462]], ['plankv', [8463]], ['plusacir', [10787]], ['plusb', [8862]], ['pluscir', [10786]], ['plus', [43]], ['plusdo', [8724]], ['plusdu', [10789]], ['pluse', [10866]], ['PlusMinus', [177]], ['plusmn', [177]], ['plussim', [10790]], ['plustwo', [10791]], ['pm', [177]], ['Poincareplane', [8460]], ['pointint', [10773]], ['popf', [120161]], ['Popf', [8473]], ['pound', [163]], ['prap', [10935]], ['Pr', [10939]], ['pr', [8826]], ['prcue', [8828]], ['precapprox', [10935]], ['prec', [8826]], ['preccurlyeq', [8828]], ['Precedes', [8826]], ['PrecedesEqual', [10927]], ['PrecedesSlantEqual', [8828]], ['PrecedesTilde', [8830]], ['preceq', [10927]], ['precnapprox', [10937]], ['precneqq', [10933]], ['precnsim', [8936]], ['pre', [10927]], ['prE', [10931]], ['precsim', [8830]], ['prime', [8242]], ['Prime', [8243]], ['primes', [8473]], ['prnap', [10937]], ['prnE', [10933]], ['prnsim', [8936]], ['prod', [8719]], ['Product', [8719]], ['profalar', [9006]], ['profline', [8978]], ['profsurf', [8979]], ['prop', [8733]], ['Proportional', [8733]], ['Proportion', [8759]], ['propto', [8733]], ['prsim', [8830]], ['prurel', [8880]], ['Pscr', [119979]], ['pscr', [120005]], ['Psi', [936]], ['psi', [968]], ['puncsp', [8200]], ['Qfr', [120084]], ['qfr', [120110]], ['qint', [10764]], ['qopf', [120162]], ['Qopf', [8474]], ['qprime', [8279]], ['Qscr', [119980]], ['qscr', [120006]], ['quaternions', [8461]], ['quatint', [10774]], ['quest', [63]], ['questeq', [8799]], ['quot', [34]], ['QUOT', [34]], ['rAarr', [8667]], ['race', [8765, 817]], ['Racute', [340]], ['racute', [341]], ['radic', [8730]], ['raemptyv', [10675]], ['rang', [10217]], ['Rang', [10219]], ['rangd', [10642]], ['range', [10661]], ['rangle', [10217]], ['raquo', [187]], ['rarrap', [10613]], ['rarrb', [8677]], ['rarrbfs', [10528]], ['rarrc', [10547]], ['rarr', [8594]], ['Rarr', [8608]], ['rArr', [8658]], ['rarrfs', [10526]], ['rarrhk', [8618]], ['rarrlp', [8620]], ['rarrpl', [10565]], ['rarrsim', [10612]], ['Rarrtl', [10518]], ['rarrtl', [8611]], ['rarrw', [8605]], ['ratail', [10522]], ['rAtail', [10524]], ['ratio', [8758]], ['rationals', [8474]], ['rbarr', [10509]], ['rBarr', [10511]], ['RBarr', [10512]], ['rbbrk', [10099]], ['rbrace', [125]], ['rbrack', [93]], ['rbrke', [10636]], ['rbrksld', [10638]], ['rbrkslu', [10640]], ['Rcaron', [344]], ['rcaron', [345]], ['Rcedil', [342]], ['rcedil', [343]], ['rceil', [8969]], ['rcub', [125]], ['Rcy', [1056]], ['rcy', [1088]], ['rdca', [10551]], ['rdldhar', [10601]], ['rdquo', [8221]], ['rdquor', [8221]], ['CloseCurlyDoubleQuote', [8221]], ['rdsh', [8627]], ['real', [8476]], ['realine', [8475]], ['realpart', [8476]], ['reals', [8477]], ['Re', [8476]], ['rect', [9645]], ['reg', [174]], ['REG', [174]], ['ReverseElement', [8715]], ['ReverseEquilibrium', [8651]], ['ReverseUpEquilibrium', [10607]], ['rfisht', [10621]], ['rfloor', [8971]], ['rfr', [120111]], ['Rfr', [8476]], ['rHar', [10596]], ['rhard', [8641]], ['rharu', [8640]], ['rharul', [10604]], ['Rho', [929]], ['rho', [961]], ['rhov', [1009]], ['RightAngleBracket', [10217]], ['RightArrowBar', [8677]], ['rightarrow', [8594]], ['RightArrow', [8594]], ['Rightarrow', [8658]], ['RightArrowLeftArrow', [8644]], ['rightarrowtail', [8611]], ['RightCeiling', [8969]], ['RightDoubleBracket', [10215]], ['RightDownTeeVector', [10589]], ['RightDownVectorBar', [10581]], ['RightDownVector', [8642]], ['RightFloor', [8971]], ['rightharpoondown', [8641]], ['rightharpoonup', [8640]], ['rightleftarrows', [8644]], ['rightleftharpoons', [8652]], ['rightrightarrows', [8649]], ['rightsquigarrow', [8605]], ['RightTeeArrow', [8614]], ['RightTee', [8866]], ['RightTeeVector', [10587]], ['rightthreetimes', [8908]], ['RightTriangleBar', [10704]], ['RightTriangle', [8883]], ['RightTriangleEqual', [8885]], ['RightUpDownVector', [10575]], ['RightUpTeeVector', [10588]], ['RightUpVectorBar', [10580]], ['RightUpVector', [8638]], ['RightVectorBar', [10579]], ['RightVector', [8640]], ['ring', [730]], ['risingdotseq', [8787]], ['rlarr', [8644]], ['rlhar', [8652]], ['rlm', [8207]], ['rmoustache', [9137]], ['rmoust', [9137]], ['rnmid', [10990]], ['roang', [10221]], ['roarr', [8702]], ['robrk', [10215]], ['ropar', [10630]], ['ropf', [120163]], ['Ropf', [8477]], ['roplus', [10798]], ['rotimes', [10805]], ['RoundImplies', [10608]], ['rpar', [41]], ['rpargt', [10644]], ['rppolint', [10770]], ['rrarr', [8649]], ['Rrightarrow', [8667]], ['rsaquo', [8250]], ['rscr', [120007]], ['Rscr', [8475]], ['rsh', [8625]], ['Rsh', [8625]], ['rsqb', [93]], ['rsquo', [8217]], ['rsquor', [8217]], ['CloseCurlyQuote', [8217]], ['rthree', [8908]], ['rtimes', [8906]], ['rtri', [9657]], ['rtrie', [8885]], ['rtrif', [9656]], ['rtriltri', [10702]], ['RuleDelayed', [10740]], ['ruluhar', [10600]], ['rx', [8478]], ['Sacute', [346]], ['sacute', [347]], ['sbquo', [8218]], ['scap', [10936]], ['Scaron', [352]], ['scaron', [353]], ['Sc', [10940]], ['sc', [8827]], ['sccue', [8829]], ['sce', [10928]], ['scE', [10932]], ['Scedil', [350]], ['scedil', [351]], ['Scirc', [348]], ['scirc', [349]], ['scnap', [10938]], ['scnE', [10934]], ['scnsim', [8937]], ['scpolint', [10771]], ['scsim', [8831]], ['Scy', [1057]], ['scy', [1089]], ['sdotb', [8865]], ['sdot', [8901]], ['sdote', [10854]], ['searhk', [10533]], ['searr', [8600]], ['seArr', [8664]], ['searrow', [8600]], ['sect', [167]], ['semi', [59]], ['seswar', [10537]], ['setminus', [8726]], ['setmn', [8726]], ['sext', [10038]], ['Sfr', [120086]], ['sfr', [120112]], ['sfrown', [8994]], ['sharp', [9839]], ['SHCHcy', [1065]], ['shchcy', [1097]], ['SHcy', [1064]], ['shcy', [1096]], ['ShortDownArrow', [8595]], ['ShortLeftArrow', [8592]], ['shortmid', [8739]], ['shortparallel', [8741]], ['ShortRightArrow', [8594]], ['ShortUpArrow', [8593]], ['shy', [173]], ['Sigma', [931]], ['sigma', [963]], ['sigmaf', [962]], ['sigmav', [962]], ['sim', [8764]], ['simdot', [10858]], ['sime', [8771]], ['simeq', [8771]], ['simg', [10910]], ['simgE', [10912]], ['siml', [10909]], ['simlE', [10911]], ['simne', [8774]], ['simplus', [10788]], ['simrarr', [10610]], ['slarr', [8592]], ['SmallCircle', [8728]], ['smallsetminus', [8726]], ['smashp', [10803]], ['smeparsl', [10724]], ['smid', [8739]], ['smile', [8995]], ['smt', [10922]], ['smte', [10924]], ['smtes', [10924, 65024]], ['SOFTcy', [1068]], ['softcy', [1100]], ['solbar', [9023]], ['solb', [10692]], ['sol', [47]], ['Sopf', [120138]], ['sopf', [120164]], ['spades', [9824]], ['spadesuit', [9824]], ['spar', [8741]], ['sqcap', [8851]], ['sqcaps', [8851, 65024]], ['sqcup', [8852]], ['sqcups', [8852, 65024]], ['Sqrt', [8730]], ['sqsub', [8847]], ['sqsube', [8849]], ['sqsubset', [8847]], ['sqsubseteq', [8849]], ['sqsup', [8848]], ['sqsupe', [8850]], ['sqsupset', [8848]], ['sqsupseteq', [8850]], ['square', [9633]], ['Square', [9633]], ['SquareIntersection', [8851]], ['SquareSubset', [8847]], ['SquareSubsetEqual', [8849]], ['SquareSuperset', [8848]], ['SquareSupersetEqual', [8850]], ['SquareUnion', [8852]], ['squarf', [9642]], ['squ', [9633]], ['squf', [9642]], ['srarr', [8594]], ['Sscr', [119982]], ['sscr', [120008]], ['ssetmn', [8726]], ['ssmile', [8995]], ['sstarf', [8902]], ['Star', [8902]], ['star', [9734]], ['starf', [9733]], ['straightepsilon', [1013]], ['straightphi', [981]], ['strns', [175]], ['sub', [8834]], ['Sub', [8912]], ['subdot', [10941]], ['subE', [10949]], ['sube', [8838]], ['subedot', [10947]], ['submult', [10945]], ['subnE', [10955]], ['subne', [8842]], ['subplus', [10943]], ['subrarr', [10617]], ['subset', [8834]], ['Subset', [8912]], ['subseteq', [8838]], ['subseteqq', [10949]], ['SubsetEqual', [8838]], ['subsetneq', [8842]], ['subsetneqq', [10955]], ['subsim', [10951]], ['subsub', [10965]], ['subsup', [10963]], ['succapprox', [10936]], ['succ', [8827]], ['succcurlyeq', [8829]], ['Succeeds', [8827]], ['SucceedsEqual', [10928]], ['SucceedsSlantEqual', [8829]], ['SucceedsTilde', [8831]], ['succeq', [10928]], ['succnapprox', [10938]], ['succneqq', [10934]], ['succnsim', [8937]], ['succsim', [8831]], ['SuchThat', [8715]], ['sum', [8721]], ['Sum', [8721]], ['sung', [9834]], ['sup1', [185]], ['sup2', [178]], ['sup3', [179]], ['sup', [8835]], ['Sup', [8913]], ['supdot', [10942]], ['supdsub', [10968]], ['supE', [10950]], ['supe', [8839]], ['supedot', [10948]], ['Superset', [8835]], ['SupersetEqual', [8839]], ['suphsol', [10185]], ['suphsub', [10967]], ['suplarr', [10619]], ['supmult', [10946]], ['supnE', [10956]], ['supne', [8843]], ['supplus', [10944]], ['supset', [8835]], ['Supset', [8913]], ['supseteq', [8839]], ['supseteqq', [10950]], ['supsetneq', [8843]], ['supsetneqq', [10956]], ['supsim', [10952]], ['supsub', [10964]], ['supsup', [10966]], ['swarhk', [10534]], ['swarr', [8601]], ['swArr', [8665]], ['swarrow', [8601]], ['swnwar', [10538]], ['szlig', [223]], ['Tab', [9]], ['target', [8982]], ['Tau', [932]], ['tau', [964]], ['tbrk', [9140]], ['Tcaron', [356]], ['tcaron', [357]], ['Tcedil', [354]], ['tcedil', [355]], ['Tcy', [1058]], ['tcy', [1090]], ['tdot', [8411]], ['telrec', [8981]], ['Tfr', [120087]], ['tfr', [120113]], ['there4', [8756]], ['therefore', [8756]], ['Therefore', [8756]], ['Theta', [920]], ['theta', [952]], ['thetasym', [977]], ['thetav', [977]], ['thickapprox', [8776]], ['thicksim', [8764]], ['ThickSpace', [8287, 8202]], ['ThinSpace', [8201]], ['thinsp', [8201]], ['thkap', [8776]], ['thksim', [8764]], ['THORN', [222]], ['thorn', [254]], ['tilde', [732]], ['Tilde', [8764]], ['TildeEqual', [8771]], ['TildeFullEqual', [8773]], ['TildeTilde', [8776]], ['timesbar', [10801]], ['timesb', [8864]], ['times', [215]], ['timesd', [10800]], ['tint', [8749]], ['toea', [10536]], ['topbot', [9014]], ['topcir', [10993]], ['top', [8868]], ['Topf', [120139]], ['topf', [120165]], ['topfork', [10970]], ['tosa', [10537]], ['tprime', [8244]], ['trade', [8482]], ['TRADE', [8482]], ['triangle', [9653]], ['triangledown', [9663]], ['triangleleft', [9667]], ['trianglelefteq', [8884]], ['triangleq', [8796]], ['triangleright', [9657]], ['trianglerighteq', [8885]], ['tridot', [9708]], ['trie', [8796]], ['triminus', [10810]], ['TripleDot', [8411]], ['triplus', [10809]], ['trisb', [10701]], ['tritime', [10811]], ['trpezium', [9186]], ['Tscr', [119983]], ['tscr', [120009]], ['TScy', [1062]], ['tscy', [1094]], ['TSHcy', [1035]], ['tshcy', [1115]], ['Tstrok', [358]], ['tstrok', [359]], ['twixt', [8812]], ['twoheadleftarrow', [8606]], ['twoheadrightarrow', [8608]], ['Uacute', [218]], ['uacute', [250]], ['uarr', [8593]], ['Uarr', [8607]], ['uArr', [8657]], ['Uarrocir', [10569]], ['Ubrcy', [1038]], ['ubrcy', [1118]], ['Ubreve', [364]], ['ubreve', [365]], ['Ucirc', [219]], ['ucirc', [251]], ['Ucy', [1059]], ['ucy', [1091]], ['udarr', [8645]], ['Udblac', [368]], ['udblac', [369]], ['udhar', [10606]], ['ufisht', [10622]], ['Ufr', [120088]], ['ufr', [120114]], ['Ugrave', [217]], ['ugrave', [249]], ['uHar', [10595]], ['uharl', [8639]], ['uharr', [8638]], ['uhblk', [9600]], ['ulcorn', [8988]], ['ulcorner', [8988]], ['ulcrop', [8975]], ['ultri', [9720]], ['Umacr', [362]], ['umacr', [363]], ['uml', [168]], ['UnderBar', [95]], ['UnderBrace', [9183]], ['UnderBracket', [9141]], ['UnderParenthesis', [9181]], ['Union', [8899]], ['UnionPlus', [8846]], ['Uogon', [370]], ['uogon', [371]], ['Uopf', [120140]], ['uopf', [120166]], ['UpArrowBar', [10514]], ['uparrow', [8593]], ['UpArrow', [8593]], ['Uparrow', [8657]], ['UpArrowDownArrow', [8645]], ['updownarrow', [8597]], ['UpDownArrow', [8597]], ['Updownarrow', [8661]], ['UpEquilibrium', [10606]], ['upharpoonleft', [8639]], ['upharpoonright', [8638]], ['uplus', [8846]], ['UpperLeftArrow', [8598]], ['UpperRightArrow', [8599]], ['upsi', [965]], ['Upsi', [978]], ['upsih', [978]], ['Upsilon', [933]], ['upsilon', [965]], ['UpTeeArrow', [8613]], ['UpTee', [8869]], ['upuparrows', [8648]], ['urcorn', [8989]], ['urcorner', [8989]], ['urcrop', [8974]], ['Uring', [366]], ['uring', [367]], ['urtri', [9721]], ['Uscr', [119984]], ['uscr', [120010]], ['utdot', [8944]], ['Utilde', [360]], ['utilde', [361]], ['utri', [9653]], ['utrif', [9652]], ['uuarr', [8648]], ['Uuml', [220]], ['uuml', [252]], ['uwangle', [10663]], ['vangrt', [10652]], ['varepsilon', [1013]], ['varkappa', [1008]], ['varnothing', [8709]], ['varphi', [981]], ['varpi', [982]], ['varpropto', [8733]], ['varr', [8597]], ['vArr', [8661]], ['varrho', [1009]], ['varsigma', [962]], ['varsubsetneq', [8842, 65024]], ['varsubsetneqq', [10955, 65024]], ['varsupsetneq', [8843, 65024]], ['varsupsetneqq', [10956, 65024]], ['vartheta', [977]], ['vartriangleleft', [8882]], ['vartriangleright', [8883]], ['vBar', [10984]], ['Vbar', [10987]], ['vBarv', [10985]], ['Vcy', [1042]], ['vcy', [1074]], ['vdash', [8866]], ['vDash', [8872]], ['Vdash', [8873]], ['VDash', [8875]], ['Vdashl', [10982]], ['veebar', [8891]], ['vee', [8744]], ['Vee', [8897]], ['veeeq', [8794]], ['vellip', [8942]], ['verbar', [124]], ['Verbar', [8214]], ['vert', [124]], ['Vert', [8214]], ['VerticalBar', [8739]], ['VerticalLine', [124]], ['VerticalSeparator', [10072]], ['VerticalTilde', [8768]], ['VeryThinSpace', [8202]], ['Vfr', [120089]], ['vfr', [120115]], ['vltri', [8882]], ['vnsub', [8834, 8402]], ['vnsup', [8835, 8402]], ['Vopf', [120141]], ['vopf', [120167]], ['vprop', [8733]], ['vrtri', [8883]], ['Vscr', [119985]], ['vscr', [120011]], ['vsubnE', [10955, 65024]], ['vsubne', [8842, 65024]], ['vsupnE', [10956, 65024]], ['vsupne', [8843, 65024]], ['Vvdash', [8874]], ['vzigzag', [10650]], ['Wcirc', [372]], ['wcirc', [373]], ['wedbar', [10847]], ['wedge', [8743]], ['Wedge', [8896]], ['wedgeq', [8793]], ['weierp', [8472]], ['Wfr', [120090]], ['wfr', [120116]], ['Wopf', [120142]], ['wopf', [120168]], ['wp', [8472]], ['wr', [8768]], ['wreath', [8768]], ['Wscr', [119986]], ['wscr', [120012]], ['xcap', [8898]], ['xcirc', [9711]], ['xcup', [8899]], ['xdtri', [9661]], ['Xfr', [120091]], ['xfr', [120117]], ['xharr', [10231]], ['xhArr', [10234]], ['Xi', [926]], ['xi', [958]], ['xlarr', [10229]], ['xlArr', [10232]], ['xmap', [10236]], ['xnis', [8955]], ['xodot', [10752]], ['Xopf', [120143]], ['xopf', [120169]], ['xoplus', [10753]], ['xotime', [10754]], ['xrarr', [10230]], ['xrArr', [10233]], ['Xscr', [119987]], ['xscr', [120013]], ['xsqcup', [10758]], ['xuplus', [10756]], ['xutri', [9651]], ['xvee', [8897]], ['xwedge', [8896]], ['Yacute', [221]], ['yacute', [253]], ['YAcy', [1071]], ['yacy', [1103]], ['Ycirc', [374]], ['ycirc', [375]], ['Ycy', [1067]], ['ycy', [1099]], ['yen', [165]], ['Yfr', [120092]], ['yfr', [120118]], ['YIcy', [1031]], ['yicy', [1111]], ['Yopf', [120144]], ['yopf', [120170]], ['Yscr', [119988]], ['yscr', [120014]], ['YUcy', [1070]], ['yucy', [1102]], ['yuml', [255]], ['Yuml', [376]], ['Zacute', [377]], ['zacute', [378]], ['Zcaron', [381]], ['zcaron', [382]], ['Zcy', [1047]], ['zcy', [1079]], ['Zdot', [379]], ['zdot', [380]], ['zeetrf', [8488]], ['ZeroWidthSpace', [8203]], ['Zeta', [918]], ['zeta', [950]], ['zfr', [120119]], ['Zfr', [8488]], ['ZHcy', [1046]], ['zhcy', [1078]], ['zigrarr', [8669]], ['zopf', [120171]], ['Zopf', [8484]], ['Zscr', [119989]], ['zscr', [120015]], ['zwj', [8205]], ['zwnj', [8204]]];
2059var alphaIndex = {};
2060var charIndex = {};
2061createIndexes(alphaIndex, charIndex);
2062/**
2063 * @constructor
2064 */
2065
2066function Html5Entities() {}
2067/**
2068 * @param {String} str
2069 * @returns {String}
2070 */
2071
2072
2073Html5Entities.prototype.decode = function (str) {
2074 if (!str || !str.length) {
2075 return '';
2076 }
2077
2078 return str.replace(/&(#?[\w\d]+);?/g, function (s, entity) {
2079 var chr;
2080
2081 if (entity.charAt(0) === "#") {
2082 var code = entity.charAt(1) === 'x' ? parseInt(entity.substr(2).toLowerCase(), 16) : parseInt(entity.substr(1));
2083
2084 if (!(isNaN(code) || code < -32768 || code > 65535)) {
2085 chr = String.fromCharCode(code);
2086 }
2087 } else {
2088 chr = alphaIndex[entity];
2089 }
2090
2091 return chr || s;
2092 });
2093};
2094/**
2095 * @param {String} str
2096 * @returns {String}
2097 */
2098
2099
2100Html5Entities.decode = function (str) {
2101 return new Html5Entities().decode(str);
2102};
2103/**
2104 * @param {String} str
2105 * @returns {String}
2106 */
2107
2108
2109Html5Entities.prototype.encode = function (str) {
2110 if (!str || !str.length) {
2111 return '';
2112 }
2113
2114 var strLength = str.length;
2115 var result = '';
2116 var i = 0;
2117
2118 while (i < strLength) {
2119 var charInfo = charIndex[str.charCodeAt(i)];
2120
2121 if (charInfo) {
2122 var alpha = charInfo[str.charCodeAt(i + 1)];
2123
2124 if (alpha) {
2125 i++;
2126 } else {
2127 alpha = charInfo[''];
2128 }
2129
2130 if (alpha) {
2131 result += "&" + alpha + ";";
2132 i++;
2133 continue;
2134 }
2135 }
2136
2137 result += str.charAt(i);
2138 i++;
2139 }
2140
2141 return result;
2142};
2143/**
2144 * @param {String} str
2145 * @returns {String}
2146 */
2147
2148
2149Html5Entities.encode = function (str) {
2150 return new Html5Entities().encode(str);
2151};
2152/**
2153 * @param {String} str
2154 * @returns {String}
2155 */
2156
2157
2158Html5Entities.prototype.encodeNonUTF = function (str) {
2159 if (!str || !str.length) {
2160 return '';
2161 }
2162
2163 var strLength = str.length;
2164 var result = '';
2165 var i = 0;
2166
2167 while (i < strLength) {
2168 var c = str.charCodeAt(i);
2169 var charInfo = charIndex[c];
2170
2171 if (charInfo) {
2172 var alpha = charInfo[str.charCodeAt(i + 1)];
2173
2174 if (alpha) {
2175 i++;
2176 } else {
2177 alpha = charInfo[''];
2178 }
2179
2180 if (alpha) {
2181 result += "&" + alpha + ";";
2182 i++;
2183 continue;
2184 }
2185 }
2186
2187 if (c < 32 || c > 126) {
2188 result += '&#' + c + ';';
2189 } else {
2190 result += str.charAt(i);
2191 }
2192
2193 i++;
2194 }
2195
2196 return result;
2197};
2198/**
2199 * @param {String} str
2200 * @returns {String}
2201 */
2202
2203
2204Html5Entities.encodeNonUTF = function (str) {
2205 return new Html5Entities().encodeNonUTF(str);
2206};
2207/**
2208 * @param {String} str
2209 * @returns {String}
2210 */
2211
2212
2213Html5Entities.prototype.encodeNonASCII = function (str) {
2214 if (!str || !str.length) {
2215 return '';
2216 }
2217
2218 var strLength = str.length;
2219 var result = '';
2220 var i = 0;
2221
2222 while (i < strLength) {
2223 var c = str.charCodeAt(i);
2224
2225 if (c <= 255) {
2226 result += str[i++];
2227 continue;
2228 }
2229
2230 result += '&#' + c + ';';
2231 i++;
2232 }
2233
2234 return result;
2235};
2236/**
2237 * @param {String} str
2238 * @returns {String}
2239 */
2240
2241
2242Html5Entities.encodeNonASCII = function (str) {
2243 return new Html5Entities().encodeNonASCII(str);
2244};
2245/**
2246 * @param {Object} alphaIndex Passed by reference.
2247 * @param {Object} charIndex Passed by reference.
2248 */
2249
2250
2251function createIndexes(alphaIndex, charIndex) {
2252 var i = ENTITIES.length;
2253 var _results = [];
2254
2255 while (i--) {
2256 var e = ENTITIES[i];
2257 var alpha = e[0];
2258 var chars = e[1];
2259 var chr = chars[0];
2260 var addChar = chr < 32 || chr > 126 || chr === 62 || chr === 60 || chr === 38 || chr === 34 || chr === 39;
2261 var charInfo;
2262
2263 if (addChar) {
2264 charInfo = charIndex[chr] = charIndex[chr] || {};
2265 }
2266
2267 if (chars[1]) {
2268 var chr2 = chars[1];
2269 alphaIndex[alpha] = String.fromCharCode(chr) + String.fromCharCode(chr2);
2270
2271 _results.push(addChar && (charInfo[chr2] = alpha));
2272 } else {
2273 alphaIndex[alpha] = String.fromCharCode(chr);
2274
2275 _results.push(addChar && (charInfo[''] = alpha));
2276 }
2277 }
2278}
2279
2280module.exports = Html5Entities;
2281
2282/***/ }),
2283
2284/***/ "./node_modules/html-entities/lib/xml-entities.js":
2285/*!********************************************************!*\
2286 !*** ./node_modules/html-entities/lib/xml-entities.js ***!
2287 \********************************************************/
2288/*! no static exports found */
2289/*! all exports used */
2290/***/ (function(module, exports) {
2291
2292var ALPHA_INDEX = {
2293 '&lt': '<',
2294 '&gt': '>',
2295 '&quot': '"',
2296 '&apos': '\'',
2297 '&amp': '&',
2298 '&lt;': '<',
2299 '&gt;': '>',
2300 '&quot;': '"',
2301 '&apos;': '\'',
2302 '&amp;': '&'
2303};
2304var CHAR_INDEX = {
2305 60: 'lt',
2306 62: 'gt',
2307 34: 'quot',
2308 39: 'apos',
2309 38: 'amp'
2310};
2311var CHAR_S_INDEX = {
2312 '<': '&lt;',
2313 '>': '&gt;',
2314 '"': '&quot;',
2315 '\'': '&apos;',
2316 '&': '&amp;'
2317};
2318/**
2319 * @constructor
2320 */
2321
2322function XmlEntities() {}
2323/**
2324 * @param {String} str
2325 * @returns {String}
2326 */
2327
2328
2329XmlEntities.prototype.encode = function (str) {
2330 if (!str || !str.length) {
2331 return '';
2332 }
2333
2334 return str.replace(/<|>|"|'|&/g, function (s) {
2335 return CHAR_S_INDEX[s];
2336 });
2337};
2338/**
2339 * @param {String} str
2340 * @returns {String}
2341 */
2342
2343
2344XmlEntities.encode = function (str) {
2345 return new XmlEntities().encode(str);
2346};
2347/**
2348 * @param {String} str
2349 * @returns {String}
2350 */
2351
2352
2353XmlEntities.prototype.decode = function (str) {
2354 if (!str || !str.length) {
2355 return '';
2356 }
2357
2358 return str.replace(/&#?[0-9a-zA-Z]+;?/g, function (s) {
2359 if (s.charAt(1) === '#') {
2360 var code = s.charAt(2).toLowerCase() === 'x' ? parseInt(s.substr(3), 16) : parseInt(s.substr(2));
2361
2362 if (isNaN(code) || code < -32768 || code > 65535) {
2363 return '';
2364 }
2365
2366 return String.fromCharCode(code);
2367 }
2368
2369 return ALPHA_INDEX[s] || s;
2370 });
2371};
2372/**
2373 * @param {String} str
2374 * @returns {String}
2375 */
2376
2377
2378XmlEntities.decode = function (str) {
2379 return new XmlEntities().decode(str);
2380};
2381/**
2382 * @param {String} str
2383 * @returns {String}
2384 */
2385
2386
2387XmlEntities.prototype.encodeNonUTF = function (str) {
2388 if (!str || !str.length) {
2389 return '';
2390 }
2391
2392 var strLength = str.length;
2393 var result = '';
2394 var i = 0;
2395
2396 while (i < strLength) {
2397 var c = str.charCodeAt(i);
2398 var alpha = CHAR_INDEX[c];
2399
2400 if (alpha) {
2401 result += "&" + alpha + ";";
2402 i++;
2403 continue;
2404 }
2405
2406 if (c < 32 || c > 126) {
2407 result += '&#' + c + ';';
2408 } else {
2409 result += str.charAt(i);
2410 }
2411
2412 i++;
2413 }
2414
2415 return result;
2416};
2417/**
2418 * @param {String} str
2419 * @returns {String}
2420 */
2421
2422
2423XmlEntities.encodeNonUTF = function (str) {
2424 return new XmlEntities().encodeNonUTF(str);
2425};
2426/**
2427 * @param {String} str
2428 * @returns {String}
2429 */
2430
2431
2432XmlEntities.prototype.encodeNonASCII = function (str) {
2433 if (!str || !str.length) {
2434 return '';
2435 }
2436
2437 var strLenght = str.length;
2438 var result = '';
2439 var i = 0;
2440
2441 while (i < strLenght) {
2442 var c = str.charCodeAt(i);
2443
2444 if (c <= 255) {
2445 result += str[i++];
2446 continue;
2447 }
2448
2449 result += '&#' + c + ';';
2450 i++;
2451 }
2452
2453 return result;
2454};
2455/**
2456 * @param {String} str
2457 * @returns {String}
2458 */
2459
2460
2461XmlEntities.encodeNonASCII = function (str) {
2462 return new XmlEntities().encodeNonASCII(str);
2463};
2464
2465module.exports = XmlEntities;
2466
2467/***/ }),
2468
2469/***/ "./node_modules/object-assign/index.js":
2470/*!*********************************************!*\
2471 !*** ./node_modules/object-assign/index.js ***!
2472 \*********************************************/
2473/*! no static exports found */
2474/*! all exports used */
2475/***/ (function(module, exports, __webpack_require__) {
2476
2477"use strict";
2478/*
2479object-assign
2480(c) Sindre Sorhus
2481@license MIT
2482*/
2483
2484/* eslint-disable no-unused-vars */
2485
2486var getOwnPropertySymbols = Object.getOwnPropertySymbols;
2487var hasOwnProperty = Object.prototype.hasOwnProperty;
2488var propIsEnumerable = Object.prototype.propertyIsEnumerable;
2489
2490function toObject(val) {
2491 if (val === null || val === undefined) {
2492 throw new TypeError('Object.assign cannot be called with null or undefined');
2493 }
2494
2495 return Object(val);
2496}
2497
2498function shouldUseNative() {
2499 try {
2500 if (!Object.assign) {
2501 return false;
2502 } // Detect buggy property enumeration order in older V8 versions.
2503 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
2504
2505
2506 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
2507
2508 test1[5] = 'de';
2509
2510 if (Object.getOwnPropertyNames(test1)[0] === '5') {
2511 return false;
2512 } // https://bugs.chromium.org/p/v8/issues/detail?id=3056
2513
2514
2515 var test2 = {};
2516
2517 for (var i = 0; i < 10; i++) {
2518 test2['_' + String.fromCharCode(i)] = i;
2519 }
2520
2521 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
2522 return test2[n];
2523 });
2524
2525 if (order2.join('') !== '0123456789') {
2526 return false;
2527 } // https://bugs.chromium.org/p/v8/issues/detail?id=3056
2528
2529
2530 var test3 = {};
2531 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
2532 test3[letter] = letter;
2533 });
2534
2535 if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
2536 return false;
2537 }
2538
2539 return true;
2540 } catch (err) {
2541 // We don't expect any of the above to throw, but better to be safe.
2542 return false;
2543 }
2544}
2545
2546module.exports = shouldUseNative() ? Object.assign : function (target, source) {
2547 var from;
2548 var to = toObject(target);
2549 var symbols;
2550
2551 for (var s = 1; s < arguments.length; s++) {
2552 from = Object(arguments[s]);
2553
2554 for (var key in from) {
2555 if (hasOwnProperty.call(from, key)) {
2556 to[key] = from[key];
2557 }
2558 }
2559
2560 if (getOwnPropertySymbols) {
2561 symbols = getOwnPropertySymbols(from);
2562
2563 for (var i = 0; i < symbols.length; i++) {
2564 if (propIsEnumerable.call(from, symbols[i])) {
2565 to[symbols[i]] = from[symbols[i]];
2566 }
2567 }
2568 }
2569 }
2570
2571 return to;
2572};
2573
2574/***/ }),
2575
2576/***/ "./node_modules/prop-types/checkPropTypes.js":
2577/*!***************************************************!*\
2578 !*** ./node_modules/prop-types/checkPropTypes.js ***!
2579 \***************************************************/
2580/*! no static exports found */
2581/*! all exports used */
2582/***/ (function(module, exports, __webpack_require__) {
2583
2584"use strict";
2585/**
2586 * Copyright (c) 2013-present, Facebook, Inc.
2587 *
2588 * This source code is licensed under the MIT license found in the
2589 * LICENSE file in the root directory of this source tree.
2590 */
2591
2592
2593var printWarning = function () {};
2594
2595if (true) {
2596 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
2597
2598 var loggedTypeFailures = {};
2599
2600 printWarning = function (text) {
2601 var message = 'Warning: ' + text;
2602
2603 if (typeof console !== 'undefined') {
2604 console.error(message);
2605 }
2606
2607 try {
2608 // --- Welcome to debugging React ---
2609 // This error was thrown as a convenience so that you can use this stack
2610 // to find the callsite that caused this warning to fire.
2611 throw new Error(message);
2612 } catch (x) {}
2613 };
2614}
2615/**
2616 * Assert that the values match with the type specs.
2617 * Error messages are memorized and will only be shown once.
2618 *
2619 * @param {object} typeSpecs Map of name to a ReactPropType
2620 * @param {object} values Runtime values that need to be type-checked
2621 * @param {string} location e.g. "prop", "context", "child context"
2622 * @param {string} componentName Name of the component for error messages.
2623 * @param {?Function} getStack Returns the component stack.
2624 * @private
2625 */
2626
2627
2628function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
2629 if (true) {
2630 for (var typeSpecName in typeSpecs) {
2631 if (typeSpecs.hasOwnProperty(typeSpecName)) {
2632 var error; // Prop type validation may throw. In case they do, we don't want to
2633 // fail the render phase where it didn't fail before. So we log it.
2634 // After these have been cleaned up, we'll let them throw.
2635
2636 try {
2637 // This is intentionally an invariant that gets caught. It's the same
2638 // behavior as without this statement except with a better message.
2639 if (typeof typeSpecs[typeSpecName] !== 'function') {
2640 var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.');
2641 err.name = 'Invariant Violation';
2642 throw err;
2643 }
2644
2645 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
2646 } catch (ex) {
2647 error = ex;
2648 }
2649
2650 if (error && !(error instanceof Error)) {
2651 printWarning((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');
2652 }
2653
2654 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
2655 // Only monitor this failure once because there tends to be a lot of the
2656 // same error.
2657 loggedTypeFailures[error.message] = true;
2658 var stack = getStack ? getStack() : '';
2659 printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
2660 }
2661 }
2662 }
2663 }
2664}
2665
2666module.exports = checkPropTypes;
2667
2668/***/ }),
2669
2670/***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
2671/*!*************************************************************!*\
2672 !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
2673 \*************************************************************/
2674/*! no static exports found */
2675/*! all exports used */
2676/***/ (function(module, exports, __webpack_require__) {
2677
2678"use strict";
2679/**
2680 * Copyright (c) 2013-present, Facebook, Inc.
2681 *
2682 * This source code is licensed under the MIT license found in the
2683 * LICENSE file in the root directory of this source tree.
2684 */
2685
2686
2687var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
2688module.exports = ReactPropTypesSecret;
2689
2690/***/ }),
2691
2692/***/ "./node_modules/querystring-es3/decode.js":
2693/*!************************************************!*\
2694 !*** ./node_modules/querystring-es3/decode.js ***!
2695 \************************************************/
2696/*! no static exports found */
2697/*! all exports used */
2698/***/ (function(module, exports, __webpack_require__) {
2699
2700"use strict";
2701// Copyright Joyent, Inc. and other Node contributors.
2702//
2703// Permission is hereby granted, free of charge, to any person obtaining a
2704// copy of this software and associated documentation files (the
2705// "Software"), to deal in the Software without restriction, including
2706// without limitation the rights to use, copy, modify, merge, publish,
2707// distribute, sublicense, and/or sell copies of the Software, and to permit
2708// persons to whom the Software is furnished to do so, subject to the
2709// following conditions:
2710//
2711// The above copyright notice and this permission notice shall be included
2712// in all copies or substantial portions of the Software.
2713//
2714// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2715// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2716// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
2717// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
2718// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
2719// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2720// USE OR OTHER DEALINGS IN THE SOFTWARE.
2721 // If obj.hasOwnProperty has been overridden, then calling
2722// obj.hasOwnProperty(prop) will break.
2723// See: https://github.com/joyent/node/issues/1707
2724
2725function hasOwnProperty(obj, prop) {
2726 return Object.prototype.hasOwnProperty.call(obj, prop);
2727}
2728
2729module.exports = function (qs, sep, eq, options) {
2730 sep = sep || '&';
2731 eq = eq || '=';
2732 var obj = {};
2733
2734 if (typeof qs !== 'string' || qs.length === 0) {
2735 return obj;
2736 }
2737
2738 var regexp = /\+/g;
2739 qs = qs.split(sep);
2740 var maxKeys = 1000;
2741
2742 if (options && typeof options.maxKeys === 'number') {
2743 maxKeys = options.maxKeys;
2744 }
2745
2746 var len = qs.length; // maxKeys <= 0 means that we should not limit keys count
2747
2748 if (maxKeys > 0 && len > maxKeys) {
2749 len = maxKeys;
2750 }
2751
2752 for (var i = 0; i < len; ++i) {
2753 var x = qs[i].replace(regexp, '%20'),
2754 idx = x.indexOf(eq),
2755 kstr,
2756 vstr,
2757 k,
2758 v;
2759
2760 if (idx >= 0) {
2761 kstr = x.substr(0, idx);
2762 vstr = x.substr(idx + 1);
2763 } else {
2764 kstr = x;
2765 vstr = '';
2766 }
2767
2768 k = decodeURIComponent(kstr);
2769 v = decodeURIComponent(vstr);
2770
2771 if (!hasOwnProperty(obj, k)) {
2772 obj[k] = v;
2773 } else if (isArray(obj[k])) {
2774 obj[k].push(v);
2775 } else {
2776 obj[k] = [obj[k], v];
2777 }
2778 }
2779
2780 return obj;
2781};
2782
2783var isArray = Array.isArray || function (xs) {
2784 return Object.prototype.toString.call(xs) === '[object Array]';
2785};
2786
2787/***/ }),
2788
2789/***/ "./node_modules/querystring-es3/encode.js":
2790/*!************************************************!*\
2791 !*** ./node_modules/querystring-es3/encode.js ***!
2792 \************************************************/
2793/*! no static exports found */
2794/*! all exports used */
2795/***/ (function(module, exports, __webpack_require__) {
2796
2797"use strict";
2798// Copyright Joyent, Inc. and other Node contributors.
2799//
2800// Permission is hereby granted, free of charge, to any person obtaining a
2801// copy of this software and associated documentation files (the
2802// "Software"), to deal in the Software without restriction, including
2803// without limitation the rights to use, copy, modify, merge, publish,
2804// distribute, sublicense, and/or sell copies of the Software, and to permit
2805// persons to whom the Software is furnished to do so, subject to the
2806// following conditions:
2807//
2808// The above copyright notice and this permission notice shall be included
2809// in all copies or substantial portions of the Software.
2810//
2811// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2812// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2813// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
2814// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
2815// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
2816// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2817// USE OR OTHER DEALINGS IN THE SOFTWARE.
2818
2819
2820var stringifyPrimitive = function (v) {
2821 switch (typeof v) {
2822 case 'string':
2823 return v;
2824
2825 case 'boolean':
2826 return v ? 'true' : 'false';
2827
2828 case 'number':
2829 return isFinite(v) ? v : '';
2830
2831 default:
2832 return '';
2833 }
2834};
2835
2836module.exports = function (obj, sep, eq, name) {
2837 sep = sep || '&';
2838 eq = eq || '=';
2839
2840 if (obj === null) {
2841 obj = undefined;
2842 }
2843
2844 if (typeof obj === 'object') {
2845 return map(objectKeys(obj), function (k) {
2846 var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
2847
2848 if (isArray(obj[k])) {
2849 return map(obj[k], function (v) {
2850 return ks + encodeURIComponent(stringifyPrimitive(v));
2851 }).join(sep);
2852 } else {
2853 return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
2854 }
2855 }).join(sep);
2856 }
2857
2858 if (!name) return '';
2859 return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj));
2860};
2861
2862var isArray = Array.isArray || function (xs) {
2863 return Object.prototype.toString.call(xs) === '[object Array]';
2864};
2865
2866function map(xs, f) {
2867 if (xs.map) return xs.map(f);
2868 var res = [];
2869
2870 for (var i = 0; i < xs.length; i++) {
2871 res.push(f(xs[i], i));
2872 }
2873
2874 return res;
2875}
2876
2877var objectKeys = Object.keys || function (obj) {
2878 var res = [];
2879
2880 for (var key in obj) {
2881 if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
2882 }
2883
2884 return res;
2885};
2886
2887/***/ }),
2888
2889/***/ "./node_modules/querystring-es3/index.js":
2890/*!***********************************************!*\
2891 !*** ./node_modules/querystring-es3/index.js ***!
2892 \***********************************************/
2893/*! no static exports found */
2894/*! all exports used */
2895/***/ (function(module, exports, __webpack_require__) {
2896
2897"use strict";
2898
2899
2900exports.decode = exports.parse = __webpack_require__(/*! ./decode */ "./node_modules/querystring-es3/decode.js");
2901exports.encode = exports.stringify = __webpack_require__(/*! ./encode */ "./node_modules/querystring-es3/encode.js");
2902
2903/***/ }),
2904
2905/***/ "./node_modules/react-dom/cjs/react-dom.development.js":
2906/*!*************************************************************!*\
2907 !*** ./node_modules/react-dom/cjs/react-dom.development.js ***!
2908 \*************************************************************/
2909/*! no static exports found */
2910/*! all exports used */
2911/***/ (function(module, exports, __webpack_require__) {
2912
2913"use strict";
2914/** @license React v16.5.2
2915 * react-dom.development.js
2916 *
2917 * Copyright (c) Facebook, Inc. and its affiliates.
2918 *
2919 * This source code is licensed under the MIT license found in the
2920 * LICENSE file in the root directory of this source tree.
2921 */if(true){(function(){'use strict';var React=__webpack_require__(/*! react */ "./node_modules/react/index.js");var _assign=__webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");var checkPropTypes=__webpack_require__(/*! prop-types/checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");var schedule=__webpack_require__(/*! schedule */ "./node_modules/schedule/index.js");var tracing=__webpack_require__(/*! schedule/tracing */ "./node_modules/schedule/tracing.js");/**
2922 * Use invariant() to assert state which your program assumes to be true.
2923 *
2924 * Provide sprintf-style format (only %s is supported) and arguments
2925 * to provide information about what broke and what you were
2926 * expecting.
2927 *
2928 * The invariant message will be stripped in production, but the invariant
2929 * will remain to ensure logic does not differ in production.
2930 */var validateFormat=function(){};{validateFormat=function(format){if(format===undefined){throw new Error('invariant requires an error message argument');}};}function invariant(condition,format,a,b,c,d,e,f){validateFormat(format);if(!condition){var error=void 0;if(format===undefined){error=new Error('Minified exception occurred; use the non-minified dev environment '+'for the full error message and additional helpful warnings.');}else{var args=[a,b,c,d,e,f];var argIndex=0;error=new Error(format.replace(/%s/g,function(){return args[argIndex++];}));error.name='Invariant Violation';}error.framesToPop=1;// we don't care about invariant's own frame
2931throw error;}}// Relying on the `invariant()` implementation lets us
2932// preserve the format and params in the www builds.
2933!React?invariant(false,'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.'):void 0;var invokeGuardedCallbackImpl=function(name,func,context,a,b,c,d,e,f){var funcArgs=Array.prototype.slice.call(arguments,3);try{func.apply(context,funcArgs);}catch(error){this.onError(error);}};{// In DEV mode, we swap out invokeGuardedCallback for a special version
2934// that plays more nicely with the browser's DevTools. The idea is to preserve
2935// "Pause on exceptions" behavior. Because React wraps all user-provided
2936// functions in invokeGuardedCallback, and the production version of
2937// invokeGuardedCallback uses a try-catch, all user exceptions are treated
2938// like caught exceptions, and the DevTools won't pause unless the developer
2939// takes the extra step of enabling pause on caught exceptions. This is
2940// untintuitive, though, because even though React has caught the error, from
2941// the developer's perspective, the error is uncaught.
2942//
2943// To preserve the expected "Pause on exceptions" behavior, we don't use a
2944// try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
2945// DOM node, and call the user-provided callback from inside an event handler
2946// for that fake event. If the callback throws, the error is "captured" using
2947// a global event handler. But because the error happens in a different
2948// event loop context, it does not interrupt the normal program flow.
2949// Effectively, this gives us try-catch behavior without actually using
2950// try-catch. Neat!
2951// Check that the browser supports the APIs we need to implement our special
2952// DEV version of invokeGuardedCallback
2953if(typeof window!=='undefined'&&typeof window.dispatchEvent==='function'&&typeof document!=='undefined'&&typeof document.createEvent==='function'){var fakeNode=document.createElement('react');var invokeGuardedCallbackDev=function(name,func,context,a,b,c,d,e,f){// If document doesn't exist we know for sure we will crash in this method
2954// when we call document.createEvent(). However this can cause confusing
2955// errors: https://github.com/facebookincubator/create-react-app/issues/3482
2956// So we preemptively throw with a better message instead.
2957!(typeof document!=='undefined')?invariant(false,'The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.'):void 0;var evt=document.createEvent('Event');// Keeps track of whether the user-provided callback threw an error. We
2958// set this to true at the beginning, then set it to false right after
2959// calling the function. If the function errors, `didError` will never be
2960// set to false. This strategy works even if the browser is flaky and
2961// fails to call our global error handler, because it doesn't rely on
2962// the error event at all.
2963var didError=true;// Keeps track of the value of window.event so that we can reset it
2964// during the callback to let user code access window.event in the
2965// browsers that support it.
2966var windowEvent=window.event;// Create an event handler for our fake event. We will synchronously
2967// dispatch our fake event using `dispatchEvent`. Inside the handler, we
2968// call the user-provided callback.
2969var funcArgs=Array.prototype.slice.call(arguments,3);function callCallback(){// We immediately remove the callback from event listeners so that
2970// nested `invokeGuardedCallback` calls do not clash. Otherwise, a
2971// nested call would trigger the fake event handlers of any call higher
2972// in the stack.
2973fakeNode.removeEventListener(evtType,callCallback,false);// We check for window.hasOwnProperty('event') to prevent the
2974// window.event assignment in both IE <= 10 as they throw an error
2975// "Member not found" in strict mode, and in Firefox which does not
2976// support window.event.
2977if(typeof window.event!=='undefined'&&window.hasOwnProperty('event')){window.event=windowEvent;}func.apply(context,funcArgs);didError=false;}// Create a global error event handler. We use this to capture the value
2978// that was thrown. It's possible that this error handler will fire more
2979// than once; for example, if non-React code also calls `dispatchEvent`
2980// and a handler for that event throws. We should be resilient to most of
2981// those cases. Even if our error event handler fires more than once, the
2982// last error event is always used. If the callback actually does error,
2983// we know that the last error event is the correct one, because it's not
2984// possible for anything else to have happened in between our callback
2985// erroring and the code that follows the `dispatchEvent` call below. If
2986// the callback doesn't error, but the error event was fired, we know to
2987// ignore it because `didError` will be false, as described above.
2988var error=void 0;// Use this to track whether the error event is ever called.
2989var didSetError=false;var isCrossOriginError=false;function handleWindowError(event){error=event.error;didSetError=true;if(error===null&&event.colno===0&&event.lineno===0){isCrossOriginError=true;}if(event.defaultPrevented){// Some other error handler has prevented default.
2990// Browsers silence the error report if this happens.
2991// We'll remember this to later decide whether to log it or not.
2992if(error!=null&&typeof error==='object'){try{error._suppressLogging=true;}catch(inner){// Ignore.
2993}}}}// Create a fake event type.
2994var evtType='react-'+(name?name:'invokeguardedcallback');// Attach our event handlers
2995window.addEventListener('error',handleWindowError);fakeNode.addEventListener(evtType,callCallback,false);// Synchronously dispatch our fake event. If the user-provided function
2996// errors, it will trigger our global error handler.
2997evt.initEvent(evtType,false,false);fakeNode.dispatchEvent(evt);if(didError){if(!didSetError){// The callback errored, but the error event never fired.
2998error=new Error('An error was thrown inside one of your components, but React '+"doesn't know what it was. This is likely due to browser "+'flakiness. React does its best to preserve the "Pause on '+'exceptions" behavior of the DevTools, which requires some '+"DEV-mode only tricks. It's possible that these don't work in "+'your browser. Try triggering the error in production mode, '+'or switching to a modern browser. If you suspect that this is '+'actually an issue with React, please file an issue.');}else if(isCrossOriginError){error=new Error("A cross-origin error was thrown. React doesn't have access to "+'the actual error object in development. '+'See https://fb.me/react-crossorigin-error for more information.');}this.onError(error);}// Remove our event listeners
2999window.removeEventListener('error',handleWindowError);};invokeGuardedCallbackImpl=invokeGuardedCallbackDev;}}var invokeGuardedCallbackImpl$1=invokeGuardedCallbackImpl;// Used by Fiber to simulate a try-catch.
3000var hasError=false;var caughtError=null;// Used by event system to capture/rethrow the first error.
3001var hasRethrowError=false;var rethrowError=null;var reporter={onError:function(error){hasError=true;caughtError=error;}};/**
3002 * Call a function while guarding against errors that happens within it.
3003 * Returns an error if it throws, otherwise null.
3004 *
3005 * In production, this is implemented using a try-catch. The reason we don't
3006 * use a try-catch directly is so that we can swap out a different
3007 * implementation in DEV mode.
3008 *
3009 * @param {String} name of the guard to use for logging or debugging
3010 * @param {Function} func The function to invoke
3011 * @param {*} context The context to use when calling the function
3012 * @param {...*} args Arguments for function
3013 */function invokeGuardedCallback(name,func,context,a,b,c,d,e,f){hasError=false;caughtError=null;invokeGuardedCallbackImpl$1.apply(reporter,arguments);}/**
3014 * Same as invokeGuardedCallback, but instead of returning an error, it stores
3015 * it in a global so it can be rethrown by `rethrowCaughtError` later.
3016 * TODO: See if caughtError and rethrowError can be unified.
3017 *
3018 * @param {String} name of the guard to use for logging or debugging
3019 * @param {Function} func The function to invoke
3020 * @param {*} context The context to use when calling the function
3021 * @param {...*} args Arguments for function
3022 */function invokeGuardedCallbackAndCatchFirstError(name,func,context,a,b,c,d,e,f){invokeGuardedCallback.apply(this,arguments);if(hasError){var error=clearCaughtError();if(!hasRethrowError){hasRethrowError=true;rethrowError=error;}}}/**
3023 * During execution of guarded functions we will capture the first error which
3024 * we will rethrow to be handled by the top level error handler.
3025 */function rethrowCaughtError(){if(hasRethrowError){var error=rethrowError;hasRethrowError=false;rethrowError=null;throw error;}}function hasCaughtError(){return hasError;}function clearCaughtError(){if(hasError){var error=caughtError;hasError=false;caughtError=null;return error;}else{invariant(false,'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.');}}/**
3026 * Injectable ordering of event plugins.
3027 */var eventPluginOrder=null;/**
3028 * Injectable mapping from names to event plugin modules.
3029 */var namesToPlugins={};/**
3030 * Recomputes the plugin list using the injected plugins and plugin ordering.
3031 *
3032 * @private
3033 */function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.
3034return;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);!(pluginIndex>-1)?invariant(false,'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.',pluginName):void 0;if(plugins[pluginIndex]){continue;}!pluginModule.extractEvents?invariant(false,'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.',pluginName):void 0;plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)?invariant(false,'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',eventName,pluginName):void 0;}}}/**
3035 * Publishes an event so that it can be dispatched by the supplied plugin.
3036 *
3037 * @param {object} dispatchConfig Dispatch configuration for the event.
3038 * @param {object} PluginModule Plugin publishing the event.
3039 * @return {boolean} True if the event was successfully published.
3040 * @private
3041 */function publishEventForPlugin(dispatchConfig,pluginModule,eventName){!!eventNameDispatchConfigs.hasOwnProperty(eventName)?invariant(false,'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.',eventName):void 0;eventNameDispatchConfigs[eventName]=dispatchConfig;var phasedRegistrationNames=dispatchConfig.phasedRegistrationNames;if(phasedRegistrationNames){for(var phaseName in phasedRegistrationNames){if(phasedRegistrationNames.hasOwnProperty(phaseName)){var phasedRegistrationName=phasedRegistrationNames[phaseName];publishRegistrationName(phasedRegistrationName,pluginModule,eventName);}}return true;}else if(dispatchConfig.registrationName){publishRegistrationName(dispatchConfig.registrationName,pluginModule,eventName);return true;}return false;}/**
3042 * Publishes a registration name that is used to identify dispatched events.
3043 *
3044 * @param {string} registrationName Registration name to add.
3045 * @param {object} PluginModule Plugin publishing the event.
3046 * @private
3047 */function publishRegistrationName(registrationName,pluginModule,eventName){!!registrationNameModules[registrationName]?invariant(false,'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.',registrationName):void 0;registrationNameModules[registrationName]=pluginModule;registrationNameDependencies[registrationName]=pluginModule.eventTypes[eventName].dependencies;{var lowerCasedName=registrationName.toLowerCase();possibleRegistrationNames[lowerCasedName]=registrationName;if(registrationName==='onDoubleClick'){possibleRegistrationNames.ondblclick=registrationName;}}}/**
3048 * Registers plugins so that they can extract and dispatch events.
3049 *
3050 * @see {EventPluginHub}
3051 */ /**
3052 * Ordered list of injected plugins.
3053 */var plugins=[];/**
3054 * Mapping from event name to dispatch config
3055 */var eventNameDispatchConfigs={};/**
3056 * Mapping from registration name to plugin module
3057 */var registrationNameModules={};/**
3058 * Mapping from registration name to event name
3059 */var registrationNameDependencies={};/**
3060 * Mapping from lowercase registration names to the properly cased version,
3061 * used to warn in the case of missing event handlers. Available
3062 * only in true.
3063 * @type {Object}
3064 */var possibleRegistrationNames={};// Trust the developer to only use possibleRegistrationNames in true
3065/**
3066 * Injects an ordering of plugins (by plugin name). This allows the ordering
3067 * to be decoupled from injection of the actual plugins so that ordering is
3068 * always deterministic regardless of packaging, on-the-fly injection, etc.
3069 *
3070 * @param {array} InjectedEventPluginOrder
3071 * @internal
3072 * @see {EventPluginHub.injection.injectEventPluginOrder}
3073 */function injectEventPluginOrder(injectedEventPluginOrder){!!eventPluginOrder?invariant(false,'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.'):void 0;// Clone the ordering so it cannot be dynamically mutated.
3074eventPluginOrder=Array.prototype.slice.call(injectedEventPluginOrder);recomputePluginOrdering();}/**
3075 * Injects plugins to be used by `EventPluginHub`. The plugin names must be
3076 * in the ordering injected by `injectEventPluginOrder`.
3077 *
3078 * Plugins can be injected as part of page initialization or on-the-fly.
3079 *
3080 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
3081 * @internal
3082 * @see {EventPluginHub.injection.injectEventPluginsByName}
3083 */function injectEventPluginsByName(injectedNamesToPlugins){var isOrderingDirty=false;for(var pluginName in injectedNamesToPlugins){if(!injectedNamesToPlugins.hasOwnProperty(pluginName)){continue;}var pluginModule=injectedNamesToPlugins[pluginName];if(!namesToPlugins.hasOwnProperty(pluginName)||namesToPlugins[pluginName]!==pluginModule){!!namesToPlugins[pluginName]?invariant(false,'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.',pluginName):void 0;namesToPlugins[pluginName]=pluginModule;isOrderingDirty=true;}}if(isOrderingDirty){recomputePluginOrdering();}}/**
3084 * Similar to invariant but only logs a warning if the condition is not met.
3085 * This can be used to log issues in development environments in critical
3086 * paths. Removing the logging code for production environments will keep the
3087 * same logic and follow the same code paths.
3088 */var warningWithoutStack=function(){};{warningWithoutStack=function(condition,format){for(var _len=arguments.length,args=Array(_len>2?_len-2:0),_key=2;_key<_len;_key++){args[_key-2]=arguments[_key];}if(format===undefined){throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning '+'message argument');}if(args.length>8){// Check before the condition to catch violations early.
3089throw new Error('warningWithoutStack() currently supports at most 8 arguments.');}if(condition){return;}if(typeof console!=='undefined'){var _args$map=args.map(function(item){return''+item;}),a=_args$map[0],b=_args$map[1],c=_args$map[2],d=_args$map[3],e=_args$map[4],f=_args$map[5],g=_args$map[6],h=_args$map[7];var message='Warning: '+format;// We intentionally don't use spread (or .apply) because it breaks IE9:
3090// https://github.com/facebook/react/issues/13610
3091switch(args.length){case 0:console.error(message);break;case 1:console.error(message,a);break;case 2:console.error(message,a,b);break;case 3:console.error(message,a,b,c);break;case 4:console.error(message,a,b,c,d);break;case 5:console.error(message,a,b,c,d,e);break;case 6:console.error(message,a,b,c,d,e,f);break;case 7:console.error(message,a,b,c,d,e,f,g);break;case 8:console.error(message,a,b,c,d,e,f,g,h);break;default:throw new Error('warningWithoutStack() currently supports at most 8 arguments.');}}try{// --- Welcome to debugging React ---
3092// This error was thrown as a convenience so that you can use this stack
3093// to find the callsite that caused this warning to fire.
3094var argIndex=0;var _message='Warning: '+format.replace(/%s/g,function(){return args[argIndex++];});throw new Error(_message);}catch(x){}};}var warningWithoutStack$1=warningWithoutStack;var getFiberCurrentPropsFromNode=null;var getInstanceFromNode=null;var getNodeFromInstance=null;function setComponentTree(getFiberCurrentPropsFromNodeImpl,getInstanceFromNodeImpl,getNodeFromInstanceImpl){getFiberCurrentPropsFromNode=getFiberCurrentPropsFromNodeImpl;getInstanceFromNode=getInstanceFromNodeImpl;getNodeFromInstance=getNodeFromInstanceImpl;{!(getNodeFromInstance&&getInstanceFromNode)?warningWithoutStack$1(false,'EventPluginUtils.setComponentTree(...): Injected '+'module is missing getNodeFromInstance or getInstanceFromNode.'):void 0;}}var validateEventDispatches=void 0;{validateEventDispatches=function(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;var listenersIsArr=Array.isArray(dispatchListeners);var listenersLen=listenersIsArr?dispatchListeners.length:dispatchListeners?1:0;var instancesIsArr=Array.isArray(dispatchInstances);var instancesLen=instancesIsArr?dispatchInstances.length:dispatchInstances?1:0;!(instancesIsArr===listenersIsArr&&instancesLen===listenersLen)?warningWithoutStack$1(false,'EventPluginUtils: Invalid `event`.'):void 0;};}/**
3095 * Dispatch the event to the listener.
3096 * @param {SyntheticEvent} event SyntheticEvent to handle
3097 * @param {boolean} simulated If the event is simulated (changes exn behavior)
3098 * @param {function} listener Application-level callback
3099 * @param {*} inst Internal component instance
3100 */function executeDispatch(event,simulated,listener,inst){var type=event.type||'unknown-event';event.currentTarget=getNodeFromInstance(inst);invokeGuardedCallbackAndCatchFirstError(type,listener,undefined,event);event.currentTarget=null;}/**
3101 * Standard/simple iteration through an event's collected dispatches.
3102 */function executeDispatchesInOrder(event,simulated){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.
3103executeDispatch(event,simulated,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,simulated,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}/**
3104 * @see executeDispatchesInOrderStopAtTrueImpl
3105 */ /**
3106 * Execution of a "direct" dispatch - there must be at most one dispatch
3107 * accumulated on the event or it is considered an error. It doesn't really make
3108 * sense for an event with multiple dispatches (bubbled) to keep track of the
3109 * return values at each dispatch execution, but it does tend to make sense when
3110 * dealing with "direct" dispatches.
3111 *
3112 * @return {*} The return value of executing the single dispatch.
3113 */ /**
3114 * @param {SyntheticEvent} event
3115 * @return {boolean} True iff number of dispatches accumulated is greater than 0.
3116 */ /**
3117 * Accumulates items that must not be null or undefined into the first one. This
3118 * is used to conserve memory by avoiding array allocations, and thus sacrifices
3119 * API cleanness. Since `current` can be null before being passed in and not
3120 * null after this function, make sure to assign it back to `current`:
3121 *
3122 * `a = accumulateInto(a, b);`
3123 *
3124 * This API should be sparingly used. Try `accumulate` for something cleaner.
3125 *
3126 * @return {*|array<*>} An accumulation of items.
3127 */function accumulateInto(current,next){!(next!=null)?invariant(false,'accumulateInto(...): Accumulated items must not be null or undefined.'):void 0;if(current==null){return next;}// Both are not empty. Warning: Never call x.concat(y) when you are not
3128// certain that x is an Array (x could be a string with concat method).
3129if(Array.isArray(current)){if(Array.isArray(next)){current.push.apply(current,next);return current;}current.push(next);return current;}if(Array.isArray(next)){// A bit too dangerous to mutate `next`.
3130return[current].concat(next);}return[current,next];}/**
3131 * @param {array} arr an "accumulation" of items which is either an Array or
3132 * a single item. Useful when paired with the `accumulate` module. This is a
3133 * simple utility that allows us to reason about a collection of items, but
3134 * handling the case when there is exactly one item (and we do not need to
3135 * allocate an array).
3136 * @param {function} cb Callback invoked with each element or a collection.
3137 * @param {?} [scope] Scope used as `this` in a callback.
3138 */function forEachAccumulated(arr,cb,scope){if(Array.isArray(arr)){arr.forEach(cb,scope);}else if(arr){cb.call(scope,arr);}}/**
3139 * Internal queue of events that have accumulated their dispatches and are
3140 * waiting to have their dispatches executed.
3141 */var eventQueue=null;/**
3142 * Dispatches an event and releases it back into the pool, unless persistent.
3143 *
3144 * @param {?object} event Synthetic event to be dispatched.
3145 * @param {boolean} simulated If the event is simulated (changes exn behavior)
3146 * @private
3147 */var executeDispatchesAndRelease=function(event,simulated){if(event){executeDispatchesInOrder(event,simulated);if(!event.isPersistent()){event.constructor.release(event);}}};var executeDispatchesAndReleaseSimulated=function(e){return executeDispatchesAndRelease(e,true);};var executeDispatchesAndReleaseTopLevel=function(e){return executeDispatchesAndRelease(e,false);};function isInteractive(tag){return tag==='button'||tag==='input'||tag==='select'||tag==='textarea';}function shouldPreventMouseEvent(name,type,props){switch(name){case'onClick':case'onClickCapture':case'onDoubleClick':case'onDoubleClickCapture':case'onMouseDown':case'onMouseDownCapture':case'onMouseMove':case'onMouseMoveCapture':case'onMouseUp':case'onMouseUpCapture':return!!(props.disabled&&isInteractive(type));default:return false;}}/**
3148 * This is a unified interface for event plugins to be installed and configured.
3149 *
3150 * Event plugins can implement the following properties:
3151 *
3152 * `extractEvents` {function(string, DOMEventTarget, string, object): *}
3153 * Required. When a top-level event is fired, this method is expected to
3154 * extract synthetic events that will in turn be queued and dispatched.
3155 *
3156 * `eventTypes` {object}
3157 * Optional, plugins that fire events must publish a mapping of registration
3158 * names that are used to register listeners. Values of this mapping must
3159 * be objects that contain `registrationName` or `phasedRegistrationNames`.
3160 *
3161 * `executeDispatch` {function(object, function, string)}
3162 * Optional, allows plugins to override how an event gets dispatched. By
3163 * default, the listener is simply invoked.
3164 *
3165 * Each plugin that is injected into `EventsPluginHub` is immediately operable.
3166 *
3167 * @public
3168 */ /**
3169 * Methods for injecting dependencies.
3170 */var injection={/**
3171 * @param {array} InjectedEventPluginOrder
3172 * @public
3173 */injectEventPluginOrder:injectEventPluginOrder,/**
3174 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
3175 */injectEventPluginsByName:injectEventPluginsByName};/**
3176 * @param {object} inst The instance, which is the source of events.
3177 * @param {string} registrationName Name of listener (e.g. `onClick`).
3178 * @return {?function} The stored callback.
3179 */function getListener(inst,registrationName){var listener=void 0;// TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
3180// live here; needs to be moved to a better place soon
3181var stateNode=inst.stateNode;if(!stateNode){// Work in progress (ex: onload events in incremental mode).
3182return null;}var props=getFiberCurrentPropsFromNode(stateNode);if(!props){// Work in progress.
3183return null;}listener=props[registrationName];if(shouldPreventMouseEvent(registrationName,inst.type,props)){return null;}!(!listener||typeof listener==='function')?invariant(false,'Expected `%s` listener to be a function, instead got a value of `%s` type.',registrationName,typeof listener):void 0;return listener;}/**
3184 * Allows registered plugins an opportunity to extract events from top-level
3185 * native browser events.
3186 *
3187 * @return {*} An accumulation of synthetic events.
3188 * @internal
3189 */function extractEvents(topLevelType,targetInst,nativeEvent,nativeEventTarget){var events=null;for(var i=0;i<plugins.length;i++){// Not every plugin in the ordering may be loaded at runtime.
3190var possiblePlugin=plugins[i];if(possiblePlugin){var extractedEvents=possiblePlugin.extractEvents(topLevelType,targetInst,nativeEvent,nativeEventTarget);if(extractedEvents){events=accumulateInto(events,extractedEvents);}}}return events;}function runEventsInBatch(events,simulated){if(events!==null){eventQueue=accumulateInto(eventQueue,events);}// Set `eventQueue` to null before processing it so that we can tell if more
3191// events get enqueued while processing.
3192var processingEventQueue=eventQueue;eventQueue=null;if(!processingEventQueue){return;}if(simulated){forEachAccumulated(processingEventQueue,executeDispatchesAndReleaseSimulated);}else{forEachAccumulated(processingEventQueue,executeDispatchesAndReleaseTopLevel);}!!eventQueue?invariant(false,'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.'):void 0;// This would be a good time to rethrow if any of the event handlers threw.
3193rethrowCaughtError();}function runExtractedEventsInBatch(topLevelType,targetInst,nativeEvent,nativeEventTarget){var events=extractEvents(topLevelType,targetInst,nativeEvent,nativeEventTarget);runEventsInBatch(events,false);}var FunctionalComponent=0;var FunctionalComponentLazy=1;var ClassComponent=2;var ClassComponentLazy=3;var IndeterminateComponent=4;// Before we know whether it is functional or class
3194var HostRoot=5;// Root of a host tree. Could be nested inside another node.
3195var HostPortal=6;// A subtree. Could be an entry point to a different renderer.
3196var HostComponent=7;var HostText=8;var Fragment=9;var Mode=10;var ContextConsumer=11;var ContextProvider=12;var ForwardRef=13;var ForwardRefLazy=14;var Profiler=15;var PlaceholderComponent=16;var randomKey=Math.random().toString(36).slice(2);var internalInstanceKey='__reactInternalInstance$'+randomKey;var internalEventHandlersKey='__reactEventHandlers$'+randomKey;function precacheFiberNode(hostInst,node){node[internalInstanceKey]=hostInst;}/**
3197 * Given a DOM node, return the closest ReactDOMComponent or
3198 * ReactDOMTextComponent instance ancestor.
3199 */function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is
3200// unmounted, potentially).
3201return null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.
3202return inst;}return null;}/**
3203 * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
3204 * instance, or null if the node was not rendered by this React.
3205 */function getInstanceFromNode$1(node){var inst=node[internalInstanceKey];if(inst){if(inst.tag===HostComponent||inst.tag===HostText){return inst;}else{return null;}}return null;}/**
3206 * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
3207 * DOM node.
3208 */function getNodeFromInstance$1(inst){if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber this, is just the state node right now. We assume it will be
3209// a host component or host text.
3210return inst.stateNode;}// Without this first invariant, passing a non-DOM-component triggers the next
3211// invariant for a missing parent, which is super confusing.
3212invariant(false,'getNodeFromInstance: Invalid argument.');}function getFiberCurrentPropsFromNode$1(node){return node[internalEventHandlersKey]||null;}function updateFiberProps(node,props){node[internalEventHandlersKey]=props;}function getParent(inst){do{inst=inst.return;// TODO: If this is a HostRoot we might want to bail out.
3213// That is depending on if we want nested subtrees (layers) to bubble
3214// events to their parent. We could also go through parentNode on the
3215// host node but that wouldn't work for React Native and doesn't let us
3216// do the portal feature.
3217}while(inst&&inst.tag!==HostComponent);if(inst){return inst;}return null;}/**
3218 * Return the lowest common ancestor of A and B, or null if they are in
3219 * different trees.
3220 */function getLowestCommonAncestor(instA,instB){var depthA=0;for(var tempA=instA;tempA;tempA=getParent(tempA)){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=getParent(tempB)){depthB++;}// If A is deeper, crawl up.
3221while(depthA-depthB>0){instA=getParent(instA);depthA--;}// If B is deeper, crawl up.
3222while(depthB-depthA>0){instB=getParent(instB);depthB--;}// Walk in lockstep until we find a match.
3223var depth=depthA;while(depth--){if(instA===instB||instA===instB.alternate){return instA;}instA=getParent(instA);instB=getParent(instB);}return null;}/**
3224 * Return if A is an ancestor of B.
3225 */ /**
3226 * Return the parent instance of the passed-in instance.
3227 */ /**
3228 * Simulates the traversal of a two-phase, capture/bubble event dispatch.
3229 */function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i=void 0;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}/**
3230 * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
3231 * should would receive a `mouseEnter` or `mouseLeave` event.
3232 *
3233 * Does not invoke the callback on the nearest common ancestor because nothing
3234 * "entered" or "left" that element.
3235 */function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(true){if(!from){break;}if(from===common){break;}var alternate=from.alternate;if(alternate!==null&&alternate===common){break;}pathFrom.push(from);from=getParent(from);}var pathTo=[];while(true){if(!to){break;}if(to===common){break;}var _alternate=to.alternate;if(_alternate!==null&&_alternate===common){break;}pathTo.push(to);to=getParent(to);}for(var i=0;i<pathFrom.length;i++){fn(pathFrom[i],'bubbled',argFrom);}for(var _i=pathTo.length;_i-->0;){fn(pathTo[_i],'captured',argTo);}}/**
3236 * Some event types have a notion of different registration names for different
3237 * "phases" of propagation. This finds listeners by a given phase.
3238 */function listenerAtPhase(inst,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(inst,registrationName);}/**
3239 * A small set of propagation patterns, each of which will accept a small amount
3240 * of information, and generate a set of "dispatch ready event objects" - which
3241 * are sets of events that have already been annotated with a set of dispatched
3242 * listener functions/ids. The API is designed this way to discourage these
3243 * propagation strategies from actually executing the dispatches, since we
3244 * always want to collect the entire set of dispatches before executing even a
3245 * single one.
3246 */ /**
3247 * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
3248 * here, allows us to not have to bind or create functions for each event.
3249 * Mutating the event's members allows us to not have to create a wrapping
3250 * "dispatch" object that pairs the event with the listener.
3251 */function accumulateDirectionalDispatches(inst,phase,event){{!inst?warningWithoutStack$1(false,'Dispatching inst must not be null'):void 0;}var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}/**
3252 * Collect dispatches (must be entirely collected before dispatching - see unit
3253 * tests). Lazily allocate the array to conserve memory. We must loop through
3254 * each event and perform the traversal for each one. We cannot perform a
3255 * single traversal for the entire collection of events because each event may
3256 * have a different target.
3257 */function accumulateTwoPhaseDispatchesSingle(event){if(event&&event.dispatchConfig.phasedRegistrationNames){traverseTwoPhase(event._targetInst,accumulateDirectionalDispatches,event);}}/**
3258 * Accumulates without regard to direction, does not look for phased
3259 * registration names. Same as `accumulateDirectDispatchesSingle` but without
3260 * requiring that the `dispatchMarker` be the same as the dispatched ID.
3261 */function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}/**
3262 * Accumulates dispatches on an `SyntheticEvent`, but only for the
3263 * `dispatchMarker`.
3264 * @param {SyntheticEvent} event
3265 */function accumulateDirectDispatchesSingle(event){if(event&&event.dispatchConfig.registrationName){accumulateDispatches(event._targetInst,null,event);}}function accumulateTwoPhaseDispatches(events){forEachAccumulated(events,accumulateTwoPhaseDispatchesSingle);}function accumulateEnterLeaveDispatches(leave,enter,from,to){traverseEnterLeave(from,to,accumulateDispatches,leave,enter);}function accumulateDirectDispatches(events){forEachAccumulated(events,accumulateDirectDispatchesSingle);}var canUseDOM=!!(typeof window!=='undefined'&&window.document&&window.document.createElement);// Do not uses the below two methods directly!
3266// Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.
3267// (It is the only module that is allowed to access these methods.)
3268function unsafeCastStringToDOMTopLevelType(topLevelType){return topLevelType;}function unsafeCastDOMTopLevelTypeToString(topLevelType){return topLevelType;}/**
3269 * Generate a mapping of standard vendor prefixes using the defined style property and event name.
3270 *
3271 * @param {string} styleProp
3272 * @param {string} eventName
3273 * @returns {object}
3274 */function makePrefixMap(styleProp,eventName){var prefixes={};prefixes[styleProp.toLowerCase()]=eventName.toLowerCase();prefixes['Webkit'+styleProp]='webkit'+eventName;prefixes['Moz'+styleProp]='moz'+eventName;return prefixes;}/**
3275 * A list of event names to a configurable list of vendor prefixes.
3276 */var vendorPrefixes={animationend:makePrefixMap('Animation','AnimationEnd'),animationiteration:makePrefixMap('Animation','AnimationIteration'),animationstart:makePrefixMap('Animation','AnimationStart'),transitionend:makePrefixMap('Transition','TransitionEnd')};/**
3277 * Event names that have already been detected and prefixed (if applicable).
3278 */var prefixedEventNames={};/**
3279 * Element to check for prefixes on.
3280 */var style={};/**
3281 * Bootstrap if a DOM exists.
3282 */if(canUseDOM){style=document.createElement('div').style;// On some platforms, in particular some releases of Android 4.x,
3283// the un-prefixed "animation" and "transition" properties are defined on the
3284// style object but the events that fire will still be prefixed, so we need
3285// to check if the un-prefixed events are usable, and if not remove them from the map.
3286if(!('AnimationEvent'in window)){delete vendorPrefixes.animationend.animation;delete vendorPrefixes.animationiteration.animation;delete vendorPrefixes.animationstart.animation;}// Same as above
3287if(!('TransitionEvent'in window)){delete vendorPrefixes.transitionend.transition;}}/**
3288 * Attempts to determine the correct vendor prefixed event name.
3289 *
3290 * @param {string} eventName
3291 * @returns {string}
3292 */function getVendorPrefixedEventName(eventName){if(prefixedEventNames[eventName]){return prefixedEventNames[eventName];}else if(!vendorPrefixes[eventName]){return eventName;}var prefixMap=vendorPrefixes[eventName];for(var styleProp in prefixMap){if(prefixMap.hasOwnProperty(styleProp)&&styleProp in style){return prefixedEventNames[eventName]=prefixMap[styleProp];}}return eventName;}/**
3293 * To identify top level events in ReactDOM, we use constants defined by this
3294 * module. This is the only module that uses the unsafe* methods to express
3295 * that the constants actually correspond to the browser event names. This lets
3296 * us save some bundle size by avoiding a top level type -> event name map.
3297 * The rest of ReactDOM code should import top level types from this file.
3298 */var TOP_ABORT=unsafeCastStringToDOMTopLevelType('abort');var TOP_ANIMATION_END=unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));var TOP_ANIMATION_ITERATION=unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));var TOP_ANIMATION_START=unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));var TOP_BLUR=unsafeCastStringToDOMTopLevelType('blur');var TOP_CAN_PLAY=unsafeCastStringToDOMTopLevelType('canplay');var TOP_CAN_PLAY_THROUGH=unsafeCastStringToDOMTopLevelType('canplaythrough');var TOP_CANCEL=unsafeCastStringToDOMTopLevelType('cancel');var TOP_CHANGE=unsafeCastStringToDOMTopLevelType('change');var TOP_CLICK=unsafeCastStringToDOMTopLevelType('click');var TOP_CLOSE=unsafeCastStringToDOMTopLevelType('close');var TOP_COMPOSITION_END=unsafeCastStringToDOMTopLevelType('compositionend');var TOP_COMPOSITION_START=unsafeCastStringToDOMTopLevelType('compositionstart');var TOP_COMPOSITION_UPDATE=unsafeCastStringToDOMTopLevelType('compositionupdate');var TOP_CONTEXT_MENU=unsafeCastStringToDOMTopLevelType('contextmenu');var TOP_COPY=unsafeCastStringToDOMTopLevelType('copy');var TOP_CUT=unsafeCastStringToDOMTopLevelType('cut');var TOP_DOUBLE_CLICK=unsafeCastStringToDOMTopLevelType('dblclick');var TOP_AUX_CLICK=unsafeCastStringToDOMTopLevelType('auxclick');var TOP_DRAG=unsafeCastStringToDOMTopLevelType('drag');var TOP_DRAG_END=unsafeCastStringToDOMTopLevelType('dragend');var TOP_DRAG_ENTER=unsafeCastStringToDOMTopLevelType('dragenter');var TOP_DRAG_EXIT=unsafeCastStringToDOMTopLevelType('dragexit');var TOP_DRAG_LEAVE=unsafeCastStringToDOMTopLevelType('dragleave');var TOP_DRAG_OVER=unsafeCastStringToDOMTopLevelType('dragover');var TOP_DRAG_START=unsafeCastStringToDOMTopLevelType('dragstart');var TOP_DROP=unsafeCastStringToDOMTopLevelType('drop');var TOP_DURATION_CHANGE=unsafeCastStringToDOMTopLevelType('durationchange');var TOP_EMPTIED=unsafeCastStringToDOMTopLevelType('emptied');var TOP_ENCRYPTED=unsafeCastStringToDOMTopLevelType('encrypted');var TOP_ENDED=unsafeCastStringToDOMTopLevelType('ended');var TOP_ERROR=unsafeCastStringToDOMTopLevelType('error');var TOP_FOCUS=unsafeCastStringToDOMTopLevelType('focus');var TOP_GOT_POINTER_CAPTURE=unsafeCastStringToDOMTopLevelType('gotpointercapture');var TOP_INPUT=unsafeCastStringToDOMTopLevelType('input');var TOP_INVALID=unsafeCastStringToDOMTopLevelType('invalid');var TOP_KEY_DOWN=unsafeCastStringToDOMTopLevelType('keydown');var TOP_KEY_PRESS=unsafeCastStringToDOMTopLevelType('keypress');var TOP_KEY_UP=unsafeCastStringToDOMTopLevelType('keyup');var TOP_LOAD=unsafeCastStringToDOMTopLevelType('load');var TOP_LOAD_START=unsafeCastStringToDOMTopLevelType('loadstart');var TOP_LOADED_DATA=unsafeCastStringToDOMTopLevelType('loadeddata');var TOP_LOADED_METADATA=unsafeCastStringToDOMTopLevelType('loadedmetadata');var TOP_LOST_POINTER_CAPTURE=unsafeCastStringToDOMTopLevelType('lostpointercapture');var TOP_MOUSE_DOWN=unsafeCastStringToDOMTopLevelType('mousedown');var TOP_MOUSE_MOVE=unsafeCastStringToDOMTopLevelType('mousemove');var TOP_MOUSE_OUT=unsafeCastStringToDOMTopLevelType('mouseout');var TOP_MOUSE_OVER=unsafeCastStringToDOMTopLevelType('mouseover');var TOP_MOUSE_UP=unsafeCastStringToDOMTopLevelType('mouseup');var TOP_PASTE=unsafeCastStringToDOMTopLevelType('paste');var TOP_PAUSE=unsafeCastStringToDOMTopLevelType('pause');var TOP_PLAY=unsafeCastStringToDOMTopLevelType('play');var TOP_PLAYING=unsafeCastStringToDOMTopLevelType('playing');var TOP_POINTER_CANCEL=unsafeCastStringToDOMTopLevelType('pointercancel');var TOP_POINTER_DOWN=unsafeCastStringToDOMTopLevelType('pointerdown');var TOP_POINTER_MOVE=unsafeCastStringToDOMTopLevelType('pointermove');var TOP_POINTER_OUT=unsafeCastStringToDOMTopLevelType('pointerout');var TOP_POINTER_OVER=unsafeCastStringToDOMTopLevelType('pointerover');var TOP_POINTER_UP=unsafeCastStringToDOMTopLevelType('pointerup');var TOP_PROGRESS=unsafeCastStringToDOMTopLevelType('progress');var TOP_RATE_CHANGE=unsafeCastStringToDOMTopLevelType('ratechange');var TOP_RESET=unsafeCastStringToDOMTopLevelType('reset');var TOP_SCROLL=unsafeCastStringToDOMTopLevelType('scroll');var TOP_SEEKED=unsafeCastStringToDOMTopLevelType('seeked');var TOP_SEEKING=unsafeCastStringToDOMTopLevelType('seeking');var TOP_SELECTION_CHANGE=unsafeCastStringToDOMTopLevelType('selectionchange');var TOP_STALLED=unsafeCastStringToDOMTopLevelType('stalled');var TOP_SUBMIT=unsafeCastStringToDOMTopLevelType('submit');var TOP_SUSPEND=unsafeCastStringToDOMTopLevelType('suspend');var TOP_TEXT_INPUT=unsafeCastStringToDOMTopLevelType('textInput');var TOP_TIME_UPDATE=unsafeCastStringToDOMTopLevelType('timeupdate');var TOP_TOGGLE=unsafeCastStringToDOMTopLevelType('toggle');var TOP_TOUCH_CANCEL=unsafeCastStringToDOMTopLevelType('touchcancel');var TOP_TOUCH_END=unsafeCastStringToDOMTopLevelType('touchend');var TOP_TOUCH_MOVE=unsafeCastStringToDOMTopLevelType('touchmove');var TOP_TOUCH_START=unsafeCastStringToDOMTopLevelType('touchstart');var TOP_TRANSITION_END=unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));var TOP_VOLUME_CHANGE=unsafeCastStringToDOMTopLevelType('volumechange');var TOP_WAITING=unsafeCastStringToDOMTopLevelType('waiting');var TOP_WHEEL=unsafeCastStringToDOMTopLevelType('wheel');// List of events that need to be individually attached to media elements.
3299// Note that events in this list will *not* be listened to at the top level
3300// unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.
3301var mediaEventTypes=[TOP_ABORT,TOP_CAN_PLAY,TOP_CAN_PLAY_THROUGH,TOP_DURATION_CHANGE,TOP_EMPTIED,TOP_ENCRYPTED,TOP_ENDED,TOP_ERROR,TOP_LOADED_DATA,TOP_LOADED_METADATA,TOP_LOAD_START,TOP_PAUSE,TOP_PLAY,TOP_PLAYING,TOP_PROGRESS,TOP_RATE_CHANGE,TOP_SEEKED,TOP_SEEKING,TOP_STALLED,TOP_SUSPEND,TOP_TIME_UPDATE,TOP_VOLUME_CHANGE,TOP_WAITING];function getRawEventName(topLevelType){return unsafeCastDOMTopLevelTypeToString(topLevelType);}/**
3302 * These variables store information about text content of a target node,
3303 * allowing comparison of content before and after a given event.
3304 *
3305 * Identify the node where selection currently begins, then observe
3306 * both its text content and its current position in the DOM. Since the
3307 * browser may natively replace the target node during composition, we can
3308 * use its position to find its replacement.
3309 *
3310 *
3311 */var root=null;var startText=null;var fallbackText=null;function initialize(nativeEventTarget){root=nativeEventTarget;startText=getText();return true;}function reset(){root=null;startText=null;fallbackText=null;}function getData(){if(fallbackText){return fallbackText;}var start=void 0;var startValue=startText;var startLength=startValue.length;var end=void 0;var endValue=getText();var endLength=endValue.length;for(start=0;start<startLength;start++){if(startValue[start]!==endValue[start]){break;}}var minEnd=startLength-start;for(end=1;end<=minEnd;end++){if(startValue[startLength-end]!==endValue[endLength-end]){break;}}var sliceTail=end>1?1-end:undefined;fallbackText=endValue.slice(start,sliceTail);return fallbackText;}function getText(){if('value'in root){return root.value;}return root.textContent;}/* eslint valid-typeof: 0 */var EVENT_POOL_SIZE=10;/**
3312 * @interface Event
3313 * @see http://www.w3.org/TR/DOM-Level-3-Events/
3314 */var EventInterface={type:null,target:null,// currentTarget is set when dispatching; no use in copying it here
3315currentTarget:function(){return null;},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(event){return event.timeStamp||Date.now();},defaultPrevented:null,isTrusted:null};function functionThatReturnsTrue(){return true;}function functionThatReturnsFalse(){return false;}/**
3316 * Synthetic events are dispatched by event plugins, typically in response to a
3317 * top-level event delegation handler.
3318 *
3319 * These systems should generally use pooling to reduce the frequency of garbage
3320 * collection. The system should check `isPersistent` to determine whether the
3321 * event should be released into the pool after being dispatched. Users that
3322 * need a persisted event should invoke `persist`.
3323 *
3324 * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
3325 * normalizing browser quirks. Subclasses do not necessarily have to implement a
3326 * DOM interface; custom application-specific events can also subclass this.
3327 *
3328 * @param {object} dispatchConfig Configuration used to dispatch this event.
3329 * @param {*} targetInst Marker identifying the event target.
3330 * @param {object} nativeEvent Native browser event.
3331 * @param {DOMEventTarget} nativeEventTarget Target node.
3332 */function SyntheticEvent(dispatchConfig,targetInst,nativeEvent,nativeEventTarget){{// these have a getter/setter for warnings
3333delete this.nativeEvent;delete this.preventDefault;delete this.stopPropagation;delete this.isDefaultPrevented;delete this.isPropagationStopped;}this.dispatchConfig=dispatchConfig;this._targetInst=targetInst;this.nativeEvent=nativeEvent;var Interface=this.constructor.Interface;for(var propName in Interface){if(!Interface.hasOwnProperty(propName)){continue;}{delete this[propName];// this has a getter/setter for warnings
3334}var normalize=Interface[propName];if(normalize){this[propName]=normalize(nativeEvent);}else{if(propName==='target'){this.target=nativeEventTarget;}else{this[propName]=nativeEvent[propName];}}}var defaultPrevented=nativeEvent.defaultPrevented!=null?nativeEvent.defaultPrevented:nativeEvent.returnValue===false;if(defaultPrevented){this.isDefaultPrevented=functionThatReturnsTrue;}else{this.isDefaultPrevented=functionThatReturnsFalse;}this.isPropagationStopped=functionThatReturnsFalse;return this;}_assign(SyntheticEvent.prototype,{preventDefault:function(){this.defaultPrevented=true;var event=this.nativeEvent;if(!event){return;}if(event.preventDefault){event.preventDefault();}else if(typeof event.returnValue!=='unknown'){event.returnValue=false;}this.isDefaultPrevented=functionThatReturnsTrue;},stopPropagation:function(){var event=this.nativeEvent;if(!event){return;}if(event.stopPropagation){event.stopPropagation();}else if(typeof event.cancelBubble!=='unknown'){// The ChangeEventPlugin registers a "propertychange" event for
3335// IE. This event does not support bubbling or cancelling, and
3336// any references to cancelBubble throw "Member not found". A
3337// typeof check of "unknown" circumvents this issue (and is also
3338// IE specific).
3339event.cancelBubble=true;}this.isPropagationStopped=functionThatReturnsTrue;},/**
3340 * We release all dispatched `SyntheticEvent`s after each event loop, adding
3341 * them back into the pool. This allows a way to hold onto a reference that
3342 * won't be added back into the pool.
3343 */persist:function(){this.isPersistent=functionThatReturnsTrue;},/**
3344 * Checks if this event should be released back into the pool.
3345 *
3346 * @return {boolean} True if this should not be released, false otherwise.
3347 */isPersistent:functionThatReturnsFalse,/**
3348 * `PooledClass` looks for `destructor` on each instance it releases.
3349 */destructor:function(){var Interface=this.constructor.Interface;for(var propName in Interface){{Object.defineProperty(this,propName,getPooledWarningPropertyDefinition(propName,Interface[propName]));}}this.dispatchConfig=null;this._targetInst=null;this.nativeEvent=null;this.isDefaultPrevented=functionThatReturnsFalse;this.isPropagationStopped=functionThatReturnsFalse;this._dispatchListeners=null;this._dispatchInstances=null;{Object.defineProperty(this,'nativeEvent',getPooledWarningPropertyDefinition('nativeEvent',null));Object.defineProperty(this,'isDefaultPrevented',getPooledWarningPropertyDefinition('isDefaultPrevented',functionThatReturnsFalse));Object.defineProperty(this,'isPropagationStopped',getPooledWarningPropertyDefinition('isPropagationStopped',functionThatReturnsFalse));Object.defineProperty(this,'preventDefault',getPooledWarningPropertyDefinition('preventDefault',function(){}));Object.defineProperty(this,'stopPropagation',getPooledWarningPropertyDefinition('stopPropagation',function(){}));}}});SyntheticEvent.Interface=EventInterface;/**
3350 * Helper to reduce boilerplate when creating subclasses.
3351 */SyntheticEvent.extend=function(Interface){var Super=this;var E=function(){};E.prototype=Super.prototype;var prototype=new E();function Class(){return Super.apply(this,arguments);}_assign(prototype,Class.prototype);Class.prototype=prototype;Class.prototype.constructor=Class;Class.Interface=_assign({},Super.Interface,Interface);Class.extend=Super.extend;addEventPoolingTo(Class);return Class;};addEventPoolingTo(SyntheticEvent);/**
3352 * Helper to nullify syntheticEvent instance properties when destructing
3353 *
3354 * @param {String} propName
3355 * @param {?object} getVal
3356 * @return {object} defineProperty object
3357 */function getPooledWarningPropertyDefinition(propName,getVal){var isFunction=typeof getVal==='function';return{configurable:true,set:set,get:get};function set(val){var action=isFunction?'setting the method':'setting the property';warn(action,'This is effectively a no-op');return val;}function get(){var action=isFunction?'accessing the method':'accessing the property';var result=isFunction?'This is a no-op function':'This is set to null';warn(action,result);return getVal;}function warn(action,result){var warningCondition=false;!warningCondition?warningWithoutStack$1(false,"This synthetic event is reused for performance reasons. If you're seeing this, "+"you're %s `%s` on a released/nullified synthetic event. %s. "+'If you must keep the original synthetic event around, use event.persist(). '+'See https://fb.me/react-event-pooling for more information.',action,propName,result):void 0;}}function getPooledEvent(dispatchConfig,targetInst,nativeEvent,nativeInst){var EventConstructor=this;if(EventConstructor.eventPool.length){var instance=EventConstructor.eventPool.pop();EventConstructor.call(instance,dispatchConfig,targetInst,nativeEvent,nativeInst);return instance;}return new EventConstructor(dispatchConfig,targetInst,nativeEvent,nativeInst);}function releasePooledEvent(event){var EventConstructor=this;!(event instanceof EventConstructor)?invariant(false,'Trying to release an event instance into a pool of a different type.'):void 0;event.destructor();if(EventConstructor.eventPool.length<EVENT_POOL_SIZE){EventConstructor.eventPool.push(event);}}function addEventPoolingTo(EventConstructor){EventConstructor.eventPool=[];EventConstructor.getPooled=getPooledEvent;EventConstructor.release=releasePooledEvent;}/**
3358 * @interface Event
3359 * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
3360 */var SyntheticCompositionEvent=SyntheticEvent.extend({data:null});/**
3361 * @interface Event
3362 * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
3363 * /#events-inputevents
3364 */var SyntheticInputEvent=SyntheticEvent.extend({data:null});var END_KEYCODES=[9,13,27,32];// Tab, Return, Esc, Space
3365var START_KEYCODE=229;var canUseCompositionEvent=canUseDOM&&'CompositionEvent'in window;var documentMode=null;if(canUseDOM&&'documentMode'in document){documentMode=document.documentMode;}// Webkit offers a very useful `textInput` event that can be used to
3366// directly represent `beforeInput`. The IE `textinput` event is not as
3367// useful, so we don't use it.
3368var canUseTextInputEvent=canUseDOM&&'TextEvent'in window&&!documentMode;// In IE9+, we have access to composition events, but the data supplied
3369// by the native compositionend event may be incorrect. Japanese ideographic
3370// spaces, for instance (\u3000) are not recorded correctly.
3371var useFallbackCompositionData=canUseDOM&&(!canUseCompositionEvent||documentMode&&documentMode>8&&documentMode<=11);var SPACEBAR_CODE=32;var SPACEBAR_CHAR=String.fromCharCode(SPACEBAR_CODE);// Events and their corresponding property names.
3372var eventTypes={beforeInput:{phasedRegistrationNames:{bubbled:'onBeforeInput',captured:'onBeforeInputCapture'},dependencies:[TOP_COMPOSITION_END,TOP_KEY_PRESS,TOP_TEXT_INPUT,TOP_PASTE]},compositionEnd:{phasedRegistrationNames:{bubbled:'onCompositionEnd',captured:'onCompositionEndCapture'},dependencies:[TOP_BLUR,TOP_COMPOSITION_END,TOP_KEY_DOWN,TOP_KEY_PRESS,TOP_KEY_UP,TOP_MOUSE_DOWN]},compositionStart:{phasedRegistrationNames:{bubbled:'onCompositionStart',captured:'onCompositionStartCapture'},dependencies:[TOP_BLUR,TOP_COMPOSITION_START,TOP_KEY_DOWN,TOP_KEY_PRESS,TOP_KEY_UP,TOP_MOUSE_DOWN]},compositionUpdate:{phasedRegistrationNames:{bubbled:'onCompositionUpdate',captured:'onCompositionUpdateCapture'},dependencies:[TOP_BLUR,TOP_COMPOSITION_UPDATE,TOP_KEY_DOWN,TOP_KEY_PRESS,TOP_KEY_UP,TOP_MOUSE_DOWN]}};// Track whether we've ever handled a keypress on the space key.
3373var hasSpaceKeypress=false;/**
3374 * Return whether a native keypress event is assumed to be a command.
3375 * This is required because Firefox fires `keypress` events for key commands
3376 * (cut, copy, select-all, etc.) even though no character is inserted.
3377 */function isKeypressCommand(nativeEvent){return(nativeEvent.ctrlKey||nativeEvent.altKey||nativeEvent.metaKey)&&// ctrlKey && altKey is equivalent to AltGr, and is not a command.
3378!(nativeEvent.ctrlKey&&nativeEvent.altKey);}/**
3379 * Translate native top level events into event types.
3380 *
3381 * @param {string} topLevelType
3382 * @return {object}
3383 */function getCompositionEventType(topLevelType){switch(topLevelType){case TOP_COMPOSITION_START:return eventTypes.compositionStart;case TOP_COMPOSITION_END:return eventTypes.compositionEnd;case TOP_COMPOSITION_UPDATE:return eventTypes.compositionUpdate;}}/**
3384 * Does our fallback best-guess model think this event signifies that
3385 * composition has begun?
3386 *
3387 * @param {string} topLevelType
3388 * @param {object} nativeEvent
3389 * @return {boolean}
3390 */function isFallbackCompositionStart(topLevelType,nativeEvent){return topLevelType===TOP_KEY_DOWN&&nativeEvent.keyCode===START_KEYCODE;}/**
3391 * Does our fallback mode think that this event is the end of composition?
3392 *
3393 * @param {string} topLevelType
3394 * @param {object} nativeEvent
3395 * @return {boolean}
3396 */function isFallbackCompositionEnd(topLevelType,nativeEvent){switch(topLevelType){case TOP_KEY_UP:// Command keys insert or clear IME input.
3397return END_KEYCODES.indexOf(nativeEvent.keyCode)!==-1;case TOP_KEY_DOWN:// Expect IME keyCode on each keydown. If we get any other
3398// code we must have exited earlier.
3399return nativeEvent.keyCode!==START_KEYCODE;case TOP_KEY_PRESS:case TOP_MOUSE_DOWN:case TOP_BLUR:// Events are not possible without cancelling IME.
3400return true;default:return false;}}/**
3401 * Google Input Tools provides composition data via a CustomEvent,
3402 * with the `data` property populated in the `detail` object. If this
3403 * is available on the event object, use it. If not, this is a plain
3404 * composition event and we have nothing special to extract.
3405 *
3406 * @param {object} nativeEvent
3407 * @return {?string}
3408 */function getDataFromCustomEvent(nativeEvent){var detail=nativeEvent.detail;if(typeof detail==='object'&&'data'in detail){return detail.data;}return null;}/**
3409 * Check if a composition event was triggered by Korean IME.
3410 * Our fallback mode does not work well with IE's Korean IME,
3411 * so just use native composition events when Korean IME is used.
3412 * Although CompositionEvent.locale property is deprecated,
3413 * it is available in IE, where our fallback mode is enabled.
3414 *
3415 * @param {object} nativeEvent
3416 * @return {boolean}
3417 */function isUsingKoreanIME(nativeEvent){return nativeEvent.locale==='ko';}// Track the current IME composition status, if any.
3418var isComposing=false;/**
3419 * @return {?object} A SyntheticCompositionEvent.
3420 */function extractCompositionEvent(topLevelType,targetInst,nativeEvent,nativeEventTarget){var eventType=void 0;var fallbackData=void 0;if(canUseCompositionEvent){eventType=getCompositionEventType(topLevelType);}else if(!isComposing){if(isFallbackCompositionStart(topLevelType,nativeEvent)){eventType=eventTypes.compositionStart;}}else if(isFallbackCompositionEnd(topLevelType,nativeEvent)){eventType=eventTypes.compositionEnd;}if(!eventType){return null;}if(useFallbackCompositionData&&!isUsingKoreanIME(nativeEvent)){// The current composition is stored statically and must not be
3421// overwritten while composition continues.
3422if(!isComposing&&eventType===eventTypes.compositionStart){isComposing=initialize(nativeEventTarget);}else if(eventType===eventTypes.compositionEnd){if(isComposing){fallbackData=getData();}}}var event=SyntheticCompositionEvent.getPooled(eventType,targetInst,nativeEvent,nativeEventTarget);if(fallbackData){// Inject data generated from fallback path into the synthetic event.
3423// This matches the property of native CompositionEventInterface.
3424event.data=fallbackData;}else{var customData=getDataFromCustomEvent(nativeEvent);if(customData!==null){event.data=customData;}}accumulateTwoPhaseDispatches(event);return event;}/**
3425 * @param {TopLevelType} topLevelType Number from `TopLevelType`.
3426 * @param {object} nativeEvent Native browser event.
3427 * @return {?string} The string corresponding to this `beforeInput` event.
3428 */function getNativeBeforeInputChars(topLevelType,nativeEvent){switch(topLevelType){case TOP_COMPOSITION_END:return getDataFromCustomEvent(nativeEvent);case TOP_KEY_PRESS:/**
3429 * If native `textInput` events are available, our goal is to make
3430 * use of them. However, there is a special case: the spacebar key.
3431 * In Webkit, preventing default on a spacebar `textInput` event
3432 * cancels character insertion, but it *also* causes the browser
3433 * to fall back to its default spacebar behavior of scrolling the
3434 * page.
3435 *
3436 * Tracking at:
3437 * https://code.google.com/p/chromium/issues/detail?id=355103
3438 *
3439 * To avoid this issue, use the keypress event as if no `textInput`
3440 * event is available.
3441 */var which=nativeEvent.which;if(which!==SPACEBAR_CODE){return null;}hasSpaceKeypress=true;return SPACEBAR_CHAR;case TOP_TEXT_INPUT:// Record the characters to be added to the DOM.
3442var chars=nativeEvent.data;// If it's a spacebar character, assume that we have already handled
3443// it at the keypress level and bail immediately. Android Chrome
3444// doesn't give us keycodes, so we need to ignore it.
3445if(chars===SPACEBAR_CHAR&&hasSpaceKeypress){return null;}return chars;default:// For other native event types, do nothing.
3446return null;}}/**
3447 * For browsers that do not provide the `textInput` event, extract the
3448 * appropriate string to use for SyntheticInputEvent.
3449 *
3450 * @param {number} topLevelType Number from `TopLevelEventTypes`.
3451 * @param {object} nativeEvent Native browser event.
3452 * @return {?string} The fallback string for this `beforeInput` event.
3453 */function getFallbackBeforeInputChars(topLevelType,nativeEvent){// If we are currently composing (IME) and using a fallback to do so,
3454// try to extract the composed characters from the fallback object.
3455// If composition event is available, we extract a string only at
3456// compositionevent, otherwise extract it at fallback events.
3457if(isComposing){if(topLevelType===TOP_COMPOSITION_END||!canUseCompositionEvent&&isFallbackCompositionEnd(topLevelType,nativeEvent)){var chars=getData();reset();isComposing=false;return chars;}return null;}switch(topLevelType){case TOP_PASTE:// If a paste event occurs after a keypress, throw out the input
3458// chars. Paste events should not lead to BeforeInput events.
3459return null;case TOP_KEY_PRESS:/**
3460 * As of v27, Firefox may fire keypress events even when no character
3461 * will be inserted. A few possibilities:
3462 *
3463 * - `which` is `0`. Arrow keys, Esc key, etc.
3464 *
3465 * - `which` is the pressed key code, but no char is available.
3466 * Ex: 'AltGr + d` in Polish. There is no modified character for
3467 * this key combination and no character is inserted into the
3468 * document, but FF fires the keypress for char code `100` anyway.
3469 * No `input` event will occur.
3470 *
3471 * - `which` is the pressed key code, but a command combination is
3472 * being used. Ex: `Cmd+C`. No character is inserted, and no
3473 * `input` event will occur.
3474 */if(!isKeypressCommand(nativeEvent)){// IE fires the `keypress` event when a user types an emoji via
3475// Touch keyboard of Windows. In such a case, the `char` property
3476// holds an emoji character like `\uD83D\uDE0A`. Because its length
3477// is 2, the property `which` does not represent an emoji correctly.
3478// In such a case, we directly return the `char` property instead of
3479// using `which`.
3480if(nativeEvent.char&&nativeEvent.char.length>1){return nativeEvent.char;}else if(nativeEvent.which){return String.fromCharCode(nativeEvent.which);}}return null;case TOP_COMPOSITION_END:return useFallbackCompositionData&&!isUsingKoreanIME(nativeEvent)?null:nativeEvent.data;default:return null;}}/**
3481 * Extract a SyntheticInputEvent for `beforeInput`, based on either native
3482 * `textInput` or fallback behavior.
3483 *
3484 * @return {?object} A SyntheticInputEvent.
3485 */function extractBeforeInputEvent(topLevelType,targetInst,nativeEvent,nativeEventTarget){var chars=void 0;if(canUseTextInputEvent){chars=getNativeBeforeInputChars(topLevelType,nativeEvent);}else{chars=getFallbackBeforeInputChars(topLevelType,nativeEvent);}// If no characters are being inserted, no BeforeInput event should
3486// be fired.
3487if(!chars){return null;}var event=SyntheticInputEvent.getPooled(eventTypes.beforeInput,targetInst,nativeEvent,nativeEventTarget);event.data=chars;accumulateTwoPhaseDispatches(event);return event;}/**
3488 * Create an `onBeforeInput` event to match
3489 * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
3490 *
3491 * This event plugin is based on the native `textInput` event
3492 * available in Chrome, Safari, Opera, and IE. This event fires after
3493 * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
3494 *
3495 * `beforeInput` is spec'd but not implemented in any browsers, and
3496 * the `input` event does not provide any useful information about what has
3497 * actually been added, contrary to the spec. Thus, `textInput` is the best
3498 * available event to identify the characters that have actually been inserted
3499 * into the target node.
3500 *
3501 * This plugin is also responsible for emitting `composition` events, thus
3502 * allowing us to share composition fallback code for both `beforeInput` and
3503 * `composition` event types.
3504 */var BeforeInputEventPlugin={eventTypes:eventTypes,extractEvents:function(topLevelType,targetInst,nativeEvent,nativeEventTarget){var composition=extractCompositionEvent(topLevelType,targetInst,nativeEvent,nativeEventTarget);var beforeInput=extractBeforeInputEvent(topLevelType,targetInst,nativeEvent,nativeEventTarget);if(composition===null){return beforeInput;}if(beforeInput===null){return composition;}return[composition,beforeInput];}};// Use to restore controlled state after a change event has fired.
3505var restoreImpl=null;var restoreTarget=null;var restoreQueue=null;function restoreStateOfTarget(target){// We perform this translation at the end of the event loop so that we
3506// always receive the correct fiber here
3507var internalInstance=getInstanceFromNode(target);if(!internalInstance){// Unmounted
3508return;}!(typeof restoreImpl==='function')?invariant(false,'setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.'):void 0;var props=getFiberCurrentPropsFromNode(internalInstance.stateNode);restoreImpl(internalInstance.stateNode,internalInstance.type,props);}function setRestoreImplementation(impl){restoreImpl=impl;}function enqueueStateRestore(target){if(restoreTarget){if(restoreQueue){restoreQueue.push(target);}else{restoreQueue=[target];}}else{restoreTarget=target;}}function needsStateRestore(){return restoreTarget!==null||restoreQueue!==null;}function restoreStateIfNeeded(){if(!restoreTarget){return;}var target=restoreTarget;var queuedTargets=restoreQueue;restoreTarget=null;restoreQueue=null;restoreStateOfTarget(target);if(queuedTargets){for(var i=0;i<queuedTargets.length;i++){restoreStateOfTarget(queuedTargets[i]);}}}// Used as a way to call batchedUpdates when we don't have a reference to
3509// the renderer. Such as when we're dispatching events or if third party
3510// libraries need to call batchedUpdates. Eventually, this API will go away when
3511// everything is batched by default. We'll then have a similar API to opt-out of
3512// scheduled work and instead do synchronous work.
3513// Defaults
3514var _batchedUpdatesImpl=function(fn,bookkeeping){return fn(bookkeeping);};var _interactiveUpdatesImpl=function(fn,a,b){return fn(a,b);};var _flushInteractiveUpdatesImpl=function(){};var isBatching=false;function batchedUpdates(fn,bookkeeping){if(isBatching){// If we are currently inside another batch, we need to wait until it
3515// fully completes before restoring state.
3516return fn(bookkeeping);}isBatching=true;try{return _batchedUpdatesImpl(fn,bookkeeping);}finally{// Here we wait until all updates have propagated, which is important
3517// when using controlled components within layers:
3518// https://github.com/facebook/react/issues/1698
3519// Then we restore state of any controlled component.
3520isBatching=false;var controlledComponentsHavePendingUpdates=needsStateRestore();if(controlledComponentsHavePendingUpdates){// If a controlled event was fired, we may need to restore the state of
3521// the DOM node back to the controlled value. This is necessary when React
3522// bails out of the update without touching the DOM.
3523_flushInteractiveUpdatesImpl();restoreStateIfNeeded();}}}function interactiveUpdates(fn,a,b){return _interactiveUpdatesImpl(fn,a,b);}function setBatchingImplementation(batchedUpdatesImpl,interactiveUpdatesImpl,flushInteractiveUpdatesImpl){_batchedUpdatesImpl=batchedUpdatesImpl;_interactiveUpdatesImpl=interactiveUpdatesImpl;_flushInteractiveUpdatesImpl=flushInteractiveUpdatesImpl;}/**
3524 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
3525 */var supportedInputTypes={color:true,date:true,datetime:true,'datetime-local':true,email:true,month:true,number:true,password:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true};function isTextInputElement(elem){var nodeName=elem&&elem.nodeName&&elem.nodeName.toLowerCase();if(nodeName==='input'){return!!supportedInputTypes[elem.type];}if(nodeName==='textarea'){return true;}return false;}/**
3526 * HTML nodeType values that represent the type of the node
3527 */var ELEMENT_NODE=1;var TEXT_NODE=3;var COMMENT_NODE=8;var DOCUMENT_NODE=9;var DOCUMENT_FRAGMENT_NODE=11;/**
3528 * Gets the target node from a native browser event by accounting for
3529 * inconsistencies in browser DOM APIs.
3530 *
3531 * @param {object} nativeEvent Native browser event.
3532 * @return {DOMEventTarget} Target node.
3533 */function getEventTarget(nativeEvent){// Fallback to nativeEvent.srcElement for IE9
3534// https://github.com/facebook/react/issues/12506
3535var target=nativeEvent.target||nativeEvent.srcElement||window;// Normalize SVG <use> element events #4963
3536if(target.correspondingUseElement){target=target.correspondingUseElement;}// Safari may fire events on text nodes (Node.TEXT_NODE is 3).
3537// @see http://www.quirksmode.org/js/events_properties.html
3538return target.nodeType===TEXT_NODE?target.parentNode:target;}/**
3539 * Checks if an event is supported in the current execution environment.
3540 *
3541 * NOTE: This will not work correctly for non-generic events such as `change`,
3542 * `reset`, `load`, `error`, and `select`.
3543 *
3544 * Borrows from Modernizr.
3545 *
3546 * @param {string} eventNameSuffix Event name, e.g. "click".
3547 * @return {boolean} True if the event is supported.
3548 * @internal
3549 * @license Modernizr 3.0.0pre (Custom Build) | MIT
3550 */function isEventSupported(eventNameSuffix){if(!canUseDOM){return false;}var eventName='on'+eventNameSuffix;var isSupported=eventName in document;if(!isSupported){var element=document.createElement('div');element.setAttribute(eventName,'return;');isSupported=typeof element[eventName]==='function';}return isSupported;}function isCheckable(elem){var type=elem.type;var nodeName=elem.nodeName;return nodeName&&nodeName.toLowerCase()==='input'&&(type==='checkbox'||type==='radio');}function getTracker(node){return node._valueTracker;}function detachTracker(node){node._valueTracker=null;}function getValueFromNode(node){var value='';if(!node){return value;}if(isCheckable(node)){value=node.checked?'true':'false';}else{value=node.value;}return value;}function trackValueOnNode(node){var valueField=isCheckable(node)?'checked':'value';var descriptor=Object.getOwnPropertyDescriptor(node.constructor.prototype,valueField);var currentValue=''+node[valueField];// if someone has already defined a value or Safari, then bail
3551// and don't track value will cause over reporting of changes,
3552// but it's better then a hard failure
3553// (needed for certain tests that spyOn input values and Safari)
3554if(node.hasOwnProperty(valueField)||typeof descriptor==='undefined'||typeof descriptor.get!=='function'||typeof descriptor.set!=='function'){return;}var get=descriptor.get,set=descriptor.set;Object.defineProperty(node,valueField,{configurable:true,get:function(){return get.call(this);},set:function(value){currentValue=''+value;set.call(this,value);}});// We could've passed this the first time
3555// but it triggers a bug in IE11 and Edge 14/15.
3556// Calling defineProperty() again should be equivalent.
3557// https://github.com/facebook/react/issues/11768
3558Object.defineProperty(node,valueField,{enumerable:descriptor.enumerable});var tracker={getValue:function(){return currentValue;},setValue:function(value){currentValue=''+value;},stopTracking:function(){detachTracker(node);delete node[valueField];}};return tracker;}function track(node){if(getTracker(node)){return;}// TODO: Once it's just Fiber we can move this to node._wrapperState
3559node._valueTracker=trackValueOnNode(node);}function updateValueIfChanged(node){if(!node){return false;}var tracker=getTracker(node);// if there is no tracker at this point it's unlikely
3560// that trying again will succeed
3561if(!tracker){return true;}var lastValue=tracker.getValue();var nextValue=getValueFromNode(node);if(nextValue!==lastValue){tracker.setValue(nextValue);return true;}return false;}var ReactSharedInternals=React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;var BEFORE_SLASH_RE=/^(.*)[\\\/]/;var describeComponentFrame=function(name,source,ownerName){var sourceInfo='';if(source){var path=source.fileName;var fileName=path.replace(BEFORE_SLASH_RE,'');{// In DEV, include code for a common special case:
3562// prefer "folder/index.js" instead of just "index.js".
3563if(/^index\./.test(fileName)){var match=path.match(BEFORE_SLASH_RE);if(match){var pathBeforeSlash=match[1];if(pathBeforeSlash){var folderName=pathBeforeSlash.replace(BEFORE_SLASH_RE,'');fileName=folderName+'/'+fileName;}}}}sourceInfo=' (at '+fileName+':'+source.lineNumber+')';}else if(ownerName){sourceInfo=' (created by '+ownerName+')';}return'\n in '+(name||'Unknown')+sourceInfo;};// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
3564// nor polyfill, then a plain number is used for performance.
3565var hasSymbol=typeof Symbol==='function'&&Symbol.for;var REACT_ELEMENT_TYPE=hasSymbol?Symbol.for('react.element'):0xeac7;var REACT_PORTAL_TYPE=hasSymbol?Symbol.for('react.portal'):0xeaca;var REACT_FRAGMENT_TYPE=hasSymbol?Symbol.for('react.fragment'):0xeacb;var REACT_STRICT_MODE_TYPE=hasSymbol?Symbol.for('react.strict_mode'):0xeacc;var REACT_PROFILER_TYPE=hasSymbol?Symbol.for('react.profiler'):0xead2;var REACT_PROVIDER_TYPE=hasSymbol?Symbol.for('react.provider'):0xeacd;var REACT_CONTEXT_TYPE=hasSymbol?Symbol.for('react.context'):0xeace;var REACT_ASYNC_MODE_TYPE=hasSymbol?Symbol.for('react.async_mode'):0xeacf;var REACT_FORWARD_REF_TYPE=hasSymbol?Symbol.for('react.forward_ref'):0xead0;var REACT_PLACEHOLDER_TYPE=hasSymbol?Symbol.for('react.placeholder'):0xead1;var MAYBE_ITERATOR_SYMBOL=typeof Symbol==='function'&&Symbol.iterator;var FAUX_ITERATOR_SYMBOL='@@iterator';function getIteratorFn(maybeIterable){if(maybeIterable===null||typeof maybeIterable!=='object'){return null;}var maybeIterator=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||maybeIterable[FAUX_ITERATOR_SYMBOL];if(typeof maybeIterator==='function'){return maybeIterator;}return null;}var Pending=0;var Resolved=1;var Rejected=2;function getResultFromResolvedThenable(thenable){return thenable._reactResult;}function refineResolvedThenable(thenable){return thenable._reactStatus===Resolved?thenable._reactResult:null;}function getComponentName(type){if(type==null){// Host root, text node or just invalid type.
3566return null;}{if(typeof type.tag==='number'){warningWithoutStack$1(false,'Received an unexpected object in getComponentName(). '+'This is likely a bug in React. Please file an issue.');}}if(typeof type==='function'){return type.displayName||type.name||null;}if(typeof type==='string'){return type;}switch(type){case REACT_ASYNC_MODE_TYPE:return'AsyncMode';case REACT_FRAGMENT_TYPE:return'Fragment';case REACT_PORTAL_TYPE:return'Portal';case REACT_PROFILER_TYPE:return'Profiler';case REACT_STRICT_MODE_TYPE:return'StrictMode';case REACT_PLACEHOLDER_TYPE:return'Placeholder';}if(typeof type==='object'){switch(type.$$typeof){case REACT_CONTEXT_TYPE:return'Context.Consumer';case REACT_PROVIDER_TYPE:return'Context.Provider';case REACT_FORWARD_REF_TYPE:var renderFn=type.render;var functionName=renderFn.displayName||renderFn.name||'';return type.displayName||(functionName!==''?'ForwardRef('+functionName+')':'ForwardRef');}if(typeof type.then==='function'){var thenable=type;var resolvedThenable=refineResolvedThenable(thenable);if(resolvedThenable){return getComponentName(resolvedThenable);}}}return null;}var ReactDebugCurrentFrame=ReactSharedInternals.ReactDebugCurrentFrame;function describeFiber(fiber){switch(fiber.tag){case IndeterminateComponent:case FunctionalComponent:case FunctionalComponentLazy:case ClassComponent:case ClassComponentLazy:case HostComponent:case Mode:var owner=fiber._debugOwner;var source=fiber._debugSource;var name=getComponentName(fiber.type);var ownerName=null;if(owner){ownerName=getComponentName(owner.type);}return describeComponentFrame(name,source,ownerName);default:return'';}}function getStackByFiberInDevAndProd(workInProgress){var info='';var node=workInProgress;do{info+=describeFiber(node);node=node.return;}while(node);return info;}var current=null;var phase=null;function getCurrentFiberOwnerNameInDevOrNull(){{if(current===null){return null;}var owner=current._debugOwner;if(owner!==null&&typeof owner!=='undefined'){return getComponentName(owner.type);}}return null;}function getCurrentFiberStackInDev(){{if(current===null){return'';}// Safe because if current fiber exists, we are reconciling,
3567// and it is guaranteed to be the work-in-progress version.
3568return getStackByFiberInDevAndProd(current);}return'';}function resetCurrentFiber(){{ReactDebugCurrentFrame.getCurrentStack=null;current=null;phase=null;}}function setCurrentFiber(fiber){{ReactDebugCurrentFrame.getCurrentStack=getCurrentFiberStackInDev;current=fiber;phase=null;}}function setCurrentPhase(lifeCyclePhase){{phase=lifeCyclePhase;}}/**
3569 * Similar to invariant but only logs a warning if the condition is not met.
3570 * This can be used to log issues in development environments in critical
3571 * paths. Removing the logging code for production environments will keep the
3572 * same logic and follow the same code paths.
3573 */var warning=warningWithoutStack$1;{warning=function(condition,format){if(condition){return;}var ReactDebugCurrentFrame=ReactSharedInternals.ReactDebugCurrentFrame;var stack=ReactDebugCurrentFrame.getStackAddendum();// eslint-disable-next-line react-internal/warning-and-invariant-args
3574for(var _len=arguments.length,args=Array(_len>2?_len-2:0),_key=2;_key<_len;_key++){args[_key-2]=arguments[_key];}warningWithoutStack$1.apply(undefined,[false,format+'%s'].concat(args,[stack]));};}var warning$1=warning;// A reserved attribute.
3575// It is handled by React separately and shouldn't be written to the DOM.
3576var RESERVED=0;// A simple string attribute.
3577// Attributes that aren't in the whitelist are presumed to have this type.
3578var STRING=1;// A string attribute that accepts booleans in React. In HTML, these are called
3579// "enumerated" attributes with "true" and "false" as possible values.
3580// When true, it should be set to a "true" string.
3581// When false, it should be set to a "false" string.
3582var BOOLEANISH_STRING=2;// A real boolean attribute.
3583// When true, it should be present (set either to an empty string or its name).
3584// When false, it should be omitted.
3585var BOOLEAN=3;// An attribute that can be used as a flag as well as with a value.
3586// When true, it should be present (set either to an empty string or its name).
3587// When false, it should be omitted.
3588// For any other value, should be present with that value.
3589var OVERLOADED_BOOLEAN=4;// An attribute that must be numeric or parse as a numeric.
3590// When falsy, it should be removed.
3591var NUMERIC=5;// An attribute that must be positive numeric or parse as a positive numeric.
3592// When falsy, it should be removed.
3593var POSITIVE_NUMERIC=6;/* eslint-disable max-len */var ATTRIBUTE_NAME_START_CHAR=':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';/* eslint-enable max-len */var ATTRIBUTE_NAME_CHAR=ATTRIBUTE_NAME_START_CHAR+'\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040';var ROOT_ATTRIBUTE_NAME='data-reactroot';var VALID_ATTRIBUTE_NAME_REGEX=new RegExp('^['+ATTRIBUTE_NAME_START_CHAR+']['+ATTRIBUTE_NAME_CHAR+']*$');var hasOwnProperty=Object.prototype.hasOwnProperty;var illegalAttributeNameCache={};var validatedAttributeNameCache={};function isAttributeNameSafe(attributeName){if(hasOwnProperty.call(validatedAttributeNameCache,attributeName)){return true;}if(hasOwnProperty.call(illegalAttributeNameCache,attributeName)){return false;}if(VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)){validatedAttributeNameCache[attributeName]=true;return true;}illegalAttributeNameCache[attributeName]=true;{warning$1(false,'Invalid attribute name: `%s`',attributeName);}return false;}function shouldIgnoreAttribute(name,propertyInfo,isCustomComponentTag){if(propertyInfo!==null){return propertyInfo.type===RESERVED;}if(isCustomComponentTag){return false;}if(name.length>2&&(name[0]==='o'||name[0]==='O')&&(name[1]==='n'||name[1]==='N')){return true;}return false;}function shouldRemoveAttributeWithWarning(name,value,propertyInfo,isCustomComponentTag){if(propertyInfo!==null&&propertyInfo.type===RESERVED){return false;}switch(typeof value){case'function':// $FlowIssue symbol is perfectly valid here
3594case'symbol':// eslint-disable-line
3595return true;case'boolean':{if(isCustomComponentTag){return false;}if(propertyInfo!==null){return!propertyInfo.acceptsBooleans;}else{var prefix=name.toLowerCase().slice(0,5);return prefix!=='data-'&&prefix!=='aria-';}}default:return false;}}function shouldRemoveAttribute(name,value,propertyInfo,isCustomComponentTag){if(value===null||typeof value==='undefined'){return true;}if(shouldRemoveAttributeWithWarning(name,value,propertyInfo,isCustomComponentTag)){return true;}if(isCustomComponentTag){return false;}if(propertyInfo!==null){switch(propertyInfo.type){case BOOLEAN:return!value;case OVERLOADED_BOOLEAN:return value===false;case NUMERIC:return isNaN(value);case POSITIVE_NUMERIC:return isNaN(value)||value<1;}}return false;}function getPropertyInfo(name){return properties.hasOwnProperty(name)?properties[name]:null;}function PropertyInfoRecord(name,type,mustUseProperty,attributeName,attributeNamespace){this.acceptsBooleans=type===BOOLEANISH_STRING||type===BOOLEAN||type===OVERLOADED_BOOLEAN;this.attributeName=attributeName;this.attributeNamespace=attributeNamespace;this.mustUseProperty=mustUseProperty;this.propertyName=name;this.type=type;}// When adding attributes to this list, be sure to also add them to
3596// the `possibleStandardNames` module to ensure casing and incorrect
3597// name warnings.
3598var properties={};// These props are reserved by React. They shouldn't be written to the DOM.
3599['children','dangerouslySetInnerHTML',// TODO: This prevents the assignment of defaultValue to regular
3600// elements (not just inputs). Now that ReactDOMInput assigns to the
3601// defaultValue property -- do we need this?
3602'defaultValue','defaultChecked','innerHTML','suppressContentEditableWarning','suppressHydrationWarning','style'].forEach(function(name){properties[name]=new PropertyInfoRecord(name,RESERVED,false,// mustUseProperty
3603name,// attributeName
3604null);}// attributeNamespace
3605);// A few React string attributes have a different name.
3606// This is a mapping from React prop names to the attribute names.
3607[['acceptCharset','accept-charset'],['className','class'],['htmlFor','for'],['httpEquiv','http-equiv']].forEach(function(_ref){var name=_ref[0],attributeName=_ref[1];properties[name]=new PropertyInfoRecord(name,STRING,false,// mustUseProperty
3608attributeName,// attributeName
3609null);}// attributeNamespace
3610);// These are "enumerated" HTML attributes that accept "true" and "false".
3611// In React, we let users pass `true` and `false` even though technically
3612// these aren't boolean attributes (they are coerced to strings).
3613['contentEditable','draggable','spellCheck','value'].forEach(function(name){properties[name]=new PropertyInfoRecord(name,BOOLEANISH_STRING,false,// mustUseProperty
3614name.toLowerCase(),// attributeName
3615null);}// attributeNamespace
3616);// These are "enumerated" SVG attributes that accept "true" and "false".
3617// In React, we let users pass `true` and `false` even though technically
3618// these aren't boolean attributes (they are coerced to strings).
3619// Since these are SVG attributes, their attribute names are case-sensitive.
3620['autoReverse','externalResourcesRequired','focusable','preserveAlpha'].forEach(function(name){properties[name]=new PropertyInfoRecord(name,BOOLEANISH_STRING,false,// mustUseProperty
3621name,// attributeName
3622null);}// attributeNamespace
3623);// These are HTML boolean attributes.
3624['allowFullScreen','async',// Note: there is a special case that prevents it from being written to the DOM
3625// on the client side because the browsers are inconsistent. Instead we call focus().
3626'autoFocus','autoPlay','controls','default','defer','disabled','formNoValidate','hidden','loop','noModule','noValidate','open','playsInline','readOnly','required','reversed','scoped','seamless',// Microdata
3627'itemScope'].forEach(function(name){properties[name]=new PropertyInfoRecord(name,BOOLEAN,false,// mustUseProperty
3628name.toLowerCase(),// attributeName
3629null);}// attributeNamespace
3630);// These are the few React props that we set as DOM properties
3631// rather than attributes. These are all booleans.
3632['checked',// Note: `option.selected` is not updated if `select.multiple` is
3633// disabled with `removeAttribute`. We have special logic for handling this.
3634'multiple','muted','selected'].forEach(function(name){properties[name]=new PropertyInfoRecord(name,BOOLEAN,true,// mustUseProperty
3635name,// attributeName
3636null);}// attributeNamespace
3637);// These are HTML attributes that are "overloaded booleans": they behave like
3638// booleans, but can also accept a string value.
3639['capture','download'].forEach(function(name){properties[name]=new PropertyInfoRecord(name,OVERLOADED_BOOLEAN,false,// mustUseProperty
3640name,// attributeName
3641null);}// attributeNamespace
3642);// These are HTML attributes that must be positive numbers.
3643['cols','rows','size','span'].forEach(function(name){properties[name]=new PropertyInfoRecord(name,POSITIVE_NUMERIC,false,// mustUseProperty
3644name,// attributeName
3645null);}// attributeNamespace
3646);// These are HTML attributes that must be numbers.
3647['rowSpan','start'].forEach(function(name){properties[name]=new PropertyInfoRecord(name,NUMERIC,false,// mustUseProperty
3648name.toLowerCase(),// attributeName
3649null);}// attributeNamespace
3650);var CAMELIZE=/[\-\:]([a-z])/g;var capitalize=function(token){return token[1].toUpperCase();};// This is a list of all SVG attributes that need special casing, namespacing,
3651// or boolean value assignment. Regular attributes that just accept strings
3652// and have the same names are omitted, just like in the HTML whitelist.
3653// Some of these attributes can be hard to find. This list was created by
3654// scrapping the MDN documentation.
3655['accent-height','alignment-baseline','arabic-form','baseline-shift','cap-height','clip-path','clip-rule','color-interpolation','color-interpolation-filters','color-profile','color-rendering','dominant-baseline','enable-background','fill-opacity','fill-rule','flood-color','flood-opacity','font-family','font-size','font-size-adjust','font-stretch','font-style','font-variant','font-weight','glyph-name','glyph-orientation-horizontal','glyph-orientation-vertical','horiz-adv-x','horiz-origin-x','image-rendering','letter-spacing','lighting-color','marker-end','marker-mid','marker-start','overline-position','overline-thickness','paint-order','panose-1','pointer-events','rendering-intent','shape-rendering','stop-color','stop-opacity','strikethrough-position','strikethrough-thickness','stroke-dasharray','stroke-dashoffset','stroke-linecap','stroke-linejoin','stroke-miterlimit','stroke-opacity','stroke-width','text-anchor','text-decoration','text-rendering','underline-position','underline-thickness','unicode-bidi','unicode-range','units-per-em','v-alphabetic','v-hanging','v-ideographic','v-mathematical','vector-effect','vert-adv-y','vert-origin-x','vert-origin-y','word-spacing','writing-mode','xmlns:xlink','x-height'].forEach(function(attributeName){var name=attributeName.replace(CAMELIZE,capitalize);properties[name]=new PropertyInfoRecord(name,STRING,false,// mustUseProperty
3656attributeName,null);}// attributeNamespace
3657);// String SVG attributes with the xlink namespace.
3658['xlink:actuate','xlink:arcrole','xlink:href','xlink:role','xlink:show','xlink:title','xlink:type'].forEach(function(attributeName){var name=attributeName.replace(CAMELIZE,capitalize);properties[name]=new PropertyInfoRecord(name,STRING,false,// mustUseProperty
3659attributeName,'http://www.w3.org/1999/xlink');});// String SVG attributes with the xml namespace.
3660['xml:base','xml:lang','xml:space'].forEach(function(attributeName){var name=attributeName.replace(CAMELIZE,capitalize);properties[name]=new PropertyInfoRecord(name,STRING,false,// mustUseProperty
3661attributeName,'http://www.w3.org/XML/1998/namespace');});// Special case: this attribute exists both in HTML and SVG.
3662// Its "tabindex" attribute name is case-sensitive in SVG so we can't just use
3663// its React `tabIndex` name, like we do for attributes that exist only in HTML.
3664properties.tabIndex=new PropertyInfoRecord('tabIndex',STRING,false,// mustUseProperty
3665'tabindex',// attributeName
3666null);/**
3667 * Get the value for a property on a node. Only used in DEV for SSR validation.
3668 * The "expected" argument is used as a hint of what the expected value is.
3669 * Some properties have multiple equivalent values.
3670 */function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it
3671// for the error message.
3672return node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is
3673// the fact that we have it is the same as the expected.
3674return expected;}// Even if this property uses a namespace we use getAttribute
3675// because we assume its namespaced name is the same as our config.
3676// To use getAttributeNS we need the local name which we don't have
3677// in our config atm.
3678stringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}/**
3679 * Get the value for a attribute on a node. Only used in DEV for SSR validation.
3680 * The third argument is used as a hint of what the expected value is. Some
3681 * attributes have multiple equivalent values.
3682 */function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}/**
3683 * Sets the value for a property on a node.
3684 *
3685 * @param {DOMElement} node
3686 * @param {string} name
3687 * @param {*} value
3688 */function setValueForProperty(node,name,value,isCustomComponentTag){var propertyInfo=getPropertyInfo(name);if(shouldIgnoreAttribute(name,propertyInfo,isCustomComponentTag)){return;}if(shouldRemoveAttribute(name,value,propertyInfo,isCustomComponentTag)){value=null;}// If the prop isn't in the special list, treat it as a simple attribute.
3689if(isCustomComponentTag||propertyInfo===null){if(isAttributeNameSafe(name)){var _attributeName=name;if(value===null){node.removeAttribute(_attributeName);}else{node.setAttribute(_attributeName,''+value);}}return;}var mustUseProperty=propertyInfo.mustUseProperty;if(mustUseProperty){var propertyName=propertyInfo.propertyName;if(value===null){var type=propertyInfo.type;node[propertyName]=type===BOOLEAN?false:'';}else{// Contrary to `setAttribute`, object properties are properly
3690// `toString`ed by IE8/9.
3691node[propertyName]=value;}return;}// The rest are treated as attributes with special cases.
3692var attributeName=propertyInfo.attributeName,attributeNamespace=propertyInfo.attributeNamespace;if(value===null){node.removeAttribute(attributeName);}else{var _type=propertyInfo.type;var attributeValue=void 0;if(_type===BOOLEAN||_type===OVERLOADED_BOOLEAN&&value===true){attributeValue='';}else{// `setAttribute` with objects becomes only `[object]` in IE8/9,
3693// ('' + value) makes it output the correct toString()-value.
3694attributeValue=''+value;}if(attributeNamespace){node.setAttributeNS(attributeNamespace,attributeName,attributeValue);}else{node.setAttribute(attributeName,attributeValue);}}}// Flow does not allow string concatenation of most non-string types. To work
3695// around this limitation, we use an opaque type that can only be obtained by
3696// passing the value through getToStringValue first.
3697function toString(value){return''+value;}function getToStringValue(value){switch(typeof value){case'boolean':case'number':case'object':case'string':case'undefined':return value;default:// function, symbol are assigned as empty strings
3698return'';}}var ReactDebugCurrentFrame$1=null;var ReactControlledValuePropTypes={checkPropTypes:null};{ReactDebugCurrentFrame$1=ReactSharedInternals.ReactDebugCurrentFrame;var hasReadOnlyValue={button:true,checkbox:true,image:true,hidden:true,radio:true,reset:true,submit:true};var propTypes={value:function(props,propName,componentName){if(hasReadOnlyValue[props.type]||props.onChange||props.readOnly||props.disabled||props[propName]==null){return null;}return new Error('You provided a `value` prop to a form field without an '+'`onChange` handler. This will render a read-only field. If '+'the field should be mutable use `defaultValue`. Otherwise, '+'set either `onChange` or `readOnly`.');},checked:function(props,propName,componentName){if(props.onChange||props.readOnly||props.disabled||props[propName]==null){return null;}return new Error('You provided a `checked` prop to a form field without an '+'`onChange` handler. This will render a read-only field. If '+'the field should be mutable use `defaultChecked`. Otherwise, '+'set either `onChange` or `readOnly`.');}};/**
3699 * Provide a linked `value` attribute for controlled forms. You should not use
3700 * this outside of the ReactDOM controlled form components.
3701 */ReactControlledValuePropTypes.checkPropTypes=function(tagName,props){checkPropTypes(propTypes,props,'prop',tagName,ReactDebugCurrentFrame$1.getStackAddendum);};}// Exports ReactDOM.createRoot
3702var enableUserTimingAPI=true;// Experimental error-boundary API that can recover from errors within a single
3703// render phase
3704var enableGetDerivedStateFromCatch=false;// Suspense
3705var enableSuspense=false;// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
3706var debugRenderPhaseSideEffects=false;// In some cases, StrictMode should also double-render lifecycles.
3707// This can be confusing for tests though,
3708// And it can be bad for performance in production.
3709// This feature flag can be used to control the behavior:
3710var debugRenderPhaseSideEffectsForStrictMode=true;// To preserve the "Pause on caught exceptions" behavior of the debugger, we
3711// replay the begin phase of a failed component inside invokeGuardedCallback.
3712var replayFailedUnitOfWorkWithInvokeGuardedCallback=true;// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
3713var warnAboutDeprecatedLifecycles=false;// Warn about legacy context API
3714var warnAboutLegacyContextAPI=false;// Gather advanced timing metrics for Profiler subtrees.
3715var enableProfilerTimer=true;// Trace which interactions trigger each commit.
3716var enableSchedulerTracing=true;// Only used in www builds.
3717// Only used in www builds.
3718// React Fire: prevent the value and checked attributes from syncing
3719// with their related DOM properties
3720var disableInputAttributeSyncing=false;// TODO: direct imports like some-package/src/* are bad. Fix me.
3721var didWarnValueDefaultValue=false;var didWarnCheckedDefaultChecked=false;var didWarnControlledToUncontrolled=false;var didWarnUncontrolledToControlled=false;function isControlled(props){var usesChecked=props.type==='checkbox'||props.type==='radio';return usesChecked?props.checked!=null:props.value!=null;}/**
3722 * Implements an <input> host component that allows setting these optional
3723 * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
3724 *
3725 * If `checked` or `value` are not supplied (or null/undefined), user actions
3726 * that affect the checked state or value will trigger updates to the element.
3727 *
3728 * If they are supplied (and not null/undefined), the rendered element will not
3729 * trigger updates to the element. Instead, the props must change in order for
3730 * the rendered element to be updated.
3731 *
3732 * The rendered element will be initialized as unchecked (or `defaultChecked`)
3733 * with an empty value (or `defaultValue`).
3734 *
3735 * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
3736 */function getHostProps(element,props){var node=element;var checked=props.checked;var hostProps=_assign({},props,{defaultChecked:undefined,defaultValue:undefined,value:undefined,checked:checked!=null?checked:node._wrapperState.initialChecked});return hostProps;}function initWrapperState(element,props){{ReactControlledValuePropTypes.checkPropTypes('input',props);if(props.checked!==undefined&&props.defaultChecked!==undefined&&!didWarnCheckedDefaultChecked){warning$1(false,'%s contains an input of type %s with both checked and defaultChecked props. '+'Input elements must be either controlled or uncontrolled '+'(specify either the checked prop, or the defaultChecked prop, but not '+'both). Decide between using a controlled or uncontrolled input '+'element and remove one of these props. More info: '+'https://fb.me/react-controlled-components',getCurrentFiberOwnerNameInDevOrNull()||'A component',props.type);didWarnCheckedDefaultChecked=true;}if(props.value!==undefined&&props.defaultValue!==undefined&&!didWarnValueDefaultValue){warning$1(false,'%s contains an input of type %s with both value and defaultValue props. '+'Input elements must be either controlled or uncontrolled '+'(specify either the value prop, or the defaultValue prop, but not '+'both). Decide between using a controlled or uncontrolled input '+'element and remove one of these props. More info: '+'https://fb.me/react-controlled-components',getCurrentFiberOwnerNameInDevOrNull()||'A component',props.type);didWarnValueDefaultValue=true;}}var node=element;var defaultValue=props.defaultValue==null?'':props.defaultValue;node._wrapperState={initialChecked:props.checked!=null?props.checked:props.defaultChecked,initialValue:getToStringValue(props.value!=null?props.value:defaultValue),controlled:isControlled(props)};}function updateChecked(element,props){var node=element;var checked=props.checked;if(checked!=null){setValueForProperty(node,'checked',checked,false);}}function updateWrapper(element,props){var node=element;{var _controlled=isControlled(props);if(!node._wrapperState.controlled&&_controlled&&!didWarnUncontrolledToControlled){warning$1(false,'A component is changing an uncontrolled input of type %s to be controlled. '+'Input elements should not switch from uncontrolled to controlled (or vice versa). '+'Decide between using a controlled or uncontrolled input '+'element for the lifetime of the component. More info: https://fb.me/react-controlled-components',props.type);didWarnUncontrolledToControlled=true;}if(node._wrapperState.controlled&&!_controlled&&!didWarnControlledToUncontrolled){warning$1(false,'A component is changing a controlled input of type %s to be uncontrolled. '+'Input elements should not switch from controlled to uncontrolled (or vice versa). '+'Decide between using a controlled or uncontrolled input '+'element for the lifetime of the component. More info: https://fb.me/react-controlled-components',props.type);didWarnControlledToUncontrolled=true;}}updateChecked(element,props);var value=getToStringValue(props.value);var type=props.type;if(value!=null){if(type==='number'){if(value===0&&node.value===''||// We explicitly want to coerce to number here if possible.
3737// eslint-disable-next-line
3738node.value!=value){node.value=toString(value);}}else if(node.value!==toString(value)){node.value=toString(value);}}else if(type==='submit'||type==='reset'){// Submit/reset inputs need the attribute removed completely to avoid
3739// blank-text buttons.
3740node.removeAttribute('value');return;}if(disableInputAttributeSyncing){// When not syncing the value attribute, React only assigns a new value
3741// whenever the defaultValue React prop has changed. When not present,
3742// React does nothing
3743if(props.hasOwnProperty('defaultValue')){setDefaultValue(node,props.type,getToStringValue(props.defaultValue));}}else{// When syncing the value attribute, the value comes from a cascade of
3744// properties:
3745// 1. The value React property
3746// 2. The defaultValue React property
3747// 3. Otherwise there should be no change
3748if(props.hasOwnProperty('value')){setDefaultValue(node,props.type,value);}else if(props.hasOwnProperty('defaultValue')){setDefaultValue(node,props.type,getToStringValue(props.defaultValue));}}if(disableInputAttributeSyncing){// When not syncing the checked attribute, the attribute is directly
3749// controllable from the defaultValue React property. It needs to be
3750// updated as new props come in.
3751if(props.defaultChecked==null){node.removeAttribute('checked');}else{node.defaultChecked=!!props.defaultChecked;}}else{// When syncing the checked attribute, it only changes when it needs
3752// to be removed, such as transitioning from a checkbox into a text input
3753if(props.checked==null&&props.defaultChecked!=null){node.defaultChecked=!!props.defaultChecked;}}}function postMountWrapper(element,props,isHydrating){var node=element;// Do not assign value if it is already set. This prevents user text input
3754// from being lost during SSR hydration.
3755if(props.hasOwnProperty('value')||props.hasOwnProperty('defaultValue')){var type=props.type;var isButton=type==='submit'||type==='reset';// Avoid setting value attribute on submit/reset inputs as it overrides the
3756// default value provided by the browser. See: #12872
3757if(isButton&&(props.value===undefined||props.value===null)){return;}var _initialValue=toString(node._wrapperState.initialValue);// Do not assign value if it is already set. This prevents user text input
3758// from being lost during SSR hydration.
3759if(!isHydrating){if(disableInputAttributeSyncing){var value=getToStringValue(props.value);// When not syncing the value attribute, the value property points
3760// directly to the React prop. Only assign it if it exists.
3761if(value!=null){// Always assign on buttons so that it is possible to assign an
3762// empty string to clear button text.
3763//
3764// Otherwise, do not re-assign the value property if is empty. This
3765// potentially avoids a DOM write and prevents Firefox (~60.0.1) from
3766// prematurely marking required inputs as invalid. Equality is compared
3767// to the current value in case the browser provided value is not an
3768// empty string.
3769if(isButton||value!==node.value){node.value=toString(value);}}}else{// When syncing the value attribute, the value property should use
3770// the the wrapperState._initialValue property. This uses:
3771//
3772// 1. The value React property when present
3773// 2. The defaultValue React property when present
3774// 3. An empty string
3775if(_initialValue!==node.value){node.value=_initialValue;}}}if(disableInputAttributeSyncing){// When not syncing the value attribute, assign the value attribute
3776// directly from the defaultValue React property (when present)
3777var defaultValue=getToStringValue(props.defaultValue);if(defaultValue!=null){node.defaultValue=toString(defaultValue);}}else{// Otherwise, the value attribute is synchronized to the property,
3778// so we assign defaultValue to the same thing as the value property
3779// assignment step above.
3780node.defaultValue=_initialValue;}}// Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
3781// this is needed to work around a chrome bug where setting defaultChecked
3782// will sometimes influence the value of checked (even after detachment).
3783// Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
3784// We need to temporarily unset name to avoid disrupting radio button groups.
3785var name=node.name;if(name!==''){node.name='';}if(disableInputAttributeSyncing){// When not syncing the checked attribute, the checked property
3786// never gets assigned. It must be manually set. We don't want
3787// to do this when hydrating so that existing user input isn't
3788// modified
3789if(!isHydrating){updateChecked(element,props);}// Only assign the checked attribute if it is defined. This saves
3790// a DOM write when controlling the checked attribute isn't needed
3791// (text inputs, submit/reset)
3792if(props.hasOwnProperty('defaultChecked')){node.defaultChecked=!node.defaultChecked;node.defaultChecked=!!props.defaultChecked;}}else{// When syncing the checked attribute, both the the checked property and
3793// attribute are assigned at the same time using defaultChecked. This uses:
3794//
3795// 1. The checked React property when present
3796// 2. The defaultChecked React property when present
3797// 3. Otherwise, false
3798node.defaultChecked=!node.defaultChecked;node.defaultChecked=!!node._wrapperState.initialChecked;}if(name!==''){node.name=name;}}function restoreControlledState(element,props){var node=element;updateWrapper(node,props);updateNamedCousins(node,props);}function updateNamedCousins(rootNode,props){var name=props.name;if(props.type==='radio'&&name!=null){var queryRoot=rootNode;while(queryRoot.parentNode){queryRoot=queryRoot.parentNode;}// If `rootNode.form` was non-null, then we could try `form.elements`,
3799// but that sometimes behaves strangely in IE8. We could also try using
3800// `form.getElementsByName`, but that will only return direct children
3801// and won't include inputs that use the HTML5 `form=` attribute. Since
3802// the input might not even be in a form. It might not even be in the
3803// document. Let's just use the local `querySelectorAll` to ensure we don't
3804// miss anything.
3805var group=queryRoot.querySelectorAll('input[name='+JSON.stringify(''+name)+'][type="radio"]');for(var i=0;i<group.length;i++){var otherNode=group[i];if(otherNode===rootNode||otherNode.form!==rootNode.form){continue;}// This will throw if radio buttons rendered by different copies of React
3806// and the same name are rendered into the same form (same as #1939).
3807// That's probably okay; we don't support it just as we don't support
3808// mixing React radio buttons with non-React ones.
3809var otherProps=getFiberCurrentPropsFromNode$1(otherNode);!otherProps?invariant(false,'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.'):void 0;// We need update the tracked value on the named cousin since the value
3810// was changed but the input saw no event or value set
3811updateValueIfChanged(otherNode);// If this is a controlled radio button group, forcing the input that
3812// was previously checked to update will cause it to be come re-checked
3813// as appropriate.
3814updateWrapper(otherNode,otherProps);}}}// In Chrome, assigning defaultValue to certain input types triggers input validation.
3815// For number inputs, the display value loses trailing decimal points. For email inputs,
3816// Chrome raises "The specified value <x> is not a valid email address".
3817//
3818// Here we check to see if the defaultValue has actually changed, avoiding these problems
3819// when the user is inputting text
3820//
3821// https://github.com/facebook/react/issues/7253
3822function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js
3823type!=='number'||node.ownerDocument.activeElement!==node){if(value==null){node.defaultValue=toString(node._wrapperState.initialValue);}else if(node.defaultValue!==toString(value)){node.defaultValue=toString(value);}}}var eventTypes$1={change:{phasedRegistrationNames:{bubbled:'onChange',captured:'onChangeCapture'},dependencies:[TOP_BLUR,TOP_CHANGE,TOP_CLICK,TOP_FOCUS,TOP_INPUT,TOP_KEY_DOWN,TOP_KEY_UP,TOP_SELECTION_CHANGE]}};function createAndAccumulateChangeEvent(inst,nativeEvent,target){var event=SyntheticEvent.getPooled(eventTypes$1.change,inst,nativeEvent,target);event.type='change';// Flag this event loop as needing state restore.
3824enqueueStateRestore(target);accumulateTwoPhaseDispatches(event);return event;}/**
3825 * For IE shims
3826 */var activeElement=null;var activeElementInst=null;/**
3827 * SECTION: handle `change` event
3828 */function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}function manualDispatchChangeEvent(nativeEvent){var event=createAndAccumulateChangeEvent(activeElementInst,nativeEvent,getEventTarget(nativeEvent));// If change and propertychange bubbled, we'd just bind to it like all the
3829// other events and have it go through ReactBrowserEventEmitter. Since it
3830// doesn't, we manually listen for the events and so we have to enqueue and
3831// process the abstract event manually.
3832//
3833// Batching is necessary here in order to ensure that all event handlers run
3834// before the next rerender (including event handlers attached to ancestor
3835// elements instead of directly on the input). Without this, controlled
3836// components don't work properly in conjunction with event bubbling because
3837// the component is rerendered and the value reverted before all the event
3838// handlers can run. See https://github.com/facebook/react/issues/708.
3839batchedUpdates(runEventInBatch,event);}function runEventInBatch(event){runEventsInBatch(event,false);}function getInstIfValueChanged(targetInst){var targetNode=getNodeFromInstance$1(targetInst);if(updateValueIfChanged(targetNode)){return targetInst;}}function getTargetInstForChangeEvent(topLevelType,targetInst){if(topLevelType===TOP_CHANGE){return targetInst;}}/**
3840 * SECTION: handle `input` event
3841 */var isInputEventSupported=false;if(canUseDOM){// IE9 claims to support the input event but fails to trigger it when
3842// deleting text, so we ignore its input events.
3843isInputEventSupported=isEventSupported('input')&&(!document.documentMode||document.documentMode>9);}/**
3844 * (For IE <=9) Starts tracking propertychange events on the passed-in element
3845 * and override the value property so that we can distinguish user events from
3846 * value changes in JS.
3847 */function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}/**
3848 * (For IE <=9) Removes the event listeners from the currently-tracked element,
3849 * if any exists.
3850 */function stopWatchingForValueChange(){if(!activeElement){return;}activeElement.detachEvent('onpropertychange',handlePropertyChange);activeElement=null;activeElementInst=null;}/**
3851 * (For IE <=9) Handles a propertychange event, sending a `change` event if
3852 * the value of the active element has changed.
3853 */function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}function handleEventsForInputEventPolyfill(topLevelType,target,targetInst){if(topLevelType===TOP_FOCUS){// In IE9, propertychange fires for most input events but is buggy and
3854// doesn't fire when text is deleted, but conveniently, selectionchange
3855// appears to fire in all of the remaining cases so we catch those and
3856// forward the event if the value has changed
3857// In either case, we don't want to call the event handler if the value
3858// is changed from JS so we redefine a setter for `.value` that updates
3859// our activeElementValue variable, allowing us to ignore those changes
3860//
3861// stopWatching() should be a noop here but we call it just in case we
3862// missed a blur event somehow.
3863stopWatchingForValueChange();startWatchingForValueChange(target,targetInst);}else if(topLevelType===TOP_BLUR){stopWatchingForValueChange();}}// For IE8 and IE9.
3864function getTargetInstForInputEventPolyfill(topLevelType,targetInst){if(topLevelType===TOP_SELECTION_CHANGE||topLevelType===TOP_KEY_UP||topLevelType===TOP_KEY_DOWN){// On the selectionchange event, the target is just document which isn't
3865// helpful for us so just check activeElement instead.
3866//
3867// 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
3868// propertychange on the first input event after setting `value` from a
3869// script and fires only keydown, keypress, keyup. Catching keyup usually
3870// gets it and catching keydown lets us fire an event for the first
3871// keystroke if user does a key repeat (it'll be a little delayed: right
3872// before the second keystroke). Other input methods (e.g., paste) seem to
3873// fire selectionchange normally.
3874return getInstIfValueChanged(activeElementInst);}}/**
3875 * SECTION: handle `click` event
3876 */function shouldUseClickEvent(elem){// Use the `click` event to detect changes to checkbox and radio inputs.
3877// This approach works across all browsers, whereas `change` does not fire
3878// until `blur` in IE8.
3879var nodeName=elem.nodeName;return nodeName&&nodeName.toLowerCase()==='input'&&(elem.type==='checkbox'||elem.type==='radio');}function getTargetInstForClickEvent(topLevelType,targetInst){if(topLevelType===TOP_CLICK){return getInstIfValueChanged(targetInst);}}function getTargetInstForInputOrChangeEvent(topLevelType,targetInst){if(topLevelType===TOP_INPUT||topLevelType===TOP_CHANGE){return getInstIfValueChanged(targetInst);}}function handleControlledInputBlur(node){var state=node._wrapperState;if(!state||!state.controlled||node.type!=='number'){return;}if(!disableInputAttributeSyncing){// If controlled, assign the value attribute to the current value on blur
3880setDefaultValue(node,'number',node.value);}}/**
3881 * This plugin creates an `onChange` event that normalizes change events
3882 * across form elements. This event fires at a time when it's possible to
3883 * change the element's value without seeing a flicker.
3884 *
3885 * Supported elements are:
3886 * - input (see `isTextInputElement`)
3887 * - textarea
3888 * - select
3889 */var ChangeEventPlugin={eventTypes:eventTypes$1,_isInputEventSupported:isInputEventSupported,extractEvents:function(topLevelType,targetInst,nativeEvent,nativeEventTarget){var targetNode=targetInst?getNodeFromInstance$1(targetInst):window;var getTargetInstFunc=void 0,handleEventFunc=void 0;if(shouldUseChangeEvent(targetNode)){getTargetInstFunc=getTargetInstForChangeEvent;}else if(isTextInputElement(targetNode)){if(isInputEventSupported){getTargetInstFunc=getTargetInstForInputOrChangeEvent;}else{getTargetInstFunc=getTargetInstForInputEventPolyfill;handleEventFunc=handleEventsForInputEventPolyfill;}}else if(shouldUseClickEvent(targetNode)){getTargetInstFunc=getTargetInstForClickEvent;}if(getTargetInstFunc){var inst=getTargetInstFunc(topLevelType,targetInst);if(inst){var event=createAndAccumulateChangeEvent(inst,nativeEvent,nativeEventTarget);return event;}}if(handleEventFunc){handleEventFunc(topLevelType,targetNode,targetInst);}// When blurring, set the value attribute for number inputs
3890if(topLevelType===TOP_BLUR){handleControlledInputBlur(targetNode);}}};/**
3891 * Module that is injectable into `EventPluginHub`, that specifies a
3892 * deterministic ordering of `EventPlugin`s. A convenient way to reason about
3893 * plugins, without having to package every one of them. This is better than
3894 * having plugins be ordered in the same order that they are injected because
3895 * that ordering would be influenced by the packaging order.
3896 * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
3897 * preventing default on events is convenient in `SimpleEventPlugin` handlers.
3898 */var DOMEventPluginOrder=['ResponderEventPlugin','SimpleEventPlugin','EnterLeaveEventPlugin','ChangeEventPlugin','SelectEventPlugin','BeforeInputEventPlugin'];var SyntheticUIEvent=SyntheticEvent.extend({view:null,detail:null});/**
3899 * Translation from modifier key to the associated property in the event.
3900 * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
3901 */var modifierKeyToProp={Alt:'altKey',Control:'ctrlKey',Meta:'metaKey',Shift:'shiftKey'};// IE8 does not implement getModifierState so we simply map it to the only
3902// modifier keys exposed by the event itself, does not support Lock-keys.
3903// Currently, all major browsers except Chrome seems to support Lock-keys.
3904function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}function getEventModifierState(nativeEvent){return modifierStateGetter;}var previousScreenX=0;var previousScreenY=0;// Use flags to signal movementX/Y has already been set
3905var isMovementXSet=false;var isMovementYSet=false;/**
3906 * @interface MouseEvent
3907 * @see http://www.w3.org/TR/DOM-Level-3-Events/
3908 */var SyntheticMouseEvent=SyntheticUIEvent.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:getEventModifierState,button:null,buttons:null,relatedTarget:function(event){return event.relatedTarget||(event.fromElement===event.srcElement?event.toElement:event.fromElement);},movementX:function(event){if('movementX'in event){return event.movementX;}var screenX=previousScreenX;previousScreenX=event.screenX;if(!isMovementXSet){isMovementXSet=true;return 0;}return event.type==='mousemove'?event.screenX-screenX:0;},movementY:function(event){if('movementY'in event){return event.movementY;}var screenY=previousScreenY;previousScreenY=event.screenY;if(!isMovementYSet){isMovementYSet=true;return 0;}return event.type==='mousemove'?event.screenY-screenY:0;}});/**
3909 * @interface PointerEvent
3910 * @see http://www.w3.org/TR/pointerevents/
3911 */var SyntheticPointerEvent=SyntheticMouseEvent.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null});var eventTypes$2={mouseEnter:{registrationName:'onMouseEnter',dependencies:[TOP_MOUSE_OUT,TOP_MOUSE_OVER]},mouseLeave:{registrationName:'onMouseLeave',dependencies:[TOP_MOUSE_OUT,TOP_MOUSE_OVER]},pointerEnter:{registrationName:'onPointerEnter',dependencies:[TOP_POINTER_OUT,TOP_POINTER_OVER]},pointerLeave:{registrationName:'onPointerLeave',dependencies:[TOP_POINTER_OUT,TOP_POINTER_OVER]}};var EnterLeaveEventPlugin={eventTypes:eventTypes$2,/**
3912 * For almost every interaction we care about, there will be both a top-level
3913 * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
3914 * we do not extract duplicate events. However, moving the mouse into the
3915 * browser from outside will not fire a `mouseout` event. In this case, we use
3916 * the `mouseover` top-level event.
3917 */extractEvents:function(topLevelType,targetInst,nativeEvent,nativeEventTarget){var isOverEvent=topLevelType===TOP_MOUSE_OVER||topLevelType===TOP_POINTER_OVER;var isOutEvent=topLevelType===TOP_MOUSE_OUT||topLevelType===TOP_POINTER_OUT;if(isOverEvent&&(nativeEvent.relatedTarget||nativeEvent.fromElement)){return null;}if(!isOutEvent&&!isOverEvent){// Must not be a mouse or pointer in or out - ignoring.
3918return null;}var win=void 0;if(nativeEventTarget.window===nativeEventTarget){// `nativeEventTarget` is probably a window object.
3919win=nativeEventTarget;}else{// TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
3920var doc=nativeEventTarget.ownerDocument;if(doc){win=doc.defaultView||doc.parentWindow;}else{win=window;}}var from=void 0;var to=void 0;if(isOutEvent){from=targetInst;var related=nativeEvent.relatedTarget||nativeEvent.toElement;to=related?getClosestInstanceFromNode(related):null;}else{// Moving to a node from outside the window.
3921from=null;to=targetInst;}if(from===to){// Nothing pertains to our managed components.
3922return null;}var eventInterface=void 0,leaveEventType=void 0,enterEventType=void 0,eventTypePrefix=void 0;if(topLevelType===TOP_MOUSE_OUT||topLevelType===TOP_MOUSE_OVER){eventInterface=SyntheticMouseEvent;leaveEventType=eventTypes$2.mouseLeave;enterEventType=eventTypes$2.mouseEnter;eventTypePrefix='mouse';}else if(topLevelType===TOP_POINTER_OUT||topLevelType===TOP_POINTER_OVER){eventInterface=SyntheticPointerEvent;leaveEventType=eventTypes$2.pointerLeave;enterEventType=eventTypes$2.pointerEnter;eventTypePrefix='pointer';}var fromNode=from==null?win:getNodeFromInstance$1(from);var toNode=to==null?win:getNodeFromInstance$1(to);var leave=eventInterface.getPooled(leaveEventType,from,nativeEvent,nativeEventTarget);leave.type=eventTypePrefix+'leave';leave.target=fromNode;leave.relatedTarget=toNode;var enter=eventInterface.getPooled(enterEventType,to,nativeEvent,nativeEventTarget);enter.type=eventTypePrefix+'enter';enter.target=toNode;enter.relatedTarget=fromNode;accumulateEnterLeaveDispatches(leave,enter,from,to);return[leave,enter];}};/*eslint-disable no-self-compare */var hasOwnProperty$1=Object.prototype.hasOwnProperty;/**
3923 * inlined Object.is polyfill to avoid requiring consumers ship their own
3924 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
3925 */function is(x,y){// SameValue algorithm
3926if(x===y){// Steps 1-5, 7-10
3927// Steps 6.b-6.e: +0 != -0
3928// Added the nonzero y check to make Flow happy, but it is redundant
3929return x!==0||y!==0||1/x===1/y;}else{// Step 6.a: NaN == NaN
3930return x!==x&&y!==y;}}/**
3931 * Performs equality by iterating through keys on an object and returning false
3932 * when any key has values which are not strictly equal between the arguments.
3933 * Returns true when the values of all keys are strictly equal.
3934 */function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.
3935for(var i=0;i<keysA.length;i++){if(!hasOwnProperty$1.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}/**
3936 * `ReactInstanceMap` maintains a mapping from a public facing stateful
3937 * instance (key) and the internal representation (value). This allows public
3938 * methods to accept the user facing instance as an argument and map them back
3939 * to internal methods.
3940 *
3941 * Note that this module is currently shared and assumed to be stateless.
3942 * If this becomes an actual Map, that will break.
3943 */ /**
3944 * This API should be called `delete` but we'd have to make sure to always
3945 * transform these to strings for IE support. When this transform is fully
3946 * supported we can rename it.
3947 */function get(key){return key._reactInternalFiber;}function has(key){return key._reactInternalFiber!==undefined;}function set(key,value){key._reactInternalFiber=value;}// Don't change these two values. They're used by React Dev Tools.
3948var NoEffect=/* */0;var PerformedWork=/* */1;// You can change the rest (and add more).
3949var Placement=/* */2;var Update=/* */4;var PlacementAndUpdate=/* */6;var Deletion=/* */8;var ContentReset=/* */16;var Callback=/* */32;var DidCapture=/* */64;var Ref=/* */128;var Snapshot=/* */256;// Update & Callback & Ref & Snapshot
3950var LifecycleEffectMask=/* */420;// Union of all host effects
3951var HostEffectMask=/* */511;var Incomplete=/* */512;var ShouldCapture=/* */1024;var ReactCurrentOwner$1=ReactSharedInternals.ReactCurrentOwner;var MOUNTING=1;var MOUNTED=2;var UNMOUNTED=3;function isFiberMountedImpl(fiber){var node=fiber;if(!fiber.alternate){// If there is no alternate, this might be a new tree that isn't inserted
3952// yet. If it is, then it will have a pending insertion effect on it.
3953if((node.effectTag&Placement)!==NoEffect){return MOUNTING;}while(node.return){node=node.return;if((node.effectTag&Placement)!==NoEffect){return MOUNTING;}}}else{while(node.return){node=node.return;}}if(node.tag===HostRoot){// TODO: Check if this was a nested HostRoot when used with
3954// renderContainerIntoSubtree.
3955return MOUNTED;}// If we didn't hit the root, that means that we're in an disconnected tree
3956// that has been unmounted.
3957return UNMOUNTED;}function isFiberMounted(fiber){return isFiberMountedImpl(fiber)===MOUNTED;}function isMounted(component){{var owner=ReactCurrentOwner$1.current;if(owner!==null&&(owner.tag===ClassComponent||owner.tag===ClassComponentLazy)){var ownerFiber=owner;var instance=ownerFiber.stateNode;!instance._warnedAboutRefsInRender?warningWithoutStack$1(false,'%s is accessing isMounted inside its render() function. '+'render() should be a pure function of props and state. It should '+'never access something that requires stale data from the previous '+'render, such as refs. Move this logic to componentDidMount and '+'componentDidUpdate instead.',getComponentName(ownerFiber.type)||'A component'):void 0;instance._warnedAboutRefsInRender=true;}}var fiber=get(component);if(!fiber){return false;}return isFiberMountedImpl(fiber)===MOUNTED;}function assertIsMounted(fiber){!(isFiberMountedImpl(fiber)===MOUNTED)?invariant(false,'Unable to find node on an unmounted component.'):void 0;}function findCurrentFiberUsingSlowPath(fiber){var alternate=fiber.alternate;if(!alternate){// If there is no alternate, then we only need to check if it is mounted.
3958var state=isFiberMountedImpl(fiber);!(state!==UNMOUNTED)?invariant(false,'Unable to find node on an unmounted component.'):void 0;if(state===MOUNTING){return null;}return fiber;}// If we have two possible branches, we'll walk backwards up to the root
3959// to see what path the root points to. On the way we may hit one of the
3960// special cases and we'll deal with them.
3961var a=fiber;var b=alternate;while(true){var parentA=a.return;var parentB=parentA?parentA.alternate:null;if(!parentA||!parentB){// We're at the root.
3962break;}// If both copies of the parent fiber point to the same child, we can
3963// assume that the child is current. This happens when we bailout on low
3964// priority: the bailed out fiber's child reuses the current child.
3965if(parentA.child===parentB.child){var child=parentA.child;while(child){if(child===a){// We've determined that A is the current branch.
3966assertIsMounted(parentA);return fiber;}if(child===b){// We've determined that B is the current branch.
3967assertIsMounted(parentA);return alternate;}child=child.sibling;}// We should never have an alternate for any mounting node. So the only
3968// way this could possibly happen is if this was unmounted, if at all.
3969invariant(false,'Unable to find node on an unmounted component.');}if(a.return!==b.return){// The return pointer of A and the return pointer of B point to different
3970// fibers. We assume that return pointers never criss-cross, so A must
3971// belong to the child set of A.return, and B must belong to the child
3972// set of B.return.
3973a=parentA;b=parentB;}else{// The return pointers point to the same fiber. We'll have to use the
3974// default, slow path: scan the child sets of each parent alternate to see
3975// which child belongs to which set.
3976//
3977// Search parent A's child set
3978var didFindChild=false;var _child=parentA.child;while(_child){if(_child===a){didFindChild=true;a=parentA;b=parentB;break;}if(_child===b){didFindChild=true;b=parentA;a=parentB;break;}_child=_child.sibling;}if(!didFindChild){// Search parent B's child set
3979_child=parentB.child;while(_child){if(_child===a){didFindChild=true;a=parentB;b=parentA;break;}if(_child===b){didFindChild=true;b=parentB;a=parentA;break;}_child=_child.sibling;}!didFindChild?invariant(false,'Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.'):void 0;}}!(a.alternate===b)?invariant(false,'Return fibers should always be each others\' alternates. This error is likely caused by a bug in React. Please file an issue.'):void 0;}// If the root is not a host container, we're in a disconnected tree. I.e.
3980// unmounted.
3981!(a.tag===HostRoot)?invariant(false,'Unable to find node on an unmounted component.'):void 0;if(a.stateNode.current===a){// We've determined that A is the current branch.
3982return fiber;}// Otherwise B has to be current branch.
3983return alternate;}function findCurrentHostFiber(parent){var currentParent=findCurrentFiberUsingSlowPath(parent);if(!currentParent){return null;}// Next we'll drill down this component to find the first HostComponent/Text.
3984var node=currentParent;while(true){if(node.tag===HostComponent||node.tag===HostText){return node;}else if(node.child){node.child.return=node;node=node.child;continue;}if(node===currentParent){return null;}while(!node.sibling){if(!node.return||node.return===currentParent){return null;}node=node.return;}node.sibling.return=node.return;node=node.sibling;}// Flow needs the return null here, but ESLint complains about it.
3985// eslint-disable-next-line no-unreachable
3986return null;}function findCurrentHostFiberWithNoPortals(parent){var currentParent=findCurrentFiberUsingSlowPath(parent);if(!currentParent){return null;}// Next we'll drill down this component to find the first HostComponent/Text.
3987var node=currentParent;while(true){if(node.tag===HostComponent||node.tag===HostText){return node;}else if(node.child&&node.tag!==HostPortal){node.child.return=node;node=node.child;continue;}if(node===currentParent){return null;}while(!node.sibling){if(!node.return||node.return===currentParent){return null;}node=node.return;}node.sibling.return=node.return;node=node.sibling;}// Flow needs the return null here, but ESLint complains about it.
3988// eslint-disable-next-line no-unreachable
3989return null;}function addEventBubbleListener(element,eventType,listener){element.addEventListener(eventType,listener,false);}function addEventCaptureListener(element,eventType,listener){element.addEventListener(eventType,listener,true);}/**
3990 * @interface Event
3991 * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
3992 * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
3993 */var SyntheticAnimationEvent=SyntheticEvent.extend({animationName:null,elapsedTime:null,pseudoElement:null});/**
3994 * @interface Event
3995 * @see http://www.w3.org/TR/clipboard-apis/
3996 */var SyntheticClipboardEvent=SyntheticEvent.extend({clipboardData:function(event){return'clipboardData'in event?event.clipboardData:window.clipboardData;}});/**
3997 * @interface FocusEvent
3998 * @see http://www.w3.org/TR/DOM-Level-3-Events/
3999 */var SyntheticFocusEvent=SyntheticUIEvent.extend({relatedTarget:null});/**
4000 * `charCode` represents the actual "character code" and is safe to use with
4001 * `String.fromCharCode`. As such, only keys that correspond to printable
4002 * characters produce a valid `charCode`, the only exception to this is Enter.
4003 * The Tab-key is considered non-printable and does not have a `charCode`,
4004 * presumably because it does not produce a tab-character in browsers.
4005 *
4006 * @param {object} nativeEvent Native browser event.
4007 * @return {number} Normalized `charCode` property.
4008 */function getEventCharCode(nativeEvent){var charCode=void 0;var keyCode=nativeEvent.keyCode;if('charCode'in nativeEvent){charCode=nativeEvent.charCode;// FF does not set `charCode` for the Enter-key, check against `keyCode`.
4009if(charCode===0&&keyCode===13){charCode=13;}}else{// IE8 does not implement `charCode`, but `keyCode` has the correct value.
4010charCode=keyCode;}// IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
4011// report Enter as charCode 10 when ctrl is pressed.
4012if(charCode===10){charCode=13;}// Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
4013// Must not discard the (non-)printable Enter-key.
4014if(charCode>=32||charCode===13){return charCode;}return 0;}/**
4015 * Normalization of deprecated HTML5 `key` values
4016 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
4017 */var normalizeKey={Esc:'Escape',Spacebar:' ',Left:'ArrowLeft',Up:'ArrowUp',Right:'ArrowRight',Down:'ArrowDown',Del:'Delete',Win:'OS',Menu:'ContextMenu',Apps:'ContextMenu',Scroll:'ScrollLock',MozPrintableKey:'Unidentified'};/**
4018 * Translation from legacy `keyCode` to HTML5 `key`
4019 * Only special keys supported, all others depend on keyboard layout or browser
4020 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
4021 */var translateToKey={'8':'Backspace','9':'Tab','12':'Clear','13':'Enter','16':'Shift','17':'Control','18':'Alt','19':'Pause','20':'CapsLock','27':'Escape','32':' ','33':'PageUp','34':'PageDown','35':'End','36':'Home','37':'ArrowLeft','38':'ArrowUp','39':'ArrowRight','40':'ArrowDown','45':'Insert','46':'Delete','112':'F1','113':'F2','114':'F3','115':'F4','116':'F5','117':'F6','118':'F7','119':'F8','120':'F9','121':'F10','122':'F11','123':'F12','144':'NumLock','145':'ScrollLock','224':'Meta'};/**
4022 * @param {object} nativeEvent Native browser event.
4023 * @return {string} Normalized `key` property.
4024 */function getEventKey(nativeEvent){if(nativeEvent.key){// Normalize inconsistent values reported by browsers due to
4025// implementations of a working draft specification.
4026// FireFox implements `key` but returns `MozPrintableKey` for all
4027// printable characters (normalized to `Unidentified`), ignore it.
4028var key=normalizeKey[nativeEvent.key]||nativeEvent.key;if(key!=='Unidentified'){return key;}}// Browser does not implement `key`, polyfill as much of it as we can.
4029if(nativeEvent.type==='keypress'){var charCode=getEventCharCode(nativeEvent);// The enter-key is technically both printable and non-printable and can
4030// thus be captured by `keypress`, no other non-printable key should.
4031return charCode===13?'Enter':String.fromCharCode(charCode);}if(nativeEvent.type==='keydown'||nativeEvent.type==='keyup'){// While user keyboard layout determines the actual meaning of each
4032// `keyCode` value, almost all function keys have a universal value.
4033return translateToKey[nativeEvent.keyCode]||'Unidentified';}return'';}/**
4034 * @interface KeyboardEvent
4035 * @see http://www.w3.org/TR/DOM-Level-3-Events/
4036 */var SyntheticKeyboardEvent=SyntheticUIEvent.extend({key:getEventKey,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:getEventModifierState,// Legacy Interface
4037charCode:function(event){// `charCode` is the result of a KeyPress event and represents the value of
4038// the actual printable character.
4039// KeyPress is deprecated, but its replacement is not yet final and not
4040// implemented in any major browser. Only KeyPress has charCode.
4041if(event.type==='keypress'){return getEventCharCode(event);}return 0;},keyCode:function(event){// `keyCode` is the result of a KeyDown/Up event and represents the value of
4042// physical keyboard key.
4043// The actual meaning of the value depends on the users' keyboard layout
4044// which cannot be detected. Assuming that it is a US keyboard layout
4045// provides a surprisingly accurate mapping for US and European users.
4046// Due to this, it is left to the user to implement at this time.
4047if(event.type==='keydown'||event.type==='keyup'){return event.keyCode;}return 0;},which:function(event){// `which` is an alias for either `keyCode` or `charCode` depending on the
4048// type of the event.
4049if(event.type==='keypress'){return getEventCharCode(event);}if(event.type==='keydown'||event.type==='keyup'){return event.keyCode;}return 0;}});/**
4050 * @interface DragEvent
4051 * @see http://www.w3.org/TR/DOM-Level-3-Events/
4052 */var SyntheticDragEvent=SyntheticMouseEvent.extend({dataTransfer:null});/**
4053 * @interface TouchEvent
4054 * @see http://www.w3.org/TR/touch-events/
4055 */var SyntheticTouchEvent=SyntheticUIEvent.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:getEventModifierState});/**
4056 * @interface Event
4057 * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
4058 * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
4059 */var SyntheticTransitionEvent=SyntheticEvent.extend({propertyName:null,elapsedTime:null,pseudoElement:null});/**
4060 * @interface WheelEvent
4061 * @see http://www.w3.org/TR/DOM-Level-3-Events/
4062 */var SyntheticWheelEvent=SyntheticMouseEvent.extend({deltaX:function(event){return'deltaX'in event?event.deltaX:// Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
4063'wheelDeltaX'in event?-event.wheelDeltaX:0;},deltaY:function(event){return'deltaY'in event?event.deltaY:// Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
4064'wheelDeltaY'in event?-event.wheelDeltaY:// Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
4065'wheelDelta'in event?-event.wheelDelta:0;},deltaZ:null,// Browsers without "deltaMode" is reporting in raw wheel delta where one
4066// notch on the scroll is always +/- 120, roughly equivalent to pixels.
4067// A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
4068// ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
4069deltaMode:null});/**
4070 * Turns
4071 * ['abort', ...]
4072 * into
4073 * eventTypes = {
4074 * 'abort': {
4075 * phasedRegistrationNames: {
4076 * bubbled: 'onAbort',
4077 * captured: 'onAbortCapture',
4078 * },
4079 * dependencies: [TOP_ABORT],
4080 * },
4081 * ...
4082 * };
4083 * topLevelEventsToDispatchConfig = new Map([
4084 * [TOP_ABORT, { sameConfig }],
4085 * ]);
4086 */var interactiveEventTypeNames=[[TOP_BLUR,'blur'],[TOP_CANCEL,'cancel'],[TOP_CLICK,'click'],[TOP_CLOSE,'close'],[TOP_CONTEXT_MENU,'contextMenu'],[TOP_COPY,'copy'],[TOP_CUT,'cut'],[TOP_AUX_CLICK,'auxClick'],[TOP_DOUBLE_CLICK,'doubleClick'],[TOP_DRAG_END,'dragEnd'],[TOP_DRAG_START,'dragStart'],[TOP_DROP,'drop'],[TOP_FOCUS,'focus'],[TOP_INPUT,'input'],[TOP_INVALID,'invalid'],[TOP_KEY_DOWN,'keyDown'],[TOP_KEY_PRESS,'keyPress'],[TOP_KEY_UP,'keyUp'],[TOP_MOUSE_DOWN,'mouseDown'],[TOP_MOUSE_UP,'mouseUp'],[TOP_PASTE,'paste'],[TOP_PAUSE,'pause'],[TOP_PLAY,'play'],[TOP_POINTER_CANCEL,'pointerCancel'],[TOP_POINTER_DOWN,'pointerDown'],[TOP_POINTER_UP,'pointerUp'],[TOP_RATE_CHANGE,'rateChange'],[TOP_RESET,'reset'],[TOP_SEEKED,'seeked'],[TOP_SUBMIT,'submit'],[TOP_TOUCH_CANCEL,'touchCancel'],[TOP_TOUCH_END,'touchEnd'],[TOP_TOUCH_START,'touchStart'],[TOP_VOLUME_CHANGE,'volumeChange']];var nonInteractiveEventTypeNames=[[TOP_ABORT,'abort'],[TOP_ANIMATION_END,'animationEnd'],[TOP_ANIMATION_ITERATION,'animationIteration'],[TOP_ANIMATION_START,'animationStart'],[TOP_CAN_PLAY,'canPlay'],[TOP_CAN_PLAY_THROUGH,'canPlayThrough'],[TOP_DRAG,'drag'],[TOP_DRAG_ENTER,'dragEnter'],[TOP_DRAG_EXIT,'dragExit'],[TOP_DRAG_LEAVE,'dragLeave'],[TOP_DRAG_OVER,'dragOver'],[TOP_DURATION_CHANGE,'durationChange'],[TOP_EMPTIED,'emptied'],[TOP_ENCRYPTED,'encrypted'],[TOP_ENDED,'ended'],[TOP_ERROR,'error'],[TOP_GOT_POINTER_CAPTURE,'gotPointerCapture'],[TOP_LOAD,'load'],[TOP_LOADED_DATA,'loadedData'],[TOP_LOADED_METADATA,'loadedMetadata'],[TOP_LOAD_START,'loadStart'],[TOP_LOST_POINTER_CAPTURE,'lostPointerCapture'],[TOP_MOUSE_MOVE,'mouseMove'],[TOP_MOUSE_OUT,'mouseOut'],[TOP_MOUSE_OVER,'mouseOver'],[TOP_PLAYING,'playing'],[TOP_POINTER_MOVE,'pointerMove'],[TOP_POINTER_OUT,'pointerOut'],[TOP_POINTER_OVER,'pointerOver'],[TOP_PROGRESS,'progress'],[TOP_SCROLL,'scroll'],[TOP_SEEKING,'seeking'],[TOP_STALLED,'stalled'],[TOP_SUSPEND,'suspend'],[TOP_TIME_UPDATE,'timeUpdate'],[TOP_TOGGLE,'toggle'],[TOP_TOUCH_MOVE,'touchMove'],[TOP_TRANSITION_END,'transitionEnd'],[TOP_WAITING,'waiting'],[TOP_WHEEL,'wheel']];var eventTypes$4={};var topLevelEventsToDispatchConfig={};function addEventTypeNameToConfig(_ref,isInteractive){var topEvent=_ref[0],event=_ref[1];var capitalizedEvent=event[0].toUpperCase()+event.slice(1);var onEvent='on'+capitalizedEvent;var type={phasedRegistrationNames:{bubbled:onEvent,captured:onEvent+'Capture'},dependencies:[topEvent],isInteractive:isInteractive};eventTypes$4[event]=type;topLevelEventsToDispatchConfig[topEvent]=type;}interactiveEventTypeNames.forEach(function(eventTuple){addEventTypeNameToConfig(eventTuple,true);});nonInteractiveEventTypeNames.forEach(function(eventTuple){addEventTypeNameToConfig(eventTuple,false);});// Only used in DEV for exhaustiveness validation.
4087var knownHTMLTopLevelTypes=[TOP_ABORT,TOP_CANCEL,TOP_CAN_PLAY,TOP_CAN_PLAY_THROUGH,TOP_CLOSE,TOP_DURATION_CHANGE,TOP_EMPTIED,TOP_ENCRYPTED,TOP_ENDED,TOP_ERROR,TOP_INPUT,TOP_INVALID,TOP_LOAD,TOP_LOADED_DATA,TOP_LOADED_METADATA,TOP_LOAD_START,TOP_PAUSE,TOP_PLAY,TOP_PLAYING,TOP_PROGRESS,TOP_RATE_CHANGE,TOP_RESET,TOP_SEEKED,TOP_SEEKING,TOP_STALLED,TOP_SUBMIT,TOP_SUSPEND,TOP_TIME_UPDATE,TOP_TOGGLE,TOP_VOLUME_CHANGE,TOP_WAITING];var SimpleEventPlugin={eventTypes:eventTypes$4,isInteractiveTopLevelEventType:function(topLevelType){var config=topLevelEventsToDispatchConfig[topLevelType];return config!==undefined&&config.isInteractive===true;},extractEvents:function(topLevelType,targetInst,nativeEvent,nativeEventTarget){var dispatchConfig=topLevelEventsToDispatchConfig[topLevelType];if(!dispatchConfig){return null;}var EventConstructor=void 0;switch(topLevelType){case TOP_KEY_PRESS:// Firefox creates a keypress event for function keys too. This removes
4088// the unwanted keypress events. Enter is however both printable and
4089// non-printable. One would expect Tab to be as well (but it isn't).
4090if(getEventCharCode(nativeEvent)===0){return null;}/* falls through */case TOP_KEY_DOWN:case TOP_KEY_UP:EventConstructor=SyntheticKeyboardEvent;break;case TOP_BLUR:case TOP_FOCUS:EventConstructor=SyntheticFocusEvent;break;case TOP_CLICK:// Firefox creates a click event on right mouse clicks. This removes the
4091// unwanted click events.
4092if(nativeEvent.button===2){return null;}/* falls through */case TOP_AUX_CLICK:case TOP_DOUBLE_CLICK:case TOP_MOUSE_DOWN:case TOP_MOUSE_MOVE:case TOP_MOUSE_UP:// TODO: Disabled elements should not respond to mouse events
4093/* falls through */case TOP_MOUSE_OUT:case TOP_MOUSE_OVER:case TOP_CONTEXT_MENU:EventConstructor=SyntheticMouseEvent;break;case TOP_DRAG:case TOP_DRAG_END:case TOP_DRAG_ENTER:case TOP_DRAG_EXIT:case TOP_DRAG_LEAVE:case TOP_DRAG_OVER:case TOP_DRAG_START:case TOP_DROP:EventConstructor=SyntheticDragEvent;break;case TOP_TOUCH_CANCEL:case TOP_TOUCH_END:case TOP_TOUCH_MOVE:case TOP_TOUCH_START:EventConstructor=SyntheticTouchEvent;break;case TOP_ANIMATION_END:case TOP_ANIMATION_ITERATION:case TOP_ANIMATION_START:EventConstructor=SyntheticAnimationEvent;break;case TOP_TRANSITION_END:EventConstructor=SyntheticTransitionEvent;break;case TOP_SCROLL:EventConstructor=SyntheticUIEvent;break;case TOP_WHEEL:EventConstructor=SyntheticWheelEvent;break;case TOP_COPY:case TOP_CUT:case TOP_PASTE:EventConstructor=SyntheticClipboardEvent;break;case TOP_GOT_POINTER_CAPTURE:case TOP_LOST_POINTER_CAPTURE:case TOP_POINTER_CANCEL:case TOP_POINTER_DOWN:case TOP_POINTER_MOVE:case TOP_POINTER_OUT:case TOP_POINTER_OVER:case TOP_POINTER_UP:EventConstructor=SyntheticPointerEvent;break;default:{if(knownHTMLTopLevelTypes.indexOf(topLevelType)===-1){warningWithoutStack$1(false,'SimpleEventPlugin: Unhandled event type, `%s`. This warning '+'is likely caused by a bug in React. Please file an issue.',topLevelType);}}// HTML Events
4094// @see http://www.w3.org/TR/html5/index.html#events-0
4095EventConstructor=SyntheticEvent;break;}var event=EventConstructor.getPooled(dispatchConfig,targetInst,nativeEvent,nativeEventTarget);accumulateTwoPhaseDispatches(event);return event;}};var isInteractiveTopLevelEventType=SimpleEventPlugin.isInteractiveTopLevelEventType;var CALLBACK_BOOKKEEPING_POOL_SIZE=10;var callbackBookkeepingPool=[];/**
4096 * Find the deepest React component completely containing the root of the
4097 * passed-in instance (for use when entire React trees are nested within each
4098 * other). If React trees are not nested, returns null.
4099 */function findRootContainerNode(inst){// TODO: It may be a good idea to cache this to prevent unnecessary DOM
4100// traversal, but caching is difficult to do correctly without using a
4101// mutation observer to listen for all DOM changes.
4102while(inst.return){inst=inst.return;}if(inst.tag!==HostRoot){// This can happen if we're in a detached tree.
4103return null;}return inst.stateNode.containerInfo;}// Used to store ancestor hierarchy in top level callback
4104function getTopLevelCallbackBookKeeping(topLevelType,nativeEvent,targetInst){if(callbackBookkeepingPool.length){var instance=callbackBookkeepingPool.pop();instance.topLevelType=topLevelType;instance.nativeEvent=nativeEvent;instance.targetInst=targetInst;return instance;}return{topLevelType:topLevelType,nativeEvent:nativeEvent,targetInst:targetInst,ancestors:[]};}function releaseTopLevelCallbackBookKeeping(instance){instance.topLevelType=null;instance.nativeEvent=null;instance.targetInst=null;instance.ancestors.length=0;if(callbackBookkeepingPool.length<CALLBACK_BOOKKEEPING_POOL_SIZE){callbackBookkeepingPool.push(instance);}}function handleTopLevel(bookKeeping){var targetInst=bookKeeping.targetInst;// Loop through the hierarchy, in case there's any nested components.
4105// It's important that we build the array of ancestors before calling any
4106// event handlers, because event handlers can modify the DOM, leading to
4107// inconsistencies with ReactMount's node cache. See #1105.
4108var ancestor=targetInst;do{if(!ancestor){bookKeeping.ancestors.push(ancestor);break;}var root=findRootContainerNode(ancestor);if(!root){break;}bookKeeping.ancestors.push(ancestor);ancestor=getClosestInstanceFromNode(root);}while(ancestor);for(var i=0;i<bookKeeping.ancestors.length;i++){targetInst=bookKeeping.ancestors[i];runExtractedEventsInBatch(bookKeeping.topLevelType,targetInst,bookKeeping.nativeEvent,getEventTarget(bookKeeping.nativeEvent));}}// TODO: can we stop exporting these?
4109var _enabled=true;function setEnabled(enabled){_enabled=!!enabled;}function isEnabled(){return _enabled;}/**
4110 * Traps top-level events by using event bubbling.
4111 *
4112 * @param {number} topLevelType Number from `TopLevelEventTypes`.
4113 * @param {object} element Element on which to attach listener.
4114 * @return {?object} An object with a remove function which will forcefully
4115 * remove the listener.
4116 * @internal
4117 */function trapBubbledEvent(topLevelType,element){if(!element){return null;}var dispatch=isInteractiveTopLevelEventType(topLevelType)?dispatchInteractiveEvent:dispatchEvent;addEventBubbleListener(element,getRawEventName(topLevelType),// Check if interactive and wrap in interactiveUpdates
4118dispatch.bind(null,topLevelType));}/**
4119 * Traps a top-level event by using event capturing.
4120 *
4121 * @param {number} topLevelType Number from `TopLevelEventTypes`.
4122 * @param {object} element Element on which to attach listener.
4123 * @return {?object} An object with a remove function which will forcefully
4124 * remove the listener.
4125 * @internal
4126 */function trapCapturedEvent(topLevelType,element){if(!element){return null;}var dispatch=isInteractiveTopLevelEventType(topLevelType)?dispatchInteractiveEvent:dispatchEvent;addEventCaptureListener(element,getRawEventName(topLevelType),// Check if interactive and wrap in interactiveUpdates
4127dispatch.bind(null,topLevelType));}function dispatchInteractiveEvent(topLevelType,nativeEvent){interactiveUpdates(dispatchEvent,topLevelType,nativeEvent);}function dispatchEvent(topLevelType,nativeEvent){if(!_enabled){return;}var nativeEventTarget=getEventTarget(nativeEvent);var targetInst=getClosestInstanceFromNode(nativeEventTarget);if(targetInst!==null&&typeof targetInst.tag==='number'&&!isFiberMounted(targetInst)){// If we get an event (ex: img onload) before committing that
4128// component's mount, ignore it for now (that is, treat it as if it was an
4129// event on a non-React tree). We might also consider queueing events and
4130// dispatching them after the mount.
4131targetInst=null;}var bookKeeping=getTopLevelCallbackBookKeeping(topLevelType,nativeEvent,targetInst);try{// Event queue being processed in the same cycle allows
4132// `preventDefault`.
4133batchedUpdates(handleTopLevel,bookKeeping);}finally{releaseTopLevelCallbackBookKeeping(bookKeeping);}}/**
4134 * Summary of `ReactBrowserEventEmitter` event handling:
4135 *
4136 * - Top-level delegation is used to trap most native browser events. This
4137 * may only occur in the main thread and is the responsibility of
4138 * ReactDOMEventListener, which is injected and can therefore support
4139 * pluggable event sources. This is the only work that occurs in the main
4140 * thread.
4141 *
4142 * - We normalize and de-duplicate events to account for browser quirks. This
4143 * may be done in the worker thread.
4144 *
4145 * - Forward these native events (with the associated top-level type used to
4146 * trap it) to `EventPluginHub`, which in turn will ask plugins if they want
4147 * to extract any synthetic events.
4148 *
4149 * - The `EventPluginHub` will then process each event by annotating them with
4150 * "dispatches", a sequence of listeners and IDs that care about that event.
4151 *
4152 * - The `EventPluginHub` then dispatches the events.
4153 *
4154 * Overview of React and the event system:
4155 *
4156 * +------------+ .
4157 * | DOM | .
4158 * +------------+ .
4159 * | .
4160 * v .
4161 * +------------+ .
4162 * | ReactEvent | .
4163 * | Listener | .
4164 * +------------+ . +-----------+
4165 * | . +--------+|SimpleEvent|
4166 * | . | |Plugin |
4167 * +-----|------+ . v +-----------+
4168 * | | | . +--------------+ +------------+
4169 * | +-----------.--->|EventPluginHub| | Event |
4170 * | | . | | +-----------+ | Propagators|
4171 * | ReactEvent | . | | |TapEvent | |------------|
4172 * | Emitter | . | |<---+|Plugin | |other plugin|
4173 * | | . | | +-----------+ | utilities |
4174 * | +-----------.--->| | +------------+
4175 * | | | . +--------------+
4176 * +-----|------+ . ^ +-----------+
4177 * | . | |Enter/Leave|
4178 * + . +-------+|Plugin |
4179 * +-------------+ . +-----------+
4180 * | application | .
4181 * |-------------| .
4182 * | | .
4183 * | | .
4184 * +-------------+ .
4185 * .
4186 * React Core . General Purpose Event Plugin System
4187 */var alreadyListeningTo={};var reactTopListenersCounter=0;/**
4188 * To ensure no conflicts with other potential React instances on the page
4189 */var topListenersIDKey='_reactListenersID'+(''+Math.random()).slice(2);function getListeningForDocument(mountAt){// In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
4190// directly.
4191if(!Object.prototype.hasOwnProperty.call(mountAt,topListenersIDKey)){mountAt[topListenersIDKey]=reactTopListenersCounter++;alreadyListeningTo[mountAt[topListenersIDKey]]={};}return alreadyListeningTo[mountAt[topListenersIDKey]];}/**
4192 * We listen for bubbled touch events on the document object.
4193 *
4194 * Firefox v8.01 (and possibly others) exhibited strange behavior when
4195 * mounting `onmousemove` events at some node that was not the document
4196 * element. The symptoms were that if your mouse is not moving over something
4197 * contained within that mount point (for example on the background) the
4198 * top-level listeners for `onmousemove` won't be called. However, if you
4199 * register the `mousemove` on the document object, then it will of course
4200 * catch all `mousemove`s. This along with iOS quirks, justifies restricting
4201 * top-level listeners to the document object only, at least for these
4202 * movement types of events and possibly all events.
4203 *
4204 * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
4205 *
4206 * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
4207 * they bubble to document.
4208 *
4209 * @param {string} registrationName Name of listener (e.g. `onClick`).
4210 * @param {object} mountAt Container where to mount the listener
4211 */function listenTo(registrationName,mountAt){var isListening=getListeningForDocument(mountAt);var dependencies=registrationNameDependencies[registrationName];for(var i=0;i<dependencies.length;i++){var dependency=dependencies[i];if(!(isListening.hasOwnProperty(dependency)&&isListening[dependency])){switch(dependency){case TOP_SCROLL:trapCapturedEvent(TOP_SCROLL,mountAt);break;case TOP_FOCUS:case TOP_BLUR:trapCapturedEvent(TOP_FOCUS,mountAt);trapCapturedEvent(TOP_BLUR,mountAt);// We set the flag for a single dependency later in this function,
4212// but this ensures we mark both as attached rather than just one.
4213isListening[TOP_BLUR]=true;isListening[TOP_FOCUS]=true;break;case TOP_CANCEL:case TOP_CLOSE:if(isEventSupported(getRawEventName(dependency))){trapCapturedEvent(dependency,mountAt);}break;case TOP_INVALID:case TOP_SUBMIT:case TOP_RESET:// We listen to them on the target DOM elements.
4214// Some of them bubble so we don't want them to fire twice.
4215break;default:// By default, listen on the top level to all non-media events.
4216// Media events don't bubble so adding the listener wouldn't do anything.
4217var isMediaEvent=mediaEventTypes.indexOf(dependency)!==-1;if(!isMediaEvent){trapBubbledEvent(dependency,mountAt);}break;}isListening[dependency]=true;}}}function isListeningToAllDependencies(registrationName,mountAt){var isListening=getListeningForDocument(mountAt);var dependencies=registrationNameDependencies[registrationName];for(var i=0;i<dependencies.length;i++){var dependency=dependencies[i];if(!(isListening.hasOwnProperty(dependency)&&isListening[dependency])){return false;}}return true;}function getActiveElement(doc){doc=doc||(typeof document!=='undefined'?document:undefined);if(typeof doc==='undefined'){return null;}try{return doc.activeElement||doc.body;}catch(e){return doc.body;}}/**
4218 * Given any node return the first leaf node without children.
4219 *
4220 * @param {DOMElement|DOMTextNode} node
4221 * @return {DOMElement|DOMTextNode}
4222 */function getLeafNode(node){while(node&&node.firstChild){node=node.firstChild;}return node;}/**
4223 * Get the next sibling within a container. This will walk up the
4224 * DOM if a node's siblings have been exhausted.
4225 *
4226 * @param {DOMElement|DOMTextNode} node
4227 * @return {?DOMElement|DOMTextNode}
4228 */function getSiblingNode(node){while(node){if(node.nextSibling){return node.nextSibling;}node=node.parentNode;}}/**
4229 * Get object describing the nodes which contain characters at offset.
4230 *
4231 * @param {DOMElement|DOMTextNode} root
4232 * @param {number} offset
4233 * @return {?object}
4234 */function getNodeForCharacterOffset(root,offset){var node=getLeafNode(root);var nodeStart=0;var nodeEnd=0;while(node){if(node.nodeType===TEXT_NODE){nodeEnd=nodeStart+node.textContent.length;if(nodeStart<=offset&&nodeEnd>=offset){return{node:node,offset:offset-nodeStart};}nodeStart=nodeEnd;}node=getLeafNode(getSiblingNode(node));}}/**
4235 * @param {DOMElement} outerNode
4236 * @return {?object}
4237 */function getOffsets(outerNode){var ownerDocument=outerNode.ownerDocument;var win=ownerDocument&&ownerDocument.defaultView||window;var selection=win.getSelection&&win.getSelection();if(!selection||selection.rangeCount===0){return null;}var anchorNode=selection.anchorNode,anchorOffset=selection.anchorOffset,focusNode=selection.focusNode,focusOffset=selection.focusOffset;// In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
4238// up/down buttons on an <input type="number">. Anonymous divs do not seem to
4239// expose properties, triggering a "Permission denied error" if any of its
4240// properties are accessed. The only seemingly possible way to avoid erroring
4241// is to access a property that typically works for non-anonymous divs and
4242// catch any error that may otherwise arise. See
4243// https://bugzilla.mozilla.org/show_bug.cgi?id=208427
4244try{/* eslint-disable no-unused-expressions */anchorNode.nodeType;focusNode.nodeType;/* eslint-enable no-unused-expressions */}catch(e){return null;}return getModernOffsetsFromPoints(outerNode,anchorNode,anchorOffset,focusNode,focusOffset);}/**
4245 * Returns {start, end} where `start` is the character/codepoint index of
4246 * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
4247 * `end` is the index of (focusNode, focusOffset).
4248 *
4249 * Returns null if you pass in garbage input but we should probably just crash.
4250 *
4251 * Exported only for testing.
4252 */function getModernOffsetsFromPoints(outerNode,anchorNode,anchorOffset,focusNode,focusOffset){var length=0;var start=-1;var end=-1;var indexWithinAnchor=0;var indexWithinFocus=0;var node=outerNode;var parentNode=null;outer:while(true){var next=null;while(true){if(node===anchorNode&&(anchorOffset===0||node.nodeType===TEXT_NODE)){start=length+anchorOffset;}if(node===focusNode&&(focusOffset===0||node.nodeType===TEXT_NODE)){end=length+focusOffset;}if(node.nodeType===TEXT_NODE){length+=node.nodeValue.length;}if((next=node.firstChild)===null){break;}// Moving from `node` to its first child `next`.
4253parentNode=node;node=next;}while(true){if(node===outerNode){// If `outerNode` has children, this is always the second time visiting
4254// it. If it has no children, this is still the first loop, and the only
4255// valid selection is anchorNode and focusNode both equal to this node
4256// and both offsets 0, in which case we will have handled above.
4257break outer;}if(parentNode===anchorNode&&++indexWithinAnchor===anchorOffset){start=length;}if(parentNode===focusNode&&++indexWithinFocus===focusOffset){end=length;}if((next=node.nextSibling)!==null){break;}node=parentNode;parentNode=node.parentNode;}// Moving from `node` to its next sibling `next`.
4258node=next;}if(start===-1||end===-1){// This should never happen. (Would happen if the anchor/focus nodes aren't
4259// actually inside the passed-in node.)
4260return null;}return{start:start,end:end};}/**
4261 * In modern non-IE browsers, we can support both forward and backward
4262 * selections.
4263 *
4264 * Note: IE10+ supports the Selection object, but it does not support
4265 * the `extend` method, which means that even in modern IE, it's not possible
4266 * to programmatically create a backward selection. Thus, for all IE
4267 * versions, we use the old IE API to create our selections.
4268 *
4269 * @param {DOMElement|DOMTextNode} node
4270 * @param {object} offsets
4271 */function setOffsets(node,offsets){var doc=node.ownerDocument||document;var win=doc&&doc.defaultView||window;var selection=win.getSelection();var length=node.textContent.length;var start=Math.min(offsets.start,length);var end=offsets.end===undefined?start:Math.min(offsets.end,length);// IE 11 uses modern selection, but doesn't support the extend method.
4272// Flip backward selections, so we can set with a single range.
4273if(!selection.extend&&start>end){var temp=end;end=start;start=temp;}var startMarker=getNodeForCharacterOffset(node,start);var endMarker=getNodeForCharacterOffset(node,end);if(startMarker&&endMarker){if(selection.rangeCount===1&&selection.anchorNode===startMarker.node&&selection.anchorOffset===startMarker.offset&&selection.focusNode===endMarker.node&&selection.focusOffset===endMarker.offset){return;}var range=doc.createRange();range.setStart(startMarker.node,startMarker.offset);selection.removeAllRanges();if(start>end){selection.addRange(range);selection.extend(endMarker.node,endMarker.offset);}else{range.setEnd(endMarker.node,endMarker.offset);selection.addRange(range);}}}function isTextNode(node){return node&&node.nodeType===TEXT_NODE;}function containsNode(outerNode,innerNode){if(!outerNode||!innerNode){return false;}else if(outerNode===innerNode){return true;}else if(isTextNode(outerNode)){return false;}else if(isTextNode(innerNode)){return containsNode(outerNode,innerNode.parentNode);}else if('contains'in outerNode){return outerNode.contains(innerNode);}else if(outerNode.compareDocumentPosition){return!!(outerNode.compareDocumentPosition(innerNode)&16);}else{return false;}}function isInDocument(node){return node&&node.ownerDocument&&containsNode(node.ownerDocument.documentElement,node);}function getActiveElementDeep(){var win=window;var element=getActiveElement();while(element instanceof win.HTMLIFrameElement){// Accessing the contentDocument of a HTMLIframeElement can cause the browser
4274// to throw, e.g. if it has a cross-origin src attribute
4275try{win=element.contentDocument.defaultView;}catch(e){return element;}element=getActiveElement(win.document);}return element;}/**
4276 * @ReactInputSelection: React input selection module. Based on Selection.js,
4277 * but modified to be suitable for react and has a couple of bug fixes (doesn't
4278 * assume buttons have range selections allowed).
4279 * Input selection module for React.
4280 */ /**
4281 * @hasSelectionCapabilities: we get the element types that support selection
4282 * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
4283 * and `selectionEnd` rows.
4284 */function hasSelectionCapabilities(elem){var nodeName=elem&&elem.nodeName&&elem.nodeName.toLowerCase();return nodeName&&(nodeName==='input'&&(elem.type==='text'||elem.type==='search'||elem.type==='tel'||elem.type==='url'||elem.type==='password')||nodeName==='textarea'||elem.contentEditable==='true');}function getSelectionInformation(){var focusedElem=getActiveElementDeep();return{focusedElem:focusedElem,selectionRange:hasSelectionCapabilities(focusedElem)?getSelection$1(focusedElem):null};}/**
4285 * @restoreSelection: If any selection information was potentially lost,
4286 * restore it. This is useful when performing operations that could remove dom
4287 * nodes and place them back in, resulting in focus being lost.
4288 */function restoreSelection(priorSelectionInformation){var curFocusedElem=getActiveElementDeep();var priorFocusedElem=priorSelectionInformation.focusedElem;var priorSelectionRange=priorSelectionInformation.selectionRange;if(curFocusedElem!==priorFocusedElem&&isInDocument(priorFocusedElem)){if(priorSelectionRange!==null&&hasSelectionCapabilities(priorFocusedElem)){setSelection(priorFocusedElem,priorSelectionRange);}// Focusing a node can change the scroll position, which is undesirable
4289var ancestors=[];var ancestor=priorFocusedElem;while(ancestor=ancestor.parentNode){if(ancestor.nodeType===ELEMENT_NODE){ancestors.push({element:ancestor,left:ancestor.scrollLeft,top:ancestor.scrollTop});}}if(typeof priorFocusedElem.focus==='function'){priorFocusedElem.focus();}for(var i=0;i<ancestors.length;i++){var info=ancestors[i];info.element.scrollLeft=info.left;info.element.scrollTop=info.top;}}}/**
4290 * @getSelection: Gets the selection bounds of a focused textarea, input or
4291 * contentEditable node.
4292 * -@input: Look up selection bounds of this input
4293 * -@return {start: selectionStart, end: selectionEnd}
4294 */function getSelection$1(input){var selection=void 0;if('selectionStart'in input){// Modern browser with input or textarea.
4295selection={start:input.selectionStart,end:input.selectionEnd};}else{// Content editable or old IE textarea.
4296selection=getOffsets(input);}return selection||{start:0,end:0};}/**
4297 * @setSelection: Sets the selection bounds of a textarea or input and focuses
4298 * the input.
4299 * -@input Set selection bounds of this input or textarea
4300 * -@offsets Object of same form that is returned from get*
4301 */function setSelection(input,offsets){var start=offsets.start,end=offsets.end;if(end===undefined){end=start;}if('selectionStart'in input){input.selectionStart=start;input.selectionEnd=Math.min(end,input.value.length);}else{setOffsets(input,offsets);}}var skipSelectionChangeEvent=canUseDOM&&'documentMode'in document&&document.documentMode<=11;var eventTypes$3={select:{phasedRegistrationNames:{bubbled:'onSelect',captured:'onSelectCapture'},dependencies:[TOP_BLUR,TOP_CONTEXT_MENU,TOP_DRAG_END,TOP_FOCUS,TOP_KEY_DOWN,TOP_KEY_UP,TOP_MOUSE_DOWN,TOP_MOUSE_UP,TOP_SELECTION_CHANGE]}};var activeElement$1=null;var activeElementInst$1=null;var lastSelection=null;var mouseDown=false;/**
4302 * Get an object which is a unique representation of the current selection.
4303 *
4304 * The return value will not be consistent across nodes or browsers, but
4305 * two identical selections on the same node will return identical objects.
4306 *
4307 * @param {DOMElement} node
4308 * @return {object}
4309 */function getSelection(node){if('selectionStart'in node&&hasSelectionCapabilities(node)){return{start:node.selectionStart,end:node.selectionEnd};}else{var win=node.ownerDocument&&node.ownerDocument.defaultView||window;var selection=win.getSelection();return{anchorNode:selection.anchorNode,anchorOffset:selection.anchorOffset,focusNode:selection.focusNode,focusOffset:selection.focusOffset};}}/**
4310 * Get document associated with the event target.
4311 *
4312 * @param {object} nativeEventTarget
4313 * @return {Document}
4314 */function getEventTargetDocument(eventTarget){return eventTarget.window===eventTarget?eventTarget.document:eventTarget.nodeType===DOCUMENT_NODE?eventTarget:eventTarget.ownerDocument;}/**
4315 * Poll selection to see whether it's changed.
4316 *
4317 * @param {object} nativeEvent
4318 * @param {object} nativeEventTarget
4319 * @return {?SyntheticEvent}
4320 */function constructSelectEvent(nativeEvent,nativeEventTarget){// Ensure we have the right element, and that the user is not dragging a
4321// selection (this matches native `select` event behavior). In HTML5, select
4322// fires only on input and textarea thus if there's no focused element we
4323// won't dispatch.
4324var doc=getEventTargetDocument(nativeEventTarget);if(mouseDown||activeElement$1==null||activeElement$1!==getActiveElement(doc)){return null;}// Only fire when selection has actually changed.
4325var currentSelection=getSelection(activeElement$1);if(!lastSelection||!shallowEqual(lastSelection,currentSelection)){lastSelection=currentSelection;var syntheticEvent=SyntheticEvent.getPooled(eventTypes$3.select,activeElementInst$1,nativeEvent,nativeEventTarget);syntheticEvent.type='select';syntheticEvent.target=activeElement$1;accumulateTwoPhaseDispatches(syntheticEvent);return syntheticEvent;}return null;}/**
4326 * This plugin creates an `onSelect` event that normalizes select events
4327 * across form elements.
4328 *
4329 * Supported elements are:
4330 * - input (see `isTextInputElement`)
4331 * - textarea
4332 * - contentEditable
4333 *
4334 * This differs from native browser implementations in the following ways:
4335 * - Fires on contentEditable fields as well as inputs.
4336 * - Fires for collapsed selection.
4337 * - Fires after user input.
4338 */var SelectEventPlugin={eventTypes:eventTypes$3,extractEvents:function(topLevelType,targetInst,nativeEvent,nativeEventTarget){var doc=getEventTargetDocument(nativeEventTarget);// Track whether all listeners exists for this plugin. If none exist, we do
4339// not extract events. See #3639.
4340if(!doc||!isListeningToAllDependencies('onSelect',doc)){return null;}var targetNode=targetInst?getNodeFromInstance$1(targetInst):window;switch(topLevelType){// Track the input node that has focus.
4341case TOP_FOCUS:if(isTextInputElement(targetNode)||targetNode.contentEditable==='true'){activeElement$1=targetNode;activeElementInst$1=targetInst;lastSelection=null;}break;case TOP_BLUR:activeElement$1=null;activeElementInst$1=null;lastSelection=null;break;// Don't fire the event while the user is dragging. This matches the
4342// semantics of the native select event.
4343case TOP_MOUSE_DOWN:mouseDown=true;break;case TOP_CONTEXT_MENU:case TOP_MOUSE_UP:case TOP_DRAG_END:mouseDown=false;return constructSelectEvent(nativeEvent,nativeEventTarget);// Chrome and IE fire non-standard event when selection is changed (and
4344// sometimes when it hasn't). IE's event fires out of order with respect
4345// to key and input events on deletion, so we discard it.
4346//
4347// Firefox doesn't support selectionchange, so check selection status
4348// after each key entry. The selection changes after keydown and before
4349// keyup, but we check on keydown as well in the case of holding down a
4350// key, when multiple keydown events are fired but only one keyup is.
4351// This is also our approach for IE handling, for the reason above.
4352case TOP_SELECTION_CHANGE:if(skipSelectionChangeEvent){break;}// falls through
4353case TOP_KEY_DOWN:case TOP_KEY_UP:return constructSelectEvent(nativeEvent,nativeEventTarget);}return null;}};/**
4354 * Inject modules for resolving DOM hierarchy and plugin ordering.
4355 */injection.injectEventPluginOrder(DOMEventPluginOrder);setComponentTree(getFiberCurrentPropsFromNode$1,getInstanceFromNode$1,getNodeFromInstance$1);/**
4356 * Some important event plugins included by default (without having to require
4357 * them).
4358 */injection.injectEventPluginsByName({SimpleEventPlugin:SimpleEventPlugin,EnterLeaveEventPlugin:EnterLeaveEventPlugin,ChangeEventPlugin:ChangeEventPlugin,SelectEventPlugin:SelectEventPlugin,BeforeInputEventPlugin:BeforeInputEventPlugin});var didWarnSelectedSetOnOption=false;var didWarnInvalidChild=false;function flattenChildren(children){var content='';// Flatten children. We'll warn if they are invalid
4359// during validateProps() which runs for hydration too.
4360// Note that this would throw on non-element objects.
4361// Elements are stringified (which is normally irrelevant
4362// but matters for <fbt>).
4363React.Children.forEach(children,function(child){if(child==null){return;}content+=child;// Note: we don't warn about invalid children here.
4364// Instead, this is done separately below so that
4365// it happens during the hydration codepath too.
4366});return content;}/**
4367 * Implements an <option> host component that warns when `selected` is set.
4368 */function validateProps(element,props){{// This mirrors the codepath above, but runs for hydration too.
4369// Warn about invalid children here so that client and hydration are consistent.
4370// TODO: this seems like it could cause a DEV-only throw for hydration
4371// if children contains a non-element object. We should try to avoid that.
4372if(typeof props.children==='object'&&props.children!==null){React.Children.forEach(props.children,function(child){if(child==null){return;}if(typeof child==='string'||typeof child==='number'){return;}if(typeof child.type!=='string'){return;}if(!didWarnInvalidChild){didWarnInvalidChild=true;warning$1(false,'Only strings and numbers are supported as <option> children.');}});}// TODO: Remove support for `selected` in <option>.
4373if(props.selected!=null&&!didWarnSelectedSetOnOption){warning$1(false,'Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');didWarnSelectedSetOnOption=true;}}}function postMountWrapper$1(element,props){// value="" should make a value attribute (#6219)
4374if(props.value!=null){element.setAttribute('value',toString(getToStringValue(props.value)));}}function getHostProps$1(element,props){var hostProps=_assign({children:undefined},props);var content=flattenChildren(props.children);if(content){hostProps.children=content;}return hostProps;}// TODO: direct imports like some-package/src/* are bad. Fix me.
4375var didWarnValueDefaultValue$1=void 0;{didWarnValueDefaultValue$1=false;}function getDeclarationErrorAddendum(){var ownerName=getCurrentFiberOwnerNameInDevOrNull();if(ownerName){return'\n\nCheck the render method of `'+ownerName+'`.';}return'';}var valuePropNames=['value','defaultValue'];/**
4376 * Validation function for `value` and `defaultValue`.
4377 */function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning$1(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning$1(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}function updateOptions(node,multiple,propValue,setDefaultSelected){var options=node.options;if(multiple){var selectedValues=propValue;var selectedValue={};for(var i=0;i<selectedValues.length;i++){// Prefix to avoid chaos with special keys.
4378selectedValue['$'+selectedValues[i]]=true;}for(var _i=0;_i<options.length;_i++){var selected=selectedValue.hasOwnProperty('$'+options[_i].value);if(options[_i].selected!==selected){options[_i].selected=selected;}if(selected&&setDefaultSelected){options[_i].defaultSelected=true;}}}else{// Do not set `select.value` as exact behavior isn't consistent across all
4379// browsers for all cases.
4380var _selectedValue=toString(getToStringValue(propValue));var defaultSelected=null;for(var _i2=0;_i2<options.length;_i2++){if(options[_i2].value===_selectedValue){options[_i2].selected=true;if(setDefaultSelected){options[_i2].defaultSelected=true;}return;}if(defaultSelected===null&&!options[_i2].disabled){defaultSelected=options[_i2];}}if(defaultSelected!==null){defaultSelected.selected=true;}}}/**
4381 * Implements a <select> host component that allows optionally setting the
4382 * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
4383 * stringable. If `multiple` is true, the prop must be an array of stringables.
4384 *
4385 * If `value` is not supplied (or null/undefined), user actions that change the
4386 * selected option will trigger updates to the rendered options.
4387 *
4388 * If it is supplied (and not null/undefined), the rendered options will not
4389 * update in response to user actions. Instead, the `value` prop must change in
4390 * order for the rendered options to update.
4391 *
4392 * If `defaultValue` is provided, any options with the supplied values will be
4393 * selected.
4394 */function getHostProps$2(element,props){return _assign({},props,{value:undefined});}function initWrapperState$1(element,props){var node=element;{checkSelectPropTypes(props);}node._wrapperState={wasMultiple:!!props.multiple};{if(props.value!==undefined&&props.defaultValue!==undefined&&!didWarnValueDefaultValue$1){warning$1(false,'Select elements must be either controlled or uncontrolled '+'(specify either the value prop, or the defaultValue prop, but not '+'both). Decide between using a controlled or uncontrolled select '+'element and remove one of these props. More info: '+'https://fb.me/react-controlled-components');didWarnValueDefaultValue$1=true;}}}function postMountWrapper$2(element,props){var node=element;node.multiple=!!props.multiple;var value=props.value;if(value!=null){updateOptions(node,!!props.multiple,value,false);}else if(props.defaultValue!=null){updateOptions(node,!!props.multiple,props.defaultValue,true);}}function postUpdateWrapper(element,props){var node=element;var wasMultiple=node._wrapperState.wasMultiple;node._wrapperState.wasMultiple=!!props.multiple;var value=props.value;if(value!=null){updateOptions(node,!!props.multiple,value,false);}else if(wasMultiple!==!!props.multiple){// For simplicity, reapply `defaultValue` if `multiple` is toggled.
4395if(props.defaultValue!=null){updateOptions(node,!!props.multiple,props.defaultValue,true);}else{// Revert the select back to its default unselected state.
4396updateOptions(node,!!props.multiple,props.multiple?[]:'',false);}}}function restoreControlledState$2(element,props){var node=element;var value=props.value;if(value!=null){updateOptions(node,!!props.multiple,value,false);}}var didWarnValDefaultVal=false;/**
4397 * Implements a <textarea> host component that allows setting `value`, and
4398 * `defaultValue`. This differs from the traditional DOM API because value is
4399 * usually set as PCDATA children.
4400 *
4401 * If `value` is not supplied (or null/undefined), user actions that affect the
4402 * value will trigger updates to the element.
4403 *
4404 * If `value` is supplied (and not null/undefined), the rendered element will
4405 * not trigger updates to the element. Instead, the `value` prop must change in
4406 * order for the rendered element to be updated.
4407 *
4408 * The rendered element will be initialized with an empty value, the prop
4409 * `defaultValue` if specified, or the children content (deprecated).
4410 */function getHostProps$3(element,props){var node=element;!(props.dangerouslySetInnerHTML==null)?invariant(false,'`dangerouslySetInnerHTML` does not make sense on <textarea>.'):void 0;// Always set children to the same thing. In IE9, the selection range will
4411// get reset if `textContent` is mutated. We could add a check in setTextContent
4412// to only set the value if/when the value differs from the node value (which would
4413// completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
4414// solution. The value can be a boolean or object so that's why it's forced
4415// to be a string.
4416var hostProps=_assign({},props,{value:undefined,defaultValue:undefined,children:toString(node._wrapperState.initialValue)});return hostProps;}function initWrapperState$2(element,props){var node=element;{ReactControlledValuePropTypes.checkPropTypes('textarea',props);if(props.value!==undefined&&props.defaultValue!==undefined&&!didWarnValDefaultVal){warning$1(false,'%s contains a textarea with both value and defaultValue props. '+'Textarea elements must be either controlled or uncontrolled '+'(specify either the value prop, or the defaultValue prop, but not '+'both). Decide between using a controlled or uncontrolled textarea '+'and remove one of these props. More info: '+'https://fb.me/react-controlled-components',getCurrentFiberOwnerNameInDevOrNull()||'A component');didWarnValDefaultVal=true;}}var initialValue=props.value;// Only bother fetching default value if we're going to use it
4417if(initialValue==null){var defaultValue=props.defaultValue;// TODO (yungsters): Remove support for children content in <textarea>.
4418var children=props.children;if(children!=null){{warning$1(false,'Use the `defaultValue` or `value` props instead of setting '+'children on <textarea>.');}!(defaultValue==null)?invariant(false,'If you supply `defaultValue` on a <textarea>, do not pass children.'):void 0;if(Array.isArray(children)){!(children.length<=1)?invariant(false,'<textarea> can only have at most one child.'):void 0;children=children[0];}defaultValue=children;}if(defaultValue==null){defaultValue='';}initialValue=defaultValue;}node._wrapperState={initialValue:getToStringValue(initialValue)};}function updateWrapper$1(element,props){var node=element;var value=getToStringValue(props.value);var defaultValue=getToStringValue(props.defaultValue);if(value!=null){// Cast `value` to a string to ensure the value is set correctly. While
4419// browsers typically do this as necessary, jsdom doesn't.
4420var newValue=toString(value);// To avoid side effects (such as losing text selection), only set value if changed
4421if(newValue!==node.value){node.value=newValue;}if(props.defaultValue==null&&node.defaultValue!==newValue){node.defaultValue=newValue;}}if(defaultValue!=null){node.defaultValue=toString(defaultValue);}}function postMountWrapper$3(element,props){var node=element;// This is in postMount because we need access to the DOM node, which is not
4422// available until after the component has mounted.
4423var textContent=node.textContent;// Only set node.value if textContent is equal to the expected
4424// initial value. In IE10/IE11 there is a bug where the placeholder attribute
4425// will populate textContent as well.
4426// https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
4427if(textContent===node._wrapperState.initialValue){node.value=textContent;}}function restoreControlledState$3(element,props){// DOM component is still mounted; update
4428updateWrapper$1(element,props);}var HTML_NAMESPACE$1='http://www.w3.org/1999/xhtml';var MATH_NAMESPACE='http://www.w3.org/1998/Math/MathML';var SVG_NAMESPACE='http://www.w3.org/2000/svg';var Namespaces={html:HTML_NAMESPACE$1,mathml:MATH_NAMESPACE,svg:SVG_NAMESPACE};// Assumes there is no parent namespace.
4429function getIntrinsicNamespace(type){switch(type){case'svg':return SVG_NAMESPACE;case'math':return MATH_NAMESPACE;default:return HTML_NAMESPACE$1;}}function getChildNamespace(parentNamespace,type){if(parentNamespace==null||parentNamespace===HTML_NAMESPACE$1){// No (or default) parent namespace: potential entry point.
4430return getIntrinsicNamespace(type);}if(parentNamespace===SVG_NAMESPACE&&type==='foreignObject'){// We're leaving SVG.
4431return HTML_NAMESPACE$1;}// By default, pass namespace below.
4432return parentNamespace;}/* globals MSApp */ /**
4433 * Create a function which has 'unsafe' privileges (required by windows8 apps)
4434 */var createMicrosoftUnsafeLocalFunction=function(func){if(typeof MSApp!=='undefined'&&MSApp.execUnsafeLocalFunction){return function(arg0,arg1,arg2,arg3){MSApp.execUnsafeLocalFunction(function(){return func(arg0,arg1,arg2,arg3);});};}else{return func;}};// SVG temp container for IE lacking innerHTML
4435var reusableSVGContainer=void 0;/**
4436 * Set the innerHTML property of a node
4437 *
4438 * @param {DOMElement} node
4439 * @param {string} html
4440 * @internal
4441 */var setInnerHTML=createMicrosoftUnsafeLocalFunction(function(node,html){// IE does not have innerHTML for SVG nodes, so instead we inject the
4442// new markup in a temp node and then move the child nodes across into
4443// the target node
4444if(node.namespaceURI===Namespaces.svg&&!('innerHTML'in node)){reusableSVGContainer=reusableSVGContainer||document.createElement('div');reusableSVGContainer.innerHTML='<svg>'+html+'</svg>';var svgNode=reusableSVGContainer.firstChild;while(node.firstChild){node.removeChild(node.firstChild);}while(svgNode.firstChild){node.appendChild(svgNode.firstChild);}}else{node.innerHTML=html;}});/**
4445 * Set the textContent property of a node. For text updates, it's faster
4446 * to set the `nodeValue` of the Text node directly instead of using
4447 * `.textContent` which will remove the existing node and create a new one.
4448 *
4449 * @param {DOMElement} node
4450 * @param {string} text
4451 * @internal
4452 */var setTextContent=function(node,text){if(text){var firstChild=node.firstChild;if(firstChild&&firstChild===node.lastChild&&firstChild.nodeType===TEXT_NODE){firstChild.nodeValue=text;return;}}node.textContent=text;};/**
4453 * CSS properties which accept numbers but are not in units of "px".
4454 */var isUnitlessNumber={animationIterationCount:true,borderImageOutset:true,borderImageSlice:true,borderImageWidth:true,boxFlex:true,boxFlexGroup:true,boxOrdinalGroup:true,columnCount:true,columns:true,flex:true,flexGrow:true,flexPositive:true,flexShrink:true,flexNegative:true,flexOrder:true,gridArea:true,gridRow:true,gridRowEnd:true,gridRowSpan:true,gridRowStart:true,gridColumn:true,gridColumnEnd:true,gridColumnSpan:true,gridColumnStart:true,fontWeight:true,lineClamp:true,lineHeight:true,opacity:true,order:true,orphans:true,tabSize:true,widows:true,zIndex:true,zoom:true,// SVG-related properties
4455fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeDasharray:true,strokeDashoffset:true,strokeMiterlimit:true,strokeOpacity:true,strokeWidth:true};/**
4456 * @param {string} prefix vendor-specific prefix, eg: Webkit
4457 * @param {string} key style name, eg: transitionDuration
4458 * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
4459 * WebkitTransitionDuration
4460 */function prefixKey(prefix,key){return prefix+key.charAt(0).toUpperCase()+key.substring(1);}/**
4461 * Support style names that may come passed in prefixed by adding permutations
4462 * of vendor prefixes.
4463 */var prefixes=['Webkit','ms','Moz','O'];// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
4464// infinite loop, because it iterates over the newly added props too.
4465Object.keys(isUnitlessNumber).forEach(function(prop){prefixes.forEach(function(prefix){isUnitlessNumber[prefixKey(prefix,prop)]=isUnitlessNumber[prop];});});/**
4466 * Convert a value into the proper css writable value. The style name `name`
4467 * should be logical (no hyphens), as specified
4468 * in `CSSProperty.isUnitlessNumber`.
4469 *
4470 * @param {string} name CSS property name such as `topMargin`.
4471 * @param {*} value CSS property value such as `10px`.
4472 * @return {string} Normalized style value with dimensions applied.
4473 */function dangerousStyleValue(name,value,isCustomProperty){// Note that we've removed escapeTextForBrowser() calls here since the
4474// whole string will be escaped when the attribute is injected into
4475// the markup. If you provide unsafe user data here they can inject
4476// arbitrary CSS which may be problematic (I couldn't repro this):
4477// https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
4478// http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
4479// This is not an XSS hole but instead a potential CSS injection issue
4480// which has lead to a greater discussion about how we're going to
4481// trust URLs moving forward. See #2115901
4482var isEmpty=value==null||typeof value==='boolean'||value==='';if(isEmpty){return'';}if(!isCustomProperty&&typeof value==='number'&&value!==0&&!(isUnitlessNumber.hasOwnProperty(name)&&isUnitlessNumber[name])){return value+'px';// Presumes implicit 'px' suffix for unitless numbers
4483}return(''+value).trim();}var uppercasePattern=/([A-Z])/g;var msPattern=/^ms-/;/**
4484 * Hyphenates a camelcased CSS property name, for example:
4485 *
4486 * > hyphenateStyleName('backgroundColor')
4487 * < "background-color"
4488 * > hyphenateStyleName('MozTransition')
4489 * < "-moz-transition"
4490 * > hyphenateStyleName('msTransition')
4491 * < "-ms-transition"
4492 *
4493 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
4494 * is converted to `-ms-`.
4495 */function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}var warnValidStyle=function(){};{// 'msTransform' is correct, but the other prefixes should be capitalized
4496var badVendoredStyleNamePattern=/^(?:webkit|moz|o)[A-Z]/;var msPattern$1=/^-ms-/;var hyphenPattern=/-(.)/g;// style values shouldn't contain a semicolon
4497var badStyleValueWithSemicolonPattern=/;\s*$/;var warnedStyleNames={};var warnedStyleValues={};var warnedForNaNValue=false;var warnedForInfinityValue=false;var camelize=function(string){return string.replace(hyphenPattern,function(_,character){return character.toUpperCase();});};var warnHyphenatedStyleName=function(name){if(warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]){return;}warnedStyleNames[name]=true;warning$1(false,'Unsupported style property %s. Did you mean %s?',name,// As Andi Smith suggests
4498// (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
4499// is converted to lowercase `ms`.
4500camelize(name.replace(msPattern$1,'ms-')));};var warnBadVendoredStyleName=function(name){if(warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]){return;}warnedStyleNames[name]=true;warning$1(false,'Unsupported vendor-prefixed style property %s. Did you mean %s?',name,name.charAt(0).toUpperCase()+name.slice(1));};var warnStyleValueWithSemicolon=function(name,value){if(warnedStyleValues.hasOwnProperty(value)&&warnedStyleValues[value]){return;}warnedStyleValues[value]=true;warning$1(false,"Style property values shouldn't contain a semicolon. "+'Try "%s: %s" instead.',name,value.replace(badStyleValueWithSemicolonPattern,''));};var warnStyleValueIsNaN=function(name,value){if(warnedForNaNValue){return;}warnedForNaNValue=true;warning$1(false,'`NaN` is an invalid value for the `%s` css style property.',name);};var warnStyleValueIsInfinity=function(name,value){if(warnedForInfinityValue){return;}warnedForInfinityValue=true;warning$1(false,'`Infinity` is an invalid value for the `%s` css style property.',name);};warnValidStyle=function(name,value){if(name.indexOf('-')>-1){warnHyphenatedStyleName(name);}else if(badVendoredStyleNamePattern.test(name)){warnBadVendoredStyleName(name);}else if(badStyleValueWithSemicolonPattern.test(value)){warnStyleValueWithSemicolon(name,value);}if(typeof value==='number'){if(isNaN(value)){warnStyleValueIsNaN(name,value);}else if(!isFinite(value)){warnStyleValueIsInfinity(name,value);}}};}var warnValidStyle$1=warnValidStyle;/**
4501 * Operations for dealing with CSS properties.
4502 */ /**
4503 * This creates a string that is expected to be equivalent to the style
4504 * attribute generated by server-side rendering. It by-passes warnings and
4505 * security checks so it's not safe to use this value for anything other than
4506 * comparison. It is only used in DEV for SSR validation.
4507 */function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+hyphenateStyleName(styleName)+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}/**
4508 * Sets the value for multiple styles on a node. If a value is specified as
4509 * '' (empty string), the corresponding style property will be unset.
4510 *
4511 * @param {DOMElement} node
4512 * @param {object} styles
4513 */function setValueForStyles(node,styles){var style=node.style;for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var isCustomProperty=styleName.indexOf('--')===0;{if(!isCustomProperty){warnValidStyle$1(styleName,styles[styleName]);}}var styleValue=dangerousStyleValue(styleName,styles[styleName],isCustomProperty);if(styleName==='float'){styleName='cssFloat';}if(isCustomProperty){style.setProperty(styleName,styleValue);}else{style[styleName]=styleValue;}}}// For HTML, certain tags should omit their close tag. We keep a whitelist for
4514// those special-case tags.
4515var omittedCloseTags={area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true// NOTE: menuitem's close tag should be omitted, but that causes problems.
4516};// For HTML, certain tags cannot have children. This has the same purpose as
4517// `omittedCloseTags` except that `menuitem` should still have its closing tag.
4518var voidElementTags=_assign({menuitem:true},omittedCloseTags);// TODO: We can remove this if we add invariantWithStack()
4519// or add stack by default to invariants where possible.
4520var HTML$1='__html';var ReactDebugCurrentFrame$2=null;{ReactDebugCurrentFrame$2=ReactSharedInternals.ReactDebugCurrentFrame;}function assertValidProps(tag,props){if(!props){return;}// Note the use of `==` which checks for null or undefined.
4521if(voidElementTags[tag]){!(props.children==null&&props.dangerouslySetInnerHTML==null)?invariant(false,'%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s',tag,ReactDebugCurrentFrame$2.getStackAddendum()):void 0;}if(props.dangerouslySetInnerHTML!=null){!(props.children==null)?invariant(false,'Can only set one of `children` or `props.dangerouslySetInnerHTML`.'):void 0;!(typeof props.dangerouslySetInnerHTML==='object'&&HTML$1 in props.dangerouslySetInnerHTML)?invariant(false,'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.'):void 0;}{!(props.suppressContentEditableWarning||!props.contentEditable||props.children==null)?warning$1(false,'A component is `contentEditable` and contains `children` managed by '+'React. It is now your responsibility to guarantee that none of '+'those nodes are unexpectedly modified or duplicated. This is '+'probably not intentional.'):void 0;}!(props.style==null||typeof props.style==='object')?invariant(false,'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s',ReactDebugCurrentFrame$2.getStackAddendum()):void 0;}function isCustomComponent(tagName,props){if(tagName.indexOf('-')===-1){return typeof props.is==='string';}switch(tagName){// These are reserved SVG and MathML elements.
4522// We don't mind this whitelist too much because we expect it to never grow.
4523// The alternative is to track the namespace in a few places which is convoluted.
4524// https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
4525case'annotation-xml':case'color-profile':case'font-face':case'font-face-src':case'font-face-uri':case'font-face-format':case'font-face-name':case'missing-glyph':return false;default:return true;}}// When adding attributes to the HTML or SVG whitelist, be sure to
4526// also add them to this module to ensure casing and incorrect name
4527// warnings.
4528var possibleStandardNames={// HTML
4529accept:'accept',acceptcharset:'acceptCharset','accept-charset':'acceptCharset',accesskey:'accessKey',action:'action',allowfullscreen:'allowFullScreen',alt:'alt',as:'as',async:'async',autocapitalize:'autoCapitalize',autocomplete:'autoComplete',autocorrect:'autoCorrect',autofocus:'autoFocus',autoplay:'autoPlay',autosave:'autoSave',capture:'capture',cellpadding:'cellPadding',cellspacing:'cellSpacing',challenge:'challenge',charset:'charSet',checked:'checked',children:'children',cite:'cite',class:'className',classid:'classID',classname:'className',cols:'cols',colspan:'colSpan',content:'content',contenteditable:'contentEditable',contextmenu:'contextMenu',controls:'controls',controlslist:'controlsList',coords:'coords',crossorigin:'crossOrigin',dangerouslysetinnerhtml:'dangerouslySetInnerHTML',data:'data',datetime:'dateTime',default:'default',defaultchecked:'defaultChecked',defaultvalue:'defaultValue',defer:'defer',dir:'dir',disabled:'disabled',download:'download',draggable:'draggable',enctype:'encType',for:'htmlFor',form:'form',formmethod:'formMethod',formaction:'formAction',formenctype:'formEncType',formnovalidate:'formNoValidate',formtarget:'formTarget',frameborder:'frameBorder',headers:'headers',height:'height',hidden:'hidden',high:'high',href:'href',hreflang:'hrefLang',htmlfor:'htmlFor',httpequiv:'httpEquiv','http-equiv':'httpEquiv',icon:'icon',id:'id',innerhtml:'innerHTML',inputmode:'inputMode',integrity:'integrity',is:'is',itemid:'itemID',itemprop:'itemProp',itemref:'itemRef',itemscope:'itemScope',itemtype:'itemType',keyparams:'keyParams',keytype:'keyType',kind:'kind',label:'label',lang:'lang',list:'list',loop:'loop',low:'low',manifest:'manifest',marginwidth:'marginWidth',marginheight:'marginHeight',max:'max',maxlength:'maxLength',media:'media',mediagroup:'mediaGroup',method:'method',min:'min',minlength:'minLength',multiple:'multiple',muted:'muted',name:'name',nomodule:'noModule',nonce:'nonce',novalidate:'noValidate',open:'open',optimum:'optimum',pattern:'pattern',placeholder:'placeholder',playsinline:'playsInline',poster:'poster',preload:'preload',profile:'profile',radiogroup:'radioGroup',readonly:'readOnly',referrerpolicy:'referrerPolicy',rel:'rel',required:'required',reversed:'reversed',role:'role',rows:'rows',rowspan:'rowSpan',sandbox:'sandbox',scope:'scope',scoped:'scoped',scrolling:'scrolling',seamless:'seamless',selected:'selected',shape:'shape',size:'size',sizes:'sizes',span:'span',spellcheck:'spellCheck',src:'src',srcdoc:'srcDoc',srclang:'srcLang',srcset:'srcSet',start:'start',step:'step',style:'style',summary:'summary',tabindex:'tabIndex',target:'target',title:'title',type:'type',usemap:'useMap',value:'value',width:'width',wmode:'wmode',wrap:'wrap',// SVG
4530about:'about',accentheight:'accentHeight','accent-height':'accentHeight',accumulate:'accumulate',additive:'additive',alignmentbaseline:'alignmentBaseline','alignment-baseline':'alignmentBaseline',allowreorder:'allowReorder',alphabetic:'alphabetic',amplitude:'amplitude',arabicform:'arabicForm','arabic-form':'arabicForm',ascent:'ascent',attributename:'attributeName',attributetype:'attributeType',autoreverse:'autoReverse',azimuth:'azimuth',basefrequency:'baseFrequency',baselineshift:'baselineShift','baseline-shift':'baselineShift',baseprofile:'baseProfile',bbox:'bbox',begin:'begin',bias:'bias',by:'by',calcmode:'calcMode',capheight:'capHeight','cap-height':'capHeight',clip:'clip',clippath:'clipPath','clip-path':'clipPath',clippathunits:'clipPathUnits',cliprule:'clipRule','clip-rule':'clipRule',color:'color',colorinterpolation:'colorInterpolation','color-interpolation':'colorInterpolation',colorinterpolationfilters:'colorInterpolationFilters','color-interpolation-filters':'colorInterpolationFilters',colorprofile:'colorProfile','color-profile':'colorProfile',colorrendering:'colorRendering','color-rendering':'colorRendering',contentscripttype:'contentScriptType',contentstyletype:'contentStyleType',cursor:'cursor',cx:'cx',cy:'cy',d:'d',datatype:'datatype',decelerate:'decelerate',descent:'descent',diffuseconstant:'diffuseConstant',direction:'direction',display:'display',divisor:'divisor',dominantbaseline:'dominantBaseline','dominant-baseline':'dominantBaseline',dur:'dur',dx:'dx',dy:'dy',edgemode:'edgeMode',elevation:'elevation',enablebackground:'enableBackground','enable-background':'enableBackground',end:'end',exponent:'exponent',externalresourcesrequired:'externalResourcesRequired',fill:'fill',fillopacity:'fillOpacity','fill-opacity':'fillOpacity',fillrule:'fillRule','fill-rule':'fillRule',filter:'filter',filterres:'filterRes',filterunits:'filterUnits',floodopacity:'floodOpacity','flood-opacity':'floodOpacity',floodcolor:'floodColor','flood-color':'floodColor',focusable:'focusable',fontfamily:'fontFamily','font-family':'fontFamily',fontsize:'fontSize','font-size':'fontSize',fontsizeadjust:'fontSizeAdjust','font-size-adjust':'fontSizeAdjust',fontstretch:'fontStretch','font-stretch':'fontStretch',fontstyle:'fontStyle','font-style':'fontStyle',fontvariant:'fontVariant','font-variant':'fontVariant',fontweight:'fontWeight','font-weight':'fontWeight',format:'format',from:'from',fx:'fx',fy:'fy',g1:'g1',g2:'g2',glyphname:'glyphName','glyph-name':'glyphName',glyphorientationhorizontal:'glyphOrientationHorizontal','glyph-orientation-horizontal':'glyphOrientationHorizontal',glyphorientationvertical:'glyphOrientationVertical','glyph-orientation-vertical':'glyphOrientationVertical',glyphref:'glyphRef',gradienttransform:'gradientTransform',gradientunits:'gradientUnits',hanging:'hanging',horizadvx:'horizAdvX','horiz-adv-x':'horizAdvX',horizoriginx:'horizOriginX','horiz-origin-x':'horizOriginX',ideographic:'ideographic',imagerendering:'imageRendering','image-rendering':'imageRendering',in2:'in2',in:'in',inlist:'inlist',intercept:'intercept',k1:'k1',k2:'k2',k3:'k3',k4:'k4',k:'k',kernelmatrix:'kernelMatrix',kernelunitlength:'kernelUnitLength',kerning:'kerning',keypoints:'keyPoints',keysplines:'keySplines',keytimes:'keyTimes',lengthadjust:'lengthAdjust',letterspacing:'letterSpacing','letter-spacing':'letterSpacing',lightingcolor:'lightingColor','lighting-color':'lightingColor',limitingconeangle:'limitingConeAngle',local:'local',markerend:'markerEnd','marker-end':'markerEnd',markerheight:'markerHeight',markermid:'markerMid','marker-mid':'markerMid',markerstart:'markerStart','marker-start':'markerStart',markerunits:'markerUnits',markerwidth:'markerWidth',mask:'mask',maskcontentunits:'maskContentUnits',maskunits:'maskUnits',mathematical:'mathematical',mode:'mode',numoctaves:'numOctaves',offset:'offset',opacity:'opacity',operator:'operator',order:'order',orient:'orient',orientation:'orientation',origin:'origin',overflow:'overflow',overlineposition:'overlinePosition','overline-position':'overlinePosition',overlinethickness:'overlineThickness','overline-thickness':'overlineThickness',paintorder:'paintOrder','paint-order':'paintOrder',panose1:'panose1','panose-1':'panose1',pathlength:'pathLength',patterncontentunits:'patternContentUnits',patterntransform:'patternTransform',patternunits:'patternUnits',pointerevents:'pointerEvents','pointer-events':'pointerEvents',points:'points',pointsatx:'pointsAtX',pointsaty:'pointsAtY',pointsatz:'pointsAtZ',prefix:'prefix',preservealpha:'preserveAlpha',preserveaspectratio:'preserveAspectRatio',primitiveunits:'primitiveUnits',property:'property',r:'r',radius:'radius',refx:'refX',refy:'refY',renderingintent:'renderingIntent','rendering-intent':'renderingIntent',repeatcount:'repeatCount',repeatdur:'repeatDur',requiredextensions:'requiredExtensions',requiredfeatures:'requiredFeatures',resource:'resource',restart:'restart',result:'result',results:'results',rotate:'rotate',rx:'rx',ry:'ry',scale:'scale',security:'security',seed:'seed',shaperendering:'shapeRendering','shape-rendering':'shapeRendering',slope:'slope',spacing:'spacing',specularconstant:'specularConstant',specularexponent:'specularExponent',speed:'speed',spreadmethod:'spreadMethod',startoffset:'startOffset',stddeviation:'stdDeviation',stemh:'stemh',stemv:'stemv',stitchtiles:'stitchTiles',stopcolor:'stopColor','stop-color':'stopColor',stopopacity:'stopOpacity','stop-opacity':'stopOpacity',strikethroughposition:'strikethroughPosition','strikethrough-position':'strikethroughPosition',strikethroughthickness:'strikethroughThickness','strikethrough-thickness':'strikethroughThickness',string:'string',stroke:'stroke',strokedasharray:'strokeDasharray','stroke-dasharray':'strokeDasharray',strokedashoffset:'strokeDashoffset','stroke-dashoffset':'strokeDashoffset',strokelinecap:'strokeLinecap','stroke-linecap':'strokeLinecap',strokelinejoin:'strokeLinejoin','stroke-linejoin':'strokeLinejoin',strokemiterlimit:'strokeMiterlimit','stroke-miterlimit':'strokeMiterlimit',strokewidth:'strokeWidth','stroke-width':'strokeWidth',strokeopacity:'strokeOpacity','stroke-opacity':'strokeOpacity',suppresscontenteditablewarning:'suppressContentEditableWarning',suppresshydrationwarning:'suppressHydrationWarning',surfacescale:'surfaceScale',systemlanguage:'systemLanguage',tablevalues:'tableValues',targetx:'targetX',targety:'targetY',textanchor:'textAnchor','text-anchor':'textAnchor',textdecoration:'textDecoration','text-decoration':'textDecoration',textlength:'textLength',textrendering:'textRendering','text-rendering':'textRendering',to:'to',transform:'transform',typeof:'typeof',u1:'u1',u2:'u2',underlineposition:'underlinePosition','underline-position':'underlinePosition',underlinethickness:'underlineThickness','underline-thickness':'underlineThickness',unicode:'unicode',unicodebidi:'unicodeBidi','unicode-bidi':'unicodeBidi',unicoderange:'unicodeRange','unicode-range':'unicodeRange',unitsperem:'unitsPerEm','units-per-em':'unitsPerEm',unselectable:'unselectable',valphabetic:'vAlphabetic','v-alphabetic':'vAlphabetic',values:'values',vectoreffect:'vectorEffect','vector-effect':'vectorEffect',version:'version',vertadvy:'vertAdvY','vert-adv-y':'vertAdvY',vertoriginx:'vertOriginX','vert-origin-x':'vertOriginX',vertoriginy:'vertOriginY','vert-origin-y':'vertOriginY',vhanging:'vHanging','v-hanging':'vHanging',videographic:'vIdeographic','v-ideographic':'vIdeographic',viewbox:'viewBox',viewtarget:'viewTarget',visibility:'visibility',vmathematical:'vMathematical','v-mathematical':'vMathematical',vocab:'vocab',widths:'widths',wordspacing:'wordSpacing','word-spacing':'wordSpacing',writingmode:'writingMode','writing-mode':'writingMode',x1:'x1',x2:'x2',x:'x',xchannelselector:'xChannelSelector',xheight:'xHeight','x-height':'xHeight',xlinkactuate:'xlinkActuate','xlink:actuate':'xlinkActuate',xlinkarcrole:'xlinkArcrole','xlink:arcrole':'xlinkArcrole',xlinkhref:'xlinkHref','xlink:href':'xlinkHref',xlinkrole:'xlinkRole','xlink:role':'xlinkRole',xlinkshow:'xlinkShow','xlink:show':'xlinkShow',xlinktitle:'xlinkTitle','xlink:title':'xlinkTitle',xlinktype:'xlinkType','xlink:type':'xlinkType',xmlbase:'xmlBase','xml:base':'xmlBase',xmllang:'xmlLang','xml:lang':'xmlLang',xmlns:'xmlns','xml:space':'xmlSpace',xmlnsxlink:'xmlnsXlink','xmlns:xlink':'xmlnsXlink',xmlspace:'xmlSpace',y1:'y1',y2:'y2',y:'y',ychannelselector:'yChannelSelector',z:'z',zoomandpan:'zoomAndPan'};var ariaProperties={'aria-current':0,// state
4531'aria-details':0,'aria-disabled':0,// state
4532'aria-hidden':0,// state
4533'aria-invalid':0,// state
4534'aria-keyshortcuts':0,'aria-label':0,'aria-roledescription':0,// Widget Attributes
4535'aria-autocomplete':0,'aria-checked':0,'aria-expanded':0,'aria-haspopup':0,'aria-level':0,'aria-modal':0,'aria-multiline':0,'aria-multiselectable':0,'aria-orientation':0,'aria-placeholder':0,'aria-pressed':0,'aria-readonly':0,'aria-required':0,'aria-selected':0,'aria-sort':0,'aria-valuemax':0,'aria-valuemin':0,'aria-valuenow':0,'aria-valuetext':0,// Live Region Attributes
4536'aria-atomic':0,'aria-busy':0,'aria-live':0,'aria-relevant':0,// Drag-and-Drop Attributes
4537'aria-dropeffect':0,'aria-grabbed':0,// Relationship Attributes
4538'aria-activedescendant':0,'aria-colcount':0,'aria-colindex':0,'aria-colspan':0,'aria-controls':0,'aria-describedby':0,'aria-errormessage':0,'aria-flowto':0,'aria-labelledby':0,'aria-owns':0,'aria-posinset':0,'aria-rowcount':0,'aria-rowindex':0,'aria-rowspan':0,'aria-setsize':0};var warnedProperties={};var rARIA=new RegExp('^(aria)-['+ATTRIBUTE_NAME_CHAR+']*$');var rARIACamel=new RegExp('^(aria)[A-Z]['+ATTRIBUTE_NAME_CHAR+']*$');var hasOwnProperty$2=Object.prototype.hasOwnProperty;function validateProperty(tagName,name){if(hasOwnProperty$2.call(warnedProperties,name)&&warnedProperties[name]){return true;}if(rARIACamel.test(name)){var ariaName='aria-'+name.slice(4).toLowerCase();var correctName=ariaProperties.hasOwnProperty(ariaName)?ariaName:null;// If this is an aria-* attribute, but is not listed in the known DOM
4539// DOM properties, then it is an invalid aria-* attribute.
4540if(correctName==null){warning$1(false,'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.',name);warnedProperties[name]=true;return true;}// aria-* attributes should be lowercase; suggest the lowercase version.
4541if(name!==correctName){warning$1(false,'Invalid ARIA attribute `%s`. Did you mean `%s`?',name,correctName);warnedProperties[name]=true;return true;}}if(rARIA.test(name)){var lowerCasedName=name.toLowerCase();var standardName=ariaProperties.hasOwnProperty(lowerCasedName)?lowerCasedName:null;// If this is an aria-* attribute, but is not listed in the known DOM
4542// DOM properties, then it is an invalid aria-* attribute.
4543if(standardName==null){warnedProperties[name]=true;return false;}// aria-* attributes should be lowercase; suggest the lowercase version.
4544if(name!==standardName){warning$1(false,'Unknown ARIA attribute `%s`. Did you mean `%s`?',name,standardName);warnedProperties[name]=true;return true;}}return true;}function warnInvalidARIAProps(type,props){var invalidProps=[];for(var key in props){var isValid=validateProperty(type,key);if(!isValid){invalidProps.push(key);}}var unknownPropString=invalidProps.map(function(prop){return'`'+prop+'`';}).join(', ');if(invalidProps.length===1){warning$1(false,'Invalid aria prop %s on <%s> tag. '+'For details, see https://fb.me/invalid-aria-prop',unknownPropString,type);}else if(invalidProps.length>1){warning$1(false,'Invalid aria props %s on <%s> tag. '+'For details, see https://fb.me/invalid-aria-prop',unknownPropString,type);}}function validateProperties(type,props){if(isCustomComponent(type,props)){return;}warnInvalidARIAProps(type,props);}var didWarnValueNull=false;function validateProperties$1(type,props){if(type!=='input'&&type!=='textarea'&&type!=='select'){return;}if(props!=null&&props.value===null&&!didWarnValueNull){didWarnValueNull=true;if(type==='select'&&props.multiple){warning$1(false,'`value` prop on `%s` should not be null. '+'Consider using an empty array when `multiple` is set to `true` '+'to clear the component or `undefined` for uncontrolled components.',type);}else{warning$1(false,'`value` prop on `%s` should not be null. '+'Consider using an empty string to clear the component or `undefined` '+'for uncontrolled components.',type);}}}var validateProperty$1=function(){};{var warnedProperties$1={};var _hasOwnProperty=Object.prototype.hasOwnProperty;var EVENT_NAME_REGEX=/^on./;var INVALID_EVENT_NAME_REGEX=/^on[^A-Z]/;var rARIA$1=new RegExp('^(aria)-['+ATTRIBUTE_NAME_CHAR+']*$');var rARIACamel$1=new RegExp('^(aria)[A-Z]['+ATTRIBUTE_NAME_CHAR+']*$');validateProperty$1=function(tagName,name,value,canUseEventSystem){if(_hasOwnProperty.call(warnedProperties$1,name)&&warnedProperties$1[name]){return true;}var lowerCasedName=name.toLowerCase();if(lowerCasedName==='onfocusin'||lowerCasedName==='onfocusout'){warning$1(false,'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. '+'All React events are normalized to bubble, so onFocusIn and onFocusOut '+'are not needed/supported by React.');warnedProperties$1[name]=true;return true;}// We can't rely on the event system being injected on the server.
4545if(canUseEventSystem){if(registrationNameModules.hasOwnProperty(name)){return true;}var registrationName=possibleRegistrationNames.hasOwnProperty(lowerCasedName)?possibleRegistrationNames[lowerCasedName]:null;if(registrationName!=null){warning$1(false,'Invalid event handler property `%s`. Did you mean `%s`?',name,registrationName);warnedProperties$1[name]=true;return true;}if(EVENT_NAME_REGEX.test(name)){warning$1(false,'Unknown event handler property `%s`. It will be ignored.',name);warnedProperties$1[name]=true;return true;}}else if(EVENT_NAME_REGEX.test(name)){// If no event plugins have been injected, we are in a server environment.
4546// So we can't tell if the event name is correct for sure, but we can filter
4547// out known bad ones like `onclick`. We can't suggest a specific replacement though.
4548if(INVALID_EVENT_NAME_REGEX.test(name)){warning$1(false,'Invalid event handler property `%s`. '+'React events use the camelCase naming convention, for example `onClick`.',name);}warnedProperties$1[name]=true;return true;}// Let the ARIA attribute hook validate ARIA attributes
4549if(rARIA$1.test(name)||rARIACamel$1.test(name)){return true;}if(lowerCasedName==='innerhtml'){warning$1(false,'Directly setting property `innerHTML` is not permitted. '+'For more information, lookup documentation on `dangerouslySetInnerHTML`.');warnedProperties$1[name]=true;return true;}if(lowerCasedName==='aria'){warning$1(false,'The `aria` attribute is reserved for future use in React. '+'Pass individual `aria-` attributes instead.');warnedProperties$1[name]=true;return true;}if(lowerCasedName==='is'&&value!==null&&value!==undefined&&typeof value!=='string'){warning$1(false,'Received a `%s` for a string attribute `is`. If this is expected, cast '+'the value to a string.',typeof value);warnedProperties$1[name]=true;return true;}if(typeof value==='number'&&isNaN(value)){warning$1(false,'Received NaN for the `%s` attribute. If this is expected, cast '+'the value to a string.',name);warnedProperties$1[name]=true;return true;}var propertyInfo=getPropertyInfo(name);var isReserved=propertyInfo!==null&&propertyInfo.type===RESERVED;// Known attributes should match the casing specified in the property config.
4550if(possibleStandardNames.hasOwnProperty(lowerCasedName)){var standardName=possibleStandardNames[lowerCasedName];if(standardName!==name){warning$1(false,'Invalid DOM property `%s`. Did you mean `%s`?',name,standardName);warnedProperties$1[name]=true;return true;}}else if(!isReserved&&name!==lowerCasedName){// Unknown attributes should have lowercase casing since that's how they
4551// will be cased anyway with server rendering.
4552warning$1(false,'React does not recognize the `%s` prop on a DOM element. If you '+'intentionally want it to appear in the DOM as a custom '+'attribute, spell it as lowercase `%s` instead. '+'If you accidentally passed it from a parent component, remove '+'it from the DOM element.',name,lowerCasedName);warnedProperties$1[name]=true;return true;}if(typeof value==='boolean'&&shouldRemoveAttributeWithWarning(name,value,propertyInfo,false)){if(value){warning$1(false,'Received `%s` for a non-boolean attribute `%s`.\n\n'+'If you want to write it to the DOM, pass a string instead: '+'%s="%s" or %s={value.toString()}.',value,name,name,value,name);}else{warning$1(false,'Received `%s` for a non-boolean attribute `%s`.\n\n'+'If you want to write it to the DOM, pass a string instead: '+'%s="%s" or %s={value.toString()}.\n\n'+'If you used to conditionally omit it with %s={condition && value}, '+'pass %s={condition ? value : undefined} instead.',value,name,name,value,name,name,name);}warnedProperties$1[name]=true;return true;}// Now that we've validated casing, do not validate
4553// data types for reserved props
4554if(isReserved){return true;}// Warn when a known attribute is a bad type
4555if(shouldRemoveAttributeWithWarning(name,value,propertyInfo,false)){warnedProperties$1[name]=true;return false;}// Warn when passing the strings 'false' or 'true' into a boolean prop
4556if((value==='false'||value==='true')&&propertyInfo!==null&&propertyInfo.type===BOOLEAN){warning$1(false,'Received the string `%s` for the boolean attribute `%s`. '+'%s '+'Did you mean %s={%s}?',value,name,value==='false'?'The browser will interpret it as a truthy value.':'Although this works, it will not work as expected if you pass the string "false".',name,value);warnedProperties$1[name]=true;return true;}return true;};}var warnUnknownProperties=function(type,props,canUseEventSystem){var unknownProps=[];for(var key in props){var isValid=validateProperty$1(type,key,props[key],canUseEventSystem);if(!isValid){unknownProps.push(key);}}var unknownPropString=unknownProps.map(function(prop){return'`'+prop+'`';}).join(', ');if(unknownProps.length===1){warning$1(false,'Invalid value for prop %s on <%s> tag. Either remove it from the element, '+'or pass a string or number value to keep it in the DOM. '+'For details, see https://fb.me/react-attribute-behavior',unknownPropString,type);}else if(unknownProps.length>1){warning$1(false,'Invalid values for props %s on <%s> tag. Either remove them from the element, '+'or pass a string or number value to keep them in the DOM. '+'For details, see https://fb.me/react-attribute-behavior',unknownPropString,type);}};function validateProperties$2(type,props,canUseEventSystem){if(isCustomComponent(type,props)){return;}warnUnknownProperties(type,props,canUseEventSystem);}// TODO: direct imports like some-package/src/* are bad. Fix me.
4557var didWarnInvalidHydration=false;var didWarnShadyDOM=false;var DANGEROUSLY_SET_INNER_HTML='dangerouslySetInnerHTML';var SUPPRESS_CONTENT_EDITABLE_WARNING='suppressContentEditableWarning';var SUPPRESS_HYDRATION_WARNING$1='suppressHydrationWarning';var AUTOFOCUS='autoFocus';var CHILDREN='children';var STYLE='style';var HTML='__html';var HTML_NAMESPACE=Namespaces.html;var warnedUnknownTags=void 0;var suppressHydrationWarning=void 0;var validatePropertiesInDevelopment=void 0;var warnForTextDifference=void 0;var warnForPropDifference=void 0;var warnForExtraAttributes=void 0;var warnForInvalidEventListener=void 0;var canDiffStyleForHydrationWarning=void 0;var normalizeMarkupForTextOrAttribute=void 0;var normalizeHTML=void 0;{warnedUnknownTags={// Chrome is the only major browser not shipping <time>. But as of July
4558// 2017 it intends to ship it due to widespread usage. We intentionally
4559// *don't* warn for <time> even if it's unrecognized by Chrome because
4560// it soon will be, and many apps have been using it anyway.
4561time:true,// There are working polyfills for <dialog>. Let people use it.
4562dialog:true,// Electron ships a custom <webview> tag to display external web content in
4563// an isolated frame and process.
4564// This tag is not present in non Electron environments such as JSDom which
4565// is often used for testing purposes.
4566// @see https://electronjs.org/docs/api/webview-tag
4567webview:true};validatePropertiesInDevelopment=function(type,props){validateProperties(type,props);validateProperties$1(type,props);validateProperties$2(type,props,/* canUseEventSystem */true);};// IE 11 parses & normalizes the style attribute as opposed to other
4568// browsers. It adds spaces and sorts the properties in some
4569// non-alphabetical order. Handling that would require sorting CSS
4570// properties in the client & server versions or applying
4571// `expectedStyle` to a temporary DOM node to read its `style` attribute
4572// normalized. Since it only affects IE, we're skipping style warnings
4573// in that browser completely in favor of doing all that work.
4574// See https://github.com/facebook/react/issues/11807
4575canDiffStyleForHydrationWarning=canUseDOM&&!document.documentMode;// HTML parsing normalizes CR and CRLF to LF.
4576// It also can turn \u0000 into \uFFFD inside attributes.
4577// https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream
4578// If we have a mismatch, it might be caused by that.
4579// We will still patch up in this case but not fire the warning.
4580var NORMALIZE_NEWLINES_REGEX=/\r\n?/g;var NORMALIZE_NULL_AND_REPLACEMENT_REGEX=/\u0000|\uFFFD/g;normalizeMarkupForTextOrAttribute=function(markup){var markupString=typeof markup==='string'?markup:''+markup;return markupString.replace(NORMALIZE_NEWLINES_REGEX,'\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX,'');};warnForTextDifference=function(serverText,clientText){if(didWarnInvalidHydration){return;}var normalizedClientText=normalizeMarkupForTextOrAttribute(clientText);var normalizedServerText=normalizeMarkupForTextOrAttribute(serverText);if(normalizedServerText===normalizedClientText){return;}didWarnInvalidHydration=true;warningWithoutStack$1(false,'Text content did not match. Server: "%s" Client: "%s"',normalizedServerText,normalizedClientText);};warnForPropDifference=function(propName,serverValue,clientValue){if(didWarnInvalidHydration){return;}var normalizedClientValue=normalizeMarkupForTextOrAttribute(clientValue);var normalizedServerValue=normalizeMarkupForTextOrAttribute(serverValue);if(normalizedServerValue===normalizedClientValue){return;}didWarnInvalidHydration=true;warningWithoutStack$1(false,'Prop `%s` did not match. Server: %s Client: %s',propName,JSON.stringify(normalizedServerValue),JSON.stringify(normalizedClientValue));};warnForExtraAttributes=function(attributeNames){if(didWarnInvalidHydration){return;}didWarnInvalidHydration=true;var names=[];attributeNames.forEach(function(name){names.push(name);});warningWithoutStack$1(false,'Extra attributes from the server: %s',names);};warnForInvalidEventListener=function(registrationName,listener){if(listener===false){warning$1(false,'Expected `%s` listener to be a function, instead got `false`.\n\n'+'If you used to conditionally omit it with %s={condition && value}, '+'pass %s={condition ? value : undefined} instead.',registrationName,registrationName,registrationName);}else{warning$1(false,'Expected `%s` listener to be a function, instead got a value of `%s` type.',registrationName,typeof listener);}};// Parse the HTML and read it back to normalize the HTML string so that it
4581// can be used for comparison.
4582normalizeHTML=function(parent,html){// We could have created a separate document here to avoid
4583// re-initializing custom elements if they exist. But this breaks
4584// how <noscript> is being handled. So we use the same document.
4585// See the discussion in https://github.com/facebook/react/pull/11157.
4586var testElement=parent.namespaceURI===HTML_NAMESPACE?parent.ownerDocument.createElement(parent.tagName):parent.ownerDocument.createElementNS(parent.namespaceURI,parent.tagName);testElement.innerHTML=html;return testElement.innerHTML;};}function ensureListeningTo(rootContainerElement,registrationName){var isDocumentOrFragment=rootContainerElement.nodeType===DOCUMENT_NODE||rootContainerElement.nodeType===DOCUMENT_FRAGMENT_NODE;var doc=isDocumentOrFragment?rootContainerElement:rootContainerElement.ownerDocument;listenTo(registrationName,doc);}function getOwnerDocumentFromRootContainer(rootContainerElement){return rootContainerElement.nodeType===DOCUMENT_NODE?rootContainerElement:rootContainerElement.ownerDocument;}function noop(){}function trapClickOnNonInteractiveElement(node){// Mobile Safari does not fire properly bubble click events on
4587// non-interactive elements, which means delegated click listeners do not
4588// fire. The workaround for this bug involves attaching an empty click
4589// listener on the target node.
4590// http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
4591// Just set it using the onclick property so that we don't have to manage any
4592// bookkeeping for it. Not sure if we need to clear it when the listener is
4593// removed.
4594// TODO: Only do this for the relevant Safaris maybe?
4595node.onclick=noop;}function setInitialDOMProperties(tag,domElement,rootContainerElement,nextProps,isCustomComponentTag){for(var propKey in nextProps){if(!nextProps.hasOwnProperty(propKey)){continue;}var nextProp=nextProps[propKey];if(propKey===STYLE){{if(nextProp){// Freeze the next style object so that we can assume it won't be
4596// mutated. We have already warned for this in the past.
4597Object.freeze(nextProp);}}// Relies on `updateStylesByID` not mutating `styleUpdates`.
4598setValueForStyles(domElement,nextProp);}else if(propKey===DANGEROUSLY_SET_INNER_HTML){var nextHtml=nextProp?nextProp[HTML]:undefined;if(nextHtml!=null){setInnerHTML(domElement,nextHtml);}}else if(propKey===CHILDREN){if(typeof nextProp==='string'){// Avoid setting initial textContent when the text is empty. In IE11 setting
4599// textContent on a <textarea> will cause the placeholder to not
4600// show within the <textarea> until it has been focused and blurred again.
4601// https://github.com/facebook/react/issues/6731#issuecomment-254874553
4602var canSetTextContent=tag!=='textarea'||nextProp!=='';if(canSetTextContent){setTextContent(domElement,nextProp);}}else if(typeof nextProp==='number'){setTextContent(domElement,''+nextProp);}}else if(propKey===SUPPRESS_CONTENT_EDITABLE_WARNING||propKey===SUPPRESS_HYDRATION_WARNING$1){// Noop
4603}else if(propKey===AUTOFOCUS){// We polyfill it separately on the client during commit.
4604// We could have excluded it in the property list instead of
4605// adding a special case here, but then it wouldn't be emitted
4606// on server rendering (but we *do* want to emit it in SSR).
4607}else if(registrationNameModules.hasOwnProperty(propKey)){if(nextProp!=null){if(true&&typeof nextProp!=='function'){warnForInvalidEventListener(propKey,nextProp);}ensureListeningTo(rootContainerElement,propKey);}}else if(nextProp!=null){setValueForProperty(domElement,propKey,nextProp,isCustomComponentTag);}}}function updateDOMProperties(domElement,updatePayload,wasCustomComponentTag,isCustomComponentTag){// TODO: Handle wasCustomComponentTag
4608for(var i=0;i<updatePayload.length;i+=2){var propKey=updatePayload[i];var propValue=updatePayload[i+1];if(propKey===STYLE){setValueForStyles(domElement,propValue);}else if(propKey===DANGEROUSLY_SET_INNER_HTML){setInnerHTML(domElement,propValue);}else if(propKey===CHILDREN){setTextContent(domElement,propValue);}else{setValueForProperty(domElement,propKey,propValue,isCustomComponentTag);}}}function createElement(type,props,rootContainerElement,parentNamespace){var isCustomComponentTag=void 0;// We create tags in the namespace of their parent container, except HTML
4609// tags get no namespace.
4610var ownerDocument=getOwnerDocumentFromRootContainer(rootContainerElement);var domElement=void 0;var namespaceURI=parentNamespace;if(namespaceURI===HTML_NAMESPACE){namespaceURI=getIntrinsicNamespace(type);}if(namespaceURI===HTML_NAMESPACE){{isCustomComponentTag=isCustomComponent(type,props);// Should this check be gated by parent namespace? Not sure we want to
4611// allow <SVG> or <mATH>.
4612!(isCustomComponentTag||type===type.toLowerCase())?warning$1(false,'<%s /> is using incorrect casing. '+'Use PascalCase for React components, '+'or lowercase for HTML elements.',type):void 0;}if(type==='script'){// Create the script via .innerHTML so its "parser-inserted" flag is
4613// set to true and it does not execute
4614var div=ownerDocument.createElement('div');div.innerHTML='<script><'+'/script>';// eslint-disable-line
4615// This is guaranteed to yield a script element.
4616var firstChild=div.firstChild;domElement=div.removeChild(firstChild);}else if(typeof props.is==='string'){// $FlowIssue `createElement` should be updated for Web Components
4617domElement=ownerDocument.createElement(type,{is:props.is});}else{// Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
4618// See discussion in https://github.com/facebook/react/pull/6896
4619// and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
4620domElement=ownerDocument.createElement(type);// Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple`
4621// attribute on `select`s needs to be added before `option`s are inserted. This prevents
4622// a bug where the `select` does not scroll to the correct option because singular
4623// `select` elements automatically pick the first item.
4624// See https://github.com/facebook/react/issues/13222
4625if(type==='select'&&props.multiple){var node=domElement;node.multiple=true;}}}else{domElement=ownerDocument.createElementNS(namespaceURI,type);}{if(namespaceURI===HTML_NAMESPACE){if(!isCustomComponentTag&&Object.prototype.toString.call(domElement)==='[object HTMLUnknownElement]'&&!Object.prototype.hasOwnProperty.call(warnedUnknownTags,type)){warnedUnknownTags[type]=true;warning$1(false,'The tag <%s> is unrecognized in this browser. '+'If you meant to render a React component, start its name with '+'an uppercase letter.',type);}}}return domElement;}function createTextNode(text,rootContainerElement){return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);}function setInitialProperties(domElement,tag,rawProps,rootContainerElement){var isCustomComponentTag=isCustomComponent(tag,rawProps);{validatePropertiesInDevelopment(tag,rawProps);if(isCustomComponentTag&&!didWarnShadyDOM&&domElement.shadyRoot){warning$1(false,'%s is using shady DOM. Using shady DOM with React can '+'cause things to break subtly.',getCurrentFiberOwnerNameInDevOrNull()||'A component');didWarnShadyDOM=true;}}// TODO: Make sure that we check isMounted before firing any of these events.
4626var props=void 0;switch(tag){case'iframe':case'object':trapBubbledEvent(TOP_LOAD,domElement);props=rawProps;break;case'video':case'audio':// Create listener for each media event
4627for(var i=0;i<mediaEventTypes.length;i++){trapBubbledEvent(mediaEventTypes[i],domElement);}props=rawProps;break;case'source':trapBubbledEvent(TOP_ERROR,domElement);props=rawProps;break;case'img':case'image':case'link':trapBubbledEvent(TOP_ERROR,domElement);trapBubbledEvent(TOP_LOAD,domElement);props=rawProps;break;case'form':trapBubbledEvent(TOP_RESET,domElement);trapBubbledEvent(TOP_SUBMIT,domElement);props=rawProps;break;case'details':trapBubbledEvent(TOP_TOGGLE,domElement);props=rawProps;break;case'input':initWrapperState(domElement,rawProps);props=getHostProps(domElement,rawProps);trapBubbledEvent(TOP_INVALID,domElement);// For controlled components we always need to ensure we're listening
4628// to onChange. Even if there is no listener.
4629ensureListeningTo(rootContainerElement,'onChange');break;case'option':validateProps(domElement,rawProps);props=getHostProps$1(domElement,rawProps);break;case'select':initWrapperState$1(domElement,rawProps);props=getHostProps$2(domElement,rawProps);trapBubbledEvent(TOP_INVALID,domElement);// For controlled components we always need to ensure we're listening
4630// to onChange. Even if there is no listener.
4631ensureListeningTo(rootContainerElement,'onChange');break;case'textarea':initWrapperState$2(domElement,rawProps);props=getHostProps$3(domElement,rawProps);trapBubbledEvent(TOP_INVALID,domElement);// For controlled components we always need to ensure we're listening
4632// to onChange. Even if there is no listener.
4633ensureListeningTo(rootContainerElement,'onChange');break;default:props=rawProps;}assertValidProps(tag,props);setInitialDOMProperties(tag,domElement,rootContainerElement,props,isCustomComponentTag);switch(tag){case'input':// TODO: Make sure we check if this is still unmounted or do any clean
4634// up necessary since we never stop tracking anymore.
4635track(domElement);postMountWrapper(domElement,rawProps,false);break;case'textarea':// TODO: Make sure we check if this is still unmounted or do any clean
4636// up necessary since we never stop tracking anymore.
4637track(domElement);postMountWrapper$3(domElement,rawProps);break;case'option':postMountWrapper$1(domElement,rawProps);break;case'select':postMountWrapper$2(domElement,rawProps);break;default:if(typeof props.onClick==='function'){// TODO: This cast may not be sound for SVG, MathML or custom elements.
4638trapClickOnNonInteractiveElement(domElement);}break;}}// Calculate the diff between the two objects.
4639function diffProperties(domElement,tag,lastRawProps,nextRawProps,rootContainerElement){{validatePropertiesInDevelopment(tag,nextRawProps);}var updatePayload=null;var lastProps=void 0;var nextProps=void 0;switch(tag){case'input':lastProps=getHostProps(domElement,lastRawProps);nextProps=getHostProps(domElement,nextRawProps);updatePayload=[];break;case'option':lastProps=getHostProps$1(domElement,lastRawProps);nextProps=getHostProps$1(domElement,nextRawProps);updatePayload=[];break;case'select':lastProps=getHostProps$2(domElement,lastRawProps);nextProps=getHostProps$2(domElement,nextRawProps);updatePayload=[];break;case'textarea':lastProps=getHostProps$3(domElement,lastRawProps);nextProps=getHostProps$3(domElement,nextRawProps);updatePayload=[];break;default:lastProps=lastRawProps;nextProps=nextRawProps;if(typeof lastProps.onClick!=='function'&&typeof nextProps.onClick==='function'){// TODO: This cast may not be sound for SVG, MathML or custom elements.
4640trapClickOnNonInteractiveElement(domElement);}break;}assertValidProps(tag,nextProps);var propKey=void 0;var styleName=void 0;var styleUpdates=null;for(propKey in lastProps){if(nextProps.hasOwnProperty(propKey)||!lastProps.hasOwnProperty(propKey)||lastProps[propKey]==null){continue;}if(propKey===STYLE){var lastStyle=lastProps[propKey];for(styleName in lastStyle){if(lastStyle.hasOwnProperty(styleName)){if(!styleUpdates){styleUpdates={};}styleUpdates[styleName]='';}}}else if(propKey===DANGEROUSLY_SET_INNER_HTML||propKey===CHILDREN){// Noop. This is handled by the clear text mechanism.
4641}else if(propKey===SUPPRESS_CONTENT_EDITABLE_WARNING||propKey===SUPPRESS_HYDRATION_WARNING$1){// Noop
4642}else if(propKey===AUTOFOCUS){// Noop. It doesn't work on updates anyway.
4643}else if(registrationNameModules.hasOwnProperty(propKey)){// This is a special case. If any listener updates we need to ensure
4644// that the "current" fiber pointer gets updated so we need a commit
4645// to update this element.
4646if(!updatePayload){updatePayload=[];}}else{// For all other deleted properties we add it to the queue. We use
4647// the whitelist in the commit phase instead.
4648(updatePayload=updatePayload||[]).push(propKey,null);}}for(propKey in nextProps){var nextProp=nextProps[propKey];var lastProp=lastProps!=null?lastProps[propKey]:undefined;if(!nextProps.hasOwnProperty(propKey)||nextProp===lastProp||nextProp==null&&lastProp==null){continue;}if(propKey===STYLE){{if(nextProp){// Freeze the next style object so that we can assume it won't be
4649// mutated. We have already warned for this in the past.
4650Object.freeze(nextProp);}}if(lastProp){// Unset styles on `lastProp` but not on `nextProp`.
4651for(styleName in lastProp){if(lastProp.hasOwnProperty(styleName)&&(!nextProp||!nextProp.hasOwnProperty(styleName))){if(!styleUpdates){styleUpdates={};}styleUpdates[styleName]='';}}// Update styles that changed since `lastProp`.
4652for(styleName in nextProp){if(nextProp.hasOwnProperty(styleName)&&lastProp[styleName]!==nextProp[styleName]){if(!styleUpdates){styleUpdates={};}styleUpdates[styleName]=nextProp[styleName];}}}else{// Relies on `updateStylesByID` not mutating `styleUpdates`.
4653if(!styleUpdates){if(!updatePayload){updatePayload=[];}updatePayload.push(propKey,styleUpdates);}styleUpdates=nextProp;}}else if(propKey===DANGEROUSLY_SET_INNER_HTML){var nextHtml=nextProp?nextProp[HTML]:undefined;var lastHtml=lastProp?lastProp[HTML]:undefined;if(nextHtml!=null){if(lastHtml!==nextHtml){(updatePayload=updatePayload||[]).push(propKey,''+nextHtml);}}else{// TODO: It might be too late to clear this if we have children
4654// inserted already.
4655}}else if(propKey===CHILDREN){if(lastProp!==nextProp&&(typeof nextProp==='string'||typeof nextProp==='number')){(updatePayload=updatePayload||[]).push(propKey,''+nextProp);}}else if(propKey===SUPPRESS_CONTENT_EDITABLE_WARNING||propKey===SUPPRESS_HYDRATION_WARNING$1){// Noop
4656}else if(registrationNameModules.hasOwnProperty(propKey)){if(nextProp!=null){// We eagerly listen to this even though we haven't committed yet.
4657if(true&&typeof nextProp!=='function'){warnForInvalidEventListener(propKey,nextProp);}ensureListeningTo(rootContainerElement,propKey);}if(!updatePayload&&lastProp!==nextProp){// This is a special case. If any listener updates we need to ensure
4658// that the "current" props pointer gets updated so we need a commit
4659// to update this element.
4660updatePayload=[];}}else{// For any other property we always add it to the queue and then we
4661// filter it out using the whitelist during the commit.
4662(updatePayload=updatePayload||[]).push(propKey,nextProp);}}if(styleUpdates){(updatePayload=updatePayload||[]).push(STYLE,styleUpdates);}return updatePayload;}// Apply the diff.
4663function updateProperties(domElement,updatePayload,tag,lastRawProps,nextRawProps){// Update checked *before* name.
4664// In the middle of an update, it is possible to have multiple checked.
4665// When a checked radio tries to change name, browser makes another radio's checked false.
4666if(tag==='input'&&nextRawProps.type==='radio'&&nextRawProps.name!=null){updateChecked(domElement,nextRawProps);}var wasCustomComponentTag=isCustomComponent(tag,lastRawProps);var isCustomComponentTag=isCustomComponent(tag,nextRawProps);// Apply the diff.
4667updateDOMProperties(domElement,updatePayload,wasCustomComponentTag,isCustomComponentTag);// TODO: Ensure that an update gets scheduled if any of the special props
4668// changed.
4669switch(tag){case'input':// Update the wrapper around inputs *after* updating props. This has to
4670// happen after `updateDOMProperties`. Otherwise HTML5 input validations
4671// raise warnings and prevent the new value from being assigned.
4672updateWrapper(domElement,nextRawProps);break;case'textarea':updateWrapper$1(domElement,nextRawProps);break;case'select':// <select> value update needs to occur after <option> children
4673// reconciliation
4674postUpdateWrapper(domElement,nextRawProps);break;}}function getPossibleStandardName(propName){{var lowerCasedName=propName.toLowerCase();if(!possibleStandardNames.hasOwnProperty(lowerCasedName)){return null;}return possibleStandardNames[lowerCasedName]||null;}return null;}function diffHydratedProperties(domElement,tag,rawProps,parentNamespace,rootContainerElement){var isCustomComponentTag=void 0;var extraAttributeNames=void 0;{suppressHydrationWarning=rawProps[SUPPRESS_HYDRATION_WARNING$1]===true;isCustomComponentTag=isCustomComponent(tag,rawProps);validatePropertiesInDevelopment(tag,rawProps);if(isCustomComponentTag&&!didWarnShadyDOM&&domElement.shadyRoot){warning$1(false,'%s is using shady DOM. Using shady DOM with React can '+'cause things to break subtly.',getCurrentFiberOwnerNameInDevOrNull()||'A component');didWarnShadyDOM=true;}}// TODO: Make sure that we check isMounted before firing any of these events.
4675switch(tag){case'iframe':case'object':trapBubbledEvent(TOP_LOAD,domElement);break;case'video':case'audio':// Create listener for each media event
4676for(var i=0;i<mediaEventTypes.length;i++){trapBubbledEvent(mediaEventTypes[i],domElement);}break;case'source':trapBubbledEvent(TOP_ERROR,domElement);break;case'img':case'image':case'link':trapBubbledEvent(TOP_ERROR,domElement);trapBubbledEvent(TOP_LOAD,domElement);break;case'form':trapBubbledEvent(TOP_RESET,domElement);trapBubbledEvent(TOP_SUBMIT,domElement);break;case'details':trapBubbledEvent(TOP_TOGGLE,domElement);break;case'input':initWrapperState(domElement,rawProps);trapBubbledEvent(TOP_INVALID,domElement);// For controlled components we always need to ensure we're listening
4677// to onChange. Even if there is no listener.
4678ensureListeningTo(rootContainerElement,'onChange');break;case'option':validateProps(domElement,rawProps);break;case'select':initWrapperState$1(domElement,rawProps);trapBubbledEvent(TOP_INVALID,domElement);// For controlled components we always need to ensure we're listening
4679// to onChange. Even if there is no listener.
4680ensureListeningTo(rootContainerElement,'onChange');break;case'textarea':initWrapperState$2(domElement,rawProps);trapBubbledEvent(TOP_INVALID,domElement);// For controlled components we always need to ensure we're listening
4681// to onChange. Even if there is no listener.
4682ensureListeningTo(rootContainerElement,'onChange');break;}assertValidProps(tag,rawProps);{extraAttributeNames=new Set();var attributes=domElement.attributes;for(var _i=0;_i<attributes.length;_i++){var name=attributes[_i].name.toLowerCase();switch(name){// Built-in SSR attribute is whitelisted
4683case'data-reactroot':break;// Controlled attributes are not validated
4684// TODO: Only ignore them on controlled tags.
4685case'value':break;case'checked':break;case'selected':break;default:// Intentionally use the original name.
4686// See discussion in https://github.com/facebook/react/pull/10676.
4687extraAttributeNames.add(attributes[_i].name);}}}var updatePayload=null;for(var propKey in rawProps){if(!rawProps.hasOwnProperty(propKey)){continue;}var nextProp=rawProps[propKey];if(propKey===CHILDREN){// For text content children we compare against textContent. This
4688// might match additional HTML that is hidden when we read it using
4689// textContent. E.g. "foo" will match "f<span>oo</span>" but that still
4690// satisfies our requirement. Our requirement is not to produce perfect
4691// HTML and attributes. Ideally we should preserve structure but it's
4692// ok not to if the visible content is still enough to indicate what
4693// even listeners these nodes might be wired up to.
4694// TODO: Warn if there is more than a single textNode as a child.
4695// TODO: Should we use domElement.firstChild.nodeValue to compare?
4696if(typeof nextProp==='string'){if(domElement.textContent!==nextProp){if(true&&!suppressHydrationWarning){warnForTextDifference(domElement.textContent,nextProp);}updatePayload=[CHILDREN,nextProp];}}else if(typeof nextProp==='number'){if(domElement.textContent!==''+nextProp){if(true&&!suppressHydrationWarning){warnForTextDifference(domElement.textContent,nextProp);}updatePayload=[CHILDREN,''+nextProp];}}}else if(registrationNameModules.hasOwnProperty(propKey)){if(nextProp!=null){if(true&&typeof nextProp!=='function'){warnForInvalidEventListener(propKey,nextProp);}ensureListeningTo(rootContainerElement,propKey);}}else if(true&&// Convince Flow we've calculated it (it's DEV-only in this method.)
4697typeof isCustomComponentTag==='boolean'){// Validate that the properties correspond to their expected values.
4698var serverValue=void 0;var propertyInfo=getPropertyInfo(propKey);if(suppressHydrationWarning){// Don't bother comparing. We're ignoring all these warnings.
4699}else if(propKey===SUPPRESS_CONTENT_EDITABLE_WARNING||propKey===SUPPRESS_HYDRATION_WARNING$1||// Controlled attributes are not validated
4700// TODO: Only ignore them on controlled tags.
4701propKey==='value'||propKey==='checked'||propKey==='selected'){// Noop
4702}else if(propKey===DANGEROUSLY_SET_INNER_HTML){var serverHTML=domElement.innerHTML;var nextHtml=nextProp?nextProp[HTML]:undefined;var expectedHTML=normalizeHTML(domElement,nextHtml!=null?nextHtml:'');if(expectedHTML!==serverHTML){warnForPropDifference(propKey,serverHTML,expectedHTML);}}else if(propKey===STYLE){// $FlowFixMe - Should be inferred as not undefined.
4703extraAttributeNames.delete(propKey);if(canDiffStyleForHydrationWarning){var expectedStyle=createDangerousStringForStyles(nextProp);serverValue=domElement.getAttribute('style');if(expectedStyle!==serverValue){warnForPropDifference(propKey,serverValue,expectedStyle);}}}else if(isCustomComponentTag){// $FlowFixMe - Should be inferred as not undefined.
4704extraAttributeNames.delete(propKey.toLowerCase());serverValue=getValueForAttribute(domElement,propKey,nextProp);if(nextProp!==serverValue){warnForPropDifference(propKey,serverValue,nextProp);}}else if(!shouldIgnoreAttribute(propKey,propertyInfo,isCustomComponentTag)&&!shouldRemoveAttribute(propKey,nextProp,propertyInfo,isCustomComponentTag)){var isMismatchDueToBadCasing=false;if(propertyInfo!==null){// $FlowFixMe - Should be inferred as not undefined.
4705extraAttributeNames.delete(propertyInfo.attributeName);serverValue=getValueForProperty(domElement,propKey,nextProp,propertyInfo);}else{var ownNamespace=parentNamespace;if(ownNamespace===HTML_NAMESPACE){ownNamespace=getIntrinsicNamespace(tag);}if(ownNamespace===HTML_NAMESPACE){// $FlowFixMe - Should be inferred as not undefined.
4706extraAttributeNames.delete(propKey.toLowerCase());}else{var standardName=getPossibleStandardName(propKey);if(standardName!==null&&standardName!==propKey){// If an SVG prop is supplied with bad casing, it will
4707// be successfully parsed from HTML, but will produce a mismatch
4708// (and would be incorrectly rendered on the client).
4709// However, we already warn about bad casing elsewhere.
4710// So we'll skip the misleading extra mismatch warning in this case.
4711isMismatchDueToBadCasing=true;// $FlowFixMe - Should be inferred as not undefined.
4712extraAttributeNames.delete(standardName);}// $FlowFixMe - Should be inferred as not undefined.
4713extraAttributeNames.delete(propKey);}serverValue=getValueForAttribute(domElement,propKey,nextProp);}if(nextProp!==serverValue&&!isMismatchDueToBadCasing){warnForPropDifference(propKey,serverValue,nextProp);}}}}{// $FlowFixMe - Should be inferred as not undefined.
4714if(extraAttributeNames.size>0&&!suppressHydrationWarning){// $FlowFixMe - Should be inferred as not undefined.
4715warnForExtraAttributes(extraAttributeNames);}}switch(tag){case'input':// TODO: Make sure we check if this is still unmounted or do any clean
4716// up necessary since we never stop tracking anymore.
4717track(domElement);postMountWrapper(domElement,rawProps,true);break;case'textarea':// TODO: Make sure we check if this is still unmounted or do any clean
4718// up necessary since we never stop tracking anymore.
4719track(domElement);postMountWrapper$3(domElement,rawProps);break;case'select':case'option':// For input and textarea we current always set the value property at
4720// post mount to force it to diverge from attributes. However, for
4721// option and select we don't quite do the same thing and select
4722// is not resilient to the DOM state changing so we don't do that here.
4723// TODO: Consider not doing this for input and textarea.
4724break;default:if(typeof rawProps.onClick==='function'){// TODO: This cast may not be sound for SVG, MathML or custom elements.
4725trapClickOnNonInteractiveElement(domElement);}break;}return updatePayload;}function diffHydratedText(textNode,text){var isDifferent=textNode.nodeValue!==text;return isDifferent;}function warnForUnmatchedText(textNode,text){{warnForTextDifference(textNode.nodeValue,text);}}function warnForDeletedHydratableElement(parentNode,child){{if(didWarnInvalidHydration){return;}didWarnInvalidHydration=true;warningWithoutStack$1(false,'Did not expect server HTML to contain a <%s> in <%s>.',child.nodeName.toLowerCase(),parentNode.nodeName.toLowerCase());}}function warnForDeletedHydratableText(parentNode,child){{if(didWarnInvalidHydration){return;}didWarnInvalidHydration=true;warningWithoutStack$1(false,'Did not expect server HTML to contain the text node "%s" in <%s>.',child.nodeValue,parentNode.nodeName.toLowerCase());}}function warnForInsertedHydratedElement(parentNode,tag,props){{if(didWarnInvalidHydration){return;}didWarnInvalidHydration=true;warningWithoutStack$1(false,'Expected server HTML to contain a matching <%s> in <%s>.',tag,parentNode.nodeName.toLowerCase());}}function warnForInsertedHydratedText(parentNode,text){{if(text===''){// We expect to insert empty text nodes since they're not represented in
4726// the HTML.
4727// TODO: Remove this special case if we can just avoid inserting empty
4728// text nodes.
4729return;}if(didWarnInvalidHydration){return;}didWarnInvalidHydration=true;warningWithoutStack$1(false,'Expected server HTML to contain a matching text node for "%s" in <%s>.',text,parentNode.nodeName.toLowerCase());}}function restoreControlledState$1(domElement,tag,props){switch(tag){case'input':restoreControlledState(domElement,props);return;case'textarea':restoreControlledState$3(domElement,props);return;case'select':restoreControlledState$2(domElement,props);return;}}// TODO: direct imports like some-package/src/* are bad. Fix me.
4730var validateDOMNesting=function(){};var updatedAncestorInfo=function(){};{// This validation code was written based on the HTML5 parsing spec:
4731// https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
4732//
4733// Note: this does not catch all invalid nesting, nor does it try to (as it's
4734// not clear what practical benefit doing so provides); instead, we warn only
4735// for cases where the parser will give a parse tree differing from what React
4736// intended. For example, <b><div></div></b> is invalid but we don't warn
4737// because it still parses correctly; we do warn for other cases like nested
4738// <p> tags where the beginning of the second element implicitly closes the
4739// first, causing a confusing mess.
4740// https://html.spec.whatwg.org/multipage/syntax.html#special
4741var specialTags=['address','applet','area','article','aside','base','basefont','bgsound','blockquote','body','br','button','caption','center','col','colgroup','dd','details','dir','div','dl','dt','embed','fieldset','figcaption','figure','footer','form','frame','frameset','h1','h2','h3','h4','h5','h6','head','header','hgroup','hr','html','iframe','img','input','isindex','li','link','listing','main','marquee','menu','menuitem','meta','nav','noembed','noframes','noscript','object','ol','p','param','plaintext','pre','script','section','select','source','style','summary','table','tbody','td','template','textarea','tfoot','th','thead','title','tr','track','ul','wbr','xmp'];// https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
4742var inScopeTags=['applet','caption','html','table','td','th','marquee','object','template',// https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
4743// TODO: Distinguish by namespace here -- for <title>, including it here
4744// errs on the side of fewer warnings
4745'foreignObject','desc','title'];// https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
4746var buttonScopeTags=inScopeTags.concat(['button']);// https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
4747var impliedEndTags=['dd','dt','li','option','optgroup','p','rp','rt'];var emptyAncestorInfo={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};updatedAncestorInfo=function(oldInfo,tag){var ancestorInfo=_assign({},oldInfo||emptyAncestorInfo);var info={tag:tag};if(inScopeTags.indexOf(tag)!==-1){ancestorInfo.aTagInScope=null;ancestorInfo.buttonTagInScope=null;ancestorInfo.nobrTagInScope=null;}if(buttonScopeTags.indexOf(tag)!==-1){ancestorInfo.pTagInButtonScope=null;}// See rules for 'li', 'dd', 'dt' start tags in
4748// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
4749if(specialTags.indexOf(tag)!==-1&&tag!=='address'&&tag!=='div'&&tag!=='p'){ancestorInfo.listItemTagAutoclosing=null;ancestorInfo.dlItemTagAutoclosing=null;}ancestorInfo.current=info;if(tag==='form'){ancestorInfo.formTag=info;}if(tag==='a'){ancestorInfo.aTagInScope=info;}if(tag==='button'){ancestorInfo.buttonTagInScope=info;}if(tag==='nobr'){ancestorInfo.nobrTagInScope=info;}if(tag==='p'){ancestorInfo.pTagInButtonScope=info;}if(tag==='li'){ancestorInfo.listItemTagAutoclosing=info;}if(tag==='dd'||tag==='dt'){ancestorInfo.dlItemTagAutoclosing=info;}return ancestorInfo;};/**
4750 * Returns whether
4751 */var isTagValidWithParent=function(tag,parentTag){// First, let's check if we're in an unusual parsing mode...
4752switch(parentTag){// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
4753case'select':return tag==='option'||tag==='optgroup'||tag==='#text';case'optgroup':return tag==='option'||tag==='#text';// Strictly speaking, seeing an <option> doesn't mean we're in a <select>
4754// but
4755case'option':return tag==='#text';// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
4756// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
4757// No special behavior since these rules fall back to "in body" mode for
4758// all except special table nodes which cause bad parsing behavior anyway.
4759// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
4760case'tr':return tag==='th'||tag==='td'||tag==='style'||tag==='script'||tag==='template';// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
4761case'tbody':case'thead':case'tfoot':return tag==='tr'||tag==='style'||tag==='script'||tag==='template';// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
4762case'colgroup':return tag==='col'||tag==='template';// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
4763case'table':return tag==='caption'||tag==='colgroup'||tag==='tbody'||tag==='tfoot'||tag==='thead'||tag==='style'||tag==='script'||tag==='template';// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
4764case'head':return tag==='base'||tag==='basefont'||tag==='bgsound'||tag==='link'||tag==='meta'||tag==='title'||tag==='noscript'||tag==='noframes'||tag==='style'||tag==='script'||tag==='template';// https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
4765case'html':return tag==='head'||tag==='body';case'#document':return tag==='html';}// Probably in the "in body" parsing mode, so we outlaw only tag combos
4766// where the parsing rules cause implicit opens or closes to be added.
4767// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
4768switch(tag){case'h1':case'h2':case'h3':case'h4':case'h5':case'h6':return parentTag!=='h1'&&parentTag!=='h2'&&parentTag!=='h3'&&parentTag!=='h4'&&parentTag!=='h5'&&parentTag!=='h6';case'rp':case'rt':return impliedEndTags.indexOf(parentTag)===-1;case'body':case'caption':case'col':case'colgroup':case'frame':case'head':case'html':case'tbody':case'td':case'tfoot':case'th':case'thead':case'tr':// These tags are only valid with a few parents that have special child
4769// parsing rules -- if we're down here, then none of those matched and
4770// so we allow it only if we don't know what the parent is, as all other
4771// cases are invalid.
4772return parentTag==null;}return true;};/**
4773 * Returns whether
4774 */var findInvalidAncestorForTag=function(tag,ancestorInfo){switch(tag){case'address':case'article':case'aside':case'blockquote':case'center':case'details':case'dialog':case'dir':case'div':case'dl':case'fieldset':case'figcaption':case'figure':case'footer':case'header':case'hgroup':case'main':case'menu':case'nav':case'ol':case'p':case'section':case'summary':case'ul':case'pre':case'listing':case'table':case'hr':case'xmp':case'h1':case'h2':case'h3':case'h4':case'h5':case'h6':return ancestorInfo.pTagInButtonScope;case'form':return ancestorInfo.formTag||ancestorInfo.pTagInButtonScope;case'li':return ancestorInfo.listItemTagAutoclosing;case'dd':case'dt':return ancestorInfo.dlItemTagAutoclosing;case'button':return ancestorInfo.buttonTagInScope;case'a':// Spec says something about storing a list of markers, but it sounds
4775// equivalent to this check.
4776return ancestorInfo.aTagInScope;case'nobr':return ancestorInfo.nobrTagInScope;}return null;};var didWarn={};validateDOMNesting=function(childTag,childText,ancestorInfo){ancestorInfo=ancestorInfo||emptyAncestorInfo;var parentInfo=ancestorInfo.current;var parentTag=parentInfo&&parentInfo.tag;if(childText!=null){!(childTag==null)?warningWithoutStack$1(false,'validateDOMNesting: when childText is passed, childTag should be null'):void 0;childTag='#text';}var invalidParent=isTagValidWithParent(childTag,parentTag)?null:parentInfo;var invalidAncestor=invalidParent?null:findInvalidAncestorForTag(childTag,ancestorInfo);var invalidParentOrAncestor=invalidParent||invalidAncestor;if(!invalidParentOrAncestor){return;}var ancestorTag=invalidParentOrAncestor.tag;var addendum=getCurrentFiberStackInDev();var warnKey=!!invalidParent+'|'+childTag+'|'+ancestorTag+'|'+addendum;if(didWarn[warnKey]){return;}didWarn[warnKey]=true;var tagDisplayName=childTag;var whitespaceInfo='';if(childTag==='#text'){if(/\S/.test(childText)){tagDisplayName='Text nodes';}else{tagDisplayName='Whitespace text nodes';whitespaceInfo=" Make sure you don't have any extra whitespace between tags on "+'each line of your source code.';}}else{tagDisplayName='<'+childTag+'>';}if(invalidParent){var info='';if(ancestorTag==='table'&&childTag==='tr'){info+=' Add a <tbody> to your code to match the DOM tree generated by '+'the browser.';}warningWithoutStack$1(false,'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s',tagDisplayName,ancestorTag,whitespaceInfo,info,addendum);}else{warningWithoutStack$1(false,'validateDOMNesting(...): %s cannot appear as a descendant of '+'<%s>.%s',tagDisplayName,ancestorTag,addendum);}};}// Renderers that don't support persistence
4777// can re-export everything from this module.
4778function shim(){invariant(false,'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');}// Persistence (when unsupported)
4779var supportsPersistence=false;var cloneInstance=shim;var createContainerChildSet=shim;var appendChildToContainerChildSet=shim;var finalizeContainerChildren=shim;var replaceContainerChildren=shim;var SUPPRESS_HYDRATION_WARNING=void 0;{SUPPRESS_HYDRATION_WARNING='suppressHydrationWarning';}var eventsEnabled=null;var selectionInformation=null;function shouldAutoFocusHostComponent(type,props){switch(type){case'button':case'input':case'select':case'textarea':return!!props.autoFocus;}return false;}function getRootHostContext(rootContainerInstance){var type=void 0;var namespace=void 0;var nodeType=rootContainerInstance.nodeType;switch(nodeType){case DOCUMENT_NODE:case DOCUMENT_FRAGMENT_NODE:{type=nodeType===DOCUMENT_NODE?'#document':'#fragment';var root=rootContainerInstance.documentElement;namespace=root?root.namespaceURI:getChildNamespace(null,'');break;}default:{var container=nodeType===COMMENT_NODE?rootContainerInstance.parentNode:rootContainerInstance;var ownNamespace=container.namespaceURI||null;type=container.tagName;namespace=getChildNamespace(ownNamespace,type);break;}}{var validatedTag=type.toLowerCase();var _ancestorInfo=updatedAncestorInfo(null,validatedTag);return{namespace:namespace,ancestorInfo:_ancestorInfo};}return namespace;}function getChildHostContext(parentHostContext,type,rootContainerInstance){{var parentHostContextDev=parentHostContext;var _namespace=getChildNamespace(parentHostContextDev.namespace,type);var _ancestorInfo2=updatedAncestorInfo(parentHostContextDev.ancestorInfo,type);return{namespace:_namespace,ancestorInfo:_ancestorInfo2};}var parentNamespace=parentHostContext;return getChildNamespace(parentNamespace,type);}function getPublicInstance(instance){return instance;}function prepareForCommit(containerInfo){eventsEnabled=isEnabled();selectionInformation=getSelectionInformation();setEnabled(false);}function resetAfterCommit(containerInfo){restoreSelection(selectionInformation);selectionInformation=null;setEnabled(eventsEnabled);eventsEnabled=null;}function createInstance(type,props,rootContainerInstance,hostContext,internalInstanceHandle){var parentNamespace=void 0;{// TODO: take namespace into account when validating.
4780var hostContextDev=hostContext;validateDOMNesting(type,null,hostContextDev.ancestorInfo);if(typeof props.children==='string'||typeof props.children==='number'){var string=''+props.children;var ownAncestorInfo=updatedAncestorInfo(hostContextDev.ancestorInfo,type);validateDOMNesting(null,string,ownAncestorInfo);}parentNamespace=hostContextDev.namespace;}var domElement=createElement(type,props,rootContainerInstance,parentNamespace);precacheFiberNode(internalInstanceHandle,domElement);updateFiberProps(domElement,props);return domElement;}function appendInitialChild(parentInstance,child){parentInstance.appendChild(child);}function finalizeInitialChildren(domElement,type,props,rootContainerInstance,hostContext){setInitialProperties(domElement,type,props,rootContainerInstance);return shouldAutoFocusHostComponent(type,props);}function prepareUpdate(domElement,type,oldProps,newProps,rootContainerInstance,hostContext){{var hostContextDev=hostContext;if(typeof newProps.children!==typeof oldProps.children&&(typeof newProps.children==='string'||typeof newProps.children==='number')){var string=''+newProps.children;var ownAncestorInfo=updatedAncestorInfo(hostContextDev.ancestorInfo,type);validateDOMNesting(null,string,ownAncestorInfo);}}return diffProperties(domElement,type,oldProps,newProps,rootContainerInstance);}function shouldSetTextContent(type,props){return type==='textarea'||type==='option'||type==='noscript'||typeof props.children==='string'||typeof props.children==='number'||typeof props.dangerouslySetInnerHTML==='object'&&props.dangerouslySetInnerHTML!==null&&props.dangerouslySetInnerHTML.__html!=null;}function shouldDeprioritizeSubtree(type,props){return!!props.hidden;}function createTextInstance(text,rootContainerInstance,hostContext,internalInstanceHandle){{var hostContextDev=hostContext;validateDOMNesting(null,text,hostContextDev.ancestorInfo);}var textNode=createTextNode(text,rootContainerInstance);precacheFiberNode(internalInstanceHandle,textNode);return textNode;}var isPrimaryRenderer=true;var scheduleTimeout=setTimeout;var cancelTimeout=clearTimeout;var noTimeout=-1;// -------------------
4781// Mutation
4782// -------------------
4783var supportsMutation=true;function commitMount(domElement,type,newProps,internalInstanceHandle){// Despite the naming that might imply otherwise, this method only
4784// fires if there is an `Update` effect scheduled during mounting.
4785// This happens if `finalizeInitialChildren` returns `true` (which it
4786// does to implement the `autoFocus` attribute on the client). But
4787// there are also other cases when this might happen (such as patching
4788// up text content during hydration mismatch). So we'll check this again.
4789if(shouldAutoFocusHostComponent(type,newProps)){domElement.focus();}}function commitUpdate(domElement,updatePayload,type,oldProps,newProps,internalInstanceHandle){// Update the props handle so that we know which props are the ones with
4790// with current event handlers.
4791updateFiberProps(domElement,newProps);// Apply the diff to the DOM node.
4792updateProperties(domElement,updatePayload,type,oldProps,newProps);}function resetTextContent(domElement){setTextContent(domElement,'');}function commitTextUpdate(textInstance,oldText,newText){textInstance.nodeValue=newText;}function appendChild(parentInstance,child){parentInstance.appendChild(child);}function appendChildToContainer(container,child){var parentNode=void 0;if(container.nodeType===COMMENT_NODE){parentNode=container.parentNode;parentNode.insertBefore(child,container);}else{parentNode=container;parentNode.appendChild(child);}// This container might be used for a portal.
4793// If something inside a portal is clicked, that click should bubble
4794// through the React tree. However, on Mobile Safari the click would
4795// never bubble through the *DOM* tree unless an ancestor with onclick
4796// event exists. So we wouldn't see it and dispatch it.
4797// This is why we ensure that containers have inline onclick defined.
4798// https://github.com/facebook/react/issues/11918
4799if(parentNode.onclick===null){// TODO: This cast may not be sound for SVG, MathML or custom elements.
4800trapClickOnNonInteractiveElement(parentNode);}}function insertBefore(parentInstance,child,beforeChild){parentInstance.insertBefore(child,beforeChild);}function insertInContainerBefore(container,child,beforeChild){if(container.nodeType===COMMENT_NODE){container.parentNode.insertBefore(child,beforeChild);}else{container.insertBefore(child,beforeChild);}}function removeChild(parentInstance,child){parentInstance.removeChild(child);}function removeChildFromContainer(container,child){if(container.nodeType===COMMENT_NODE){container.parentNode.removeChild(child);}else{container.removeChild(child);}}// -------------------
4801// Hydration
4802// -------------------
4803var supportsHydration=true;function canHydrateInstance(instance,type,props){if(instance.nodeType!==ELEMENT_NODE||type.toLowerCase()!==instance.nodeName.toLowerCase()){return null;}// This has now been refined to an element node.
4804return instance;}function canHydrateTextInstance(instance,text){if(text===''||instance.nodeType!==TEXT_NODE){// Empty strings are not parsed by HTML so there won't be a correct match here.
4805return null;}// This has now been refined to a text node.
4806return instance;}function getNextHydratableSibling(instance){var node=instance.nextSibling;// Skip non-hydratable nodes.
4807while(node&&node.nodeType!==ELEMENT_NODE&&node.nodeType!==TEXT_NODE){node=node.nextSibling;}return node;}function getFirstHydratableChild(parentInstance){var next=parentInstance.firstChild;// Skip non-hydratable nodes.
4808while(next&&next.nodeType!==ELEMENT_NODE&&next.nodeType!==TEXT_NODE){next=next.nextSibling;}return next;}function hydrateInstance(instance,type,props,rootContainerInstance,hostContext,internalInstanceHandle){precacheFiberNode(internalInstanceHandle,instance);// TODO: Possibly defer this until the commit phase where all the events
4809// get attached.
4810updateFiberProps(instance,props);var parentNamespace=void 0;{var hostContextDev=hostContext;parentNamespace=hostContextDev.namespace;}return diffHydratedProperties(instance,type,props,parentNamespace,rootContainerInstance);}function hydrateTextInstance(textInstance,text,internalInstanceHandle){precacheFiberNode(internalInstanceHandle,textInstance);return diffHydratedText(textInstance,text);}function didNotMatchHydratedContainerTextInstance(parentContainer,textInstance,text){{warnForUnmatchedText(textInstance,text);}}function didNotMatchHydratedTextInstance(parentType,parentProps,parentInstance,textInstance,text){if(true&&parentProps[SUPPRESS_HYDRATION_WARNING]!==true){warnForUnmatchedText(textInstance,text);}}function didNotHydrateContainerInstance(parentContainer,instance){{if(instance.nodeType===ELEMENT_NODE){warnForDeletedHydratableElement(parentContainer,instance);}else{warnForDeletedHydratableText(parentContainer,instance);}}}function didNotHydrateInstance(parentType,parentProps,parentInstance,instance){if(true&&parentProps[SUPPRESS_HYDRATION_WARNING]!==true){if(instance.nodeType===ELEMENT_NODE){warnForDeletedHydratableElement(parentInstance,instance);}else{warnForDeletedHydratableText(parentInstance,instance);}}}function didNotFindHydratableContainerInstance(parentContainer,type,props){{warnForInsertedHydratedElement(parentContainer,type,props);}}function didNotFindHydratableContainerTextInstance(parentContainer,text){{warnForInsertedHydratedText(parentContainer,text);}}function didNotFindHydratableInstance(parentType,parentProps,parentInstance,type,props){if(true&&parentProps[SUPPRESS_HYDRATION_WARNING]!==true){warnForInsertedHydratedElement(parentInstance,type,props);}}function didNotFindHydratableTextInstance(parentType,parentProps,parentInstance,text){if(true&&parentProps[SUPPRESS_HYDRATION_WARNING]!==true){warnForInsertedHydratedText(parentInstance,text);}}// Prefix measurements so that it's possible to filter them.
4811// Longer prefixes are hard to read in DevTools.
4812var reactEmoji='\u269B';var warningEmoji='\u26D4';var supportsUserTiming=typeof performance!=='undefined'&&typeof performance.mark==='function'&&typeof performance.clearMarks==='function'&&typeof performance.measure==='function'&&typeof performance.clearMeasures==='function';// Keep track of current fiber so that we know the path to unwind on pause.
4813// TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them?
4814var currentFiber=null;// If we're in the middle of user code, which fiber and method is it?
4815// Reusing `currentFiber` would be confusing for this because user code fiber
4816// can change during commit phase too, but we don't need to unwind it (since
4817// lifecycles in the commit phase don't resemble a tree).
4818var currentPhase=null;var currentPhaseFiber=null;// Did lifecycle hook schedule an update? This is often a performance problem,
4819// so we will keep track of it, and include it in the report.
4820// Track commits caused by cascading updates.
4821var isCommitting=false;var hasScheduledUpdateInCurrentCommit=false;var hasScheduledUpdateInCurrentPhase=false;var commitCountInCurrentWorkLoop=0;var effectCountInCurrentCommit=0;var isWaitingForCallback=false;// During commits, we only show a measurement once per method name
4822// to avoid stretch the commit phase with measurement overhead.
4823var labelsInCurrentCommit=new Set();var formatMarkName=function(markName){return reactEmoji+' '+markName;};var formatLabel=function(label,warning){var prefix=warning?warningEmoji+' ':reactEmoji+' ';var suffix=warning?' Warning: '+warning:'';return''+prefix+label+suffix;};var beginMark=function(markName){performance.mark(formatMarkName(markName));};var clearMark=function(markName){performance.clearMarks(formatMarkName(markName));};var endMark=function(label,markName,warning){var formattedMarkName=formatMarkName(markName);var formattedLabel=formatLabel(label,warning);try{performance.measure(formattedLabel,formattedMarkName);}catch(err){}// If previous mark was missing for some reason, this will throw.
4824// This could only happen if React crashed in an unexpected place earlier.
4825// Don't pile on with more errors.
4826// Clear marks immediately to avoid growing buffer.
4827performance.clearMarks(formattedMarkName);performance.clearMeasures(formattedLabel);};var getFiberMarkName=function(label,debugID){return label+' (#'+debugID+')';};var getFiberLabel=function(componentName,isMounted,phase){if(phase===null){// These are composite component total time measurements.
4828return componentName+' ['+(isMounted?'update':'mount')+']';}else{// Composite component methods.
4829return componentName+'.'+phase;}};var beginFiberMark=function(fiber,phase){var componentName=getComponentName(fiber.type)||'Unknown';var debugID=fiber._debugID;var isMounted=fiber.alternate!==null;var label=getFiberLabel(componentName,isMounted,phase);if(isCommitting&&labelsInCurrentCommit.has(label)){// During the commit phase, we don't show duplicate labels because
4830// there is a fixed overhead for every measurement, and we don't
4831// want to stretch the commit phase beyond necessary.
4832return false;}labelsInCurrentCommit.add(label);var markName=getFiberMarkName(label,debugID);beginMark(markName);return true;};var clearFiberMark=function(fiber,phase){var componentName=getComponentName(fiber.type)||'Unknown';var debugID=fiber._debugID;var isMounted=fiber.alternate!==null;var label=getFiberLabel(componentName,isMounted,phase);var markName=getFiberMarkName(label,debugID);clearMark(markName);};var endFiberMark=function(fiber,phase,warning){var componentName=getComponentName(fiber.type)||'Unknown';var debugID=fiber._debugID;var isMounted=fiber.alternate!==null;var label=getFiberLabel(componentName,isMounted,phase);var markName=getFiberMarkName(label,debugID);endMark(label,markName,warning);};var shouldIgnoreFiber=function(fiber){// Host components should be skipped in the timeline.
4833// We could check typeof fiber.type, but does this work with RN?
4834switch(fiber.tag){case HostRoot:case HostComponent:case HostText:case HostPortal:case Fragment:case ContextProvider:case ContextConsumer:case Mode:return true;default:return false;}};var clearPendingPhaseMeasurement=function(){if(currentPhase!==null&&currentPhaseFiber!==null){clearFiberMark(currentPhaseFiber,currentPhase);}currentPhaseFiber=null;currentPhase=null;hasScheduledUpdateInCurrentPhase=false;};var pauseTimers=function(){// Stops all currently active measurements so that they can be resumed
4835// if we continue in a later deferred loop from the same unit of work.
4836var fiber=currentFiber;while(fiber){if(fiber._debugIsCurrentlyTiming){endFiberMark(fiber,null,null);}fiber=fiber.return;}};var resumeTimersRecursively=function(fiber){if(fiber.return!==null){resumeTimersRecursively(fiber.return);}if(fiber._debugIsCurrentlyTiming){beginFiberMark(fiber,null);}};var resumeTimers=function(){// Resumes all measurements that were active during the last deferred loop.
4837if(currentFiber!==null){resumeTimersRecursively(currentFiber);}};function recordEffect(){if(enableUserTimingAPI){effectCountInCurrentCommit++;}}function recordScheduleUpdate(){if(enableUserTimingAPI){if(isCommitting){hasScheduledUpdateInCurrentCommit=true;}if(currentPhase!==null&&currentPhase!=='componentWillMount'&&currentPhase!=='componentWillReceiveProps'){hasScheduledUpdateInCurrentPhase=true;}}}function startRequestCallbackTimer(){if(enableUserTimingAPI){if(supportsUserTiming&&!isWaitingForCallback){isWaitingForCallback=true;beginMark('(Waiting for async callback...)');}}}function stopRequestCallbackTimer(didExpire,expirationTime){if(enableUserTimingAPI){if(supportsUserTiming){isWaitingForCallback=false;var warning=didExpire?'React was blocked by main thread':null;endMark('(Waiting for async callback... will force flush in '+expirationTime+' ms)','(Waiting for async callback...)',warning);}}}function startWorkTimer(fiber){if(enableUserTimingAPI){if(!supportsUserTiming||shouldIgnoreFiber(fiber)){return;}// If we pause, this is the fiber to unwind from.
4838currentFiber=fiber;if(!beginFiberMark(fiber,null)){return;}fiber._debugIsCurrentlyTiming=true;}}function cancelWorkTimer(fiber){if(enableUserTimingAPI){if(!supportsUserTiming||shouldIgnoreFiber(fiber)){return;}// Remember we shouldn't complete measurement for this fiber.
4839// Otherwise flamechart will be deep even for small updates.
4840fiber._debugIsCurrentlyTiming=false;clearFiberMark(fiber,null);}}function stopWorkTimer(fiber){if(enableUserTimingAPI){if(!supportsUserTiming||shouldIgnoreFiber(fiber)){return;}// If we pause, its parent is the fiber to unwind from.
4841currentFiber=fiber.return;if(!fiber._debugIsCurrentlyTiming){return;}fiber._debugIsCurrentlyTiming=false;endFiberMark(fiber,null,null);}}function stopFailedWorkTimer(fiber){if(enableUserTimingAPI){if(!supportsUserTiming||shouldIgnoreFiber(fiber)){return;}// If we pause, its parent is the fiber to unwind from.
4842currentFiber=fiber.return;if(!fiber._debugIsCurrentlyTiming){return;}fiber._debugIsCurrentlyTiming=false;var warning='An error was thrown inside this error boundary';endFiberMark(fiber,null,warning);}}function startPhaseTimer(fiber,phase){if(enableUserTimingAPI){if(!supportsUserTiming){return;}clearPendingPhaseMeasurement();if(!beginFiberMark(fiber,phase)){return;}currentPhaseFiber=fiber;currentPhase=phase;}}function stopPhaseTimer(){if(enableUserTimingAPI){if(!supportsUserTiming){return;}if(currentPhase!==null&&currentPhaseFiber!==null){var warning=hasScheduledUpdateInCurrentPhase?'Scheduled a cascading update':null;endFiberMark(currentPhaseFiber,currentPhase,warning);}currentPhase=null;currentPhaseFiber=null;}}function startWorkLoopTimer(nextUnitOfWork){if(enableUserTimingAPI){currentFiber=nextUnitOfWork;if(!supportsUserTiming){return;}commitCountInCurrentWorkLoop=0;// This is top level call.
4843// Any other measurements are performed within.
4844beginMark('(React Tree Reconciliation)');// Resume any measurements that were in progress during the last loop.
4845resumeTimers();}}function stopWorkLoopTimer(interruptedBy,didCompleteRoot){if(enableUserTimingAPI){if(!supportsUserTiming){return;}var warning=null;if(interruptedBy!==null){if(interruptedBy.tag===HostRoot){warning='A top-level update interrupted the previous render';}else{var componentName=getComponentName(interruptedBy.type)||'Unknown';warning='An update to '+componentName+' interrupted the previous render';}}else if(commitCountInCurrentWorkLoop>1){warning='There were cascading updates';}commitCountInCurrentWorkLoop=0;var label=didCompleteRoot?'(React Tree Reconciliation: Completed Root)':'(React Tree Reconciliation: Yielded)';// Pause any measurements until the next loop.
4846pauseTimers();endMark(label,'(React Tree Reconciliation)',warning);}}function startCommitTimer(){if(enableUserTimingAPI){if(!supportsUserTiming){return;}isCommitting=true;hasScheduledUpdateInCurrentCommit=false;labelsInCurrentCommit.clear();beginMark('(Committing Changes)');}}function stopCommitTimer(){if(enableUserTimingAPI){if(!supportsUserTiming){return;}var warning=null;if(hasScheduledUpdateInCurrentCommit){warning='Lifecycle hook scheduled a cascading update';}else if(commitCountInCurrentWorkLoop>0){warning='Caused by a cascading update in earlier commit';}hasScheduledUpdateInCurrentCommit=false;commitCountInCurrentWorkLoop++;isCommitting=false;labelsInCurrentCommit.clear();endMark('(Committing Changes)','(Committing Changes)',warning);}}function startCommitSnapshotEffectsTimer(){if(enableUserTimingAPI){if(!supportsUserTiming){return;}effectCountInCurrentCommit=0;beginMark('(Committing Snapshot Effects)');}}function stopCommitSnapshotEffectsTimer(){if(enableUserTimingAPI){if(!supportsUserTiming){return;}var count=effectCountInCurrentCommit;effectCountInCurrentCommit=0;endMark('(Committing Snapshot Effects: '+count+' Total)','(Committing Snapshot Effects)',null);}}function startCommitHostEffectsTimer(){if(enableUserTimingAPI){if(!supportsUserTiming){return;}effectCountInCurrentCommit=0;beginMark('(Committing Host Effects)');}}function stopCommitHostEffectsTimer(){if(enableUserTimingAPI){if(!supportsUserTiming){return;}var count=effectCountInCurrentCommit;effectCountInCurrentCommit=0;endMark('(Committing Host Effects: '+count+' Total)','(Committing Host Effects)',null);}}function startCommitLifeCyclesTimer(){if(enableUserTimingAPI){if(!supportsUserTiming){return;}effectCountInCurrentCommit=0;beginMark('(Calling Lifecycle Methods)');}}function stopCommitLifeCyclesTimer(){if(enableUserTimingAPI){if(!supportsUserTiming){return;}var count=effectCountInCurrentCommit;effectCountInCurrentCommit=0;endMark('(Calling Lifecycle Methods: '+count+' Total)','(Calling Lifecycle Methods)',null);}}var valueStack=[];var fiberStack=void 0;{fiberStack=[];}var index=-1;function createCursor(defaultValue){return{current:defaultValue};}function pop(cursor,fiber){if(index<0){{warningWithoutStack$1(false,'Unexpected pop.');}return;}{if(fiber!==fiberStack[index]){warningWithoutStack$1(false,'Unexpected Fiber popped.');}}cursor.current=valueStack[index];valueStack[index]=null;{fiberStack[index]=null;}index--;}function push(cursor,value,fiber){index++;valueStack[index]=cursor.current;{fiberStack[index]=fiber;}cursor.current=value;}function checkThatStackIsEmpty(){{if(index!==-1){warningWithoutStack$1(false,'Expected an empty stack. Something was not reset properly.');}}}function resetStackAfterFatalErrorInDev(){{index=-1;valueStack.length=0;fiberStack.length=0;}}var warnedAboutMissingGetChildContext=void 0;{warnedAboutMissingGetChildContext={};}var emptyContextObject={};{Object.freeze(emptyContextObject);}// A cursor to the current merged context object on the stack.
4847var contextStackCursor=createCursor(emptyContextObject);// A cursor to a boolean indicating whether the context has changed.
4848var didPerformWorkStackCursor=createCursor(false);// Keep track of the previous context object that was on the stack.
4849// We use this to get access to the parent context after we have already
4850// pushed the next context provider, and now need to merge their contexts.
4851var previousContext=emptyContextObject;function getUnmaskedContext(workInProgress,Component,didPushOwnContextIfProvider){if(didPushOwnContextIfProvider&&isContextProvider(Component)){// If the fiber is a context provider itself, when we read its context
4852// we may have already pushed its own child context on the stack. A context
4853// provider should not "see" its own child context. Therefore we read the
4854// previous (parent) context instead for a context provider.
4855return previousContext;}return contextStackCursor.current;}function cacheContext(workInProgress,unmaskedContext,maskedContext){var instance=workInProgress.stateNode;instance.__reactInternalMemoizedUnmaskedChildContext=unmaskedContext;instance.__reactInternalMemoizedMaskedChildContext=maskedContext;}function getMaskedContext(workInProgress,unmaskedContext){var type=workInProgress.type;var contextTypes=type.contextTypes;if(!contextTypes){return emptyContextObject;}// Avoid recreating masked context unless unmasked context has changed.
4856// Failing to do this will result in unnecessary calls to componentWillReceiveProps.
4857// This may trigger infinite loops if componentWillReceiveProps calls setState.
4858var instance=workInProgress.stateNode;if(instance&&instance.__reactInternalMemoizedUnmaskedChildContext===unmaskedContext){return instance.__reactInternalMemoizedMaskedChildContext;}var context={};for(var key in contextTypes){context[key]=unmaskedContext[key];}{var name=getComponentName(type)||'Unknown';checkPropTypes(contextTypes,context,'context',name,getCurrentFiberStackInDev);}// Cache unmasked context so we can avoid recreating masked context unless necessary.
4859// Context is created before the class component is instantiated so check for instance.
4860if(instance){cacheContext(workInProgress,unmaskedContext,context);}return context;}function hasContextChanged(){return didPerformWorkStackCursor.current;}function isContextProvider(type){var childContextTypes=type.childContextTypes;return childContextTypes!==null&&childContextTypes!==undefined;}function popContext(fiber){pop(didPerformWorkStackCursor,fiber);pop(contextStackCursor,fiber);}function popTopLevelContextObject(fiber){pop(didPerformWorkStackCursor,fiber);pop(contextStackCursor,fiber);}function pushTopLevelContextObject(fiber,context,didChange){!(contextStackCursor.current===emptyContextObject)?invariant(false,'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.'):void 0;push(contextStackCursor,context,fiber);push(didPerformWorkStackCursor,didChange,fiber);}function processChildContext(fiber,type,parentContext){var instance=fiber.stateNode;var childContextTypes=type.childContextTypes;// TODO (bvaughn) Replace this behavior with an invariant() in the future.
4861// It has only been added in Fiber to match the (unintentional) behavior in Stack.
4862if(typeof instance.getChildContext!=='function'){{var componentName=getComponentName(type)||'Unknown';if(!warnedAboutMissingGetChildContext[componentName]){warnedAboutMissingGetChildContext[componentName]=true;warningWithoutStack$1(false,'%s.childContextTypes is specified but there is no getChildContext() method '+'on the instance. You can either define getChildContext() on %s or remove '+'childContextTypes from it.',componentName,componentName);}}return parentContext;}var childContext=void 0;{setCurrentPhase('getChildContext');}startPhaseTimer(fiber,'getChildContext');childContext=instance.getChildContext();stopPhaseTimer();{setCurrentPhase(null);}for(var contextKey in childContext){!(contextKey in childContextTypes)?invariant(false,'%s.getChildContext(): key "%s" is not defined in childContextTypes.',getComponentName(type)||'Unknown',contextKey):void 0;}{var name=getComponentName(type)||'Unknown';checkPropTypes(childContextTypes,childContext,'child context',name,// In practice, there is one case in which we won't get a stack. It's when
4863// somebody calls unstable_renderSubtreeIntoContainer() and we process
4864// context from the parent component instance. The stack will be missing
4865// because it's outside of the reconciliation, and so the pointer has not
4866// been set. This is rare and doesn't matter. We'll also remove that API.
4867getCurrentFiberStackInDev);}return _assign({},parentContext,childContext);}function pushContextProvider(workInProgress){var instance=workInProgress.stateNode;// We push the context as early as possible to ensure stack integrity.
4868// If the instance does not exist yet, we will push null at first,
4869// and replace it on the stack later when invalidating the context.
4870var memoizedMergedChildContext=instance&&instance.__reactInternalMemoizedMergedChildContext||emptyContextObject;// Remember the parent context so we can merge with it later.
4871// Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
4872previousContext=contextStackCursor.current;push(contextStackCursor,memoizedMergedChildContext,workInProgress);push(didPerformWorkStackCursor,didPerformWorkStackCursor.current,workInProgress);return true;}function invalidateContextProvider(workInProgress,type,didChange){var instance=workInProgress.stateNode;!instance?invariant(false,'Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.'):void 0;if(didChange){// Merge parent and own context.
4873// Skip this if we're not updating due to sCU.
4874// This avoids unnecessarily recomputing memoized values.
4875var mergedContext=processChildContext(workInProgress,type,previousContext);instance.__reactInternalMemoizedMergedChildContext=mergedContext;// Replace the old (or empty) context with the new one.
4876// It is important to unwind the context in the reverse order.
4877pop(didPerformWorkStackCursor,workInProgress);pop(contextStackCursor,workInProgress);// Now push the new context and mark that it has changed.
4878push(contextStackCursor,mergedContext,workInProgress);push(didPerformWorkStackCursor,didChange,workInProgress);}else{pop(didPerformWorkStackCursor,workInProgress);push(didPerformWorkStackCursor,didChange,workInProgress);}}function findCurrentUnmaskedContext(fiber){// Currently this is only used with renderSubtreeIntoContainer; not sure if it
4879// makes sense elsewhere
4880!(isFiberMounted(fiber)&&(fiber.tag===ClassComponent||fiber.tag===ClassComponentLazy))?invariant(false,'Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.'):void 0;var node=fiber;do{switch(node.tag){case HostRoot:return node.stateNode.context;case ClassComponent:{var Component=node.type;if(isContextProvider(Component)){return node.stateNode.__reactInternalMemoizedMergedChildContext;}break;}case ClassComponentLazy:{var _Component=getResultFromResolvedThenable(node.type);if(isContextProvider(_Component)){return node.stateNode.__reactInternalMemoizedMergedChildContext;}break;}}node=node.return;}while(node!==null);invariant(false,'Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.');}var onCommitFiberRoot=null;var onCommitFiberUnmount=null;var hasLoggedError=false;function catchErrors(fn){return function(arg){try{return fn(arg);}catch(err){if(true&&!hasLoggedError){hasLoggedError=true;warningWithoutStack$1(false,'React DevTools encountered an error: %s',err);}}};}var isDevToolsPresent=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!=='undefined';function injectInternals(internals){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__==='undefined'){// No DevTools
4881return false;}var hook=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(hook.isDisabled){// This isn't a real property on the hook, but it can be set to opt out
4882// of DevTools integration and associated warnings and logs.
4883// https://github.com/facebook/react/issues/3877
4884return true;}if(!hook.supportsFiber){{warningWithoutStack$1(false,'The installed version of React DevTools is too old and will not work '+'with the current version of React. Please update React DevTools. '+'https://fb.me/react-devtools');}// DevTools exists, even though it doesn't support Fiber.
4885return true;}try{var rendererID=hook.inject(internals);// We have successfully injected, so now it is safe to set up hooks.
4886onCommitFiberRoot=catchErrors(function(root){return hook.onCommitFiberRoot(rendererID,root);});onCommitFiberUnmount=catchErrors(function(fiber){return hook.onCommitFiberUnmount(rendererID,fiber);});}catch(err){// Catch all errors because it is unsafe to throw during initialization.
4887{warningWithoutStack$1(false,'React DevTools encountered an error: %s.',err);}}// DevTools exists
4888return true;}function onCommitRoot(root){if(typeof onCommitFiberRoot==='function'){onCommitFiberRoot(root);}}function onCommitUnmount(fiber){if(typeof onCommitFiberUnmount==='function'){onCommitFiberUnmount(fiber);}}// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
4889// Math.pow(2, 30) - 1
4890// 0b111111111111111111111111111111
4891var maxSigned31BitInt=1073741823;var NoWork=0;var Sync=1;var Never=maxSigned31BitInt;var UNIT_SIZE=10;var MAGIC_NUMBER_OFFSET=2;// 1 unit of expiration time represents 10ms.
4892function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.
4893return(ms/UNIT_SIZE|0)+MAGIC_NUMBER_OFFSET;}function expirationTimeToMs(expirationTime){return(expirationTime-MAGIC_NUMBER_OFFSET)*UNIT_SIZE;}function ceiling(num,precision){return((num/precision|0)+1)*precision;}function computeExpirationBucket(currentTime,expirationInMs,bucketSizeMs){return MAGIC_NUMBER_OFFSET+ceiling(currentTime-MAGIC_NUMBER_OFFSET+expirationInMs/UNIT_SIZE,bucketSizeMs/UNIT_SIZE);}var LOW_PRIORITY_EXPIRATION=5000;var LOW_PRIORITY_BATCH_SIZE=250;function computeAsyncExpiration(currentTime){return computeExpirationBucket(currentTime,LOW_PRIORITY_EXPIRATION,LOW_PRIORITY_BATCH_SIZE);}// We intentionally set a higher expiration time for interactive updates in
4894// dev than in production.
4895//
4896// If the main thread is being blocked so long that you hit the expiration,
4897// it's a problem that could be solved with better scheduling.
4898//
4899// People will be more likely to notice this and fix it with the long
4900// expiration time in development.
4901//
4902// In production we opt for better UX at the risk of masking scheduling
4903// problems, by expiring fast.
4904var HIGH_PRIORITY_EXPIRATION=500;var HIGH_PRIORITY_BATCH_SIZE=100;function computeInteractiveExpiration(currentTime){return computeExpirationBucket(currentTime,HIGH_PRIORITY_EXPIRATION,HIGH_PRIORITY_BATCH_SIZE);}var NoContext=0;var AsyncMode=1;var StrictMode=2;var ProfileMode=4;var hasBadMapPolyfill=void 0;{hasBadMapPolyfill=false;try{var nonExtensibleObject=Object.preventExtensions({});var testMap=new Map([[nonExtensibleObject,null]]);var testSet=new Set([nonExtensibleObject]);// This is necessary for Rollup to not consider these unused.
4905// https://github.com/rollup/rollup/issues/1771
4906// TODO: we can remove these if Rollup fixes the bug.
4907testMap.set(0,0);testSet.add(0);}catch(e){// TODO: Consider warning about bad polyfills
4908hasBadMapPolyfill=true;}}// A Fiber is work on a Component that needs to be done or was done. There can
4909// be more than one per component.
4910var debugCounter=void 0;{debugCounter=1;}function FiberNode(tag,pendingProps,key,mode){// Instance
4911this.tag=tag;this.key=key;this.type=null;this.stateNode=null;// Fiber
4912this.return=null;this.child=null;this.sibling=null;this.index=0;this.ref=null;this.pendingProps=pendingProps;this.memoizedProps=null;this.updateQueue=null;this.memoizedState=null;this.firstContextDependency=null;this.mode=mode;// Effects
4913this.effectTag=NoEffect;this.nextEffect=null;this.firstEffect=null;this.lastEffect=null;this.expirationTime=NoWork;this.childExpirationTime=NoWork;this.alternate=null;if(enableProfilerTimer){this.actualDuration=0;this.actualStartTime=-1;this.selfBaseDuration=0;this.treeBaseDuration=0;}{this._debugID=debugCounter++;this._debugSource=null;this._debugOwner=null;this._debugIsCurrentlyTiming=false;if(!hasBadMapPolyfill&&typeof Object.preventExtensions==='function'){Object.preventExtensions(this);}}}// This is a constructor function, rather than a POJO constructor, still
4914// please ensure we do the following:
4915// 1) Nobody should add any instance methods on this. Instance methods can be
4916// more difficult to predict when they get optimized and they are almost
4917// never inlined properly in static compilers.
4918// 2) Nobody should rely on `instanceof Fiber` for type testing. We should
4919// always know when it is a fiber.
4920// 3) We might want to experiment with using numeric keys since they are easier
4921// to optimize in a non-JIT environment.
4922// 4) We can easily go from a constructor to a createFiber object literal if that
4923// is faster.
4924// 5) It should be easy to port this to a C struct and keep a C implementation
4925// compatible.
4926var createFiber=function(tag,pendingProps,key,mode){// $FlowFixMe: the shapes are exact here but Flow doesn't like constructors
4927return new FiberNode(tag,pendingProps,key,mode);};function shouldConstruct(Component){var prototype=Component.prototype;return!!(prototype&&prototype.isReactComponent);}function resolveLazyComponentTag(fiber,Component){if(typeof Component==='function'){return shouldConstruct(Component)?ClassComponentLazy:FunctionalComponentLazy;}else if(Component!==undefined&&Component!==null&&Component.$$typeof){return ForwardRefLazy;}return IndeterminateComponent;}// This is used to create an alternate fiber to do work on.
4928function createWorkInProgress(current,pendingProps,expirationTime){var workInProgress=current.alternate;if(workInProgress===null){// We use a double buffering pooling technique because we know that we'll
4929// only ever need at most two versions of a tree. We pool the "other" unused
4930// node that we're free to reuse. This is lazily created to avoid allocating
4931// extra objects for things that are never updated. It also allow us to
4932// reclaim the extra memory if needed.
4933workInProgress=createFiber(current.tag,pendingProps,current.key,current.mode);workInProgress.type=current.type;workInProgress.stateNode=current.stateNode;{// DEV-only fields
4934workInProgress._debugID=current._debugID;workInProgress._debugSource=current._debugSource;workInProgress._debugOwner=current._debugOwner;}workInProgress.alternate=current;current.alternate=workInProgress;}else{workInProgress.pendingProps=pendingProps;// We already have an alternate.
4935// Reset the effect tag.
4936workInProgress.effectTag=NoEffect;// The effect list is no longer valid.
4937workInProgress.nextEffect=null;workInProgress.firstEffect=null;workInProgress.lastEffect=null;if(enableProfilerTimer){// We intentionally reset, rather than copy, actualDuration & actualStartTime.
4938// This prevents time from endlessly accumulating in new commits.
4939// This has the downside of resetting values for different priority renders,
4940// But works for yielding (the common case) and should support resuming.
4941workInProgress.actualDuration=0;workInProgress.actualStartTime=-1;}}// Don't touching the subtree's expiration time, which has not changed.
4942workInProgress.childExpirationTime=current.childExpirationTime;if(pendingProps!==current.pendingProps){// This fiber has new props.
4943workInProgress.expirationTime=expirationTime;}else{// This fiber's props have not changed.
4944workInProgress.expirationTime=current.expirationTime;}workInProgress.child=current.child;workInProgress.memoizedProps=current.memoizedProps;workInProgress.memoizedState=current.memoizedState;workInProgress.updateQueue=current.updateQueue;workInProgress.firstContextDependency=current.firstContextDependency;// These will be overridden during the parent's reconciliation
4945workInProgress.sibling=current.sibling;workInProgress.index=current.index;workInProgress.ref=current.ref;if(enableProfilerTimer){workInProgress.selfBaseDuration=current.selfBaseDuration;workInProgress.treeBaseDuration=current.treeBaseDuration;}return workInProgress;}function createHostRootFiber(isAsync){var mode=isAsync?AsyncMode|StrictMode:NoContext;if(enableProfilerTimer&&isDevToolsPresent){// Always collect profile timings when DevTools are present.
4946// This enables DevTools to start capturing timing at any point–
4947// Without some nodes in the tree having empty base times.
4948mode|=ProfileMode;}return createFiber(HostRoot,null,null,mode);}function createFiberFromElement(element,mode,expirationTime){var owner=null;{owner=element._owner;}var fiber=void 0;var type=element.type;var key=element.key;var pendingProps=element.props;var fiberTag=void 0;if(typeof type==='function'){fiberTag=shouldConstruct(type)?ClassComponent:IndeterminateComponent;}else if(typeof type==='string'){fiberTag=HostComponent;}else{getTag:switch(type){case REACT_FRAGMENT_TYPE:return createFiberFromFragment(pendingProps.children,mode,expirationTime,key);case REACT_ASYNC_MODE_TYPE:fiberTag=Mode;mode|=AsyncMode|StrictMode;break;case REACT_STRICT_MODE_TYPE:fiberTag=Mode;mode|=StrictMode;break;case REACT_PROFILER_TYPE:return createFiberFromProfiler(pendingProps,mode,expirationTime,key);case REACT_PLACEHOLDER_TYPE:fiberTag=PlaceholderComponent;break;default:{if(typeof type==='object'&&type!==null){switch(type.$$typeof){case REACT_PROVIDER_TYPE:fiberTag=ContextProvider;break getTag;case REACT_CONTEXT_TYPE:// This is a consumer
4949fiberTag=ContextConsumer;break getTag;case REACT_FORWARD_REF_TYPE:fiberTag=ForwardRef;break getTag;default:{if(typeof type.then==='function'){fiberTag=IndeterminateComponent;break getTag;}}}}var info='';{if(type===undefined||typeof type==='object'&&type!==null&&Object.keys(type).length===0){info+=' You likely forgot to export your component from the file '+"it's defined in, or you might have mixed up default and "+'named imports.';}var ownerName=owner?getComponentName(owner.type):null;if(ownerName){info+='\n\nCheck the render method of `'+ownerName+'`.';}}invariant(false,'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s',type==null?type:typeof type,info);}}}fiber=createFiber(fiberTag,pendingProps,key,mode);fiber.type=type;fiber.expirationTime=expirationTime;{fiber._debugSource=element._source;fiber._debugOwner=element._owner;}return fiber;}function createFiberFromFragment(elements,mode,expirationTime,key){var fiber=createFiber(Fragment,elements,key,mode);fiber.expirationTime=expirationTime;return fiber;}function createFiberFromProfiler(pendingProps,mode,expirationTime,key){{if(typeof pendingProps.id!=='string'||typeof pendingProps.onRender!=='function'){warningWithoutStack$1(false,'Profiler must specify an "id" string and "onRender" function as props');}}var fiber=createFiber(Profiler,pendingProps,key,mode|ProfileMode);fiber.type=REACT_PROFILER_TYPE;fiber.expirationTime=expirationTime;return fiber;}function createFiberFromText(content,mode,expirationTime){var fiber=createFiber(HostText,content,null,mode);fiber.expirationTime=expirationTime;return fiber;}function createFiberFromHostInstanceForDeletion(){var fiber=createFiber(HostComponent,null,null,NoContext);fiber.type='DELETED';return fiber;}function createFiberFromPortal(portal,mode,expirationTime){var pendingProps=portal.children!==null?portal.children:[];var fiber=createFiber(HostPortal,pendingProps,portal.key,mode);fiber.expirationTime=expirationTime;fiber.stateNode={containerInfo:portal.containerInfo,pendingChildren:null,// Used by persistent updates
4950implementation:portal.implementation};return fiber;}// Used for stashing WIP properties to replay failed work in DEV.
4951function assignFiberPropertiesInDEV(target,source){if(target===null){// This Fiber's initial properties will always be overwritten.
4952// We only use a Fiber to ensure the same hidden class so DEV isn't slow.
4953target=createFiber(IndeterminateComponent,null,null,NoContext);}// This is intentionally written as a list of all properties.
4954// We tried to use Object.assign() instead but this is called in
4955// the hottest path, and Object.assign() was too slow:
4956// https://github.com/facebook/react/issues/12502
4957// This code is DEV-only so size is not a concern.
4958target.tag=source.tag;target.key=source.key;target.type=source.type;target.stateNode=source.stateNode;target.return=source.return;target.child=source.child;target.sibling=source.sibling;target.index=source.index;target.ref=source.ref;target.pendingProps=source.pendingProps;target.memoizedProps=source.memoizedProps;target.updateQueue=source.updateQueue;target.memoizedState=source.memoizedState;target.firstContextDependency=source.firstContextDependency;target.mode=source.mode;target.effectTag=source.effectTag;target.nextEffect=source.nextEffect;target.firstEffect=source.firstEffect;target.lastEffect=source.lastEffect;target.expirationTime=source.expirationTime;target.childExpirationTime=source.childExpirationTime;target.alternate=source.alternate;if(enableProfilerTimer){target.actualDuration=source.actualDuration;target.actualStartTime=source.actualStartTime;target.selfBaseDuration=source.selfBaseDuration;target.treeBaseDuration=source.treeBaseDuration;}target._debugID=source._debugID;target._debugSource=source._debugSource;target._debugOwner=source._debugOwner;target._debugIsCurrentlyTiming=source._debugIsCurrentlyTiming;return target;}/* eslint-disable no-use-before-define */ // TODO: This should be lifted into the renderer.
4959// The following attributes are only used by interaction tracing builds.
4960// They enable interactions to be associated with their async work,
4961// And expose interaction metadata to the React DevTools Profiler plugin.
4962// Note that these attributes are only defined when the enableSchedulerTracing flag is enabled.
4963// Exported FiberRoot type includes all properties,
4964// To avoid requiring potentially error-prone :any casts throughout the project.
4965// Profiling properties are only safe to access in profiling builds (when enableSchedulerTracing is true).
4966// The types are defined separately within this file to ensure they stay in sync.
4967// (We don't have to use an inline :any cast when enableSchedulerTracing is disabled.)
4968/* eslint-enable no-use-before-define */function createFiberRoot(containerInfo,isAsync,hydrate){// Cyclic construction. This cheats the type system right now because
4969// stateNode is any.
4970var uninitializedFiber=createHostRootFiber(isAsync);var root=void 0;if(enableSchedulerTracing){root={current:uninitializedFiber,containerInfo:containerInfo,pendingChildren:null,earliestPendingTime:NoWork,latestPendingTime:NoWork,earliestSuspendedTime:NoWork,latestSuspendedTime:NoWork,latestPingedTime:NoWork,didError:false,pendingCommitExpirationTime:NoWork,finishedWork:null,timeoutHandle:noTimeout,context:null,pendingContext:null,hydrate:hydrate,nextExpirationTimeToWorkOn:NoWork,expirationTime:NoWork,firstBatch:null,nextScheduledRoot:null,interactionThreadID:tracing.unstable_getThreadID(),memoizedInteractions:new Set(),pendingInteractionMap:new Map()};}else{root={current:uninitializedFiber,containerInfo:containerInfo,pendingChildren:null,earliestPendingTime:NoWork,latestPendingTime:NoWork,earliestSuspendedTime:NoWork,latestSuspendedTime:NoWork,latestPingedTime:NoWork,didError:false,pendingCommitExpirationTime:NoWork,finishedWork:null,timeoutHandle:noTimeout,context:null,pendingContext:null,hydrate:hydrate,nextExpirationTimeToWorkOn:NoWork,expirationTime:NoWork,firstBatch:null,nextScheduledRoot:null};}uninitializedFiber.stateNode=root;// The reason for the way the Flow types are structured in this file,
4971// Is to avoid needing :any casts everywhere interaction tracing fields are used.
4972// Unfortunately that requires an :any cast for non-interaction tracing capable builds.
4973// $FlowFixMe Remove this :any cast and replace it with something better.
4974return root;}/**
4975 * Forked from fbjs/warning:
4976 * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
4977 *
4978 * Only change is we use console.warn instead of console.error,
4979 * and do nothing when 'console' is not supported.
4980 * This really simplifies the code.
4981 * ---
4982 * Similar to invariant but only logs a warning if the condition is not met.
4983 * This can be used to log issues in development environments in critical
4984 * paths. Removing the logging code for production environments will keep the
4985 * same logic and follow the same code paths.
4986 */var lowPriorityWarning=function(){};{var printWarning=function(format){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];}var argIndex=0;var message='Warning: '+format.replace(/%s/g,function(){return args[argIndex++];});if(typeof console!=='undefined'){console.warn(message);}try{// --- Welcome to debugging React ---
4987// This error was thrown as a convenience so that you can use this stack
4988// to find the callsite that caused this warning to fire.
4989throw new Error(message);}catch(x){}};lowPriorityWarning=function(condition,format){if(format===undefined){throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning '+'message argument');}if(!condition){for(var _len2=arguments.length,args=Array(_len2>2?_len2-2:0),_key2=2;_key2<_len2;_key2++){args[_key2-2]=arguments[_key2];}printWarning.apply(undefined,[format].concat(args));}};}var lowPriorityWarning$1=lowPriorityWarning;var ReactStrictModeWarnings={discardPendingWarnings:function(){},flushPendingDeprecationWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordDeprecationWarnings:function(fiber,instance){},recordUnsafeLifecycleWarnings:function(fiber,instance){},recordLegacyContextWarning:function(fiber,instance){},flushLegacyContextWarning:function(){}};{var LIFECYCLE_SUGGESTIONS={UNSAFE_componentWillMount:'componentDidMount',UNSAFE_componentWillReceiveProps:'static getDerivedStateFromProps',UNSAFE_componentWillUpdate:'componentDidUpdate'};var pendingComponentWillMountWarnings=[];var pendingComponentWillReceivePropsWarnings=[];var pendingComponentWillUpdateWarnings=[];var pendingUnsafeLifecycleWarnings=new Map();var pendingLegacyContextWarning=new Map();// Tracks components we have already warned about.
4990var didWarnAboutDeprecatedLifecycles=new Set();var didWarnAboutUnsafeLifecycles=new Set();var didWarnAboutLegacyContext=new Set();var setToSortedString=function(set){var array=[];set.forEach(function(value){array.push(value);});return array.sort().join(', ');};ReactStrictModeWarnings.discardPendingWarnings=function(){pendingComponentWillMountWarnings=[];pendingComponentWillReceivePropsWarnings=[];pendingComponentWillUpdateWarnings=[];pendingUnsafeLifecycleWarnings=new Map();pendingLegacyContextWarning=new Map();};ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings=function(){pendingUnsafeLifecycleWarnings.forEach(function(lifecycleWarningsMap,strictRoot){var lifecyclesWarningMesages=[];Object.keys(lifecycleWarningsMap).forEach(function(lifecycle){var lifecycleWarnings=lifecycleWarningsMap[lifecycle];if(lifecycleWarnings.length>0){var componentNames=new Set();lifecycleWarnings.forEach(function(fiber){componentNames.add(getComponentName(fiber.type)||'Component');didWarnAboutUnsafeLifecycles.add(fiber.type);});var formatted=lifecycle.replace('UNSAFE_','');var suggestion=LIFECYCLE_SUGGESTIONS[lifecycle];var sortedComponentNames=setToSortedString(componentNames);lifecyclesWarningMesages.push(formatted+': Please update the following components to use '+(suggestion+' instead: '+sortedComponentNames));}});if(lifecyclesWarningMesages.length>0){var strictRootComponentStack=getStackByFiberInDevAndProd(strictRoot);warningWithoutStack$1(false,'Unsafe lifecycle methods were found within a strict-mode tree:%s'+'\n\n%s'+'\n\nLearn more about this warning here:'+'\nhttps://fb.me/react-strict-mode-warnings',strictRootComponentStack,lifecyclesWarningMesages.join('\n\n'));}});pendingUnsafeLifecycleWarnings=new Map();};var findStrictRoot=function(fiber){var maybeStrictRoot=null;var node=fiber;while(node!==null){if(node.mode&StrictMode){maybeStrictRoot=node;}node=node.return;}return maybeStrictRoot;};ReactStrictModeWarnings.flushPendingDeprecationWarnings=function(){if(pendingComponentWillMountWarnings.length>0){var uniqueNames=new Set();pendingComponentWillMountWarnings.forEach(function(fiber){uniqueNames.add(getComponentName(fiber.type)||'Component');didWarnAboutDeprecatedLifecycles.add(fiber.type);});var sortedNames=setToSortedString(uniqueNames);lowPriorityWarning$1(false,'componentWillMount is deprecated and will be removed in the next major version. '+'Use componentDidMount instead. As a temporary workaround, '+'you can rename to UNSAFE_componentWillMount.'+'\n\nPlease update the following components: %s'+'\n\nLearn more about this warning here:'+'\nhttps://fb.me/react-async-component-lifecycle-hooks',sortedNames);pendingComponentWillMountWarnings=[];}if(pendingComponentWillReceivePropsWarnings.length>0){var _uniqueNames=new Set();pendingComponentWillReceivePropsWarnings.forEach(function(fiber){_uniqueNames.add(getComponentName(fiber.type)||'Component');didWarnAboutDeprecatedLifecycles.add(fiber.type);});var _sortedNames=setToSortedString(_uniqueNames);lowPriorityWarning$1(false,'componentWillReceiveProps is deprecated and will be removed in the next major version. '+'Use static getDerivedStateFromProps instead.'+'\n\nPlease update the following components: %s'+'\n\nLearn more about this warning here:'+'\nhttps://fb.me/react-async-component-lifecycle-hooks',_sortedNames);pendingComponentWillReceivePropsWarnings=[];}if(pendingComponentWillUpdateWarnings.length>0){var _uniqueNames2=new Set();pendingComponentWillUpdateWarnings.forEach(function(fiber){_uniqueNames2.add(getComponentName(fiber.type)||'Component');didWarnAboutDeprecatedLifecycles.add(fiber.type);});var _sortedNames2=setToSortedString(_uniqueNames2);lowPriorityWarning$1(false,'componentWillUpdate is deprecated and will be removed in the next major version. '+'Use componentDidUpdate instead. As a temporary workaround, '+'you can rename to UNSAFE_componentWillUpdate.'+'\n\nPlease update the following components: %s'+'\n\nLearn more about this warning here:'+'\nhttps://fb.me/react-async-component-lifecycle-hooks',_sortedNames2);pendingComponentWillUpdateWarnings=[];}};ReactStrictModeWarnings.recordDeprecationWarnings=function(fiber,instance){// Dedup strategy: Warn once per component.
4991if(didWarnAboutDeprecatedLifecycles.has(fiber.type)){return;}// Don't warn about react-lifecycles-compat polyfilled components.
4992if(typeof instance.componentWillMount==='function'&&instance.componentWillMount.__suppressDeprecationWarning!==true){pendingComponentWillMountWarnings.push(fiber);}if(typeof instance.componentWillReceiveProps==='function'&&instance.componentWillReceiveProps.__suppressDeprecationWarning!==true){pendingComponentWillReceivePropsWarnings.push(fiber);}if(typeof instance.componentWillUpdate==='function'&&instance.componentWillUpdate.__suppressDeprecationWarning!==true){pendingComponentWillUpdateWarnings.push(fiber);}};ReactStrictModeWarnings.recordUnsafeLifecycleWarnings=function(fiber,instance){var strictRoot=findStrictRoot(fiber);if(strictRoot===null){warningWithoutStack$1(false,'Expected to find a StrictMode component in a strict mode tree. '+'This error is likely caused by a bug in React. Please file an issue.');return;}// Dedup strategy: Warn once per component.
4993// This is difficult to track any other way since component names
4994// are often vague and are likely to collide between 3rd party libraries.
4995// An expand property is probably okay to use here since it's DEV-only,
4996// and will only be set in the event of serious warnings.
4997if(didWarnAboutUnsafeLifecycles.has(fiber.type)){return;}var warningsForRoot=void 0;if(!pendingUnsafeLifecycleWarnings.has(strictRoot)){warningsForRoot={UNSAFE_componentWillMount:[],UNSAFE_componentWillReceiveProps:[],UNSAFE_componentWillUpdate:[]};pendingUnsafeLifecycleWarnings.set(strictRoot,warningsForRoot);}else{warningsForRoot=pendingUnsafeLifecycleWarnings.get(strictRoot);}var unsafeLifecycles=[];if(typeof instance.componentWillMount==='function'&&instance.componentWillMount.__suppressDeprecationWarning!==true||typeof instance.UNSAFE_componentWillMount==='function'){unsafeLifecycles.push('UNSAFE_componentWillMount');}if(typeof instance.componentWillReceiveProps==='function'&&instance.componentWillReceiveProps.__suppressDeprecationWarning!==true||typeof instance.UNSAFE_componentWillReceiveProps==='function'){unsafeLifecycles.push('UNSAFE_componentWillReceiveProps');}if(typeof instance.componentWillUpdate==='function'&&instance.componentWillUpdate.__suppressDeprecationWarning!==true||typeof instance.UNSAFE_componentWillUpdate==='function'){unsafeLifecycles.push('UNSAFE_componentWillUpdate');}if(unsafeLifecycles.length>0){unsafeLifecycles.forEach(function(lifecycle){warningsForRoot[lifecycle].push(fiber);});}};ReactStrictModeWarnings.recordLegacyContextWarning=function(fiber,instance){var strictRoot=findStrictRoot(fiber);if(strictRoot===null){warningWithoutStack$1(false,'Expected to find a StrictMode component in a strict mode tree. '+'This error is likely caused by a bug in React. Please file an issue.');return;}// Dedup strategy: Warn once per component.
4998if(didWarnAboutLegacyContext.has(fiber.type)){return;}var warningsForRoot=pendingLegacyContextWarning.get(strictRoot);if(fiber.type.contextTypes!=null||fiber.type.childContextTypes!=null||instance!==null&&typeof instance.getChildContext==='function'){if(warningsForRoot===undefined){warningsForRoot=[];pendingLegacyContextWarning.set(strictRoot,warningsForRoot);}warningsForRoot.push(fiber);}};ReactStrictModeWarnings.flushLegacyContextWarning=function(){pendingLegacyContextWarning.forEach(function(fiberArray,strictRoot){var uniqueNames=new Set();fiberArray.forEach(function(fiber){uniqueNames.add(getComponentName(fiber.type)||'Component');didWarnAboutLegacyContext.add(fiber.type);});var sortedNames=setToSortedString(uniqueNames);var strictRootComponentStack=getStackByFiberInDevAndProd(strictRoot);warningWithoutStack$1(false,'Legacy context API has been detected within a strict-mode tree: %s'+'\n\nPlease update the following components: %s'+'\n\nLearn more about this warning here:'+'\nhttps://fb.me/react-strict-mode-warnings',strictRootComponentStack,sortedNames);});};}// This lets us hook into Fiber to debug what it's doing.
4999// See https://github.com/facebook/react/pull/8033.
5000// This is not part of the public API, not even for React DevTools.
5001// You may only inject a debugTool if you work on React Fiber itself.
5002var ReactFiberInstrumentation={debugTool:null};var ReactFiberInstrumentation_1=ReactFiberInstrumentation;// TODO: Offscreen updates should never suspend. However, a promise that
5003// suspended inside an offscreen subtree should be able to ping at the priority
5004// of the outer render.
5005function markPendingPriorityLevel(root,expirationTime){// If there's a gap between completing a failed root and retrying it,
5006// additional updates may be scheduled. Clear `didError`, in case the update
5007// is sufficient to fix the error.
5008root.didError=false;// Update the latest and earliest pending times
5009var earliestPendingTime=root.earliestPendingTime;if(earliestPendingTime===NoWork){// No other pending updates.
5010root.earliestPendingTime=root.latestPendingTime=expirationTime;}else{if(earliestPendingTime>expirationTime){// This is the earliest pending update.
5011root.earliestPendingTime=expirationTime;}else{var latestPendingTime=root.latestPendingTime;if(latestPendingTime<expirationTime){// This is the latest pending update
5012root.latestPendingTime=expirationTime;}}}findNextExpirationTimeToWorkOn(expirationTime,root);}function markCommittedPriorityLevels(root,earliestRemainingTime){root.didError=false;if(earliestRemainingTime===NoWork){// Fast path. There's no remaining work. Clear everything.
5013root.earliestPendingTime=NoWork;root.latestPendingTime=NoWork;root.earliestSuspendedTime=NoWork;root.latestSuspendedTime=NoWork;root.latestPingedTime=NoWork;findNextExpirationTimeToWorkOn(NoWork,root);return;}// Let's see if the previous latest known pending level was just flushed.
5014var latestPendingTime=root.latestPendingTime;if(latestPendingTime!==NoWork){if(latestPendingTime<earliestRemainingTime){// We've flushed all the known pending levels.
5015root.earliestPendingTime=root.latestPendingTime=NoWork;}else{var earliestPendingTime=root.earliestPendingTime;if(earliestPendingTime<earliestRemainingTime){// We've flushed the earliest known pending level. Set this to the
5016// latest pending time.
5017root.earliestPendingTime=root.latestPendingTime;}}}// Now let's handle the earliest remaining level in the whole tree. We need to
5018// decide whether to treat it as a pending level or as suspended. Check
5019// it falls within the range of known suspended levels.
5020var earliestSuspendedTime=root.earliestSuspendedTime;if(earliestSuspendedTime===NoWork){// There's no suspended work. Treat the earliest remaining level as a
5021// pending level.
5022markPendingPriorityLevel(root,earliestRemainingTime);findNextExpirationTimeToWorkOn(NoWork,root);return;}var latestSuspendedTime=root.latestSuspendedTime;if(earliestRemainingTime>latestSuspendedTime){// The earliest remaining level is later than all the suspended work. That
5023// means we've flushed all the suspended work.
5024root.earliestSuspendedTime=NoWork;root.latestSuspendedTime=NoWork;root.latestPingedTime=NoWork;// There's no suspended work. Treat the earliest remaining level as a
5025// pending level.
5026markPendingPriorityLevel(root,earliestRemainingTime);findNextExpirationTimeToWorkOn(NoWork,root);return;}if(earliestRemainingTime<earliestSuspendedTime){// The earliest remaining time is earlier than all the suspended work.
5027// Treat it as a pending update.
5028markPendingPriorityLevel(root,earliestRemainingTime);findNextExpirationTimeToWorkOn(NoWork,root);return;}// The earliest remaining time falls within the range of known suspended
5029// levels. We should treat this as suspended work.
5030findNextExpirationTimeToWorkOn(NoWork,root);}function hasLowerPriorityWork(root,erroredExpirationTime){var latestPendingTime=root.latestPendingTime;var latestSuspendedTime=root.latestSuspendedTime;var latestPingedTime=root.latestPingedTime;return latestPendingTime!==NoWork&&latestPendingTime>erroredExpirationTime||latestSuspendedTime!==NoWork&&latestSuspendedTime>erroredExpirationTime||latestPingedTime!==NoWork&&latestPingedTime>erroredExpirationTime;}function isPriorityLevelSuspended(root,expirationTime){var earliestSuspendedTime=root.earliestSuspendedTime;var latestSuspendedTime=root.latestSuspendedTime;return earliestSuspendedTime!==NoWork&&expirationTime>=earliestSuspendedTime&&expirationTime<=latestSuspendedTime;}function markSuspendedPriorityLevel(root,suspendedTime){root.didError=false;clearPing(root,suspendedTime);// First, check the known pending levels and update them if needed.
5031var earliestPendingTime=root.earliestPendingTime;var latestPendingTime=root.latestPendingTime;if(earliestPendingTime===suspendedTime){if(latestPendingTime===suspendedTime){// Both known pending levels were suspended. Clear them.
5032root.earliestPendingTime=root.latestPendingTime=NoWork;}else{// The earliest pending level was suspended. Clear by setting it to the
5033// latest pending level.
5034root.earliestPendingTime=latestPendingTime;}}else if(latestPendingTime===suspendedTime){// The latest pending level was suspended. Clear by setting it to the
5035// latest pending level.
5036root.latestPendingTime=earliestPendingTime;}// Finally, update the known suspended levels.
5037var earliestSuspendedTime=root.earliestSuspendedTime;var latestSuspendedTime=root.latestSuspendedTime;if(earliestSuspendedTime===NoWork){// No other suspended levels.
5038root.earliestSuspendedTime=root.latestSuspendedTime=suspendedTime;}else{if(earliestSuspendedTime>suspendedTime){// This is the earliest suspended level.
5039root.earliestSuspendedTime=suspendedTime;}else if(latestSuspendedTime<suspendedTime){// This is the latest suspended level
5040root.latestSuspendedTime=suspendedTime;}}findNextExpirationTimeToWorkOn(suspendedTime,root);}function markPingedPriorityLevel(root,pingedTime){root.didError=false;// TODO: When we add back resuming, we need to ensure the progressed work
5041// is thrown out and not reused during the restarted render. One way to
5042// invalidate the progressed work is to restart at expirationTime + 1.
5043var latestPingedTime=root.latestPingedTime;if(latestPingedTime===NoWork||latestPingedTime<pingedTime){root.latestPingedTime=pingedTime;}findNextExpirationTimeToWorkOn(pingedTime,root);}function clearPing(root,completedTime){// TODO: Track whether the root was pinged during the render phase. If so,
5044// we need to make sure we don't lose track of it.
5045var latestPingedTime=root.latestPingedTime;if(latestPingedTime!==NoWork&&latestPingedTime<=completedTime){root.latestPingedTime=NoWork;}}function findEarliestOutstandingPriorityLevel(root,renderExpirationTime){var earliestExpirationTime=renderExpirationTime;var earliestPendingTime=root.earliestPendingTime;var earliestSuspendedTime=root.earliestSuspendedTime;if(earliestExpirationTime===NoWork||earliestPendingTime!==NoWork&&earliestPendingTime<earliestExpirationTime){earliestExpirationTime=earliestPendingTime;}if(earliestExpirationTime===NoWork||earliestSuspendedTime!==NoWork&&earliestSuspendedTime<earliestExpirationTime){earliestExpirationTime=earliestSuspendedTime;}return earliestExpirationTime;}function didExpireAtExpirationTime(root,currentTime){var expirationTime=root.expirationTime;if(expirationTime!==NoWork&&currentTime>=expirationTime){// The root has expired. Flush all work up to the current time.
5046root.nextExpirationTimeToWorkOn=currentTime;}}function findNextExpirationTimeToWorkOn(completedExpirationTime,root){var earliestSuspendedTime=root.earliestSuspendedTime;var latestSuspendedTime=root.latestSuspendedTime;var earliestPendingTime=root.earliestPendingTime;var latestPingedTime=root.latestPingedTime;// Work on the earliest pending time. Failing that, work on the latest
5047// pinged time.
5048var nextExpirationTimeToWorkOn=earliestPendingTime!==NoWork?earliestPendingTime:latestPingedTime;// If there is no pending or pinged work, check if there's suspended work
5049// that's lower priority than what we just completed.
5050if(nextExpirationTimeToWorkOn===NoWork&&(completedExpirationTime===NoWork||latestSuspendedTime>completedExpirationTime)){// The lowest priority suspended work is the work most likely to be
5051// committed next. Let's start rendering it again, so that if it times out,
5052// it's ready to commit.
5053nextExpirationTimeToWorkOn=latestSuspendedTime;}var expirationTime=nextExpirationTimeToWorkOn;if(expirationTime!==NoWork&&earliestSuspendedTime!==NoWork&&earliestSuspendedTime<expirationTime){// Expire using the earliest known expiration time.
5054expirationTime=earliestSuspendedTime;}root.nextExpirationTimeToWorkOn=nextExpirationTimeToWorkOn;root.expirationTime=expirationTime;}// UpdateQueue is a linked list of prioritized updates.
5055//
5056// Like fibers, update queues come in pairs: a current queue, which represents
5057// the visible state of the screen, and a work-in-progress queue, which is
5058// can be mutated and processed asynchronously before it is committed — a form
5059// of double buffering. If a work-in-progress render is discarded before
5060// finishing, we create a new work-in-progress by cloning the current queue.
5061//
5062// Both queues share a persistent, singly-linked list structure. To schedule an
5063// update, we append it to the end of both queues. Each queue maintains a
5064// pointer to first update in the persistent list that hasn't been processed.
5065// The work-in-progress pointer always has a position equal to or greater than
5066// the current queue, since we always work on that one. The current queue's
5067// pointer is only updated during the commit phase, when we swap in the
5068// work-in-progress.
5069//
5070// For example:
5071//
5072// Current pointer: A - B - C - D - E - F
5073// Work-in-progress pointer: D - E - F
5074// ^
5075// The work-in-progress queue has
5076// processed more updates than current.
5077//
5078// The reason we append to both queues is because otherwise we might drop
5079// updates without ever processing them. For example, if we only add updates to
5080// the work-in-progress queue, some updates could be lost whenever a work-in
5081// -progress render restarts by cloning from current. Similarly, if we only add
5082// updates to the current queue, the updates will be lost whenever an already
5083// in-progress queue commits and swaps with the current queue. However, by
5084// adding to both queues, we guarantee that the update will be part of the next
5085// work-in-progress. (And because the work-in-progress queue becomes the
5086// current queue once it commits, there's no danger of applying the same
5087// update twice.)
5088//
5089// Prioritization
5090// --------------
5091//
5092// Updates are not sorted by priority, but by insertion; new updates are always
5093// appended to the end of the list.
5094//
5095// The priority is still important, though. When processing the update queue
5096// during the render phase, only the updates with sufficient priority are
5097// included in the result. If we skip an update because it has insufficient
5098// priority, it remains in the queue to be processed later, during a lower
5099// priority render. Crucially, all updates subsequent to a skipped update also
5100// remain in the queue *regardless of their priority*. That means high priority
5101// updates are sometimes processed twice, at two separate priorities. We also
5102// keep track of a base state, that represents the state before the first
5103// update in the queue is applied.
5104//
5105// For example:
5106//
5107// Given a base state of '', and the following queue of updates
5108//
5109// A1 - B2 - C1 - D2
5110//
5111// where the number indicates the priority, and the update is applied to the
5112// previous state by appending a letter, React will process these updates as
5113// two separate renders, one per distinct priority level:
5114//
5115// First render, at priority 1:
5116// Base state: ''
5117// Updates: [A1, C1]
5118// Result state: 'AC'
5119//
5120// Second render, at priority 2:
5121// Base state: 'A' <- The base state does not include C1,
5122// because B2 was skipped.
5123// Updates: [B2, C1, D2] <- C1 was rebased on top of B2
5124// Result state: 'ABCD'
5125//
5126// Because we process updates in insertion order, and rebase high priority
5127// updates when preceding updates are skipped, the final result is deterministic
5128// regardless of priority. Intermediate state may vary according to system
5129// resources, but the final state is always the same.
5130var UpdateState=0;var ReplaceState=1;var ForceUpdate=2;var CaptureUpdate=3;// Global state that is reset at the beginning of calling `processUpdateQueue`.
5131// It should only be read right after calling `processUpdateQueue`, via
5132// `checkHasForceUpdateAfterProcessing`.
5133var hasForceUpdate=false;var didWarnUpdateInsideUpdate=void 0;var currentlyProcessingQueue=void 0;var resetCurrentlyProcessingQueue=void 0;{didWarnUpdateInsideUpdate=false;currentlyProcessingQueue=null;resetCurrentlyProcessingQueue=function(){currentlyProcessingQueue=null;};}function createUpdateQueue(baseState){var queue={baseState:baseState,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null};return queue;}function cloneUpdateQueue(currentQueue){var queue={baseState:currentQueue.baseState,firstUpdate:currentQueue.firstUpdate,lastUpdate:currentQueue.lastUpdate,// TODO: With resuming, if we bail out and resuse the child tree, we should
5134// keep these effects.
5135firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null};return queue;}function createUpdate(expirationTime){return{expirationTime:expirationTime,tag:UpdateState,payload:null,callback:null,next:null,nextEffect:null};}function appendUpdateToQueue(queue,update){// Append the update to the end of the list.
5136if(queue.lastUpdate===null){// Queue is empty
5137queue.firstUpdate=queue.lastUpdate=update;}else{queue.lastUpdate.next=update;queue.lastUpdate=update;}}function enqueueUpdate(fiber,update){// Update queues are created lazily.
5138var alternate=fiber.alternate;var queue1=void 0;var queue2=void 0;if(alternate===null){// There's only one fiber.
5139queue1=fiber.updateQueue;queue2=null;if(queue1===null){queue1=fiber.updateQueue=createUpdateQueue(fiber.memoizedState);}}else{// There are two owners.
5140queue1=fiber.updateQueue;queue2=alternate.updateQueue;if(queue1===null){if(queue2===null){// Neither fiber has an update queue. Create new ones.
5141queue1=fiber.updateQueue=createUpdateQueue(fiber.memoizedState);queue2=alternate.updateQueue=createUpdateQueue(alternate.memoizedState);}else{// Only one fiber has an update queue. Clone to create a new one.
5142queue1=fiber.updateQueue=cloneUpdateQueue(queue2);}}else{if(queue2===null){// Only one fiber has an update queue. Clone to create a new one.
5143queue2=alternate.updateQueue=cloneUpdateQueue(queue1);}else{// Both owners have an update queue.
5144}}}if(queue2===null||queue1===queue2){// There's only a single queue.
5145appendUpdateToQueue(queue1,update);}else{// There are two queues. We need to append the update to both queues,
5146// while accounting for the persistent structure of the list — we don't
5147// want the same update to be added multiple times.
5148if(queue1.lastUpdate===null||queue2.lastUpdate===null){// One of the queues is not empty. We must add the update to both queues.
5149appendUpdateToQueue(queue1,update);appendUpdateToQueue(queue2,update);}else{// Both queues are non-empty. The last update is the same in both lists,
5150// because of structural sharing. So, only append to one of the lists.
5151appendUpdateToQueue(queue1,update);// But we still need to update the `lastUpdate` pointer of queue2.
5152queue2.lastUpdate=update;}}{if((fiber.tag===ClassComponent||fiber.tag===ClassComponentLazy)&&(currentlyProcessingQueue===queue1||queue2!==null&&currentlyProcessingQueue===queue2)&&!didWarnUpdateInsideUpdate){warningWithoutStack$1(false,'An update (setState, replaceState, or forceUpdate) was scheduled '+'from inside an update function. Update functions should be pure, '+'with zero side-effects. Consider using componentDidUpdate or a '+'callback.');didWarnUpdateInsideUpdate=true;}}}function enqueueCapturedUpdate(workInProgress,update){// Captured updates go into a separate list, and only on the work-in-
5153// progress queue.
5154var workInProgressQueue=workInProgress.updateQueue;if(workInProgressQueue===null){workInProgressQueue=workInProgress.updateQueue=createUpdateQueue(workInProgress.memoizedState);}else{// TODO: I put this here rather than createWorkInProgress so that we don't
5155// clone the queue unnecessarily. There's probably a better way to
5156// structure this.
5157workInProgressQueue=ensureWorkInProgressQueueIsAClone(workInProgress,workInProgressQueue);}// Append the update to the end of the list.
5158if(workInProgressQueue.lastCapturedUpdate===null){// This is the first render phase update
5159workInProgressQueue.firstCapturedUpdate=workInProgressQueue.lastCapturedUpdate=update;}else{workInProgressQueue.lastCapturedUpdate.next=update;workInProgressQueue.lastCapturedUpdate=update;}}function ensureWorkInProgressQueueIsAClone(workInProgress,queue){var current=workInProgress.alternate;if(current!==null){// If the work-in-progress queue is equal to the current queue,
5160// we need to clone it first.
5161if(queue===current.updateQueue){queue=workInProgress.updateQueue=cloneUpdateQueue(queue);}}return queue;}function getStateFromUpdate(workInProgress,queue,update,prevState,nextProps,instance){switch(update.tag){case ReplaceState:{var _payload=update.payload;if(typeof _payload==='function'){// Updater function
5162{if(debugRenderPhaseSideEffects||debugRenderPhaseSideEffectsForStrictMode&&workInProgress.mode&StrictMode){_payload.call(instance,prevState,nextProps);}}return _payload.call(instance,prevState,nextProps);}// State object
5163return _payload;}case CaptureUpdate:{workInProgress.effectTag=workInProgress.effectTag&~ShouldCapture|DidCapture;}// Intentional fallthrough
5164case UpdateState:{var _payload2=update.payload;var partialState=void 0;if(typeof _payload2==='function'){// Updater function
5165{if(debugRenderPhaseSideEffects||debugRenderPhaseSideEffectsForStrictMode&&workInProgress.mode&StrictMode){_payload2.call(instance,prevState,nextProps);}}partialState=_payload2.call(instance,prevState,nextProps);}else{// Partial state object
5166partialState=_payload2;}if(partialState===null||partialState===undefined){// Null and undefined are treated as no-ops.
5167return prevState;}// Merge the partial state and the previous state.
5168return _assign({},prevState,partialState);}case ForceUpdate:{hasForceUpdate=true;return prevState;}}return prevState;}function processUpdateQueue(workInProgress,queue,props,instance,renderExpirationTime){hasForceUpdate=false;queue=ensureWorkInProgressQueueIsAClone(workInProgress,queue);{currentlyProcessingQueue=queue;}// These values may change as we process the queue.
5169var newBaseState=queue.baseState;var newFirstUpdate=null;var newExpirationTime=NoWork;// Iterate through the list of updates to compute the result.
5170var update=queue.firstUpdate;var resultState=newBaseState;while(update!==null){var updateExpirationTime=update.expirationTime;if(updateExpirationTime>renderExpirationTime){// This update does not have sufficient priority. Skip it.
5171if(newFirstUpdate===null){// This is the first skipped update. It will be the first update in
5172// the new list.
5173newFirstUpdate=update;// Since this is the first update that was skipped, the current result
5174// is the new base state.
5175newBaseState=resultState;}// Since this update will remain in the list, update the remaining
5176// expiration time.
5177if(newExpirationTime===NoWork||newExpirationTime>updateExpirationTime){newExpirationTime=updateExpirationTime;}}else{// This update does have sufficient priority. Process it and compute
5178// a new result.
5179resultState=getStateFromUpdate(workInProgress,queue,update,resultState,props,instance);var _callback=update.callback;if(_callback!==null){workInProgress.effectTag|=Callback;// Set this to null, in case it was mutated during an aborted render.
5180update.nextEffect=null;if(queue.lastEffect===null){queue.firstEffect=queue.lastEffect=update;}else{queue.lastEffect.nextEffect=update;queue.lastEffect=update;}}}// Continue to the next update.
5181update=update.next;}// Separately, iterate though the list of captured updates.
5182var newFirstCapturedUpdate=null;update=queue.firstCapturedUpdate;while(update!==null){var _updateExpirationTime=update.expirationTime;if(_updateExpirationTime>renderExpirationTime){// This update does not have sufficient priority. Skip it.
5183if(newFirstCapturedUpdate===null){// This is the first skipped captured update. It will be the first
5184// update in the new list.
5185newFirstCapturedUpdate=update;// If this is the first update that was skipped, the current result is
5186// the new base state.
5187if(newFirstUpdate===null){newBaseState=resultState;}}// Since this update will remain in the list, update the remaining
5188// expiration time.
5189if(newExpirationTime===NoWork||newExpirationTime>_updateExpirationTime){newExpirationTime=_updateExpirationTime;}}else{// This update does have sufficient priority. Process it and compute
5190// a new result.
5191resultState=getStateFromUpdate(workInProgress,queue,update,resultState,props,instance);var _callback2=update.callback;if(_callback2!==null){workInProgress.effectTag|=Callback;// Set this to null, in case it was mutated during an aborted render.
5192update.nextEffect=null;if(queue.lastCapturedEffect===null){queue.firstCapturedEffect=queue.lastCapturedEffect=update;}else{queue.lastCapturedEffect.nextEffect=update;queue.lastCapturedEffect=update;}}}update=update.next;}if(newFirstUpdate===null){queue.lastUpdate=null;}if(newFirstCapturedUpdate===null){queue.lastCapturedUpdate=null;}else{workInProgress.effectTag|=Callback;}if(newFirstUpdate===null&&newFirstCapturedUpdate===null){// We processed every update, without skipping. That means the new base
5193// state is the same as the result state.
5194newBaseState=resultState;}queue.baseState=newBaseState;queue.firstUpdate=newFirstUpdate;queue.firstCapturedUpdate=newFirstCapturedUpdate;// Set the remaining expiration time to be whatever is remaining in the queue.
5195// This should be fine because the only two other things that contribute to
5196// expiration time are props and context. We're already in the middle of the
5197// begin phase by the time we start processing the queue, so we've already
5198// dealt with the props. Context in components that specify
5199// shouldComponentUpdate is tricky; but we'll have to account for
5200// that regardless.
5201workInProgress.expirationTime=newExpirationTime;workInProgress.memoizedState=resultState;{currentlyProcessingQueue=null;}}function callCallback(callback,context){!(typeof callback==='function')?invariant(false,'Invalid argument passed as callback. Expected a function. Instead received: %s',callback):void 0;callback.call(context);}function resetHasForceUpdateBeforeProcessing(){hasForceUpdate=false;}function checkHasForceUpdateAfterProcessing(){return hasForceUpdate;}function commitUpdateQueue(finishedWork,finishedQueue,instance,renderExpirationTime){// If the finished render included captured updates, and there are still
5202// lower priority updates left over, we need to keep the captured updates
5203// in the queue so that they are rebased and not dropped once we process the
5204// queue again at the lower priority.
5205if(finishedQueue.firstCapturedUpdate!==null){// Join the captured update list to the end of the normal list.
5206if(finishedQueue.lastUpdate!==null){finishedQueue.lastUpdate.next=finishedQueue.firstCapturedUpdate;finishedQueue.lastUpdate=finishedQueue.lastCapturedUpdate;}// Clear the list of captured updates.
5207finishedQueue.firstCapturedUpdate=finishedQueue.lastCapturedUpdate=null;}// Commit the effects
5208commitUpdateEffects(finishedQueue.firstEffect,instance);finishedQueue.firstEffect=finishedQueue.lastEffect=null;commitUpdateEffects(finishedQueue.firstCapturedEffect,instance);finishedQueue.firstCapturedEffect=finishedQueue.lastCapturedEffect=null;}function commitUpdateEffects(effect,instance){while(effect!==null){var _callback3=effect.callback;if(_callback3!==null){effect.callback=null;callCallback(_callback3,instance);}effect=effect.nextEffect;}}function createCapturedValue(value,source){// If the value is an error, call this function immediately after it is thrown
5209// so the stack is accurate.
5210return{value:value,source:source,stack:getStackByFiberInDevAndProd(source)};}var valueCursor=createCursor(null);var rendererSigil=void 0;{// Use this to detect multiple renderers using the same context
5211rendererSigil={};}var currentlyRenderingFiber=null;var lastContextDependency=null;var lastContextWithAllBitsObserved=null;function resetContextDependences(){// This is called right before React yields execution, to ensure `readContext`
5212// cannot be called outside the render phase.
5213currentlyRenderingFiber=null;lastContextDependency=null;lastContextWithAllBitsObserved=null;}function pushProvider(providerFiber,nextValue){var context=providerFiber.type._context;if(isPrimaryRenderer){push(valueCursor,context._currentValue,providerFiber);context._currentValue=nextValue;{!(context._currentRenderer===undefined||context._currentRenderer===null||context._currentRenderer===rendererSigil)?warningWithoutStack$1(false,'Detected multiple renderers concurrently rendering the '+'same context provider. This is currently unsupported.'):void 0;context._currentRenderer=rendererSigil;}}else{push(valueCursor,context._currentValue2,providerFiber);context._currentValue2=nextValue;{!(context._currentRenderer2===undefined||context._currentRenderer2===null||context._currentRenderer2===rendererSigil)?warningWithoutStack$1(false,'Detected multiple renderers concurrently rendering the '+'same context provider. This is currently unsupported.'):void 0;context._currentRenderer2=rendererSigil;}}}function popProvider(providerFiber){var currentValue=valueCursor.current;pop(valueCursor,providerFiber);var context=providerFiber.type._context;if(isPrimaryRenderer){context._currentValue=currentValue;}else{context._currentValue2=currentValue;}}function calculateChangedBits(context,newValue,oldValue){// Use Object.is to compare the new context value to the old value. Inlined
5214// Object.is polyfill.
5215// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
5216if(oldValue===newValue&&(oldValue!==0||1/oldValue===1/newValue)||oldValue!==oldValue&&newValue!==newValue// eslint-disable-line no-self-compare
5217){// No change
5218return 0;}else{var changedBits=typeof context._calculateChangedBits==='function'?context._calculateChangedBits(oldValue,newValue):maxSigned31BitInt;{!((changedBits&maxSigned31BitInt)===changedBits)?warning$1(false,'calculateChangedBits: Expected the return value to be a '+'31-bit integer. Instead received: %s',changedBits):void 0;}return changedBits|0;}}function propagateContextChange(workInProgress,context,changedBits,renderExpirationTime){var fiber=workInProgress.child;if(fiber!==null){// Set the return pointer of the child to the work-in-progress fiber.
5219fiber.return=workInProgress;}while(fiber!==null){var nextFiber=void 0;// Visit this fiber.
5220var dependency=fiber.firstContextDependency;if(dependency!==null){do{// Check if the context matches.
5221if(dependency.context===context&&(dependency.observedBits&changedBits)!==0){// Match! Schedule an update on this fiber.
5222if(fiber.tag===ClassComponent||fiber.tag===ClassComponentLazy){// Schedule a force update on the work-in-progress.
5223var update=createUpdate(renderExpirationTime);update.tag=ForceUpdate;// TODO: Because we don't have a work-in-progress, this will add the
5224// update to the current fiber, too, which means it will persist even if
5225// this render is thrown away. Since it's a race condition, not sure it's
5226// worth fixing.
5227enqueueUpdate(fiber,update);}if(fiber.expirationTime===NoWork||fiber.expirationTime>renderExpirationTime){fiber.expirationTime=renderExpirationTime;}var alternate=fiber.alternate;if(alternate!==null&&(alternate.expirationTime===NoWork||alternate.expirationTime>renderExpirationTime)){alternate.expirationTime=renderExpirationTime;}// Update the child expiration time of all the ancestors, including
5228// the alternates.
5229var node=fiber.return;while(node!==null){alternate=node.alternate;if(node.childExpirationTime===NoWork||node.childExpirationTime>renderExpirationTime){node.childExpirationTime=renderExpirationTime;if(alternate!==null&&(alternate.childExpirationTime===NoWork||alternate.childExpirationTime>renderExpirationTime)){alternate.childExpirationTime=renderExpirationTime;}}else if(alternate!==null&&(alternate.childExpirationTime===NoWork||alternate.childExpirationTime>renderExpirationTime)){alternate.childExpirationTime=renderExpirationTime;}else{// Neither alternate was updated, which means the rest of the
5230// ancestor path already has sufficient priority.
5231break;}node=node.return;}}nextFiber=fiber.child;dependency=dependency.next;}while(dependency!==null);}else if(fiber.tag===ContextProvider){// Don't scan deeper if this is a matching provider
5232nextFiber=fiber.type===workInProgress.type?null:fiber.child;}else{// Traverse down.
5233nextFiber=fiber.child;}if(nextFiber!==null){// Set the return pointer of the child to the work-in-progress fiber.
5234nextFiber.return=fiber;}else{// No child. Traverse to next sibling.
5235nextFiber=fiber;while(nextFiber!==null){if(nextFiber===workInProgress){// We're back to the root of this subtree. Exit.
5236nextFiber=null;break;}var sibling=nextFiber.sibling;if(sibling!==null){// Set the return pointer of the sibling to the work-in-progress fiber.
5237sibling.return=nextFiber.return;nextFiber=sibling;break;}// No more siblings. Traverse up.
5238nextFiber=nextFiber.return;}}fiber=nextFiber;}}function prepareToReadContext(workInProgress,renderExpirationTime){currentlyRenderingFiber=workInProgress;lastContextDependency=null;lastContextWithAllBitsObserved=null;// Reset the work-in-progress list
5239workInProgress.firstContextDependency=null;}function readContext(context,observedBits){if(lastContextWithAllBitsObserved===context){// Nothing to do. We already observe everything in this context.
5240}else if(observedBits===false||observedBits===0){// Do not observe any updates.
5241}else{var resolvedObservedBits=void 0;// Avoid deopting on observable arguments or heterogeneous types.
5242if(typeof observedBits!=='number'||observedBits===maxSigned31BitInt){// Observe all updates.
5243lastContextWithAllBitsObserved=context;resolvedObservedBits=maxSigned31BitInt;}else{resolvedObservedBits=observedBits;}var contextItem={context:context,observedBits:resolvedObservedBits,next:null};if(lastContextDependency===null){!(currentlyRenderingFiber!==null)?invariant(false,'Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.'):void 0;// This is the first dependency in the list
5244currentlyRenderingFiber.firstContextDependency=lastContextDependency=contextItem;}else{// Append a new context item.
5245lastContextDependency=lastContextDependency.next=contextItem;}}return isPrimaryRenderer?context._currentValue:context._currentValue2;}var NO_CONTEXT={};var contextStackCursor$1=createCursor(NO_CONTEXT);var contextFiberStackCursor=createCursor(NO_CONTEXT);var rootInstanceStackCursor=createCursor(NO_CONTEXT);function requiredContext(c){!(c!==NO_CONTEXT)?invariant(false,'Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.'):void 0;return c;}function getRootHostContainer(){var rootInstance=requiredContext(rootInstanceStackCursor.current);return rootInstance;}function pushHostContainer(fiber,nextRootInstance){// Push current root instance onto the stack;
5246// This allows us to reset root when portals are popped.
5247push(rootInstanceStackCursor,nextRootInstance,fiber);// Track the context and the Fiber that provided it.
5248// This enables us to pop only Fibers that provide unique contexts.
5249push(contextFiberStackCursor,fiber,fiber);// Finally, we need to push the host context to the stack.
5250// However, we can't just call getRootHostContext() and push it because
5251// we'd have a different number of entries on the stack depending on
5252// whether getRootHostContext() throws somewhere in renderer code or not.
5253// So we push an empty value first. This lets us safely unwind on errors.
5254push(contextStackCursor$1,NO_CONTEXT,fiber);var nextRootContext=getRootHostContext(nextRootInstance);// Now that we know this function doesn't throw, replace it.
5255pop(contextStackCursor$1,fiber);push(contextStackCursor$1,nextRootContext,fiber);}function popHostContainer(fiber){pop(contextStackCursor$1,fiber);pop(contextFiberStackCursor,fiber);pop(rootInstanceStackCursor,fiber);}function getHostContext(){var context=requiredContext(contextStackCursor$1.current);return context;}function pushHostContext(fiber){var rootInstance=requiredContext(rootInstanceStackCursor.current);var context=requiredContext(contextStackCursor$1.current);var nextContext=getChildHostContext(context,fiber.type,rootInstance);// Don't push this Fiber's context unless it's unique.
5256if(context===nextContext){return;}// Track the context and the Fiber that provided it.
5257// This enables us to pop only Fibers that provide unique contexts.
5258push(contextFiberStackCursor,fiber,fiber);push(contextStackCursor$1,nextContext,fiber);}function popHostContext(fiber){// Do not pop unless this Fiber provided the current context.
5259// pushHostContext() only pushes Fibers that provide unique contexts.
5260if(contextFiberStackCursor.current!==fiber){return;}pop(contextStackCursor$1,fiber);pop(contextFiberStackCursor,fiber);}var commitTime=0;var profilerStartTime=-1;function getCommitTime(){return commitTime;}function recordCommitTime(){if(!enableProfilerTimer){return;}commitTime=schedule.unstable_now();}function startProfilerTimer(fiber){if(!enableProfilerTimer){return;}profilerStartTime=schedule.unstable_now();if(fiber.actualStartTime<0){fiber.actualStartTime=schedule.unstable_now();}}function stopProfilerTimerIfRunning(fiber){if(!enableProfilerTimer){return;}profilerStartTime=-1;}function stopProfilerTimerIfRunningAndRecordDelta(fiber,overrideBaseTime){if(!enableProfilerTimer){return;}if(profilerStartTime>=0){var elapsedTime=schedule.unstable_now()-profilerStartTime;fiber.actualDuration+=elapsedTime;if(overrideBaseTime){fiber.selfBaseDuration=elapsedTime;}profilerStartTime=-1;}}var fakeInternalInstance={};var isArray=Array.isArray;// React.Component uses a shared frozen object by default.
5261// We'll use it to determine whether we need to initialize legacy refs.
5262var emptyRefsObject=new React.Component().refs;var didWarnAboutStateAssignmentForComponent=void 0;var didWarnAboutUninitializedState=void 0;var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate=void 0;var didWarnAboutLegacyLifecyclesAndDerivedState=void 0;var didWarnAboutUndefinedDerivedState=void 0;var warnOnUndefinedDerivedState=void 0;var warnOnInvalidCallback$1=void 0;var didWarnAboutDirectlyAssigningPropsToState=void 0;{didWarnAboutStateAssignmentForComponent=new Set();didWarnAboutUninitializedState=new Set();didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate=new Set();didWarnAboutLegacyLifecyclesAndDerivedState=new Set();didWarnAboutDirectlyAssigningPropsToState=new Set();didWarnAboutUndefinedDerivedState=new Set();var didWarnOnInvalidCallback=new Set();warnOnInvalidCallback$1=function(callback,callerName){if(callback===null||typeof callback==='function'){return;}var key=callerName+'_'+callback;if(!didWarnOnInvalidCallback.has(key)){didWarnOnInvalidCallback.add(key);warningWithoutStack$1(false,'%s(...): Expected the last optional `callback` argument to be a '+'function. Instead received: %s.',callerName,callback);}};warnOnUndefinedDerivedState=function(type,partialState){if(partialState===undefined){var componentName=getComponentName(type)||'Component';if(!didWarnAboutUndefinedDerivedState.has(componentName)){didWarnAboutUndefinedDerivedState.add(componentName);warningWithoutStack$1(false,'%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. '+'You have returned undefined.',componentName);}}};// This is so gross but it's at least non-critical and can be removed if
5263// it causes problems. This is meant to give a nicer error message for
5264// ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
5265// ...)) which otherwise throws a "_processChildContext is not a function"
5266// exception.
5267Object.defineProperty(fakeInternalInstance,'_processChildContext',{enumerable:false,value:function(){invariant(false,'_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn\'t supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).');}});Object.freeze(fakeInternalInstance);}function applyDerivedStateFromProps(workInProgress,ctor,getDerivedStateFromProps,nextProps){var prevState=workInProgress.memoizedState;{if(debugRenderPhaseSideEffects||debugRenderPhaseSideEffectsForStrictMode&&workInProgress.mode&StrictMode){// Invoke the function an extra time to help detect side-effects.
5268getDerivedStateFromProps(nextProps,prevState);}}var partialState=getDerivedStateFromProps(nextProps,prevState);{warnOnUndefinedDerivedState(ctor,partialState);}// Merge the partial state and the previous state.
5269var memoizedState=partialState===null||partialState===undefined?prevState:_assign({},prevState,partialState);workInProgress.memoizedState=memoizedState;// Once the update queue is empty, persist the derived state onto the
5270// base state.
5271var updateQueue=workInProgress.updateQueue;if(updateQueue!==null&&workInProgress.expirationTime===NoWork){updateQueue.baseState=memoizedState;}}var classComponentUpdater={isMounted:isMounted,enqueueSetState:function(inst,payload,callback){var fiber=get(inst);var currentTime=requestCurrentTime();var expirationTime=computeExpirationForFiber(currentTime,fiber);var update=createUpdate(expirationTime);update.payload=payload;if(callback!==undefined&&callback!==null){{warnOnInvalidCallback$1(callback,'setState');}update.callback=callback;}enqueueUpdate(fiber,update);scheduleWork(fiber,expirationTime);},enqueueReplaceState:function(inst,payload,callback){var fiber=get(inst);var currentTime=requestCurrentTime();var expirationTime=computeExpirationForFiber(currentTime,fiber);var update=createUpdate(expirationTime);update.tag=ReplaceState;update.payload=payload;if(callback!==undefined&&callback!==null){{warnOnInvalidCallback$1(callback,'replaceState');}update.callback=callback;}enqueueUpdate(fiber,update);scheduleWork(fiber,expirationTime);},enqueueForceUpdate:function(inst,callback){var fiber=get(inst);var currentTime=requestCurrentTime();var expirationTime=computeExpirationForFiber(currentTime,fiber);var update=createUpdate(expirationTime);update.tag=ForceUpdate;if(callback!==undefined&&callback!==null){{warnOnInvalidCallback$1(callback,'forceUpdate');}update.callback=callback;}enqueueUpdate(fiber,update);scheduleWork(fiber,expirationTime);}};function checkShouldComponentUpdate(workInProgress,ctor,oldProps,newProps,oldState,newState,nextLegacyContext){var instance=workInProgress.stateNode;if(typeof instance.shouldComponentUpdate==='function'){startPhaseTimer(workInProgress,'shouldComponentUpdate');var shouldUpdate=instance.shouldComponentUpdate(newProps,newState,nextLegacyContext);stopPhaseTimer();{!(shouldUpdate!==undefined)?warningWithoutStack$1(false,'%s.shouldComponentUpdate(): Returned undefined instead of a '+'boolean value. Make sure to return true or false.',getComponentName(ctor)||'Component'):void 0;}return shouldUpdate;}if(ctor.prototype&&ctor.prototype.isPureReactComponent){return!shallowEqual(oldProps,newProps)||!shallowEqual(oldState,newState);}return true;}function checkClassInstance(workInProgress,ctor,newProps){var instance=workInProgress.stateNode;{var name=getComponentName(ctor)||'Component';var renderPresent=instance.render;if(!renderPresent){if(ctor.prototype&&typeof ctor.prototype.render==='function'){warningWithoutStack$1(false,'%s(...): No `render` method found on the returned component '+'instance: did you accidentally return an object from the constructor?',name);}else{warningWithoutStack$1(false,'%s(...): No `render` method found on the returned component '+'instance: you may have forgotten to define `render`.',name);}}var noGetInitialStateOnES6=!instance.getInitialState||instance.getInitialState.isReactClassApproved||instance.state;!noGetInitialStateOnES6?warningWithoutStack$1(false,'getInitialState was defined on %s, a plain JavaScript class. '+'This is only supported for classes created using React.createClass. '+'Did you mean to define a state property instead?',name):void 0;var noGetDefaultPropsOnES6=!instance.getDefaultProps||instance.getDefaultProps.isReactClassApproved;!noGetDefaultPropsOnES6?warningWithoutStack$1(false,'getDefaultProps was defined on %s, a plain JavaScript class. '+'This is only supported for classes created using React.createClass. '+'Use a static property to define defaultProps instead.',name):void 0;var noInstancePropTypes=!instance.propTypes;!noInstancePropTypes?warningWithoutStack$1(false,'propTypes was defined as an instance property on %s. Use a static '+'property to define propTypes instead.',name):void 0;var noInstanceContextTypes=!instance.contextTypes;!noInstanceContextTypes?warningWithoutStack$1(false,'contextTypes was defined as an instance property on %s. Use a static '+'property to define contextTypes instead.',name):void 0;var noComponentShouldUpdate=typeof instance.componentShouldUpdate!=='function';!noComponentShouldUpdate?warningWithoutStack$1(false,'%s has a method called '+'componentShouldUpdate(). Did you mean shouldComponentUpdate()? '+'The name is phrased as a question because the function is '+'expected to return a value.',name):void 0;if(ctor.prototype&&ctor.prototype.isPureReactComponent&&typeof instance.shouldComponentUpdate!=='undefined'){warningWithoutStack$1(false,'%s has a method called shouldComponentUpdate(). '+'shouldComponentUpdate should not be used when extending React.PureComponent. '+'Please extend React.Component if shouldComponentUpdate is used.',getComponentName(ctor)||'A pure component');}var noComponentDidUnmount=typeof instance.componentDidUnmount!=='function';!noComponentDidUnmount?warningWithoutStack$1(false,'%s has a method called '+'componentDidUnmount(). But there is no such lifecycle method. '+'Did you mean componentWillUnmount()?',name):void 0;var noComponentDidReceiveProps=typeof instance.componentDidReceiveProps!=='function';!noComponentDidReceiveProps?warningWithoutStack$1(false,'%s has a method called '+'componentDidReceiveProps(). But there is no such lifecycle method. '+'If you meant to update the state in response to changing props, '+'use componentWillReceiveProps(). If you meant to fetch data or '+'run side-effects or mutations after React has updated the UI, use componentDidUpdate().',name):void 0;var noComponentWillRecieveProps=typeof instance.componentWillRecieveProps!=='function';!noComponentWillRecieveProps?warningWithoutStack$1(false,'%s has a method called '+'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',name):void 0;var noUnsafeComponentWillRecieveProps=typeof instance.UNSAFE_componentWillRecieveProps!=='function';!noUnsafeComponentWillRecieveProps?warningWithoutStack$1(false,'%s has a method called '+'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?',name):void 0;var hasMutatedProps=instance.props!==newProps;!(instance.props===undefined||!hasMutatedProps)?warningWithoutStack$1(false,'%s(...): When calling super() in `%s`, make sure to pass '+"up the same props that your component's constructor was passed.",name,name):void 0;var noInstanceDefaultProps=!instance.defaultProps;!noInstanceDefaultProps?warningWithoutStack$1(false,'Setting defaultProps as an instance property on %s is not supported and will be ignored.'+' Instead, define defaultProps as a static property on %s.',name,name):void 0;if(typeof instance.getSnapshotBeforeUpdate==='function'&&typeof instance.componentDidUpdate!=='function'&&!didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)){didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);warningWithoutStack$1(false,'%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). '+'This component defines getSnapshotBeforeUpdate() only.',getComponentName(ctor));}var noInstanceGetDerivedStateFromProps=typeof instance.getDerivedStateFromProps!=='function';!noInstanceGetDerivedStateFromProps?warningWithoutStack$1(false,'%s: getDerivedStateFromProps() is defined as an instance method '+'and will be ignored. Instead, declare it as a static method.',name):void 0;var noInstanceGetDerivedStateFromCatch=typeof instance.getDerivedStateFromCatch!=='function';!noInstanceGetDerivedStateFromCatch?warningWithoutStack$1(false,'%s: getDerivedStateFromCatch() is defined as an instance method '+'and will be ignored. Instead, declare it as a static method.',name):void 0;var noStaticGetSnapshotBeforeUpdate=typeof ctor.getSnapshotBeforeUpdate!=='function';!noStaticGetSnapshotBeforeUpdate?warningWithoutStack$1(false,'%s: getSnapshotBeforeUpdate() is defined as a static method '+'and will be ignored. Instead, declare it as an instance method.',name):void 0;var _state=instance.state;if(_state&&(typeof _state!=='object'||isArray(_state))){warningWithoutStack$1(false,'%s.state: must be set to an object or null',name);}if(typeof instance.getChildContext==='function'){!(typeof ctor.childContextTypes==='object')?warningWithoutStack$1(false,'%s.getChildContext(): childContextTypes must be defined in order to '+'use getChildContext().',name):void 0;}}}function adoptClassInstance(workInProgress,instance){instance.updater=classComponentUpdater;workInProgress.stateNode=instance;// The instance needs access to the fiber so that it can schedule updates
5272set(instance,workInProgress);{instance._reactInternalInstance=fakeInternalInstance;}}function constructClassInstance(workInProgress,ctor,props,renderExpirationTime){var unmaskedContext=getUnmaskedContext(workInProgress,ctor,true);var contextTypes=ctor.contextTypes;var isContextConsumer=contextTypes!==null&&contextTypes!==undefined;var context=isContextConsumer?getMaskedContext(workInProgress,unmaskedContext):emptyContextObject;// Instantiate twice to help detect side-effects.
5273{if(debugRenderPhaseSideEffects||debugRenderPhaseSideEffectsForStrictMode&&workInProgress.mode&StrictMode){new ctor(props,context);// eslint-disable-line no-new
5274}}var instance=new ctor(props,context);var state=workInProgress.memoizedState=instance.state!==null&&instance.state!==undefined?instance.state:null;adoptClassInstance(workInProgress,instance);{if(typeof ctor.getDerivedStateFromProps==='function'&&state===null){var componentName=getComponentName(ctor)||'Component';if(!didWarnAboutUninitializedState.has(componentName)){didWarnAboutUninitializedState.add(componentName);warningWithoutStack$1(false,'`%s` uses `getDerivedStateFromProps` but its initial state is '+'%s. This is not recommended. Instead, define the initial state by '+'assigning an object to `this.state` in the constructor of `%s`. '+'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.',componentName,instance.state===null?'null':'undefined',componentName);}}// If new component APIs are defined, "unsafe" lifecycles won't be called.
5275// Warn about these lifecycles if they are present.
5276// Don't warn about react-lifecycles-compat polyfilled methods though.
5277if(typeof ctor.getDerivedStateFromProps==='function'||typeof instance.getSnapshotBeforeUpdate==='function'){var foundWillMountName=null;var foundWillReceivePropsName=null;var foundWillUpdateName=null;if(typeof instance.componentWillMount==='function'&&instance.componentWillMount.__suppressDeprecationWarning!==true){foundWillMountName='componentWillMount';}else if(typeof instance.UNSAFE_componentWillMount==='function'){foundWillMountName='UNSAFE_componentWillMount';}if(typeof instance.componentWillReceiveProps==='function'&&instance.componentWillReceiveProps.__suppressDeprecationWarning!==true){foundWillReceivePropsName='componentWillReceiveProps';}else if(typeof instance.UNSAFE_componentWillReceiveProps==='function'){foundWillReceivePropsName='UNSAFE_componentWillReceiveProps';}if(typeof instance.componentWillUpdate==='function'&&instance.componentWillUpdate.__suppressDeprecationWarning!==true){foundWillUpdateName='componentWillUpdate';}else if(typeof instance.UNSAFE_componentWillUpdate==='function'){foundWillUpdateName='UNSAFE_componentWillUpdate';}if(foundWillMountName!==null||foundWillReceivePropsName!==null||foundWillUpdateName!==null){var _componentName=getComponentName(ctor)||'Component';var newApiName=typeof ctor.getDerivedStateFromProps==='function'?'getDerivedStateFromProps()':'getSnapshotBeforeUpdate()';if(!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)){didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);warningWithoutStack$1(false,'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n'+'%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n'+'The above lifecycles should be removed. Learn more about this warning here:\n'+'https://fb.me/react-async-component-lifecycle-hooks',_componentName,newApiName,foundWillMountName!==null?'\n '+foundWillMountName:'',foundWillReceivePropsName!==null?'\n '+foundWillReceivePropsName:'',foundWillUpdateName!==null?'\n '+foundWillUpdateName:'');}}}}// Cache unmasked context so we can avoid recreating masked context unless necessary.
5278// ReactFiberContext usually updates this cache but can't for newly-created instances.
5279if(isContextConsumer){cacheContext(workInProgress,unmaskedContext,context);}return instance;}function callComponentWillMount(workInProgress,instance){startPhaseTimer(workInProgress,'componentWillMount');var oldState=instance.state;if(typeof instance.componentWillMount==='function'){instance.componentWillMount();}if(typeof instance.UNSAFE_componentWillMount==='function'){instance.UNSAFE_componentWillMount();}stopPhaseTimer();if(oldState!==instance.state){{warningWithoutStack$1(false,'%s.componentWillMount(): Assigning directly to this.state is '+"deprecated (except inside a component's "+'constructor). Use setState instead.',getComponentName(workInProgress.type)||'Component');}classComponentUpdater.enqueueReplaceState(instance,instance.state,null);}}function callComponentWillReceiveProps(workInProgress,instance,newProps,nextLegacyContext){var oldState=instance.state;startPhaseTimer(workInProgress,'componentWillReceiveProps');if(typeof instance.componentWillReceiveProps==='function'){instance.componentWillReceiveProps(newProps,nextLegacyContext);}if(typeof instance.UNSAFE_componentWillReceiveProps==='function'){instance.UNSAFE_componentWillReceiveProps(newProps,nextLegacyContext);}stopPhaseTimer();if(instance.state!==oldState){{var componentName=getComponentName(workInProgress.type)||'Component';if(!didWarnAboutStateAssignmentForComponent.has(componentName)){didWarnAboutStateAssignmentForComponent.add(componentName);warningWithoutStack$1(false,'%s.componentWillReceiveProps(): Assigning directly to '+"this.state is deprecated (except inside a component's "+'constructor). Use setState instead.',componentName);}}classComponentUpdater.enqueueReplaceState(instance,instance.state,null);}}// Invokes the mount life-cycles on a previously never rendered instance.
5280function mountClassInstance(workInProgress,ctor,newProps,renderExpirationTime){{checkClassInstance(workInProgress,ctor,newProps);}var instance=workInProgress.stateNode;var unmaskedContext=getUnmaskedContext(workInProgress,ctor,true);instance.props=newProps;instance.state=workInProgress.memoizedState;instance.refs=emptyRefsObject;instance.context=getMaskedContext(workInProgress,unmaskedContext);{if(instance.state===newProps){var componentName=getComponentName(ctor)||'Component';if(!didWarnAboutDirectlyAssigningPropsToState.has(componentName)){didWarnAboutDirectlyAssigningPropsToState.add(componentName);warningWithoutStack$1(false,'%s: It is not recommended to assign props directly to state '+"because updates to props won't be reflected in state. "+'In most cases, it is better to use props directly.',componentName);}}if(workInProgress.mode&StrictMode){ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress,instance);ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress,instance);}if(warnAboutDeprecatedLifecycles){ReactStrictModeWarnings.recordDeprecationWarnings(workInProgress,instance);}}var updateQueue=workInProgress.updateQueue;if(updateQueue!==null){processUpdateQueue(workInProgress,updateQueue,newProps,instance,renderExpirationTime);instance.state=workInProgress.memoizedState;}var getDerivedStateFromProps=ctor.getDerivedStateFromProps;if(typeof getDerivedStateFromProps==='function'){applyDerivedStateFromProps(workInProgress,ctor,getDerivedStateFromProps,newProps);instance.state=workInProgress.memoizedState;}// In order to support react-lifecycles-compat polyfilled components,
5281// Unsafe lifecycles should not be invoked for components using the new APIs.
5282if(typeof ctor.getDerivedStateFromProps!=='function'&&typeof instance.getSnapshotBeforeUpdate!=='function'&&(typeof instance.UNSAFE_componentWillMount==='function'||typeof instance.componentWillMount==='function')){callComponentWillMount(workInProgress,instance);// If we had additional state updates during this life-cycle, let's
5283// process them now.
5284updateQueue=workInProgress.updateQueue;if(updateQueue!==null){processUpdateQueue(workInProgress,updateQueue,newProps,instance,renderExpirationTime);instance.state=workInProgress.memoizedState;}}if(typeof instance.componentDidMount==='function'){workInProgress.effectTag|=Update;}}function resumeMountClassInstance(workInProgress,ctor,newProps,renderExpirationTime){var instance=workInProgress.stateNode;var oldProps=workInProgress.memoizedProps;instance.props=oldProps;var oldContext=instance.context;var nextLegacyUnmaskedContext=getUnmaskedContext(workInProgress,ctor,true);var nextLegacyContext=getMaskedContext(workInProgress,nextLegacyUnmaskedContext);var getDerivedStateFromProps=ctor.getDerivedStateFromProps;var hasNewLifecycles=typeof getDerivedStateFromProps==='function'||typeof instance.getSnapshotBeforeUpdate==='function';// Note: During these life-cycles, instance.props/instance.state are what
5285// ever the previously attempted to render - not the "current". However,
5286// during componentDidUpdate we pass the "current" props.
5287// In order to support react-lifecycles-compat polyfilled components,
5288// Unsafe lifecycles should not be invoked for components using the new APIs.
5289if(!hasNewLifecycles&&(typeof instance.UNSAFE_componentWillReceiveProps==='function'||typeof instance.componentWillReceiveProps==='function')){if(oldProps!==newProps||oldContext!==nextLegacyContext){callComponentWillReceiveProps(workInProgress,instance,newProps,nextLegacyContext);}}resetHasForceUpdateBeforeProcessing();var oldState=workInProgress.memoizedState;var newState=instance.state=oldState;var updateQueue=workInProgress.updateQueue;if(updateQueue!==null){processUpdateQueue(workInProgress,updateQueue,newProps,instance,renderExpirationTime);newState=workInProgress.memoizedState;}if(oldProps===newProps&&oldState===newState&&!hasContextChanged()&&!checkHasForceUpdateAfterProcessing()){// If an update was already in progress, we should schedule an Update
5290// effect even though we're bailing out, so that cWU/cDU are called.
5291if(typeof instance.componentDidMount==='function'){workInProgress.effectTag|=Update;}return false;}if(typeof getDerivedStateFromProps==='function'){applyDerivedStateFromProps(workInProgress,ctor,getDerivedStateFromProps,newProps);newState=workInProgress.memoizedState;}var shouldUpdate=checkHasForceUpdateAfterProcessing()||checkShouldComponentUpdate(workInProgress,ctor,oldProps,newProps,oldState,newState,nextLegacyContext);if(shouldUpdate){// In order to support react-lifecycles-compat polyfilled components,
5292// Unsafe lifecycles should not be invoked for components using the new APIs.
5293if(!hasNewLifecycles&&(typeof instance.UNSAFE_componentWillMount==='function'||typeof instance.componentWillMount==='function')){startPhaseTimer(workInProgress,'componentWillMount');if(typeof instance.componentWillMount==='function'){instance.componentWillMount();}if(typeof instance.UNSAFE_componentWillMount==='function'){instance.UNSAFE_componentWillMount();}stopPhaseTimer();}if(typeof instance.componentDidMount==='function'){workInProgress.effectTag|=Update;}}else{// If an update was already in progress, we should schedule an Update
5294// effect even though we're bailing out, so that cWU/cDU are called.
5295if(typeof instance.componentDidMount==='function'){workInProgress.effectTag|=Update;}// If shouldComponentUpdate returned false, we should still update the
5296// memoized state to indicate that this work can be reused.
5297workInProgress.memoizedProps=newProps;workInProgress.memoizedState=newState;}// Update the existing instance's state, props, and context pointers even
5298// if shouldComponentUpdate returns false.
5299instance.props=newProps;instance.state=newState;instance.context=nextLegacyContext;return shouldUpdate;}// Invokes the update life-cycles and returns false if it shouldn't rerender.
5300function updateClassInstance(current,workInProgress,ctor,newProps,renderExpirationTime){var instance=workInProgress.stateNode;var oldProps=workInProgress.memoizedProps;instance.props=oldProps;var oldContext=instance.context;var nextLegacyUnmaskedContext=getUnmaskedContext(workInProgress,ctor,true);var nextLegacyContext=getMaskedContext(workInProgress,nextLegacyUnmaskedContext);var getDerivedStateFromProps=ctor.getDerivedStateFromProps;var hasNewLifecycles=typeof getDerivedStateFromProps==='function'||typeof instance.getSnapshotBeforeUpdate==='function';// Note: During these life-cycles, instance.props/instance.state are what
5301// ever the previously attempted to render - not the "current". However,
5302// during componentDidUpdate we pass the "current" props.
5303// In order to support react-lifecycles-compat polyfilled components,
5304// Unsafe lifecycles should not be invoked for components using the new APIs.
5305if(!hasNewLifecycles&&(typeof instance.UNSAFE_componentWillReceiveProps==='function'||typeof instance.componentWillReceiveProps==='function')){if(oldProps!==newProps||oldContext!==nextLegacyContext){callComponentWillReceiveProps(workInProgress,instance,newProps,nextLegacyContext);}}resetHasForceUpdateBeforeProcessing();var oldState=workInProgress.memoizedState;var newState=instance.state=oldState;var updateQueue=workInProgress.updateQueue;if(updateQueue!==null){processUpdateQueue(workInProgress,updateQueue,newProps,instance,renderExpirationTime);newState=workInProgress.memoizedState;}if(oldProps===newProps&&oldState===newState&&!hasContextChanged()&&!checkHasForceUpdateAfterProcessing()){// If an update was already in progress, we should schedule an Update
5306// effect even though we're bailing out, so that cWU/cDU are called.
5307if(typeof instance.componentDidUpdate==='function'){if(oldProps!==current.memoizedProps||oldState!==current.memoizedState){workInProgress.effectTag|=Update;}}if(typeof instance.getSnapshotBeforeUpdate==='function'){if(oldProps!==current.memoizedProps||oldState!==current.memoizedState){workInProgress.effectTag|=Snapshot;}}return false;}if(typeof getDerivedStateFromProps==='function'){applyDerivedStateFromProps(workInProgress,ctor,getDerivedStateFromProps,newProps);newState=workInProgress.memoizedState;}var shouldUpdate=checkHasForceUpdateAfterProcessing()||checkShouldComponentUpdate(workInProgress,ctor,oldProps,newProps,oldState,newState,nextLegacyContext);if(shouldUpdate){// In order to support react-lifecycles-compat polyfilled components,
5308// Unsafe lifecycles should not be invoked for components using the new APIs.
5309if(!hasNewLifecycles&&(typeof instance.UNSAFE_componentWillUpdate==='function'||typeof instance.componentWillUpdate==='function')){startPhaseTimer(workInProgress,'componentWillUpdate');if(typeof instance.componentWillUpdate==='function'){instance.componentWillUpdate(newProps,newState,nextLegacyContext);}if(typeof instance.UNSAFE_componentWillUpdate==='function'){instance.UNSAFE_componentWillUpdate(newProps,newState,nextLegacyContext);}stopPhaseTimer();}if(typeof instance.componentDidUpdate==='function'){workInProgress.effectTag|=Update;}if(typeof instance.getSnapshotBeforeUpdate==='function'){workInProgress.effectTag|=Snapshot;}}else{// If an update was already in progress, we should schedule an Update
5310// effect even though we're bailing out, so that cWU/cDU are called.
5311if(typeof instance.componentDidUpdate==='function'){if(oldProps!==current.memoizedProps||oldState!==current.memoizedState){workInProgress.effectTag|=Update;}}if(typeof instance.getSnapshotBeforeUpdate==='function'){if(oldProps!==current.memoizedProps||oldState!==current.memoizedState){workInProgress.effectTag|=Snapshot;}}// If shouldComponentUpdate returned false, we should still update the
5312// memoized props/state to indicate that this work can be reused.
5313workInProgress.memoizedProps=newProps;workInProgress.memoizedState=newState;}// Update the existing instance's state, props, and context pointers even
5314// if shouldComponentUpdate returns false.
5315instance.props=newProps;instance.state=newState;instance.context=nextLegacyContext;return shouldUpdate;}var didWarnAboutMaps=void 0;var didWarnAboutGenerators=void 0;var didWarnAboutStringRefInStrictMode=void 0;var ownerHasKeyUseWarning=void 0;var ownerHasFunctionTypeWarning=void 0;var warnForMissingKey=function(child){};{didWarnAboutMaps=false;didWarnAboutGenerators=false;didWarnAboutStringRefInStrictMode={};/**
5316 * Warn if there's no key explicitly set on dynamic arrays of children or
5317 * object keys are not valid. This allows us to keep track of children between
5318 * updates.
5319 */ownerHasKeyUseWarning={};ownerHasFunctionTypeWarning={};warnForMissingKey=function(child){if(child===null||typeof child!=='object'){return;}if(!child._store||child._store.validated||child.key!=null){return;}!(typeof child._store==='object')?invariant(false,'React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.'):void 0;child._store.validated=true;var currentComponentErrorInfo='Each child in an array or iterator should have a unique '+'"key" prop. See https://fb.me/react-warning-keys for '+'more information.'+getCurrentFiberStackInDev();if(ownerHasKeyUseWarning[currentComponentErrorInfo]){return;}ownerHasKeyUseWarning[currentComponentErrorInfo]=true;warning$1(false,'Each child in an array or iterator should have a unique '+'"key" prop. See https://fb.me/react-warning-keys for '+'more information.');};}var isArray$1=Array.isArray;function coerceRef(returnFiber,current$$1,element){var mixedRef=element.ref;if(mixedRef!==null&&typeof mixedRef!=='function'&&typeof mixedRef!=='object'){{if(returnFiber.mode&StrictMode){var componentName=getComponentName(returnFiber.type)||'Component';if(!didWarnAboutStringRefInStrictMode[componentName]){warningWithoutStack$1(false,'A string ref, "%s", has been found within a strict mode tree. '+'String refs are a source of potential bugs and should be avoided. '+'We recommend using createRef() instead.'+'\n%s'+'\n\nLearn more about using refs safely here:'+'\nhttps://fb.me/react-strict-mode-string-ref',mixedRef,getStackByFiberInDevAndProd(returnFiber));didWarnAboutStringRefInStrictMode[componentName]=true;}}}if(element._owner){var owner=element._owner;var inst=void 0;if(owner){var ownerFiber=owner;!(ownerFiber.tag===ClassComponent||ownerFiber.tag===ClassComponentLazy)?invariant(false,'Stateless function components cannot have refs.'):void 0;inst=ownerFiber.stateNode;}!inst?invariant(false,'Missing owner for string ref %s. This error is likely caused by a bug in React. Please file an issue.',mixedRef):void 0;var stringRef=''+mixedRef;// Check if previous string ref matches new string ref
5320if(current$$1!==null&&current$$1.ref!==null&&typeof current$$1.ref==='function'&&current$$1.ref._stringRef===stringRef){return current$$1.ref;}var ref=function(value){var refs=inst.refs;if(refs===emptyRefsObject){// This is a lazy pooled frozen object, so we need to initialize.
5321refs=inst.refs={};}if(value===null){delete refs[stringRef];}else{refs[stringRef]=value;}};ref._stringRef=stringRef;return ref;}else{!(typeof mixedRef==='string')?invariant(false,'Expected ref to be a function, a string, an object returned by React.createRef(), or null.'):void 0;!element._owner?invariant(false,'Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a functional component\n2. You may be adding a ref to a component that was not created inside a component\'s render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information.',mixedRef):void 0;}}return mixedRef;}function throwOnInvalidObjectType(returnFiber,newChild){if(returnFiber.type!=='textarea'){var addendum='';{addendum=' If you meant to render a collection of children, use an array '+'instead.'+getCurrentFiberStackInDev();}invariant(false,'Objects are not valid as a React child (found: %s).%s',Object.prototype.toString.call(newChild)==='[object Object]'?'object with keys {'+Object.keys(newChild).join(', ')+'}':newChild,addendum);}}function warnOnFunctionType(){var currentComponentErrorInfo='Functions are not valid as a React child. This may happen if '+'you return a Component instead of <Component /> from render. '+'Or maybe you meant to call this function rather than return it.'+getCurrentFiberStackInDev();if(ownerHasFunctionTypeWarning[currentComponentErrorInfo]){return;}ownerHasFunctionTypeWarning[currentComponentErrorInfo]=true;warning$1(false,'Functions are not valid as a React child. This may happen if '+'you return a Component instead of <Component /> from render. '+'Or maybe you meant to call this function rather than return it.');}// This wrapper function exists because I expect to clone the code in each path
5322// to be able to optimize each path individually by branching early. This needs
5323// a compiler or we can do it manually. Helpers that don't need this branching
5324// live outside of this function.
5325function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.
5326return;}// Deletions are added in reversed order so we add it to the front.
5327// At this point, the return fiber's effect list is empty except for
5328// deletions, so we can just append the deletion to the list. The remaining
5329// effects aren't added until the complete phase. Once we implement
5330// resuming, this may not be true.
5331var last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.
5332return null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by
5333// assuming that after the first child we've already added everything.
5334var childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by
5335// keys quickly. Implicit (null) keys get added to this set with their index
5336var existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy
5337// to forget to do before returning it. E.g. for the single child case.
5338var clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.
5339return lastPlacedIndex;}var current$$1=newFiber.alternate;if(current$$1!==null){var oldIndex=current$$1.index;if(oldIndex<lastPlacedIndex){// This is a move.
5340newFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.
5341return oldIndex;}}else{// This is an insertion.
5342newFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a
5343// placement for inserting new children.
5344if(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current$$1,textContent,expirationTime){if(current$$1===null||current$$1.tag!==HostText){// Insert
5345var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update
5346var existing=useFiber(current$$1,textContent,expirationTime);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current$$1,element,expirationTime){if(current$$1!==null&&current$$1.type===element.type){// Move based on index
5347var existing=useFiber(current$$1,element.props,expirationTime);existing.ref=coerceRef(returnFiber,current$$1,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert
5348var created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current$$1,element);created.return=returnFiber;return created;}}function updatePortal(returnFiber,current$$1,portal,expirationTime){if(current$$1===null||current$$1.tag!==HostPortal||current$$1.stateNode.containerInfo!==portal.containerInfo||current$$1.stateNode.implementation!==portal.implementation){// Insert
5349var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update
5350var existing=useFiber(current$$1,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current$$1,fragment,expirationTime,key){if(current$$1===null||current$$1.tag!==Fragment){// Insert
5351var created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update
5352var existing=useFiber(current$$1,fragment,expirationTime);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed
5353// we can continue to replace it without aborting even if it is not a text
5354// node.
5355var created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.
5356var key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed
5357// we can continue to replace it without aborting even if it is not a text
5358// node.
5359if(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor
5360// new node for the key. If both are text nodes, they match.
5361var matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**
5362 * Warns if there is a duplicate or missing key
5363 */function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we
5364// don't have backpointers on fibers. I'm trying to see how far we can get
5365// with that model. If it ends up not being worth the tradeoffs, we can
5366// add it later.
5367// Even with a two ended optimization, we'd want to optimize for the case
5368// where there are few changes and brute force the comparison instead of
5369// going for the Map. It'd like to explore hitting that path first in
5370// forward-only mode and only go for the Map once we notice that we need
5371// lots of look ahead. This doesn't handle reversal as well as two ended
5372// search but that's unusual. Besides, for the two ended optimization to
5373// work on Iterables, we'd need to copy the whole set.
5374// In this first iteration, we'll just live with hitting the bad case
5375// (adding everything to a Map) in for every insert/move.
5376// If you change this code, also update reconcileChildrenIterator() which
5377// uses the same algorithm.
5378{// First, validate keys.
5379var knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's
5380// unfortunate because it triggers the slow path all the time. We need
5381// a better way to communicate whether this was a miss or null,
5382// boolean, undefined, etc.
5383if(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we
5384// need to delete the existing child.
5385deleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.
5386resultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.
5387// I.e. if we had null values before, then we want to defer this
5388// for each null value. However, we also don't want to call updateSlot
5389// with the previous one.
5390previousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.
5391deleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path
5392// since the rest will all be insertions.
5393for(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.
5394resultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.
5395var existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.
5396for(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a
5397// current, that means that we reused the fiber. We need to delete
5398// it from the child list so that we don't add it to the deletion
5399// list.
5400existingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need
5401// to add them to the deletion list.
5402existingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),
5403// but using the iterator instead.
5404var iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// We don't support rendering Generators because it's a mutation.
5405// See https://github.com/facebook/react/issues/12995
5406if(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag
5407newChildrenIterable[Symbol.toStringTag]==='Generator'){!didWarnAboutGenerators?warning$1(false,'Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.'):void 0;didWarnAboutGenerators=true;}// Warn about using Maps as children
5408if(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning$1(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.'):void 0;didWarnAboutMaps=true;}// First, validate keys.
5409// We'll get a different iterator later for the main pass.
5410var _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's
5411// unfortunate because it triggers the slow path all the time. We need
5412// a better way to communicate whether this was a miss or null,
5413// boolean, undefined, etc.
5414if(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we
5415// need to delete the existing child.
5416deleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.
5417resultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.
5418// I.e. if we had null values before, then we want to defer this
5419// for each null value. However, we also don't want to call updateSlot
5420// with the previous one.
5421previousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.
5422deleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path
5423// since the rest will all be insertions.
5424for(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.
5425resultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.
5426var existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.
5427for(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a
5428// current, that means that we reused the fiber. We need to delete
5429// it from the child list so that we don't add it to the deletion
5430// list.
5431existingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need
5432// to add them to the deletion list.
5433existingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a
5434// way to define them.
5435if(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete
5436// the rest.
5437deleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one
5438// and delete the existing ones.
5439deleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to
5440// the first item in the list.
5441if(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(returnFiber,child,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to
5442// the first item in the list.
5443if(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation
5444// itself. They will be added to the side-effect list as we pass through the
5445// children and the parent.
5446function reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.
5447// If the top level item is an array, we treat it as a set of children,
5448// not as a fragment. Nested arrays on the other hand will be treated as
5449// fragment nodes. Recursion happens at the normal flow.
5450// Handle top level unkeyed fragments as if they were arrays.
5451// This leads to an ambiguity between <>{[...]}</> and <>...</>.
5452// We treat the ambiguous cases above the same.
5453var isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types
5454var isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite
5455// component, throw an error. If Fiber return types are disabled,
5456// we already threw above.
5457switch(returnFiber.tag){case ClassComponent:case ClassComponentLazy:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.
5458break;}}}// Intentionally fall through to the next case, which handles both
5459// functions and classes
5460// eslint-disable-next-lined no-fallthrough
5461case FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.
5462return deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}var reconcileChildFibers=ChildReconciler(true);var mountChildFibers=ChildReconciler(false);function cloneChildFibers(current$$1,workInProgress){!(current$$1===null||workInProgress.child===current$$1.child)?invariant(false,'Resuming work not yet implemented.'):void 0;if(workInProgress.child===null){return;}var currentChild=workInProgress.child;var newChild=createWorkInProgress(currentChild,currentChild.pendingProps,currentChild.expirationTime);workInProgress.child=newChild;newChild.return=workInProgress;while(currentChild.sibling!==null){currentChild=currentChild.sibling;newChild=newChild.sibling=createWorkInProgress(currentChild,currentChild.pendingProps,currentChild.expirationTime);newChild.return=workInProgress;}newChild.sibling=null;}// The deepest Fiber on the stack involved in a hydration context.
5463// This may have been an insertion or a hydration.
5464var hydrationParentFiber=null;var nextHydratableInstance=null;var isHydrating=false;function enterHydrationState(fiber){if(!supportsHydration){return false;}var parentInstance=fiber.stateNode.containerInfo;nextHydratableInstance=getFirstHydratableChild(parentInstance);hydrationParentFiber=fiber;isHydrating=true;return true;}function deleteHydratableInstance(returnFiber,instance){{switch(returnFiber.tag){case HostRoot:didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo,instance);break;case HostComponent:didNotHydrateInstance(returnFiber.type,returnFiber.memoizedProps,returnFiber.stateNode,instance);break;}}var childToDelete=createFiberFromHostInstanceForDeletion();childToDelete.stateNode=instance;childToDelete.return=returnFiber;childToDelete.effectTag=Deletion;// This might seem like it belongs on progressedFirstDeletion. However,
5465// these children are not part of the reconciliation list of children.
5466// Even if we abort and rereconcile the children, that will try to hydrate
5467// again and the nodes are still in the host tree so these will be
5468// recreated.
5469if(returnFiber.lastEffect!==null){returnFiber.lastEffect.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}}function insertNonHydratedInstance(returnFiber,fiber){fiber.effectTag|=Placement;{switch(returnFiber.tag){case HostRoot:{var parentContainer=returnFiber.stateNode.containerInfo;switch(fiber.tag){case HostComponent:var type=fiber.type;var props=fiber.pendingProps;didNotFindHydratableContainerInstance(parentContainer,type,props);break;case HostText:var text=fiber.pendingProps;didNotFindHydratableContainerTextInstance(parentContainer,text);break;}break;}case HostComponent:{var parentType=returnFiber.type;var parentProps=returnFiber.memoizedProps;var parentInstance=returnFiber.stateNode;switch(fiber.tag){case HostComponent:var _type=fiber.type;var _props=fiber.pendingProps;didNotFindHydratableInstance(parentType,parentProps,parentInstance,_type,_props);break;case HostText:var _text=fiber.pendingProps;didNotFindHydratableTextInstance(parentType,parentProps,parentInstance,_text);break;}break;}default:return;}}}function tryHydrate(fiber,nextInstance){switch(fiber.tag){case HostComponent:{var type=fiber.type;var props=fiber.pendingProps;var instance=canHydrateInstance(nextInstance,type,props);if(instance!==null){fiber.stateNode=instance;return true;}return false;}case HostText:{var text=fiber.pendingProps;var textInstance=canHydrateTextInstance(nextInstance,text);if(textInstance!==null){fiber.stateNode=textInstance;return true;}return false;}default:return false;}}function tryToClaimNextHydratableInstance(fiber){if(!isHydrating){return;}var nextInstance=nextHydratableInstance;if(!nextInstance){// Nothing to hydrate. Make it an insertion.
5470insertNonHydratedInstance(hydrationParentFiber,fiber);isHydrating=false;hydrationParentFiber=fiber;return;}var firstAttemptedInstance=nextInstance;if(!tryHydrate(fiber,nextInstance)){// If we can't hydrate this instance let's try the next one.
5471// We use this as a heuristic. It's based on intuition and not data so it
5472// might be flawed or unnecessary.
5473nextInstance=getNextHydratableSibling(firstAttemptedInstance);if(!nextInstance||!tryHydrate(fiber,nextInstance)){// Nothing to hydrate. Make it an insertion.
5474insertNonHydratedInstance(hydrationParentFiber,fiber);isHydrating=false;hydrationParentFiber=fiber;return;}// We matched the next one, we'll now assume that the first one was
5475// superfluous and we'll delete it. Since we can't eagerly delete it
5476// we'll have to schedule a deletion. To do that, this node needs a dummy
5477// fiber associated with it.
5478deleteHydratableInstance(hydrationParentFiber,firstAttemptedInstance);}hydrationParentFiber=fiber;nextHydratableInstance=getFirstHydratableChild(nextInstance);}function prepareToHydrateHostInstance(fiber,rootContainerInstance,hostContext){if(!supportsHydration){invariant(false,'Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');}var instance=fiber.stateNode;var updatePayload=hydrateInstance(instance,fiber.type,fiber.memoizedProps,rootContainerInstance,hostContext,fiber);// TODO: Type this specific to this type of component.
5479fiber.updateQueue=updatePayload;// If the update payload indicates that there is a change or if there
5480// is a new ref we mark this as an update.
5481if(updatePayload!==null){return true;}return false;}function prepareToHydrateHostTextInstance(fiber){if(!supportsHydration){invariant(false,'Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');}var textInstance=fiber.stateNode;var textContent=fiber.memoizedProps;var shouldUpdate=hydrateTextInstance(textInstance,textContent,fiber);{if(shouldUpdate){// We assume that prepareToHydrateHostTextInstance is called in a context where the
5482// hydration parent is the parent host component of this host text.
5483var returnFiber=hydrationParentFiber;if(returnFiber!==null){switch(returnFiber.tag){case HostRoot:{var parentContainer=returnFiber.stateNode.containerInfo;didNotMatchHydratedContainerTextInstance(parentContainer,textInstance,textContent);break;}case HostComponent:{var parentType=returnFiber.type;var parentProps=returnFiber.memoizedProps;var parentInstance=returnFiber.stateNode;didNotMatchHydratedTextInstance(parentType,parentProps,parentInstance,textInstance,textContent);break;}}}}}return shouldUpdate;}function popToNextHostParent(fiber){var parent=fiber.return;while(parent!==null&&parent.tag!==HostComponent&&parent.tag!==HostRoot){parent=parent.return;}hydrationParentFiber=parent;}function popHydrationState(fiber){if(!supportsHydration){return false;}if(fiber!==hydrationParentFiber){// We're deeper than the current hydration context, inside an inserted
5484// tree.
5485return false;}if(!isHydrating){// If we're not currently hydrating but we're in a hydration context, then
5486// we were an insertion and now need to pop up reenter hydration of our
5487// siblings.
5488popToNextHostParent(fiber);isHydrating=true;return false;}var type=fiber.type;// If we have any remaining hydratable nodes, we need to delete them now.
5489// We only do this deeper than head and body since they tend to have random
5490// other nodes in them. We also ignore components with pure text content in
5491// side of them.
5492// TODO: Better heuristic.
5493if(fiber.tag!==HostComponent||type!=='head'&&type!=='body'&&!shouldSetTextContent(type,fiber.memoizedProps)){var nextInstance=nextHydratableInstance;while(nextInstance){deleteHydratableInstance(fiber,nextInstance);nextInstance=getNextHydratableSibling(nextInstance);}}popToNextHostParent(fiber);nextHydratableInstance=hydrationParentFiber?getNextHydratableSibling(fiber.stateNode):null;return true;}function resetHydrationState(){if(!supportsHydration){return;}hydrationParentFiber=null;nextHydratableInstance=null;isHydrating=false;}function readLazyComponentType(thenable){var status=thenable._reactStatus;switch(status){case Resolved:var Component=thenable._reactResult;return Component;case Rejected:throw thenable._reactResult;case Pending:throw thenable;default:{thenable._reactStatus=Pending;thenable.then(function(resolvedValue){if(thenable._reactStatus===Pending){thenable._reactStatus=Resolved;if(typeof resolvedValue==='object'&&resolvedValue!==null){// If the `default` property is not empty, assume it's the result
5494// of an async import() and use that. Otherwise, use the
5495// resolved value itself.
5496var defaultExport=resolvedValue.default;resolvedValue=defaultExport!==undefined&&defaultExport!==null?defaultExport:resolvedValue;}else{resolvedValue=resolvedValue;}thenable._reactResult=resolvedValue;}},function(error){if(thenable._reactStatus===Pending){thenable._reactStatus=Rejected;thenable._reactResult=error;}});throw thenable;}}}var ReactCurrentOwner$3=ReactSharedInternals.ReactCurrentOwner;var didWarnAboutBadClass=void 0;var didWarnAboutGetDerivedStateOnFunctionalComponent=void 0;var didWarnAboutStatelessRefs=void 0;{didWarnAboutBadClass={};didWarnAboutGetDerivedStateOnFunctionalComponent={};didWarnAboutStatelessRefs={};}function reconcileChildren(current$$1,workInProgress,nextChildren,renderExpirationTime){if(current$$1===null){// If this is a fresh new component that hasn't been rendered yet, we
5497// won't update its child set by applying minimal side-effects. Instead,
5498// we will add them all to the child before it gets rendered. That means
5499// we can optimize this reconciliation pass by not tracking side-effects.
5500workInProgress.child=mountChildFibers(workInProgress,null,nextChildren,renderExpirationTime);}else{// If the current child is the same as the work in progress, it means that
5501// we haven't yet started any work on these children. Therefore, we use
5502// the clone algorithm to create a copy of all the current children.
5503// If we had any progressed work already, that is invalid at this point so
5504// let's throw it out.
5505workInProgress.child=reconcileChildFibers(workInProgress,current$$1.child,nextChildren,renderExpirationTime);}}function updateForwardRef(current$$1,workInProgress,type,nextProps,renderExpirationTime){var render=type.render;var ref=workInProgress.ref;if(hasContextChanged()){// Normally we can bail out on props equality but if context has changed
5506// we don't do the bailout and we have to reuse existing props instead.
5507}else if(workInProgress.memoizedProps===nextProps){var currentRef=current$$1!==null?current$$1.ref:null;if(ref===currentRef){return bailoutOnAlreadyFinishedWork(current$$1,workInProgress,renderExpirationTime);}}var nextChildren=void 0;{ReactCurrentOwner$3.current=workInProgress;setCurrentPhase('render');nextChildren=render(nextProps,ref);setCurrentPhase(null);}reconcileChildren(current$$1,workInProgress,nextChildren,renderExpirationTime);memoizeProps(workInProgress,nextProps);return workInProgress.child;}function updateFragment(current$$1,workInProgress,renderExpirationTime){var nextChildren=workInProgress.pendingProps;reconcileChildren(current$$1,workInProgress,nextChildren,renderExpirationTime);memoizeProps(workInProgress,nextChildren);return workInProgress.child;}function updateMode(current$$1,workInProgress,renderExpirationTime){var nextChildren=workInProgress.pendingProps.children;reconcileChildren(current$$1,workInProgress,nextChildren,renderExpirationTime);memoizeProps(workInProgress,nextChildren);return workInProgress.child;}function updateProfiler(current$$1,workInProgress,renderExpirationTime){if(enableProfilerTimer){workInProgress.effectTag|=Update;}var nextProps=workInProgress.pendingProps;var nextChildren=nextProps.children;reconcileChildren(current$$1,workInProgress,nextChildren,renderExpirationTime);memoizeProps(workInProgress,nextProps);return workInProgress.child;}function markRef(current$$1,workInProgress){var ref=workInProgress.ref;if(current$$1===null&&ref!==null||current$$1!==null&&current$$1.ref!==ref){// Schedule a Ref effect
5508workInProgress.effectTag|=Ref;}}function updateFunctionalComponent(current$$1,workInProgress,Component,nextProps,renderExpirationTime){var unmaskedContext=getUnmaskedContext(workInProgress,Component,true);var context=getMaskedContext(workInProgress,unmaskedContext);var nextChildren=void 0;prepareToReadContext(workInProgress,renderExpirationTime);{ReactCurrentOwner$3.current=workInProgress;setCurrentPhase('render');nextChildren=Component(nextProps,context);setCurrentPhase(null);}// React DevTools reads this flag.
5509workInProgress.effectTag|=PerformedWork;reconcileChildren(current$$1,workInProgress,nextChildren,renderExpirationTime);memoizeProps(workInProgress,nextProps);return workInProgress.child;}function updateClassComponent(current$$1,workInProgress,Component,nextProps,renderExpirationTime){// Push context providers early to prevent context stack mismatches.
5510// During mounting we don't know the child context yet as the instance doesn't exist.
5511// We will invalidate the child context in finishClassComponent() right after rendering.
5512var hasContext=void 0;if(isContextProvider(Component)){hasContext=true;pushContextProvider(workInProgress);}else{hasContext=false;}prepareToReadContext(workInProgress,renderExpirationTime);var shouldUpdate=void 0;if(current$$1===null){if(workInProgress.stateNode===null){// In the initial pass we might need to construct the instance.
5513constructClassInstance(workInProgress,Component,nextProps,renderExpirationTime);mountClassInstance(workInProgress,Component,nextProps,renderExpirationTime);shouldUpdate=true;}else{// In a resume, we'll already have an instance we can reuse.
5514shouldUpdate=resumeMountClassInstance(workInProgress,Component,nextProps,renderExpirationTime);}}else{shouldUpdate=updateClassInstance(current$$1,workInProgress,Component,nextProps,renderExpirationTime);}return finishClassComponent(current$$1,workInProgress,Component,shouldUpdate,hasContext,renderExpirationTime);}function finishClassComponent(current$$1,workInProgress,Component,shouldUpdate,hasContext,renderExpirationTime){// Refs should update even if shouldComponentUpdate returns false
5515markRef(current$$1,workInProgress);var didCaptureError=(workInProgress.effectTag&DidCapture)!==NoEffect;if(!shouldUpdate&&!didCaptureError){// Context providers should defer to sCU for rendering
5516if(hasContext){invalidateContextProvider(workInProgress,Component,false);}return bailoutOnAlreadyFinishedWork(current$$1,workInProgress,renderExpirationTime);}var instance=workInProgress.stateNode;// Rerender
5517ReactCurrentOwner$3.current=workInProgress;var nextChildren=void 0;if(didCaptureError&&(!enableGetDerivedStateFromCatch||typeof Component.getDerivedStateFromCatch!=='function')){// If we captured an error, but getDerivedStateFrom catch is not defined,
5518// unmount all the children. componentDidCatch will schedule an update to
5519// re-render a fallback. This is temporary until we migrate everyone to
5520// the new API.
5521// TODO: Warn in a future release.
5522nextChildren=null;if(enableProfilerTimer){stopProfilerTimerIfRunning(workInProgress);}}else{{setCurrentPhase('render');nextChildren=instance.render();if(debugRenderPhaseSideEffects||debugRenderPhaseSideEffectsForStrictMode&&workInProgress.mode&StrictMode){instance.render();}setCurrentPhase(null);}}// React DevTools reads this flag.
5523workInProgress.effectTag|=PerformedWork;if(current$$1!==null&&didCaptureError){// If we're recovering from an error, reconcile twice: first to delete
5524// all the existing children.
5525reconcileChildren(current$$1,workInProgress,null,renderExpirationTime);workInProgress.child=null;// Now we can continue reconciling like normal. This has the effect of
5526// remounting all children regardless of whether their their
5527// identity matches.
5528}reconcileChildren(current$$1,workInProgress,nextChildren,renderExpirationTime);// Memoize props and state using the values we just used to render.
5529// TODO: Restructure so we never read values from the instance.
5530memoizeState(workInProgress,instance.state);memoizeProps(workInProgress,instance.props);// The context might have changed so we need to recalculate it.
5531if(hasContext){invalidateContextProvider(workInProgress,Component,true);}return workInProgress.child;}function pushHostRootContext(workInProgress){var root=workInProgress.stateNode;if(root.pendingContext){pushTopLevelContextObject(workInProgress,root.pendingContext,root.pendingContext!==root.context);}else if(root.context){// Should always be set
5532pushTopLevelContextObject(workInProgress,root.context,false);}pushHostContainer(workInProgress,root.containerInfo);}function updateHostRoot(current$$1,workInProgress,renderExpirationTime){pushHostRootContext(workInProgress);var updateQueue=workInProgress.updateQueue;!(updateQueue!==null)?invariant(false,'If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.'):void 0;var nextProps=workInProgress.pendingProps;var prevState=workInProgress.memoizedState;var prevChildren=prevState!==null?prevState.element:null;processUpdateQueue(workInProgress,updateQueue,nextProps,null,renderExpirationTime);var nextState=workInProgress.memoizedState;// Caution: React DevTools currently depends on this property
5533// being called "element".
5534var nextChildren=nextState.element;if(nextChildren===prevChildren){// If the state is the same as before, that's a bailout because we had
5535// no work that expires at this time.
5536resetHydrationState();return bailoutOnAlreadyFinishedWork(current$$1,workInProgress,renderExpirationTime);}var root=workInProgress.stateNode;if((current$$1===null||current$$1.child===null)&&root.hydrate&&enterHydrationState(workInProgress)){// If we don't have any current children this might be the first pass.
5537// We always try to hydrate. If this isn't a hydration pass there won't
5538// be any children to hydrate which is effectively the same thing as
5539// not hydrating.
5540// This is a bit of a hack. We track the host root as a placement to
5541// know that we're currently in a mounting state. That way isMounted
5542// works as expected. We must reset this before committing.
5543// TODO: Delete this when we delete isMounted and findDOMNode.
5544workInProgress.effectTag|=Placement;// Ensure that children mount into this root without tracking
5545// side-effects. This ensures that we don't store Placement effects on
5546// nodes that will be hydrated.
5547workInProgress.child=mountChildFibers(workInProgress,null,nextChildren,renderExpirationTime);}else{// Otherwise reset hydration state in case we aborted and resumed another
5548// root.
5549reconcileChildren(current$$1,workInProgress,nextChildren,renderExpirationTime);resetHydrationState();}return workInProgress.child;}function updateHostComponent(current$$1,workInProgress,renderExpirationTime){pushHostContext(workInProgress);if(current$$1===null){tryToClaimNextHydratableInstance(workInProgress);}var type=workInProgress.type;var nextProps=workInProgress.pendingProps;var prevProps=current$$1!==null?current$$1.memoizedProps:null;var nextChildren=nextProps.children;var isDirectTextChild=shouldSetTextContent(type,nextProps);if(isDirectTextChild){// We special case a direct text child of a host node. This is a common
5550// case. We won't handle it as a reified child. We will instead handle
5551// this in the host environment that also have access to this prop. That
5552// avoids allocating another HostText fiber and traversing it.
5553nextChildren=null;}else if(prevProps!==null&&shouldSetTextContent(type,prevProps)){// If we're switching from a direct text child to a normal child, or to
5554// empty, we need to schedule the text content to be reset.
5555workInProgress.effectTag|=ContentReset;}markRef(current$$1,workInProgress);// Check the host config to see if the children are offscreen/hidden.
5556if(renderExpirationTime!==Never&&workInProgress.mode&AsyncMode&&shouldDeprioritizeSubtree(type,nextProps)){// Schedule this fiber to re-render at offscreen priority. Then bailout.
5557workInProgress.expirationTime=Never;workInProgress.memoizedProps=nextProps;return null;}reconcileChildren(current$$1,workInProgress,nextChildren,renderExpirationTime);memoizeProps(workInProgress,nextProps);return workInProgress.child;}function updateHostText(current$$1,workInProgress){if(current$$1===null){tryToClaimNextHydratableInstance(workInProgress);}var nextProps=workInProgress.pendingProps;memoizeProps(workInProgress,nextProps);// Nothing to do here. This is terminal. We'll do the completion step
5558// immediately after.
5559return null;}function resolveDefaultProps(Component,baseProps){if(Component&&Component.defaultProps){// Resolve default props. Taken from ReactElement
5560var props=_assign({},baseProps);var defaultProps=Component.defaultProps;for(var propName in defaultProps){if(props[propName]===undefined){props[propName]=defaultProps[propName];}}return props;}return baseProps;}function mountIndeterminateComponent(current$$1,workInProgress,Component,renderExpirationTime){!(current$$1===null)?invariant(false,'An indeterminate component should never have mounted. This error is likely caused by a bug in React. Please file an issue.'):void 0;var props=workInProgress.pendingProps;if(typeof Component==='object'&&Component!==null&&typeof Component.then==='function'){Component=readLazyComponentType(Component);var resolvedTag=workInProgress.tag=resolveLazyComponentTag(workInProgress,Component);var resolvedProps=resolveDefaultProps(Component,props);switch(resolvedTag){case FunctionalComponentLazy:{return updateFunctionalComponent(current$$1,workInProgress,Component,resolvedProps,renderExpirationTime);}case ClassComponentLazy:{return updateClassComponent(current$$1,workInProgress,Component,resolvedProps,renderExpirationTime);}case ForwardRefLazy:{return updateForwardRef(current$$1,workInProgress,Component,resolvedProps,renderExpirationTime);}default:{// This message intentionally doesn't metion ForwardRef because the
5561// fact that it's a separate type of work is an implementation detail.
5562invariant(false,'Element type is invalid. Received a promise that resolves to: %s. Promise elements must resolve to a class or function.',Component);}}}var unmaskedContext=getUnmaskedContext(workInProgress,Component,false);var context=getMaskedContext(workInProgress,unmaskedContext);prepareToReadContext(workInProgress,renderExpirationTime);var value=void 0;{if(Component.prototype&&typeof Component.prototype.render==='function'){var componentName=getComponentName(Component)||'Unknown';if(!didWarnAboutBadClass[componentName]){warningWithoutStack$1(false,"The <%s /> component appears to have a render method, but doesn't extend React.Component. "+'This is likely to cause errors. Change %s to extend React.Component instead.',componentName,componentName);didWarnAboutBadClass[componentName]=true;}}if(workInProgress.mode&StrictMode){ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress,null);}ReactCurrentOwner$3.current=workInProgress;value=Component(props,context);}// React DevTools reads this flag.
5563workInProgress.effectTag|=PerformedWork;if(typeof value==='object'&&value!==null&&typeof value.render==='function'&&value.$$typeof===undefined){// Proceed under the assumption that this is a class instance
5564workInProgress.tag=ClassComponent;// Push context providers early to prevent context stack mismatches.
5565// During mounting we don't know the child context yet as the instance doesn't exist.
5566// We will invalidate the child context in finishClassComponent() right after rendering.
5567var hasContext=false;if(isContextProvider(Component)){hasContext=true;pushContextProvider(workInProgress);}else{hasContext=false;}workInProgress.memoizedState=value.state!==null&&value.state!==undefined?value.state:null;var getDerivedStateFromProps=Component.getDerivedStateFromProps;if(typeof getDerivedStateFromProps==='function'){applyDerivedStateFromProps(workInProgress,Component,getDerivedStateFromProps,props);}adoptClassInstance(workInProgress,value);mountClassInstance(workInProgress,Component,props,renderExpirationTime);return finishClassComponent(current$$1,workInProgress,Component,true,hasContext,renderExpirationTime);}else{// Proceed under the assumption that this is a functional component
5568workInProgress.tag=FunctionalComponent;{if(Component){!!Component.childContextTypes?warningWithoutStack$1(false,'%s(...): childContextTypes cannot be defined on a functional component.',Component.displayName||Component.name||'Component'):void 0;}if(workInProgress.ref!==null){var info='';var ownerName=getCurrentFiberOwnerNameInDevOrNull();if(ownerName){info+='\n\nCheck the render method of `'+ownerName+'`.';}var warningKey=ownerName||workInProgress._debugID||'';var debugSource=workInProgress._debugSource;if(debugSource){warningKey=debugSource.fileName+':'+debugSource.lineNumber;}if(!didWarnAboutStatelessRefs[warningKey]){didWarnAboutStatelessRefs[warningKey]=true;warning$1(false,'Stateless function components cannot be given refs. '+'Attempts to access this ref will fail.%s',info);}}if(typeof Component.getDerivedStateFromProps==='function'){var _componentName=getComponentName(Component)||'Unknown';if(!didWarnAboutGetDerivedStateOnFunctionalComponent[_componentName]){warningWithoutStack$1(false,'%s: Stateless functional components do not support getDerivedStateFromProps.',_componentName);didWarnAboutGetDerivedStateOnFunctionalComponent[_componentName]=true;}}}reconcileChildren(current$$1,workInProgress,value,renderExpirationTime);memoizeProps(workInProgress,props);return workInProgress.child;}}function updatePlaceholderComponent(current$$1,workInProgress,renderExpirationTime){if(enableSuspense){var nextProps=workInProgress.pendingProps;// Check if we already attempted to render the normal state. If we did,
5569// and we timed out, render the placeholder state.
5570var alreadyCaptured=(workInProgress.effectTag&DidCapture)===NoEffect;var nextDidTimeout=void 0;if(current$$1!==null&&workInProgress.updateQueue!==null){// We're outside strict mode. Something inside this Placeholder boundary
5571// suspended during the last commit. Switch to the placholder.
5572workInProgress.updateQueue=null;nextDidTimeout=true;// If we're recovering from an error, reconcile twice: first to delete
5573// all the existing children.
5574reconcileChildren(current$$1,workInProgress,null,renderExpirationTime);current$$1.child=null;// Now we can continue reconciling like normal. This has the effect of
5575// remounting all children regardless of whether their their
5576// identity matches.
5577}else{nextDidTimeout=!alreadyCaptured;}if((workInProgress.mode&StrictMode)!==NoEffect){if(nextDidTimeout){// If the timed-out view commits, schedule an update effect to record
5578// the committed time.
5579workInProgress.effectTag|=Update;}else{// The state node points to the time at which placeholder timed out.
5580// We can clear it once we switch back to the normal children.
5581workInProgress.stateNode=null;}}// If the `children` prop is a function, treat it like a render prop.
5582// TODO: This is temporary until we finalize a lower level API.
5583var children=nextProps.children;var nextChildren=void 0;if(typeof children==='function'){nextChildren=children(nextDidTimeout);}else{nextChildren=nextDidTimeout?nextProps.fallback:children;}workInProgress.memoizedProps=nextProps;workInProgress.memoizedState=nextDidTimeout;reconcileChildren(current$$1,workInProgress,nextChildren,renderExpirationTime);return workInProgress.child;}else{return null;}}function updatePortalComponent(current$$1,workInProgress,renderExpirationTime){pushHostContainer(workInProgress,workInProgress.stateNode.containerInfo);var nextChildren=workInProgress.pendingProps;if(current$$1===null){// Portals are special because we don't append the children during mount
5584// but at commit. Therefore we need to track insertions which the normal
5585// flow doesn't do during mount. This doesn't happen at the root because
5586// the root always starts with a "current" with a null child.
5587// TODO: Consider unifying this with how the root works.
5588workInProgress.child=reconcileChildFibers(workInProgress,null,nextChildren,renderExpirationTime);memoizeProps(workInProgress,nextChildren);}else{reconcileChildren(current$$1,workInProgress,nextChildren,renderExpirationTime);memoizeProps(workInProgress,nextChildren);}return workInProgress.child;}function updateContextProvider(current$$1,workInProgress,renderExpirationTime){var providerType=workInProgress.type;var context=providerType._context;var newProps=workInProgress.pendingProps;var oldProps=workInProgress.memoizedProps;var newValue=newProps.value;workInProgress.memoizedProps=newProps;{var providerPropTypes=workInProgress.type.propTypes;if(providerPropTypes){checkPropTypes(providerPropTypes,newProps,'prop','Context.Provider',getCurrentFiberStackInDev);}}pushProvider(workInProgress,newValue);if(oldProps!==null){var oldValue=oldProps.value;var changedBits=calculateChangedBits(context,newValue,oldValue);if(changedBits===0){// No change. Bailout early if children are the same.
5589if(oldProps.children===newProps.children&&!hasContextChanged()){return bailoutOnAlreadyFinishedWork(current$$1,workInProgress,renderExpirationTime);}}else{// The context value changed. Search for matching consumers and schedule
5590// them to update.
5591propagateContextChange(workInProgress,context,changedBits,renderExpirationTime);}}var newChildren=newProps.children;reconcileChildren(current$$1,workInProgress,newChildren,renderExpirationTime);return workInProgress.child;}function updateContextConsumer(current$$1,workInProgress,renderExpirationTime){var context=workInProgress.type;var newProps=workInProgress.pendingProps;var render=newProps.children;{!(typeof render==='function')?warningWithoutStack$1(false,'A context consumer was rendered with multiple children, or a child '+"that isn't a function. A context consumer expects a single child "+'that is a function. If you did pass a function, make sure there '+'is no trailing or leading whitespace around it.'):void 0;}prepareToReadContext(workInProgress,renderExpirationTime);var newValue=readContext(context,newProps.unstable_observedBits);var newChildren=void 0;{ReactCurrentOwner$3.current=workInProgress;setCurrentPhase('render');newChildren=render(newValue);setCurrentPhase(null);}// React DevTools reads this flag.
5592workInProgress.effectTag|=PerformedWork;reconcileChildren(current$$1,workInProgress,newChildren,renderExpirationTime);workInProgress.memoizedProps=newProps;return workInProgress.child;}/*
5593 function reuseChildrenEffects(returnFiber : Fiber, firstChild : Fiber) {
5594 let child = firstChild;
5595 do {
5596 // Ensure that the first and last effect of the parent corresponds
5597 // to the children's first and last effect.
5598 if (!returnFiber.firstEffect) {
5599 returnFiber.firstEffect = child.firstEffect;
5600 }
5601 if (child.lastEffect) {
5602 if (returnFiber.lastEffect) {
5603 returnFiber.lastEffect.nextEffect = child.firstEffect;
5604 }
5605 returnFiber.lastEffect = child.lastEffect;
5606 }
5607 } while (child = child.sibling);
5608 }
5609 */function bailoutOnAlreadyFinishedWork(current$$1,workInProgress,renderExpirationTime){cancelWorkTimer(workInProgress);if(current$$1!==null){// Reuse previous context list
5610workInProgress.firstContextDependency=current$$1.firstContextDependency;}if(enableProfilerTimer){// Don't update "base" render times for bailouts.
5611stopProfilerTimerIfRunning(workInProgress);}// Check if the children have any pending work.
5612var childExpirationTime=workInProgress.childExpirationTime;if(childExpirationTime===NoWork||childExpirationTime>renderExpirationTime){// The children don't have any work either. We can skip them.
5613// TODO: Once we add back resuming, we should check if the children are
5614// a work-in-progress set. If so, we need to transfer their effects.
5615return null;}else{// This fiber doesn't have work, but its subtree does. Clone the child
5616// fibers and continue.
5617cloneChildFibers(current$$1,workInProgress);return workInProgress.child;}}// TODO: Delete memoizeProps/State and move to reconcile/bailout instead
5618function memoizeProps(workInProgress,nextProps){workInProgress.memoizedProps=nextProps;}function memoizeState(workInProgress,nextState){workInProgress.memoizedState=nextState;// Don't reset the updateQueue, in case there are pending updates. Resetting
5619// is handled by processUpdateQueue.
5620}function beginWork(current$$1,workInProgress,renderExpirationTime){var updateExpirationTime=workInProgress.expirationTime;if(!hasContextChanged()&&(updateExpirationTime===NoWork||updateExpirationTime>renderExpirationTime)){// This fiber does not have any pending work. Bailout without entering
5621// the begin phase. There's still some bookkeeping we that needs to be done
5622// in this optimized path, mostly pushing stuff onto the stack.
5623switch(workInProgress.tag){case HostRoot:pushHostRootContext(workInProgress);resetHydrationState();break;case HostComponent:pushHostContext(workInProgress);break;case ClassComponent:{var Component=workInProgress.type;if(isContextProvider(Component)){pushContextProvider(workInProgress);}break;}case ClassComponentLazy:{var thenable=workInProgress.type;var _Component=getResultFromResolvedThenable(thenable);if(isContextProvider(_Component)){pushContextProvider(workInProgress);}break;}case HostPortal:pushHostContainer(workInProgress,workInProgress.stateNode.containerInfo);break;case ContextProvider:{var newValue=workInProgress.memoizedProps.value;pushProvider(workInProgress,newValue);break;}case Profiler:if(enableProfilerTimer){workInProgress.effectTag|=Update;}break;}return bailoutOnAlreadyFinishedWork(current$$1,workInProgress,renderExpirationTime);}// Before entering the begin phase, clear the expiration time.
5624workInProgress.expirationTime=NoWork;switch(workInProgress.tag){case IndeterminateComponent:{var _Component3=workInProgress.type;return mountIndeterminateComponent(current$$1,workInProgress,_Component3,renderExpirationTime);}case FunctionalComponent:{var _Component4=workInProgress.type;var _unresolvedProps=workInProgress.pendingProps;return updateFunctionalComponent(current$$1,workInProgress,_Component4,_unresolvedProps,renderExpirationTime);}case FunctionalComponentLazy:{var _thenable2=workInProgress.type;var _Component5=getResultFromResolvedThenable(_thenable2);var _unresolvedProps2=workInProgress.pendingProps;var _child=updateFunctionalComponent(current$$1,workInProgress,_Component5,resolveDefaultProps(_Component5,_unresolvedProps2),renderExpirationTime);workInProgress.memoizedProps=_unresolvedProps2;return _child;}case ClassComponent:{var _Component6=workInProgress.type;var _unresolvedProps3=workInProgress.pendingProps;return updateClassComponent(current$$1,workInProgress,_Component6,_unresolvedProps3,renderExpirationTime);}case ClassComponentLazy:{var _thenable3=workInProgress.type;var _Component7=getResultFromResolvedThenable(_thenable3);var _unresolvedProps4=workInProgress.pendingProps;var _child2=updateClassComponent(current$$1,workInProgress,_Component7,resolveDefaultProps(_Component7,_unresolvedProps4),renderExpirationTime);workInProgress.memoizedProps=_unresolvedProps4;return _child2;}case HostRoot:return updateHostRoot(current$$1,workInProgress,renderExpirationTime);case HostComponent:return updateHostComponent(current$$1,workInProgress,renderExpirationTime);case HostText:return updateHostText(current$$1,workInProgress);case PlaceholderComponent:return updatePlaceholderComponent(current$$1,workInProgress,renderExpirationTime);case HostPortal:return updatePortalComponent(current$$1,workInProgress,renderExpirationTime);case ForwardRef:{var type=workInProgress.type;return updateForwardRef(current$$1,workInProgress,type,workInProgress.pendingProps,renderExpirationTime);}case ForwardRefLazy:var _thenable=workInProgress.type;var _Component2=getResultFromResolvedThenable(_thenable);var unresolvedProps=workInProgress.pendingProps;var child=updateForwardRef(current$$1,workInProgress,_Component2,resolveDefaultProps(_Component2,unresolvedProps),renderExpirationTime);workInProgress.memoizedProps=unresolvedProps;return child;case Fragment:return updateFragment(current$$1,workInProgress,renderExpirationTime);case Mode:return updateMode(current$$1,workInProgress,renderExpirationTime);case Profiler:return updateProfiler(current$$1,workInProgress,renderExpirationTime);case ContextProvider:return updateContextProvider(current$$1,workInProgress,renderExpirationTime);case ContextConsumer:return updateContextConsumer(current$$1,workInProgress,renderExpirationTime);default:invariant(false,'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');}}function markUpdate(workInProgress){// Tag the fiber with an update effect. This turns a Placement into
5625// a PlacementAndUpdate.
5626workInProgress.effectTag|=Update;}function markRef$1(workInProgress){workInProgress.effectTag|=Ref;}function appendAllChildren(parent,workInProgress){// We only have the top Fiber that was created but we need recurse down its
5627// children to find all the terminal nodes.
5628var node=workInProgress.child;while(node!==null){if(node.tag===HostComponent||node.tag===HostText){appendInitialChild(parent,node.stateNode);}else if(node.tag===HostPortal){// If we have a portal child, then we don't want to traverse
5629// down its children. Instead, we'll get insertions from each child in
5630// the portal directly.
5631}else if(node.child!==null){node.child.return=node;node=node.child;continue;}if(node===workInProgress){return;}while(node.sibling===null){if(node.return===null||node.return===workInProgress){return;}node=node.return;}node.sibling.return=node.return;node=node.sibling;}}var updateHostContainer=void 0;var updateHostComponent$1=void 0;var updateHostText$1=void 0;if(supportsMutation){// Mutation mode
5632updateHostContainer=function(workInProgress){// Noop
5633};updateHostComponent$1=function(current,workInProgress,type,newProps,rootContainerInstance){// If we have an alternate, that means this is an update and we need to
5634// schedule a side-effect to do the updates.
5635var oldProps=current.memoizedProps;if(oldProps===newProps){// In mutation mode, this is sufficient for a bailout because
5636// we won't touch this node even if children changed.
5637return;}// If we get updated because one of our children updated, we don't
5638// have newProps so we'll have to reuse them.
5639// TODO: Split the update API as separate for the props vs. children.
5640// Even better would be if children weren't special cased at all tho.
5641var instance=workInProgress.stateNode;var currentHostContext=getHostContext();// TODO: Experiencing an error where oldProps is null. Suggests a host
5642// component is hitting the resume path. Figure out why. Possibly
5643// related to `hidden`.
5644var updatePayload=prepareUpdate(instance,type,oldProps,newProps,rootContainerInstance,currentHostContext);// TODO: Type this specific to this type of component.
5645workInProgress.updateQueue=updatePayload;// If the update payload indicates that there is a change or if there
5646// is a new ref we mark this as an update. All the work is done in commitWork.
5647if(updatePayload){markUpdate(workInProgress);}};updateHostText$1=function(current,workInProgress,oldText,newText){// If the text differs, mark it as an update. All the work in done in commitWork.
5648if(oldText!==newText){markUpdate(workInProgress);}};}else if(supportsPersistence){// Persistent host tree mode
5649// An unfortunate fork of appendAllChildren because we have two different parent types.
5650var appendAllChildrenToContainer=function(containerChildSet,workInProgress){// We only have the top Fiber that was created but we need recurse down its
5651// children to find all the terminal nodes.
5652var node=workInProgress.child;while(node!==null){if(node.tag===HostComponent||node.tag===HostText){appendChildToContainerChildSet(containerChildSet,node.stateNode);}else if(node.tag===HostPortal){// If we have a portal child, then we don't want to traverse
5653// down its children. Instead, we'll get insertions from each child in
5654// the portal directly.
5655}else if(node.child!==null){node.child.return=node;node=node.child;continue;}if(node===workInProgress){return;}while(node.sibling===null){if(node.return===null||node.return===workInProgress){return;}node=node.return;}node.sibling.return=node.return;node=node.sibling;}};updateHostContainer=function(workInProgress){var portalOrRoot=workInProgress.stateNode;var childrenUnchanged=workInProgress.firstEffect===null;if(childrenUnchanged){// No changes, just reuse the existing instance.
5656}else{var container=portalOrRoot.containerInfo;var newChildSet=createContainerChildSet(container);// If children might have changed, we have to add them all to the set.
5657appendAllChildrenToContainer(newChildSet,workInProgress);portalOrRoot.pendingChildren=newChildSet;// Schedule an update on the container to swap out the container.
5658markUpdate(workInProgress);finalizeContainerChildren(container,newChildSet);}};updateHostComponent$1=function(current,workInProgress,type,newProps,rootContainerInstance){var currentInstance=current.stateNode;var oldProps=current.memoizedProps;// If there are no effects associated with this node, then none of our children had any updates.
5659// This guarantees that we can reuse all of them.
5660var childrenUnchanged=workInProgress.firstEffect===null;if(childrenUnchanged&&oldProps===newProps){// No changes, just reuse the existing instance.
5661// Note that this might release a previous clone.
5662workInProgress.stateNode=currentInstance;return;}var recyclableInstance=workInProgress.stateNode;var currentHostContext=getHostContext();var updatePayload=null;if(oldProps!==newProps){updatePayload=prepareUpdate(recyclableInstance,type,oldProps,newProps,rootContainerInstance,currentHostContext);}if(childrenUnchanged&&updatePayload===null){// No changes, just reuse the existing instance.
5663// Note that this might release a previous clone.
5664workInProgress.stateNode=currentInstance;return;}var newInstance=cloneInstance(currentInstance,updatePayload,type,oldProps,newProps,workInProgress,childrenUnchanged,recyclableInstance);if(finalizeInitialChildren(newInstance,type,newProps,rootContainerInstance,currentHostContext)){markUpdate(workInProgress);}workInProgress.stateNode=newInstance;if(childrenUnchanged){// If there are no other effects in this tree, we need to flag this node as having one.
5665// Even though we're not going to use it for anything.
5666// Otherwise parents won't know that there are new children to propagate upwards.
5667markUpdate(workInProgress);}else{// If children might have changed, we have to add them all to the set.
5668appendAllChildren(newInstance,workInProgress);}};updateHostText$1=function(current,workInProgress,oldText,newText){if(oldText!==newText){// If the text content differs, we'll create a new text instance for it.
5669var rootContainerInstance=getRootHostContainer();var currentHostContext=getHostContext();workInProgress.stateNode=createTextInstance(newText,rootContainerInstance,currentHostContext,workInProgress);// We'll have to mark it as having an effect, even though we won't use the effect for anything.
5670// This lets the parents know that at least one of their children has changed.
5671markUpdate(workInProgress);}};}else{// No host operations
5672updateHostContainer=function(workInProgress){// Noop
5673};updateHostComponent$1=function(current,workInProgress,type,newProps,rootContainerInstance){// Noop
5674};updateHostText$1=function(current,workInProgress,oldText,newText){// Noop
5675};}function completeWork(current,workInProgress,renderExpirationTime){var newProps=workInProgress.pendingProps;switch(workInProgress.tag){case FunctionalComponent:case FunctionalComponentLazy:break;case ClassComponent:{var Component=workInProgress.type;if(isContextProvider(Component)){popContext(workInProgress);}break;}case ClassComponentLazy:{var _Component=getResultFromResolvedThenable(workInProgress.type);if(isContextProvider(_Component)){popContext(workInProgress);}break;}case HostRoot:{popHostContainer(workInProgress);popTopLevelContextObject(workInProgress);var fiberRoot=workInProgress.stateNode;if(fiberRoot.pendingContext){fiberRoot.context=fiberRoot.pendingContext;fiberRoot.pendingContext=null;}if(current===null||current.child===null){// If we hydrated, pop so that we can delete any remaining children
5676// that weren't hydrated.
5677popHydrationState(workInProgress);// This resets the hacky state to fix isMounted before committing.
5678// TODO: Delete this when we delete isMounted and findDOMNode.
5679workInProgress.effectTag&=~Placement;}updateHostContainer(workInProgress);break;}case HostComponent:{popHostContext(workInProgress);var rootContainerInstance=getRootHostContainer();var type=workInProgress.type;if(current!==null&&workInProgress.stateNode!=null){updateHostComponent$1(current,workInProgress,type,newProps,rootContainerInstance);if(current.ref!==workInProgress.ref){markRef$1(workInProgress);}}else{if(!newProps){!(workInProgress.stateNode!==null)?invariant(false,'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.'):void 0;// This can happen when we abort work.
5680break;}var currentHostContext=getHostContext();// TODO: Move createInstance to beginWork and keep it on a context
5681// "stack" as the parent. Then append children as we go in beginWork
5682// or completeWork depending on we want to add then top->down or
5683// bottom->up. Top->down is faster in IE11.
5684var wasHydrated=popHydrationState(workInProgress);if(wasHydrated){// TODO: Move this and createInstance step into the beginPhase
5685// to consolidate.
5686if(prepareToHydrateHostInstance(workInProgress,rootContainerInstance,currentHostContext)){// If changes to the hydrated node needs to be applied at the
5687// commit-phase we mark this as such.
5688markUpdate(workInProgress);}}else{var instance=createInstance(type,newProps,rootContainerInstance,currentHostContext,workInProgress);appendAllChildren(instance,workInProgress);// Certain renderers require commit-time effects for initial mount.
5689// (eg DOM renderer supports auto-focus for certain elements).
5690// Make sure such renderers get scheduled for later work.
5691if(finalizeInitialChildren(instance,type,newProps,rootContainerInstance,currentHostContext)){markUpdate(workInProgress);}workInProgress.stateNode=instance;}if(workInProgress.ref!==null){// If there is a ref on a host node we need to schedule a callback
5692markRef$1(workInProgress);}}break;}case HostText:{var newText=newProps;if(current&&workInProgress.stateNode!=null){var oldText=current.memoizedProps;// If we have an alternate, that means this is an update and we need
5693// to schedule a side-effect to do the updates.
5694updateHostText$1(current,workInProgress,oldText,newText);}else{if(typeof newText!=='string'){!(workInProgress.stateNode!==null)?invariant(false,'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.'):void 0;// This can happen when we abort work.
5695}var _rootContainerInstance=getRootHostContainer();var _currentHostContext=getHostContext();var _wasHydrated=popHydrationState(workInProgress);if(_wasHydrated){if(prepareToHydrateHostTextInstance(workInProgress)){markUpdate(workInProgress);}}else{workInProgress.stateNode=createTextInstance(newText,_rootContainerInstance,_currentHostContext,workInProgress);}}break;}case ForwardRef:case ForwardRefLazy:break;case PlaceholderComponent:break;case Fragment:break;case Mode:break;case Profiler:break;case HostPortal:popHostContainer(workInProgress);updateHostContainer(workInProgress);break;case ContextProvider:// Pop provider fiber
5696popProvider(workInProgress);break;case ContextConsumer:break;// Error cases
5697case IndeterminateComponent:invariant(false,'An indeterminate component should have become determinate before completing. This error is likely caused by a bug in React. Please file an issue.');// eslint-disable-next-line no-fallthrough
5698default:invariant(false,'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');}return null;}// This module is forked in different environments.
5699// By default, return `true` to log errors to the console.
5700// Forks can return `false` if this isn't desirable.
5701function showErrorDialog(capturedError){return true;}function logCapturedError(capturedError){var logError=showErrorDialog(capturedError);// Allow injected showErrorDialog() to prevent default console.error logging.
5702// This enables renderers like ReactNative to better manage redbox behavior.
5703if(logError===false){return;}var error=capturedError.error;{var componentName=capturedError.componentName,componentStack=capturedError.componentStack,errorBoundaryName=capturedError.errorBoundaryName,errorBoundaryFound=capturedError.errorBoundaryFound,willRetry=capturedError.willRetry;// Browsers support silencing uncaught errors by calling
5704// `preventDefault()` in window `error` handler.
5705// We record this information as an expando on the error.
5706if(error!=null&&error._suppressLogging){if(errorBoundaryFound&&willRetry){// The error is recoverable and was silenced.
5707// Ignore it and don't print the stack addendum.
5708// This is handy for testing error boundaries without noise.
5709return;}// The error is fatal. Since the silencing might have
5710// been accidental, we'll surface it anyway.
5711// However, the browser would have silenced the original error
5712// so we'll print it first, and then print the stack addendum.
5713console.error(error);// For a more detailed description of this block, see:
5714// https://github.com/facebook/react/pull/13384
5715}var componentNameMessage=componentName?'The above error occurred in the <'+componentName+'> component:':'The above error occurred in one of your React components:';var errorBoundaryMessage=void 0;// errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow.
5716if(errorBoundaryFound&&errorBoundaryName){if(willRetry){errorBoundaryMessage='React will try to recreate this component tree from scratch '+('using the error boundary you provided, '+errorBoundaryName+'.');}else{errorBoundaryMessage='This error was initially handled by the error boundary '+errorBoundaryName+'.\n'+'Recreating the tree from scratch failed so React will unmount the tree.';}}else{errorBoundaryMessage='Consider adding an error boundary to your tree to customize error handling behavior.\n'+'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.';}var combinedMessage=''+componentNameMessage+componentStack+'\n\n'+(''+errorBoundaryMessage);// In development, we provide our own message with just the component stack.
5717// We don't include the original error message and JS stack because the browser
5718// has already printed it. Even if the application swallows the error, it is still
5719// displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
5720console.error(combinedMessage);}}var emptyObject={};var didWarnAboutUndefinedSnapshotBeforeUpdate=null;{didWarnAboutUndefinedSnapshotBeforeUpdate=new Set();}function logError(boundary,errorInfo){var source=errorInfo.source;var stack=errorInfo.stack;if(stack===null&&source!==null){stack=getStackByFiberInDevAndProd(source);}var capturedError={componentName:source!==null?getComponentName(source.type):null,componentStack:stack!==null?stack:'',error:errorInfo.value,errorBoundary:null,errorBoundaryName:null,errorBoundaryFound:false,willRetry:false};if(boundary!==null&&boundary.tag===ClassComponent){capturedError.errorBoundary=boundary.stateNode;capturedError.errorBoundaryName=getComponentName(boundary.type);capturedError.errorBoundaryFound=true;capturedError.willRetry=true;}try{logCapturedError(capturedError);}catch(e){// This method must not throw, or React internal state will get messed up.
5721// If console.error is overridden, or logCapturedError() shows a dialog that throws,
5722// we want to report this error outside of the normal stack as a last resort.
5723// https://github.com/facebook/react/issues/13188
5724setTimeout(function(){throw e;});}}var callComponentWillUnmountWithTimer=function(current$$1,instance){startPhaseTimer(current$$1,'componentWillUnmount');instance.props=current$$1.memoizedProps;instance.state=current$$1.memoizedState;instance.componentWillUnmount();stopPhaseTimer();};// Capture errors so they don't interrupt unmounting.
5725function safelyCallComponentWillUnmount(current$$1,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current$$1,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current$$1,unmountError);}}}function safelyDetachRef(current$$1){var ref=current$$1.ref;if(ref!==null){if(typeof ref==='function'){{invokeGuardedCallback(null,ref,null,null);if(hasCaughtError()){var refError=clearCaughtError();captureCommitPhaseError(current$$1,refError);}}}else{ref.current=null;}}}function commitBeforeMutationLifeCycles(current$$1,finishedWork){switch(finishedWork.tag){case ClassComponent:case ClassComponentLazy:{if(finishedWork.effectTag&Snapshot){if(current$$1!==null){var prevProps=current$$1.memoizedProps;var prevState=current$$1.memoizedState;startPhaseTimer(finishedWork,'getSnapshotBeforeUpdate');var instance=finishedWork.stateNode;instance.props=finishedWork.memoizedProps;instance.state=finishedWork.memoizedState;var snapshot=instance.getSnapshotBeforeUpdate(prevProps,prevState);{var didWarnSet=didWarnAboutUndefinedSnapshotBeforeUpdate;if(snapshot===undefined&&!didWarnSet.has(finishedWork.type)){didWarnSet.add(finishedWork.type);warningWithoutStack$1(false,'%s.getSnapshotBeforeUpdate(): A snapshot value (or null) '+'must be returned. You have returned undefined.',getComponentName(finishedWork.type));}}instance.__reactInternalSnapshotBeforeUpdate=snapshot;stopPhaseTimer();}}return;}case HostRoot:case HostComponent:case HostText:case HostPortal:// Nothing to do for these component types
5726return;default:{invariant(false,'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');}}}function commitLifeCycles(finishedRoot,current$$1,finishedWork,committedExpirationTime){switch(finishedWork.tag){case ClassComponent:case ClassComponentLazy:{var instance=finishedWork.stateNode;if(finishedWork.effectTag&Update){if(current$$1===null){startPhaseTimer(finishedWork,'componentDidMount');instance.props=finishedWork.memoizedProps;instance.state=finishedWork.memoizedState;instance.componentDidMount();stopPhaseTimer();}else{var prevProps=current$$1.memoizedProps;var prevState=current$$1.memoizedState;startPhaseTimer(finishedWork,'componentDidUpdate');instance.props=finishedWork.memoizedProps;instance.state=finishedWork.memoizedState;instance.componentDidUpdate(prevProps,prevState,instance.__reactInternalSnapshotBeforeUpdate);stopPhaseTimer();}}var updateQueue=finishedWork.updateQueue;if(updateQueue!==null){instance.props=finishedWork.memoizedProps;instance.state=finishedWork.memoizedState;commitUpdateQueue(finishedWork,updateQueue,instance,committedExpirationTime);}return;}case HostRoot:{var _updateQueue=finishedWork.updateQueue;if(_updateQueue!==null){var _instance=null;if(finishedWork.child!==null){switch(finishedWork.child.tag){case HostComponent:_instance=getPublicInstance(finishedWork.child.stateNode);break;case ClassComponent:case ClassComponentLazy:_instance=finishedWork.child.stateNode;break;}}commitUpdateQueue(finishedWork,_updateQueue,_instance,committedExpirationTime);}return;}case HostComponent:{var _instance2=finishedWork.stateNode;// Renderers may schedule work to be done after host components are mounted
5727// (eg DOM renderer may schedule auto-focus for inputs and form controls).
5728// These effects should only be committed when components are first mounted,
5729// aka when there is no current/alternate.
5730if(current$$1===null&&finishedWork.effectTag&Update){var type=finishedWork.type;var props=finishedWork.memoizedProps;commitMount(_instance2,type,props,finishedWork);}return;}case HostText:{// We have no life-cycles associated with text.
5731return;}case HostPortal:{// We have no life-cycles associated with portals.
5732return;}case Profiler:{if(enableProfilerTimer){var onRender=finishedWork.memoizedProps.onRender;if(enableSchedulerTracing){onRender(finishedWork.memoizedProps.id,current$$1===null?'mount':'update',finishedWork.actualDuration,finishedWork.treeBaseDuration,finishedWork.actualStartTime,getCommitTime(),finishedRoot.memoizedInteractions);}else{onRender(finishedWork.memoizedProps.id,current$$1===null?'mount':'update',finishedWork.actualDuration,finishedWork.treeBaseDuration,finishedWork.actualStartTime,getCommitTime());}}return;}case PlaceholderComponent:{if(enableSuspense){if((finishedWork.mode&StrictMode)===NoEffect){// In loose mode, a placeholder times out by scheduling a synchronous
5733// update in the commit phase. Use `updateQueue` field to signal that
5734// the Timeout needs to switch to the placeholder. We don't need an
5735// entire queue. Any non-null value works.
5736// $FlowFixMe - Intentionally using a value other than an UpdateQueue.
5737finishedWork.updateQueue=emptyObject;scheduleWork(finishedWork,Sync);}else{// In strict mode, the Update effect is used to record the time at
5738// which the placeholder timed out.
5739var currentTime=requestCurrentTime();finishedWork.stateNode={timedOutAt:currentTime};}}return;}default:{invariant(false,'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');}}}function commitAttachRef(finishedWork){var ref=finishedWork.ref;if(ref!==null){var instance=finishedWork.stateNode;var instanceToUse=void 0;switch(finishedWork.tag){case HostComponent:instanceToUse=getPublicInstance(instance);break;default:instanceToUse=instance;}if(typeof ref==='function'){ref(instanceToUse);}else{{if(!ref.hasOwnProperty('current')){warningWithoutStack$1(false,'Unexpected ref object provided for %s. '+'Use either a ref-setter function or React.createRef().%s',getComponentName(finishedWork.type),getStackByFiberInDevAndProd(finishedWork));}}ref.current=instanceToUse;}}}function commitDetachRef(current$$1){var currentRef=current$$1.ref;if(currentRef!==null){if(typeof currentRef==='function'){currentRef(null);}else{currentRef.current=null;}}}// User-originating errors (lifecycles and refs) should not interrupt
5740// deletion, so don't let them throw. Host-originating errors should
5741// interrupt deletion, so it's okay
5742function commitUnmount(current$$1){onCommitUnmount(current$$1);switch(current$$1.tag){case ClassComponent:case ClassComponentLazy:{safelyDetachRef(current$$1);var instance=current$$1.stateNode;if(typeof instance.componentWillUnmount==='function'){safelyCallComponentWillUnmount(current$$1,instance);}return;}case HostComponent:{safelyDetachRef(current$$1);return;}case HostPortal:{// TODO: this is recursive.
5743// We are also not using this parent because
5744// the portal will get pushed immediately.
5745if(supportsMutation){unmountHostComponents(current$$1);}else if(supportsPersistence){emptyPortalContainer(current$$1);}return;}}}function commitNestedUnmounts(root){// While we're inside a removed host node we don't want to call
5746// removeChild on the inner nodes because they're removed by the top
5747// call anyway. We also want to call componentWillUnmount on all
5748// composites before this host node is removed from the tree. Therefore
5749var node=root;while(true){commitUnmount(node);// Visit children because they may contain more composite or host nodes.
5750// Skip portals because commitUnmount() currently visits them recursively.
5751if(node.child!==null&&(// If we use mutation we drill down into portals using commitUnmount above.
5752// If we don't use mutation we drill down into portals here instead.
5753!supportsMutation||node.tag!==HostPortal)){node.child.return=node;node=node.child;continue;}if(node===root){return;}while(node.sibling===null){if(node.return===null||node.return===root){return;}node=node.return;}node.sibling.return=node.return;node=node.sibling;}}function detachFiber(current$$1){// Cut off the return pointers to disconnect it from the tree. Ideally, we
5754// should clear the child pointer of the parent alternate to let this
5755// get GC:ed but we don't know which for sure which parent is the current
5756// one so we'll settle for GC:ing the subtree of this child. This child
5757// itself will be GC:ed when the parent updates the next time.
5758current$$1.return=null;current$$1.child=null;if(current$$1.alternate){current$$1.alternate.child=null;current$$1.alternate.return=null;}}function emptyPortalContainer(current$$1){if(!supportsPersistence){return;}var portal=current$$1.stateNode;var containerInfo=portal.containerInfo;var emptyChildSet=createContainerChildSet(containerInfo);replaceContainerChildren(containerInfo,emptyChildSet);}function commitContainer(finishedWork){if(!supportsPersistence){return;}switch(finishedWork.tag){case ClassComponent:case ClassComponentLazy:{return;}case HostComponent:{return;}case HostText:{return;}case HostRoot:case HostPortal:{var portalOrRoot=finishedWork.stateNode;var containerInfo=portalOrRoot.containerInfo,_pendingChildren=portalOrRoot.pendingChildren;replaceContainerChildren(containerInfo,_pendingChildren);return;}default:{invariant(false,'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');}}}function getHostParentFiber(fiber){var parent=fiber.return;while(parent!==null){if(isHostParent(parent)){return parent;}parent=parent.return;}invariant(false,'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.');}function isHostParent(fiber){return fiber.tag===HostComponent||fiber.tag===HostRoot||fiber.tag===HostPortal;}function getHostSibling(fiber){// We're going to search forward into the tree until we find a sibling host
5759// node. Unfortunately, if multiple insertions are done in a row we have to
5760// search past them. This leads to exponential search for the next sibling.
5761var node=fiber;siblings:while(true){// If we didn't find anything, let's try the next sibling.
5762while(node.sibling===null){if(node.return===null||isHostParent(node.return)){// If we pop out of the root or hit the parent the fiber we are the
5763// last sibling.
5764return null;}node=node.return;}node.sibling.return=node.return;node=node.sibling;while(node.tag!==HostComponent&&node.tag!==HostText){// If it is not host node and, we might have a host node inside it.
5765// Try to search down until we find one.
5766if(node.effectTag&Placement){// If we don't have a child, try the siblings instead.
5767continue siblings;}// If we don't have a child, try the siblings instead.
5768// We also skip portals because they are not part of this host tree.
5769if(node.child===null||node.tag===HostPortal){continue siblings;}else{node.child.return=node;node=node.child;}}// Check if this host node is stable or about to be placed.
5770if(!(node.effectTag&Placement)){// Found it!
5771return node.stateNode;}}}function commitPlacement(finishedWork){if(!supportsMutation){return;}// Recursively insert all host nodes into the parent.
5772var parentFiber=getHostParentFiber(finishedWork);// Note: these two variables *must* always be updated together.
5773var parent=void 0;var isContainer=void 0;switch(parentFiber.tag){case HostComponent:parent=parentFiber.stateNode;isContainer=false;break;case HostRoot:parent=parentFiber.stateNode.containerInfo;isContainer=true;break;case HostPortal:parent=parentFiber.stateNode.containerInfo;isContainer=true;break;default:invariant(false,'Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.');}if(parentFiber.effectTag&ContentReset){// Reset the text content of the parent before doing any insertions
5774resetTextContent(parent);// Clear ContentReset from the effect tag
5775parentFiber.effectTag&=~ContentReset;}var before=getHostSibling(finishedWork);// We only have the top Fiber that was inserted but we need recurse down its
5776// children to find all the terminal nodes.
5777var node=finishedWork;while(true){if(node.tag===HostComponent||node.tag===HostText){if(before){if(isContainer){insertInContainerBefore(parent,node.stateNode,before);}else{insertBefore(parent,node.stateNode,before);}}else{if(isContainer){appendChildToContainer(parent,node.stateNode);}else{appendChild(parent,node.stateNode);}}}else if(node.tag===HostPortal){// If the insertion itself is a portal, then we don't want to traverse
5778// down its children. Instead, we'll get insertions from each child in
5779// the portal directly.
5780}else if(node.child!==null){node.child.return=node;node=node.child;continue;}if(node===finishedWork){return;}while(node.sibling===null){if(node.return===null||node.return===finishedWork){return;}node=node.return;}node.sibling.return=node.return;node=node.sibling;}}function unmountHostComponents(current$$1){// We only have the top Fiber that was deleted but we need recurse down its
5781var node=current$$1;// Each iteration, currentParent is populated with node's host parent if not
5782// currentParentIsValid.
5783var currentParentIsValid=false;// Note: these two variables *must* always be updated together.
5784var currentParent=void 0;var currentParentIsContainer=void 0;while(true){if(!currentParentIsValid){var parent=node.return;findParent:while(true){!(parent!==null)?invariant(false,'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.'):void 0;switch(parent.tag){case HostComponent:currentParent=parent.stateNode;currentParentIsContainer=false;break findParent;case HostRoot:currentParent=parent.stateNode.containerInfo;currentParentIsContainer=true;break findParent;case HostPortal:currentParent=parent.stateNode.containerInfo;currentParentIsContainer=true;break findParent;}parent=parent.return;}currentParentIsValid=true;}if(node.tag===HostComponent||node.tag===HostText){commitNestedUnmounts(node);// After all the children have unmounted, it is now safe to remove the
5785// node from the tree.
5786if(currentParentIsContainer){removeChildFromContainer(currentParent,node.stateNode);}else{removeChild(currentParent,node.stateNode);}// Don't visit children because we already visited them.
5787}else if(node.tag===HostPortal){// When we go into a portal, it becomes the parent to remove from.
5788// We will reassign it back when we pop the portal on the way up.
5789currentParent=node.stateNode.containerInfo;currentParentIsContainer=true;// Visit children because portals might contain host components.
5790if(node.child!==null){node.child.return=node;node=node.child;continue;}}else{commitUnmount(node);// Visit children because we may find more host components below.
5791if(node.child!==null){node.child.return=node;node=node.child;continue;}}if(node===current$$1){return;}while(node.sibling===null){if(node.return===null||node.return===current$$1){return;}node=node.return;if(node.tag===HostPortal){// When we go out of the portal, we need to restore the parent.
5792// Since we don't keep a stack of them, we will search for it.
5793currentParentIsValid=false;}}node.sibling.return=node.return;node=node.sibling;}}function commitDeletion(current$$1){if(supportsMutation){// Recursively delete all host nodes from the parent.
5794// Detach refs and call componentWillUnmount() on the whole subtree.
5795unmountHostComponents(current$$1);}else{// Detach refs and call componentWillUnmount() on the whole subtree.
5796commitNestedUnmounts(current$$1);}detachFiber(current$$1);}function commitWork(current$$1,finishedWork){if(!supportsMutation){commitContainer(finishedWork);return;}switch(finishedWork.tag){case ClassComponent:case ClassComponentLazy:{return;}case HostComponent:{var instance=finishedWork.stateNode;if(instance!=null){// Commit the work prepared earlier.
5797var newProps=finishedWork.memoizedProps;// For hydration we reuse the update path but we treat the oldProps
5798// as the newProps. The updatePayload will contain the real change in
5799// this case.
5800var oldProps=current$$1!==null?current$$1.memoizedProps:newProps;var type=finishedWork.type;// TODO: Type the updateQueue to be specific to host components.
5801var updatePayload=finishedWork.updateQueue;finishedWork.updateQueue=null;if(updatePayload!==null){commitUpdate(instance,updatePayload,type,oldProps,newProps,finishedWork);}}return;}case HostText:{!(finishedWork.stateNode!==null)?invariant(false,'This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.'):void 0;var textInstance=finishedWork.stateNode;var newText=finishedWork.memoizedProps;// For hydration we reuse the update path but we treat the oldProps
5802// as the newProps. The updatePayload will contain the real change in
5803// this case.
5804var oldText=current$$1!==null?current$$1.memoizedProps:newText;commitTextUpdate(textInstance,oldText,newText);return;}case HostRoot:{return;}case Profiler:{return;}case PlaceholderComponent:{return;}default:{invariant(false,'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');}}}function commitResetTextContent(current$$1){if(!supportsMutation){return;}resetTextContent(current$$1.stateNode);}function NoopComponent(){return null;}function createRootErrorUpdate(fiber,errorInfo,expirationTime){var update=createUpdate(expirationTime);// Unmount the root by rendering null.
5805update.tag=CaptureUpdate;// Caution: React DevTools currently depends on this property
5806// being called "element".
5807update.payload={element:null};var error=errorInfo.value;update.callback=function(){onUncaughtError(error);logError(fiber,errorInfo);};return update;}function createClassErrorUpdate(fiber,errorInfo,expirationTime){var update=createUpdate(expirationTime);update.tag=CaptureUpdate;var getDerivedStateFromCatch=fiber.type.getDerivedStateFromCatch;if(enableGetDerivedStateFromCatch&&typeof getDerivedStateFromCatch==='function'){var error=errorInfo.value;update.payload=function(){return getDerivedStateFromCatch(error);};}var inst=fiber.stateNode;if(inst!==null&&typeof inst.componentDidCatch==='function'){update.callback=function callback(){if(!enableGetDerivedStateFromCatch||getDerivedStateFromCatch!=='function'){// To preserve the preexisting retry behavior of error boundaries,
5808// we keep track of which ones already failed during this batch.
5809// This gets reset before we yield back to the browser.
5810// TODO: Warn in strict mode if getDerivedStateFromCatch is
5811// not defined.
5812markLegacyErrorBoundaryAsFailed(this);}var error=errorInfo.value;var stack=errorInfo.stack;logError(fiber,errorInfo);this.componentDidCatch(error,{componentStack:stack!==null?stack:''});};}return update;}function throwException(root,returnFiber,sourceFiber,value,renderExpirationTime){// The source fiber did not complete.
5813sourceFiber.effectTag|=Incomplete;// Its effect list is no longer valid.
5814sourceFiber.firstEffect=sourceFiber.lastEffect=null;if(enableSuspense&&value!==null&&typeof value==='object'&&typeof value.then==='function'){// This is a thenable.
5815var thenable=value;// Find the earliest timeout threshold of all the placeholders in the
5816// ancestor path. We could avoid this traversal by storing the thresholds on
5817// the stack, but we choose not to because we only hit this path if we're
5818// IO-bound (i.e. if something suspends). Whereas the stack is used even in
5819// the non-IO- bound case.
5820var _workInProgress=returnFiber;var earliestTimeoutMs=-1;var startTimeMs=-1;do{if(_workInProgress.tag===PlaceholderComponent){var current=_workInProgress.alternate;if(current!==null&&current.memoizedState===true&&current.stateNode!==null){// Reached a placeholder that already timed out. Each timed out
5821// placeholder acts as the root of a new suspense boundary.
5822// Use the time at which the placeholder timed out as the start time
5823// for the current render.
5824var timedOutAt=current.stateNode.timedOutAt;startTimeMs=expirationTimeToMs(timedOutAt);// Do not search any further.
5825break;}var timeoutPropMs=_workInProgress.pendingProps.delayMs;if(typeof timeoutPropMs==='number'){if(timeoutPropMs<=0){earliestTimeoutMs=0;}else if(earliestTimeoutMs===-1||timeoutPropMs<earliestTimeoutMs){earliestTimeoutMs=timeoutPropMs;}}}_workInProgress=_workInProgress.return;}while(_workInProgress!==null);// Schedule the nearest Placeholder to re-render the timed out view.
5826_workInProgress=returnFiber;do{if(_workInProgress.tag===PlaceholderComponent){var didTimeout=_workInProgress.memoizedState;if(!didTimeout){// Found the nearest boundary.
5827// If the boundary is not in async mode, we should not suspend, and
5828// likewise, when the promise resolves, we should ping synchronously.
5829var pingTime=(_workInProgress.mode&AsyncMode)===NoEffect?Sync:renderExpirationTime;// Attach a listener to the promise to "ping" the root and retry.
5830var onResolveOrReject=retrySuspendedRoot.bind(null,root,_workInProgress,pingTime);thenable.then(onResolveOrReject,onResolveOrReject);// If the boundary is outside of strict mode, we should *not* suspend
5831// the commit. Pretend as if the suspended component rendered null and
5832// keep rendering. In the commit phase, we'll schedule a subsequent
5833// synchronous update to re-render the Placeholder.
5834//
5835// Note: It doesn't matter whether the component that suspended was
5836// inside a strict mode tree. If the Placeholder is outside of it, we
5837// should *not* suspend the commit.
5838if((_workInProgress.mode&StrictMode)===NoEffect){_workInProgress.effectTag|=Update;// Unmount the source fiber's children
5839var nextChildren=null;reconcileChildren(sourceFiber.alternate,sourceFiber,nextChildren,renderExpirationTime);sourceFiber.effectTag&=~Incomplete;if(sourceFiber.tag===IndeterminateComponent){// Let's just assume it's a functional component. This fiber will
5840// be unmounted in the immediate next commit, anyway.
5841sourceFiber.tag=FunctionalComponent;}if(sourceFiber.tag===ClassComponent||sourceFiber.tag===ClassComponentLazy){// We're going to commit this fiber even though it didn't
5842// complete. But we shouldn't call any lifecycle methods or
5843// callbacks. Remove all lifecycle effect tags.
5844sourceFiber.effectTag&=~LifecycleEffectMask;if(sourceFiber.alternate===null){// We're about to mount a class component that doesn't have an
5845// instance. Turn this into a dummy functional component instead,
5846// to prevent type errors. This is a bit weird but it's an edge
5847// case and we're about to synchronously delete this
5848// component, anyway.
5849sourceFiber.tag=FunctionalComponent;sourceFiber.type=NoopComponent;}}// Exit without suspending.
5850return;}// Confirmed that the boundary is in a strict mode tree. Continue with
5851// the normal suspend path.
5852var absoluteTimeoutMs=void 0;if(earliestTimeoutMs===-1){// If no explicit threshold is given, default to an abitrarily large
5853// value. The actual size doesn't matter because the threshold for the
5854// whole tree will be clamped to the expiration time.
5855absoluteTimeoutMs=maxSigned31BitInt;}else{if(startTimeMs===-1){// This suspend happened outside of any already timed-out
5856// placeholders. We don't know exactly when the update was scheduled,
5857// but we can infer an approximate start time from the expiration
5858// time. First, find the earliest uncommitted expiration time in the
5859// tree, including work that is suspended. Then subtract the offset
5860// used to compute an async update's expiration time. This will cause
5861// high priority (interactive) work to expire earlier than necessary,
5862// but we can account for this by adjusting for the Just Noticeable
5863// Difference.
5864var earliestExpirationTime=findEarliestOutstandingPriorityLevel(root,renderExpirationTime);var earliestExpirationTimeMs=expirationTimeToMs(earliestExpirationTime);startTimeMs=earliestExpirationTimeMs-LOW_PRIORITY_EXPIRATION;}absoluteTimeoutMs=startTimeMs+earliestTimeoutMs;}// Mark the earliest timeout in the suspended fiber's ancestor path.
5865// After completing the root, we'll take the largest of all the
5866// suspended fiber's timeouts and use it to compute a timeout for the
5867// whole tree.
5868renderDidSuspend(root,absoluteTimeoutMs,renderExpirationTime);_workInProgress.effectTag|=ShouldCapture;_workInProgress.expirationTime=renderExpirationTime;return;}// This boundary already captured during this render. Continue to the
5869// next boundary.
5870}_workInProgress=_workInProgress.return;}while(_workInProgress!==null);// No boundary was found. Fallthrough to error mode.
5871value=new Error('An update was suspended, but no placeholder UI was provided.');}// We didn't find a boundary that could handle this type of exception. Start
5872// over and traverse parent path again, this time treating the exception
5873// as an error.
5874renderDidError();value=createCapturedValue(value,sourceFiber);var workInProgress=returnFiber;do{switch(workInProgress.tag){case HostRoot:{var _errorInfo=value;workInProgress.effectTag|=ShouldCapture;workInProgress.expirationTime=renderExpirationTime;var update=createRootErrorUpdate(workInProgress,_errorInfo,renderExpirationTime);enqueueCapturedUpdate(workInProgress,update);return;}case ClassComponent:case ClassComponentLazy:// Capture and retry
5875var errorInfo=value;var ctor=workInProgress.type;var instance=workInProgress.stateNode;if((workInProgress.effectTag&DidCapture)===NoEffect&&(typeof ctor.getDerivedStateFromCatch==='function'&&enableGetDerivedStateFromCatch||instance!==null&&typeof instance.componentDidCatch==='function'&&!isAlreadyFailedLegacyErrorBoundary(instance))){workInProgress.effectTag|=ShouldCapture;workInProgress.expirationTime=renderExpirationTime;// Schedule the error boundary to re-render using updated state
5876var _update=createClassErrorUpdate(workInProgress,errorInfo,renderExpirationTime);enqueueCapturedUpdate(workInProgress,_update);return;}break;default:break;}workInProgress=workInProgress.return;}while(workInProgress!==null);}function unwindWork(workInProgress,renderExpirationTime){switch(workInProgress.tag){case ClassComponent:{var Component=workInProgress.type;if(isContextProvider(Component)){popContext(workInProgress);}var effectTag=workInProgress.effectTag;if(effectTag&ShouldCapture){workInProgress.effectTag=effectTag&~ShouldCapture|DidCapture;return workInProgress;}return null;}case ClassComponentLazy:{var _Component=workInProgress.type._reactResult;if(isContextProvider(_Component)){popContext(workInProgress);}var _effectTag=workInProgress.effectTag;if(_effectTag&ShouldCapture){workInProgress.effectTag=_effectTag&~ShouldCapture|DidCapture;return workInProgress;}return null;}case HostRoot:{popHostContainer(workInProgress);popTopLevelContextObject(workInProgress);var _effectTag2=workInProgress.effectTag;!((_effectTag2&DidCapture)===NoEffect)?invariant(false,'The root failed to unmount after an error. This is likely a bug in React. Please file an issue.'):void 0;workInProgress.effectTag=_effectTag2&~ShouldCapture|DidCapture;return workInProgress;}case HostComponent:{popHostContext(workInProgress);return null;}case PlaceholderComponent:{var _effectTag3=workInProgress.effectTag;if(_effectTag3&ShouldCapture){workInProgress.effectTag=_effectTag3&~ShouldCapture|DidCapture;return workInProgress;}return null;}case HostPortal:popHostContainer(workInProgress);return null;case ContextProvider:popProvider(workInProgress);return null;default:return null;}}function unwindInterruptedWork(interruptedWork){switch(interruptedWork.tag){case ClassComponent:{var childContextTypes=interruptedWork.type.childContextTypes;if(childContextTypes!==null&&childContextTypes!==undefined){popContext(interruptedWork);}break;}case ClassComponentLazy:{var _childContextTypes=interruptedWork.type._reactResult.childContextTypes;if(_childContextTypes!==null&&_childContextTypes!==undefined){popContext(interruptedWork);}break;}case HostRoot:{popHostContainer(interruptedWork);popTopLevelContextObject(interruptedWork);break;}case HostComponent:{popHostContext(interruptedWork);break;}case HostPortal:popHostContainer(interruptedWork);break;case ContextProvider:popProvider(interruptedWork);break;default:break;}}var Dispatcher={readContext:readContext};var ReactCurrentOwner$2=ReactSharedInternals.ReactCurrentOwner;var didWarnAboutStateTransition=void 0;var didWarnSetStateChildContext=void 0;var warnAboutUpdateOnUnmounted=void 0;var warnAboutInvalidUpdates=void 0;if(enableSchedulerTracing){// Provide explicit error message when production+profiling bundle of e.g. react-dom
5877// is used with production (non-profiling) bundle of schedule/tracing
5878!(tracing.__interactionsRef!=null&&tracing.__interactionsRef.current!=null)?invariant(false,'It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `schedule/tracing` module with `schedule/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling'):void 0;}{didWarnAboutStateTransition=false;didWarnSetStateChildContext=false;var didWarnStateUpdateForUnmountedComponent={};warnAboutUpdateOnUnmounted=function(fiber){// We show the whole stack but dedupe on the top component's name because
5879// the problematic code almost always lies inside that component.
5880var componentName=getComponentName(fiber.type)||'ReactClass';if(didWarnStateUpdateForUnmountedComponent[componentName]){return;}warningWithoutStack$1(false,"Can't call setState (or forceUpdate) on an unmounted component. This "+'is a no-op, but it indicates a memory leak in your application. To '+'fix, cancel all subscriptions and asynchronous tasks in the '+'componentWillUnmount method.%s',getStackByFiberInDevAndProd(fiber));didWarnStateUpdateForUnmountedComponent[componentName]=true;};warnAboutInvalidUpdates=function(instance){switch(phase){case'getChildContext':if(didWarnSetStateChildContext){return;}warningWithoutStack$1(false,'setState(...): Cannot call setState() inside getChildContext()');didWarnSetStateChildContext=true;break;case'render':if(didWarnAboutStateTransition){return;}warningWithoutStack$1(false,'Cannot update during an existing state transition (such as within '+'`render`). Render methods should be a pure function of props and state.');didWarnAboutStateTransition=true;break;}};}// Used to ensure computeUniqueAsyncExpiration is monotonically increasing.
5881var lastUniqueAsyncExpiration=0;// Represents the expiration time that incoming updates should use. (If this
5882// is NoWork, use the default strategy: async updates in async mode, sync
5883// updates in sync mode.)
5884var expirationContext=NoWork;var isWorking=false;// The next work in progress fiber that we're currently working on.
5885var nextUnitOfWork=null;var nextRoot=null;// The time at which we're currently rendering work.
5886var nextRenderExpirationTime=NoWork;var nextLatestAbsoluteTimeoutMs=-1;var nextRenderDidError=false;// The next fiber with an effect that we're currently committing.
5887var nextEffect=null;var isCommitting$1=false;var legacyErrorBoundariesThatAlreadyFailed=null;// Used for performance tracking.
5888var interruptedBy=null;// Do not decrement interaction counts in the event of suspense timeouts.
5889// This would lead to prematurely calling the interaction-complete hook.
5890var suspenseDidTimeout=false;var stashedWorkInProgressProperties=void 0;var replayUnitOfWork=void 0;var isReplayingFailedUnitOfWork=void 0;var originalReplayError=void 0;var rethrowOriginalError=void 0;if(true&&replayFailedUnitOfWorkWithInvokeGuardedCallback){stashedWorkInProgressProperties=null;isReplayingFailedUnitOfWork=false;originalReplayError=null;replayUnitOfWork=function(failedUnitOfWork,thrownValue,isYieldy){if(thrownValue!==null&&typeof thrownValue==='object'&&typeof thrownValue.then==='function'){// Don't replay promises. Treat everything else like an error.
5891// TODO: Need to figure out a different strategy if/when we add
5892// support for catching other types.
5893return;}// Restore the original state of the work-in-progress
5894if(stashedWorkInProgressProperties===null){// This should never happen. Don't throw because this code is DEV-only.
5895warningWithoutStack$1(false,'Could not replay rendering after an error. This is likely a bug in React. '+'Please file an issue.');return;}assignFiberPropertiesInDEV(failedUnitOfWork,stashedWorkInProgressProperties);switch(failedUnitOfWork.tag){case HostRoot:popHostContainer(failedUnitOfWork);popTopLevelContextObject(failedUnitOfWork);break;case HostComponent:popHostContext(failedUnitOfWork);break;case ClassComponent:{var Component=failedUnitOfWork.type;if(isContextProvider(Component)){popContext(failedUnitOfWork);}break;}case ClassComponentLazy:{var _Component=getResultFromResolvedThenable(failedUnitOfWork.type);if(isContextProvider(_Component)){popContext(failedUnitOfWork);}break;}case HostPortal:popHostContainer(failedUnitOfWork);break;case ContextProvider:popProvider(failedUnitOfWork);break;}// Replay the begin phase.
5896isReplayingFailedUnitOfWork=true;originalReplayError=thrownValue;invokeGuardedCallback(null,workLoop,null,isYieldy);isReplayingFailedUnitOfWork=false;originalReplayError=null;if(hasCaughtError()){var replayError=clearCaughtError();if(replayError!=null&&thrownValue!=null){try{// Reading the expando property is intentionally
5897// inside `try` because it might be a getter or Proxy.
5898if(replayError._suppressLogging){// Also suppress logging for the original error.
5899thrownValue._suppressLogging=true;}}catch(inner){// Ignore.
5900}}}else{// If the begin phase did not fail the second time, set this pointer
5901// back to the original value.
5902nextUnitOfWork=failedUnitOfWork;}};rethrowOriginalError=function(){throw originalReplayError;};}function resetStack(){if(nextUnitOfWork!==null){var interruptedWork=nextUnitOfWork.return;while(interruptedWork!==null){unwindInterruptedWork(interruptedWork);interruptedWork=interruptedWork.return;}}{ReactStrictModeWarnings.discardPendingWarnings();checkThatStackIsEmpty();}nextRoot=null;nextRenderExpirationTime=NoWork;nextLatestAbsoluteTimeoutMs=-1;nextRenderDidError=false;nextUnitOfWork=null;}function commitAllHostEffects(){while(nextEffect!==null){{setCurrentFiber(nextEffect);}recordEffect();var effectTag=nextEffect.effectTag;if(effectTag&ContentReset){commitResetTextContent(nextEffect);}if(effectTag&Ref){var current$$1=nextEffect.alternate;if(current$$1!==null){commitDetachRef(current$$1);}}// The following switch statement is only concerned about placement,
5903// updates, and deletions. To avoid needing to add a case for every
5904// possible bitmap value, we remove the secondary effects from the
5905// effect tag and switch on that value.
5906var primaryEffectTag=effectTag&(Placement|Update|Deletion);switch(primaryEffectTag){case Placement:{commitPlacement(nextEffect);// Clear the "placement" from effect tag so that we know that this is inserted, before
5907// any life-cycles like componentDidMount gets called.
5908// TODO: findDOMNode doesn't rely on this any more but isMounted
5909// does and isMounted is deprecated anyway so we should be able
5910// to kill this.
5911nextEffect.effectTag&=~Placement;break;}case PlacementAndUpdate:{// Placement
5912commitPlacement(nextEffect);// Clear the "placement" from effect tag so that we know that this is inserted, before
5913// any life-cycles like componentDidMount gets called.
5914nextEffect.effectTag&=~Placement;// Update
5915var _current=nextEffect.alternate;commitWork(_current,nextEffect);break;}case Update:{var _current2=nextEffect.alternate;commitWork(_current2,nextEffect);break;}case Deletion:{commitDeletion(nextEffect);break;}}nextEffect=nextEffect.nextEffect;}{resetCurrentFiber();}}function commitBeforeMutationLifecycles(){while(nextEffect!==null){{setCurrentFiber(nextEffect);}var effectTag=nextEffect.effectTag;if(effectTag&Snapshot){recordEffect();var current$$1=nextEffect.alternate;commitBeforeMutationLifeCycles(current$$1,nextEffect);}// Don't cleanup effects yet;
5916// This will be done by commitAllLifeCycles()
5917nextEffect=nextEffect.nextEffect;}{resetCurrentFiber();}}function commitAllLifeCycles(finishedRoot,committedExpirationTime){{ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();if(warnAboutDeprecatedLifecycles){ReactStrictModeWarnings.flushPendingDeprecationWarnings();}if(warnAboutLegacyContextAPI){ReactStrictModeWarnings.flushLegacyContextWarning();}}while(nextEffect!==null){var effectTag=nextEffect.effectTag;if(effectTag&(Update|Callback)){recordEffect();var current$$1=nextEffect.alternate;commitLifeCycles(finishedRoot,current$$1,nextEffect,committedExpirationTime);}if(effectTag&Ref){recordEffect();commitAttachRef(nextEffect);}var next=nextEffect.nextEffect;// Ensure that we clean these up so that we don't accidentally keep them.
5918// I'm not actually sure this matters because we can't reset firstEffect
5919// and lastEffect since they're on every node, not just the effectful
5920// ones. So we have to clean everything as we reuse nodes anyway.
5921nextEffect.nextEffect=null;// Ensure that we reset the effectTag here so that we can rely on effect
5922// tags to reason about the current life-cycle.
5923nextEffect=next;}}function isAlreadyFailedLegacyErrorBoundary(instance){return legacyErrorBoundariesThatAlreadyFailed!==null&&legacyErrorBoundariesThatAlreadyFailed.has(instance);}function markLegacyErrorBoundaryAsFailed(instance){if(legacyErrorBoundariesThatAlreadyFailed===null){legacyErrorBoundariesThatAlreadyFailed=new Set([instance]);}else{legacyErrorBoundariesThatAlreadyFailed.add(instance);}}function commitRoot(root,finishedWork){isWorking=true;isCommitting$1=true;startCommitTimer();!(root.current!==finishedWork)?invariant(false,'Cannot commit the same tree as before. This is probably a bug related to the return field. This error is likely caused by a bug in React. Please file an issue.'):void 0;var committedExpirationTime=root.pendingCommitExpirationTime;!(committedExpirationTime!==NoWork)?invariant(false,'Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.'):void 0;root.pendingCommitExpirationTime=NoWork;// Update the pending priority levels to account for the work that we are
5924// about to commit. This needs to happen before calling the lifecycles, since
5925// they may schedule additional updates.
5926var updateExpirationTimeBeforeCommit=finishedWork.expirationTime;var childExpirationTimeBeforeCommit=finishedWork.childExpirationTime;var earliestRemainingTimeBeforeCommit=updateExpirationTimeBeforeCommit===NoWork||childExpirationTimeBeforeCommit!==NoWork&&childExpirationTimeBeforeCommit<updateExpirationTimeBeforeCommit?childExpirationTimeBeforeCommit:updateExpirationTimeBeforeCommit;markCommittedPriorityLevels(root,earliestRemainingTimeBeforeCommit);var prevInteractions=null;var committedInteractions=enableSchedulerTracing?[]:null;if(enableSchedulerTracing){// Restore any pending interactions at this point,
5927// So that cascading work triggered during the render phase will be accounted for.
5928prevInteractions=tracing.__interactionsRef.current;tracing.__interactionsRef.current=root.memoizedInteractions;// We are potentially finished with the current batch of interactions.
5929// So we should clear them out of the pending interaction map.
5930// We do this at the start of commit in case cascading work is scheduled by commit phase lifecycles.
5931// In that event, interaction data may be added back into the pending map for a future commit.
5932// We also store the interactions we are about to commit so that we can notify subscribers after we're done.
5933// These are stored as an Array rather than a Set,
5934// Because the same interaction may be pending for multiple expiration times,
5935// In which case it's important that we decrement the count the right number of times after finishing.
5936root.pendingInteractionMap.forEach(function(scheduledInteractions,scheduledExpirationTime){if(scheduledExpirationTime<=committedExpirationTime){committedInteractions.push.apply(committedInteractions,Array.from(scheduledInteractions));root.pendingInteractionMap.delete(scheduledExpirationTime);}});}// Reset this to null before calling lifecycles
5937ReactCurrentOwner$2.current=null;var firstEffect=void 0;if(finishedWork.effectTag>PerformedWork){// A fiber's effect list consists only of its children, not itself. So if
5938// the root has an effect, we need to add it to the end of the list. The
5939// resulting list is the set that would belong to the root's parent, if
5940// it had one; that is, all the effects in the tree including the root.
5941if(finishedWork.lastEffect!==null){finishedWork.lastEffect.nextEffect=finishedWork;firstEffect=finishedWork.firstEffect;}else{firstEffect=finishedWork;}}else{// There is no effect on the root.
5942firstEffect=finishedWork.firstEffect;}prepareForCommit(root.containerInfo);// Invoke instances of getSnapshotBeforeUpdate before mutation.
5943nextEffect=firstEffect;startCommitSnapshotEffectsTimer();while(nextEffect!==null){var didError=false;var error=void 0;{invokeGuardedCallback(null,commitBeforeMutationLifecycles,null);if(hasCaughtError()){didError=true;error=clearCaughtError();}}if(didError){!(nextEffect!==null)?invariant(false,'Should have next effect. This error is likely caused by a bug in React. Please file an issue.'):void 0;captureCommitPhaseError(nextEffect,error);// Clean-up
5944if(nextEffect!==null){nextEffect=nextEffect.nextEffect;}}}stopCommitSnapshotEffectsTimer();if(enableProfilerTimer){// Mark the current commit time to be shared by all Profilers in this batch.
5945// This enables them to be grouped later.
5946recordCommitTime();}// Commit all the side-effects within a tree. We'll do this in two passes.
5947// The first pass performs all the host insertions, updates, deletions and
5948// ref unmounts.
5949nextEffect=firstEffect;startCommitHostEffectsTimer();while(nextEffect!==null){var _didError=false;var _error=void 0;{invokeGuardedCallback(null,commitAllHostEffects,null);if(hasCaughtError()){_didError=true;_error=clearCaughtError();}}if(_didError){!(nextEffect!==null)?invariant(false,'Should have next effect. This error is likely caused by a bug in React. Please file an issue.'):void 0;captureCommitPhaseError(nextEffect,_error);// Clean-up
5950if(nextEffect!==null){nextEffect=nextEffect.nextEffect;}}}stopCommitHostEffectsTimer();resetAfterCommit(root.containerInfo);// The work-in-progress tree is now the current tree. This must come after
5951// the first pass of the commit phase, so that the previous tree is still
5952// current during componentWillUnmount, but before the second pass, so that
5953// the finished work is current during componentDidMount/Update.
5954root.current=finishedWork;// In the second pass we'll perform all life-cycles and ref callbacks.
5955// Life-cycles happen as a separate pass so that all placements, updates,
5956// and deletions in the entire tree have already been invoked.
5957// This pass also triggers any renderer-specific initial effects.
5958nextEffect=firstEffect;startCommitLifeCyclesTimer();while(nextEffect!==null){var _didError2=false;var _error2=void 0;{invokeGuardedCallback(null,commitAllLifeCycles,null,root,committedExpirationTime);if(hasCaughtError()){_didError2=true;_error2=clearCaughtError();}}if(_didError2){!(nextEffect!==null)?invariant(false,'Should have next effect. This error is likely caused by a bug in React. Please file an issue.'):void 0;captureCommitPhaseError(nextEffect,_error2);if(nextEffect!==null){nextEffect=nextEffect.nextEffect;}}}isCommitting$1=false;isWorking=false;stopCommitLifeCyclesTimer();stopCommitTimer();onCommitRoot(finishedWork.stateNode);if(true&&ReactFiberInstrumentation_1.debugTool){ReactFiberInstrumentation_1.debugTool.onCommitWork(finishedWork);}var updateExpirationTimeAfterCommit=finishedWork.expirationTime;var childExpirationTimeAfterCommit=finishedWork.childExpirationTime;var earliestRemainingTimeAfterCommit=updateExpirationTimeAfterCommit===NoWork||childExpirationTimeAfterCommit!==NoWork&&childExpirationTimeAfterCommit<updateExpirationTimeAfterCommit?childExpirationTimeAfterCommit:updateExpirationTimeAfterCommit;if(earliestRemainingTimeAfterCommit===NoWork){// If there's no remaining work, we can clear the set of already failed
5959// error boundaries.
5960legacyErrorBoundariesThatAlreadyFailed=null;}onCommit(root,earliestRemainingTimeAfterCommit);if(enableSchedulerTracing){tracing.__interactionsRef.current=prevInteractions;var subscriber=void 0;try{subscriber=tracing.__subscriberRef.current;if(subscriber!==null&&root.memoizedInteractions.size>0){var threadID=computeThreadID(committedExpirationTime,root.interactionThreadID);subscriber.onWorkStopped(root.memoizedInteractions,threadID);}}catch(error){// It's not safe for commitRoot() to throw.
5961// Store the error for now and we'll re-throw in finishRendering().
5962if(!hasUnhandledError){hasUnhandledError=true;unhandledError=error;}}finally{// Don't update interaction counts if we're frozen due to suspense.
5963// In this case, we can skip the completed-work check entirely.
5964if(!suspenseDidTimeout){// Now that we're done, check the completed batch of interactions.
5965// If no more work is outstanding for a given interaction,
5966// We need to notify the subscribers that it's finished.
5967committedInteractions.forEach(function(interaction){interaction.__count--;if(subscriber!==null&&interaction.__count===0){try{subscriber.onInteractionScheduledWorkCompleted(interaction);}catch(error){// It's not safe for commitRoot() to throw.
5968// Store the error for now and we'll re-throw in finishRendering().
5969if(!hasUnhandledError){hasUnhandledError=true;unhandledError=error;}}}});}}}}function resetChildExpirationTime(workInProgress,renderTime){if(renderTime!==Never&&workInProgress.childExpirationTime===Never){// The children of this component are hidden. Don't bubble their
5970// expiration times.
5971return;}var newChildExpirationTime=NoWork;// Bubble up the earliest expiration time.
5972if(enableProfilerTimer&&workInProgress.mode&ProfileMode){// We're in profiling mode.
5973// Let's use this same traversal to update the render durations.
5974var actualDuration=workInProgress.actualDuration;var treeBaseDuration=workInProgress.selfBaseDuration;// When a fiber is cloned, its actualDuration is reset to 0.
5975// This value will only be updated if work is done on the fiber (i.e. it doesn't bailout).
5976// When work is done, it should bubble to the parent's actualDuration.
5977// If the fiber has not been cloned though, (meaning no work was done),
5978// Then this value will reflect the amount of time spent working on a previous render.
5979// In that case it should not bubble.
5980// We determine whether it was cloned by comparing the child pointer.
5981var shouldBubbleActualDurations=workInProgress.alternate===null||workInProgress.child!==workInProgress.alternate.child;var child=workInProgress.child;while(child!==null){var childUpdateExpirationTime=child.expirationTime;var childChildExpirationTime=child.childExpirationTime;if(newChildExpirationTime===NoWork||childUpdateExpirationTime!==NoWork&&childUpdateExpirationTime<newChildExpirationTime){newChildExpirationTime=childUpdateExpirationTime;}if(newChildExpirationTime===NoWork||childChildExpirationTime!==NoWork&&childChildExpirationTime<newChildExpirationTime){newChildExpirationTime=childChildExpirationTime;}if(shouldBubbleActualDurations){actualDuration+=child.actualDuration;}treeBaseDuration+=child.treeBaseDuration;child=child.sibling;}workInProgress.actualDuration=actualDuration;workInProgress.treeBaseDuration=treeBaseDuration;}else{var _child=workInProgress.child;while(_child!==null){var _childUpdateExpirationTime=_child.expirationTime;var _childChildExpirationTime=_child.childExpirationTime;if(newChildExpirationTime===NoWork||_childUpdateExpirationTime!==NoWork&&_childUpdateExpirationTime<newChildExpirationTime){newChildExpirationTime=_childUpdateExpirationTime;}if(newChildExpirationTime===NoWork||_childChildExpirationTime!==NoWork&&_childChildExpirationTime<newChildExpirationTime){newChildExpirationTime=_childChildExpirationTime;}_child=_child.sibling;}}workInProgress.childExpirationTime=newChildExpirationTime;}function completeUnitOfWork(workInProgress){// Attempt to complete the current unit of work, then move to the
5982// next sibling. If there are no more siblings, return to the
5983// parent fiber.
5984while(true){// The current, flushed, state of this fiber is the alternate.
5985// Ideally nothing should rely on this, but relying on it here
5986// means that we don't need an additional field on the work in
5987// progress.
5988var current$$1=workInProgress.alternate;{setCurrentFiber(workInProgress);}var returnFiber=workInProgress.return;var siblingFiber=workInProgress.sibling;if((workInProgress.effectTag&Incomplete)===NoEffect){// This fiber completed.
5989if(enableProfilerTimer){if(workInProgress.mode&ProfileMode){startProfilerTimer(workInProgress);}nextUnitOfWork=completeWork(current$$1,workInProgress,nextRenderExpirationTime);if(workInProgress.mode&ProfileMode){// Update render duration assuming we didn't error.
5990stopProfilerTimerIfRunningAndRecordDelta(workInProgress,false);}}else{nextUnitOfWork=completeWork(current$$1,workInProgress,nextRenderExpirationTime);}var next=nextUnitOfWork;stopWorkTimer(workInProgress);resetChildExpirationTime(workInProgress,nextRenderExpirationTime);{resetCurrentFiber();}if(next!==null){stopWorkTimer(workInProgress);if(true&&ReactFiberInstrumentation_1.debugTool){ReactFiberInstrumentation_1.debugTool.onCompleteWork(workInProgress);}// If completing this work spawned new work, do that next. We'll come
5991// back here again.
5992return next;}if(returnFiber!==null&&// Do not append effects to parents if a sibling failed to complete
5993(returnFiber.effectTag&Incomplete)===NoEffect){// Append all the effects of the subtree and this fiber onto the effect
5994// list of the parent. The completion order of the children affects the
5995// side-effect order.
5996if(returnFiber.firstEffect===null){returnFiber.firstEffect=workInProgress.firstEffect;}if(workInProgress.lastEffect!==null){if(returnFiber.lastEffect!==null){returnFiber.lastEffect.nextEffect=workInProgress.firstEffect;}returnFiber.lastEffect=workInProgress.lastEffect;}// If this fiber had side-effects, we append it AFTER the children's
5997// side-effects. We can perform certain side-effects earlier if
5998// needed, by doing multiple passes over the effect list. We don't want
5999// to schedule our own side-effect on our own list because if end up
6000// reusing children we'll schedule this effect onto itself since we're
6001// at the end.
6002var effectTag=workInProgress.effectTag;// Skip both NoWork and PerformedWork tags when creating the effect list.
6003// PerformedWork effect is read by React DevTools but shouldn't be committed.
6004if(effectTag>PerformedWork){if(returnFiber.lastEffect!==null){returnFiber.lastEffect.nextEffect=workInProgress;}else{returnFiber.firstEffect=workInProgress;}returnFiber.lastEffect=workInProgress;}}if(true&&ReactFiberInstrumentation_1.debugTool){ReactFiberInstrumentation_1.debugTool.onCompleteWork(workInProgress);}if(siblingFiber!==null){// If there is more work to do in this returnFiber, do that next.
6005return siblingFiber;}else if(returnFiber!==null){// If there's no more work in this returnFiber. Complete the returnFiber.
6006workInProgress=returnFiber;continue;}else{// We've reached the root.
6007return null;}}else{if(workInProgress.mode&ProfileMode){// Record the render duration for the fiber that errored.
6008stopProfilerTimerIfRunningAndRecordDelta(workInProgress,false);}// This fiber did not complete because something threw. Pop values off
6009// the stack without entering the complete phase. If this is a boundary,
6010// capture values if possible.
6011var _next=unwindWork(workInProgress,nextRenderExpirationTime);// Because this fiber did not complete, don't reset its expiration time.
6012if(workInProgress.effectTag&DidCapture){// Restarting an error boundary
6013stopFailedWorkTimer(workInProgress);}else{stopWorkTimer(workInProgress);}{resetCurrentFiber();}if(_next!==null){stopWorkTimer(workInProgress);if(true&&ReactFiberInstrumentation_1.debugTool){ReactFiberInstrumentation_1.debugTool.onCompleteWork(workInProgress);}if(enableProfilerTimer){// Include the time spent working on failed children before continuing.
6014if(_next.mode&ProfileMode){var actualDuration=_next.actualDuration;var child=_next.child;while(child!==null){actualDuration+=child.actualDuration;child=child.sibling;}_next.actualDuration=actualDuration;}}// If completing this work spawned new work, do that next. We'll come
6015// back here again.
6016// Since we're restarting, remove anything that is not a host effect
6017// from the effect tag.
6018_next.effectTag&=HostEffectMask;return _next;}if(returnFiber!==null){// Mark the parent fiber as incomplete and clear its effect list.
6019returnFiber.firstEffect=returnFiber.lastEffect=null;returnFiber.effectTag|=Incomplete;}if(true&&ReactFiberInstrumentation_1.debugTool){ReactFiberInstrumentation_1.debugTool.onCompleteWork(workInProgress);}if(siblingFiber!==null){// If there is more work to do in this returnFiber, do that next.
6020return siblingFiber;}else if(returnFiber!==null){// If there's no more work in this returnFiber. Complete the returnFiber.
6021workInProgress=returnFiber;continue;}else{return null;}}}// Without this explicit null return Flow complains of invalid return type
6022// TODO Remove the above while(true) loop
6023// eslint-disable-next-line no-unreachable
6024return null;}function performUnitOfWork(workInProgress){// The current, flushed, state of this fiber is the alternate.
6025// Ideally nothing should rely on this, but relying on it here
6026// means that we don't need an additional field on the work in
6027// progress.
6028var current$$1=workInProgress.alternate;// See if beginning this work spawns more work.
6029startWorkTimer(workInProgress);{setCurrentFiber(workInProgress);}if(true&&replayFailedUnitOfWorkWithInvokeGuardedCallback){stashedWorkInProgressProperties=assignFiberPropertiesInDEV(stashedWorkInProgressProperties,workInProgress);}var next=void 0;if(enableProfilerTimer){if(workInProgress.mode&ProfileMode){startProfilerTimer(workInProgress);}next=beginWork(current$$1,workInProgress,nextRenderExpirationTime);if(workInProgress.mode&ProfileMode){// Record the render duration assuming we didn't bailout (or error).
6030stopProfilerTimerIfRunningAndRecordDelta(workInProgress,true);}}else{next=beginWork(current$$1,workInProgress,nextRenderExpirationTime);}{resetCurrentFiber();if(isReplayingFailedUnitOfWork){// Currently replaying a failed unit of work. This should be unreachable,
6031// because the render phase is meant to be idempotent, and it should
6032// have thrown again. Since it didn't, rethrow the original error, so
6033// React's internal stack is not misaligned.
6034rethrowOriginalError();}}if(true&&ReactFiberInstrumentation_1.debugTool){ReactFiberInstrumentation_1.debugTool.onBeginWork(workInProgress);}if(next===null){// If this doesn't spawn new work, complete the current work.
6035next=completeUnitOfWork(workInProgress);}ReactCurrentOwner$2.current=null;return next;}function workLoop(isYieldy){if(!isYieldy){// Flush work without yielding
6036while(nextUnitOfWork!==null){nextUnitOfWork=performUnitOfWork(nextUnitOfWork);}}else{// Flush asynchronous work until the deadline runs out of time.
6037while(nextUnitOfWork!==null&&!shouldYield()){nextUnitOfWork=performUnitOfWork(nextUnitOfWork);}}}function renderRoot(root,isYieldy,isExpired){!!isWorking?invariant(false,'renderRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.'):void 0;isWorking=true;ReactCurrentOwner$2.currentDispatcher=Dispatcher;var expirationTime=root.nextExpirationTimeToWorkOn;var prevInteractions=null;if(enableSchedulerTracing){// We're about to start new traced work.
6038// Restore pending interactions so cascading work triggered during the render phase will be accounted for.
6039prevInteractions=tracing.__interactionsRef.current;tracing.__interactionsRef.current=root.memoizedInteractions;}// Check if we're starting from a fresh stack, or if we're resuming from
6040// previously yielded work.
6041if(expirationTime!==nextRenderExpirationTime||root!==nextRoot||nextUnitOfWork===null){// Reset the stack and start working from the root.
6042resetStack();nextRoot=root;nextRenderExpirationTime=expirationTime;nextUnitOfWork=createWorkInProgress(nextRoot.current,null,nextRenderExpirationTime);root.pendingCommitExpirationTime=NoWork;if(enableSchedulerTracing){// Determine which interactions this batch of work currently includes,
6043// So that we can accurately attribute time spent working on it,
6044var interactions=new Set();root.pendingInteractionMap.forEach(function(scheduledInteractions,scheduledExpirationTime){if(scheduledExpirationTime<=expirationTime){scheduledInteractions.forEach(function(interaction){return interactions.add(interaction);});}});// Store the current set of interactions on the FiberRoot for a few reasons:
6045// We can re-use it in hot functions like renderRoot() without having to recalculate it.
6046// We will also use it in commitWork() to pass to any Profiler onRender() hooks.
6047// This also provides DevTools with a way to access it when the onCommitRoot() hook is called.
6048root.memoizedInteractions=interactions;if(interactions.size>0){var subscriber=tracing.__subscriberRef.current;if(subscriber!==null){var threadID=computeThreadID(expirationTime,root.interactionThreadID);try{subscriber.onWorkStarted(interactions,threadID);}catch(error){// Work thrown by an interaction tracing subscriber should be rethrown,
6049// But only once it's safe (to avoid leaveing the scheduler in an invalid state).
6050// Store the error for now and we'll re-throw in finishRendering().
6051if(!hasUnhandledError){hasUnhandledError=true;unhandledError=error;}}}}}}var didFatal=false;startWorkLoopTimer(nextUnitOfWork);do{try{workLoop(isYieldy);}catch(thrownValue){if(nextUnitOfWork===null){// This is a fatal error.
6052didFatal=true;onUncaughtError(thrownValue);}else{{// Reset global debug state
6053// We assume this is defined in DEV
6054resetCurrentlyProcessingQueue();}var failedUnitOfWork=nextUnitOfWork;if(true&&replayFailedUnitOfWorkWithInvokeGuardedCallback){replayUnitOfWork(failedUnitOfWork,thrownValue,isYieldy);}// TODO: we already know this isn't true in some cases.
6055// At least this shows a nicer error message until we figure out the cause.
6056// https://github.com/facebook/react/issues/12449#issuecomment-386727431
6057!(nextUnitOfWork!==null)?invariant(false,'Failed to replay rendering after an error. This is likely caused by a bug in React. Please file an issue with a reproducing case to help us find it.'):void 0;var sourceFiber=nextUnitOfWork;var returnFiber=sourceFiber.return;if(returnFiber===null){// This is the root. The root could capture its own errors. However,
6058// we don't know if it errors before or after we pushed the host
6059// context. This information is needed to avoid a stack mismatch.
6060// Because we're not sure, treat this as a fatal error. We could track
6061// which phase it fails in, but doesn't seem worth it. At least
6062// for now.
6063didFatal=true;onUncaughtError(thrownValue);}else{throwException(root,returnFiber,sourceFiber,thrownValue,nextRenderExpirationTime);nextUnitOfWork=completeUnitOfWork(sourceFiber);continue;}}}break;}while(true);if(enableSchedulerTracing){// Traced work is done for now; restore the previous interactions.
6064tracing.__interactionsRef.current=prevInteractions;}// We're done performing work. Time to clean up.
6065isWorking=false;ReactCurrentOwner$2.currentDispatcher=null;resetContextDependences();// Yield back to main thread.
6066if(didFatal){var _didCompleteRoot=false;stopWorkLoopTimer(interruptedBy,_didCompleteRoot);interruptedBy=null;// There was a fatal error.
6067{resetStackAfterFatalErrorInDev();}// `nextRoot` points to the in-progress root. A non-null value indicates
6068// that we're in the middle of an async render. Set it to null to indicate
6069// there's no more work to be done in the current batch.
6070nextRoot=null;onFatal(root);return;}if(nextUnitOfWork!==null){// There's still remaining async work in this tree, but we ran out of time
6071// in the current frame. Yield back to the renderer. Unless we're
6072// interrupted by a higher priority update, we'll continue later from where
6073// we left off.
6074var _didCompleteRoot2=false;stopWorkLoopTimer(interruptedBy,_didCompleteRoot2);interruptedBy=null;onYield(root);return;}// We completed the whole tree.
6075var didCompleteRoot=true;stopWorkLoopTimer(interruptedBy,didCompleteRoot);var rootWorkInProgress=root.current.alternate;!(rootWorkInProgress!==null)?invariant(false,'Finished root should have a work-in-progress. This error is likely caused by a bug in React. Please file an issue.'):void 0;// `nextRoot` points to the in-progress root. A non-null value indicates
6076// that we're in the middle of an async render. Set it to null to indicate
6077// there's no more work to be done in the current batch.
6078nextRoot=null;interruptedBy=null;if(nextRenderDidError){// There was an error
6079if(hasLowerPriorityWork(root,expirationTime)){// There's lower priority work. If so, it may have the effect of fixing
6080// the exception that was just thrown. Exit without committing. This is
6081// similar to a suspend, but without a timeout because we're not waiting
6082// for a promise to resolve. React will restart at the lower
6083// priority level.
6084markSuspendedPriorityLevel(root,expirationTime);var suspendedExpirationTime=expirationTime;var rootExpirationTime=root.expirationTime;onSuspend(root,rootWorkInProgress,suspendedExpirationTime,rootExpirationTime,-1// Indicates no timeout
6085);return;}else if(// There's no lower priority work, but we're rendering asynchronously.
6086// Synchronsouly attempt to render the same level one more time. This is
6087// similar to a suspend, but without a timeout because we're not waiting
6088// for a promise to resolve.
6089!root.didError&&!isExpired){root.didError=true;var _suspendedExpirationTime=root.nextExpirationTimeToWorkOn=expirationTime;var _rootExpirationTime=root.expirationTime=Sync;onSuspend(root,rootWorkInProgress,_suspendedExpirationTime,_rootExpirationTime,-1// Indicates no timeout
6090);return;}}if(enableSuspense&&!isExpired&&nextLatestAbsoluteTimeoutMs!==-1){// The tree was suspended.
6091var _suspendedExpirationTime2=expirationTime;markSuspendedPriorityLevel(root,_suspendedExpirationTime2);// Find the earliest uncommitted expiration time in the tree, including
6092// work that is suspended. The timeout threshold cannot be longer than
6093// the overall expiration.
6094var earliestExpirationTime=findEarliestOutstandingPriorityLevel(root,expirationTime);var earliestExpirationTimeMs=expirationTimeToMs(earliestExpirationTime);if(earliestExpirationTimeMs<nextLatestAbsoluteTimeoutMs){nextLatestAbsoluteTimeoutMs=earliestExpirationTimeMs;}// Subtract the current time from the absolute timeout to get the number
6095// of milliseconds until the timeout. In other words, convert an absolute
6096// timestamp to a relative time. This is the value that is passed
6097// to `setTimeout`.
6098var currentTimeMs=expirationTimeToMs(requestCurrentTime());var msUntilTimeout=nextLatestAbsoluteTimeoutMs-currentTimeMs;msUntilTimeout=msUntilTimeout<0?0:msUntilTimeout;// TODO: Account for the Just Noticeable Difference
6099var _rootExpirationTime2=root.expirationTime;onSuspend(root,rootWorkInProgress,_suspendedExpirationTime2,_rootExpirationTime2,msUntilTimeout);return;}// Ready to commit.
6100onComplete(root,rootWorkInProgress,expirationTime);}function dispatch(sourceFiber,value,expirationTime){!(!isWorking||isCommitting$1)?invariant(false,'dispatch: Cannot dispatch during the render phase.'):void 0;var fiber=sourceFiber.return;while(fiber!==null){switch(fiber.tag){case ClassComponent:case ClassComponentLazy:var ctor=fiber.type;var instance=fiber.stateNode;if(typeof ctor.getDerivedStateFromCatch==='function'||typeof instance.componentDidCatch==='function'&&!isAlreadyFailedLegacyErrorBoundary(instance)){var errorInfo=createCapturedValue(value,sourceFiber);var update=createClassErrorUpdate(fiber,errorInfo,expirationTime);enqueueUpdate(fiber,update);scheduleWork(fiber,expirationTime);return;}break;case HostRoot:{var _errorInfo=createCapturedValue(value,sourceFiber);var _update=createRootErrorUpdate(fiber,_errorInfo,expirationTime);enqueueUpdate(fiber,_update);scheduleWork(fiber,expirationTime);return;}}fiber=fiber.return;}if(sourceFiber.tag===HostRoot){// Error was thrown at the root. There is no parent, so the root
6101// itself should capture it.
6102var rootFiber=sourceFiber;var _errorInfo2=createCapturedValue(value,rootFiber);var _update2=createRootErrorUpdate(rootFiber,_errorInfo2,expirationTime);enqueueUpdate(rootFiber,_update2);scheduleWork(rootFiber,expirationTime);}}function captureCommitPhaseError(fiber,error){return dispatch(fiber,error,Sync);}function computeThreadID(expirationTime,interactionThreadID){// Interaction threads are unique per root and expiration time.
6103return expirationTime*1000+interactionThreadID;}// Creates a unique async expiration time.
6104function computeUniqueAsyncExpiration(){var currentTime=requestCurrentTime();var result=computeAsyncExpiration(currentTime);if(result<=lastUniqueAsyncExpiration){// Since we assume the current time monotonically increases, we only hit
6105// this branch when computeUniqueAsyncExpiration is fired multiple times
6106// within a 200ms window (or whatever the async bucket size is).
6107result=lastUniqueAsyncExpiration+1;}lastUniqueAsyncExpiration=result;return lastUniqueAsyncExpiration;}function computeExpirationForFiber(currentTime,fiber){var expirationTime=void 0;if(expirationContext!==NoWork){// An explicit expiration context was set;
6108expirationTime=expirationContext;}else if(isWorking){if(isCommitting$1){// Updates that occur during the commit phase should have sync priority
6109// by default.
6110expirationTime=Sync;}else{// Updates during the render phase should expire at the same time as
6111// the work that is being rendered.
6112expirationTime=nextRenderExpirationTime;}}else{// No explicit expiration context was set, and we're not currently
6113// performing work. Calculate a new expiration time.
6114if(fiber.mode&AsyncMode){if(isBatchingInteractiveUpdates){// This is an interactive update
6115expirationTime=computeInteractiveExpiration(currentTime);}else{// This is an async update
6116expirationTime=computeAsyncExpiration(currentTime);}// If we're in the middle of rendering a tree, do not update at the same
6117// expiration time that is already rendering.
6118if(nextRoot!==null&&expirationTime===nextRenderExpirationTime){expirationTime+=1;}}else{// This is a sync update
6119expirationTime=Sync;}}if(isBatchingInteractiveUpdates){// This is an interactive update. Keep track of the lowest pending
6120// interactive expiration time. This allows us to synchronously flush
6121// all interactive updates when needed.
6122if(lowestPriorityPendingInteractiveExpirationTime===NoWork||expirationTime>lowestPriorityPendingInteractiveExpirationTime){lowestPriorityPendingInteractiveExpirationTime=expirationTime;}}return expirationTime;}function renderDidSuspend(root,absoluteTimeoutMs,suspendedTime){// Schedule the timeout.
6123if(absoluteTimeoutMs>=0&&nextLatestAbsoluteTimeoutMs<absoluteTimeoutMs){nextLatestAbsoluteTimeoutMs=absoluteTimeoutMs;}}function renderDidError(){nextRenderDidError=true;}function retrySuspendedRoot(root,fiber,suspendedTime){if(enableSuspense){var retryTime=void 0;if(isPriorityLevelSuspended(root,suspendedTime)){// Ping at the original level
6124retryTime=suspendedTime;markPingedPriorityLevel(root,retryTime);}else{// Placeholder already timed out. Compute a new expiration time
6125var currentTime=requestCurrentTime();retryTime=computeExpirationForFiber(currentTime,fiber);markPendingPriorityLevel(root,retryTime);}scheduleWorkToRoot(fiber,retryTime);var rootExpirationTime=root.expirationTime;if(rootExpirationTime!==NoWork){if(enableSchedulerTracing){// Restore previous interactions so that new work is associated with them.
6126var prevInteractions=tracing.__interactionsRef.current;tracing.__interactionsRef.current=root.memoizedInteractions;// Because suspense timeouts do not decrement the interaction count,
6127// Continued suspense work should also not increment the count.
6128storeInteractionsForExpirationTime(root,rootExpirationTime,false);requestWork(root,rootExpirationTime);tracing.__interactionsRef.current=prevInteractions;}else{requestWork(root,rootExpirationTime);}}}}function scheduleWorkToRoot(fiber,expirationTime){// Update the source fiber's expiration time
6129if(fiber.expirationTime===NoWork||fiber.expirationTime>expirationTime){fiber.expirationTime=expirationTime;}var alternate=fiber.alternate;if(alternate!==null&&(alternate.expirationTime===NoWork||alternate.expirationTime>expirationTime)){alternate.expirationTime=expirationTime;}// Walk the parent path to the root and update the child expiration time.
6130var node=fiber.return;if(node===null&&fiber.tag===HostRoot){return fiber.stateNode;}while(node!==null){alternate=node.alternate;if(node.childExpirationTime===NoWork||node.childExpirationTime>expirationTime){node.childExpirationTime=expirationTime;if(alternate!==null&&(alternate.childExpirationTime===NoWork||alternate.childExpirationTime>expirationTime)){alternate.childExpirationTime=expirationTime;}}else if(alternate!==null&&(alternate.childExpirationTime===NoWork||alternate.childExpirationTime>expirationTime)){alternate.childExpirationTime=expirationTime;}if(node.return===null&&node.tag===HostRoot){return node.stateNode;}node=node.return;}return null;}function storeInteractionsForExpirationTime(root,expirationTime,updateInteractionCounts){if(!enableSchedulerTracing){return;}var interactions=tracing.__interactionsRef.current;if(interactions.size>0){var pendingInteractions=root.pendingInteractionMap.get(expirationTime);if(pendingInteractions!=null){interactions.forEach(function(interaction){if(updateInteractionCounts&&!pendingInteractions.has(interaction)){// Update the pending async work count for previously unscheduled interaction.
6131interaction.__count++;}pendingInteractions.add(interaction);});}else{root.pendingInteractionMap.set(expirationTime,new Set(interactions));// Update the pending async work count for the current interactions.
6132if(updateInteractionCounts){interactions.forEach(function(interaction){interaction.__count++;});}}var subscriber=tracing.__subscriberRef.current;if(subscriber!==null){var threadID=computeThreadID(expirationTime,root.interactionThreadID);subscriber.onWorkScheduled(interactions,threadID);}}}function scheduleWork(fiber,expirationTime){recordScheduleUpdate();{if(fiber.tag===ClassComponent||fiber.tag===ClassComponentLazy){var instance=fiber.stateNode;warnAboutInvalidUpdates(instance);}}var root=scheduleWorkToRoot(fiber,expirationTime);if(root===null){if(true&&(fiber.tag===ClassComponent||fiber.tag===ClassComponentLazy)){warnAboutUpdateOnUnmounted(fiber);}return;}if(enableSchedulerTracing){storeInteractionsForExpirationTime(root,expirationTime,true);}if(!isWorking&&nextRenderExpirationTime!==NoWork&&expirationTime<nextRenderExpirationTime){// This is an interruption. (Used for performance tracking.)
6133interruptedBy=fiber;resetStack();}markPendingPriorityLevel(root,expirationTime);if(// If we're in the render phase, we don't need to schedule this root
6134// for an update, because we'll do it before we exit...
6135!isWorking||isCommitting$1||// ...unless this is a different root than the one we're rendering.
6136nextRoot!==root){var rootExpirationTime=root.expirationTime;requestWork(root,rootExpirationTime);}if(nestedUpdateCount>NESTED_UPDATE_LIMIT){// Reset this back to zero so subsequent updates don't throw.
6137nestedUpdateCount=0;invariant(false,'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');}}function syncUpdates(fn,a,b,c,d){var previousExpirationContext=expirationContext;expirationContext=Sync;try{return fn(a,b,c,d);}finally{expirationContext=previousExpirationContext;}}// TODO: Everything below this is written as if it has been lifted to the
6138// renderers. I'll do this in a follow-up.
6139// Linked-list of roots
6140var firstScheduledRoot=null;var lastScheduledRoot=null;var callbackExpirationTime=NoWork;var callbackID=void 0;var isRendering=false;var nextFlushedRoot=null;var nextFlushedExpirationTime=NoWork;var lowestPriorityPendingInteractiveExpirationTime=NoWork;var deadlineDidExpire=false;var hasUnhandledError=false;var unhandledError=null;var deadline=null;var isBatchingUpdates=false;var isUnbatchingUpdates=false;var isBatchingInteractiveUpdates=false;var completedBatches=null;var originalStartTimeMs=schedule.unstable_now();var currentRendererTime=msToExpirationTime(originalStartTimeMs);var currentSchedulerTime=currentRendererTime;// Use these to prevent an infinite loop of nested updates
6141var NESTED_UPDATE_LIMIT=50;var nestedUpdateCount=0;var lastCommittedRootDuringThisBatch=null;var timeHeuristicForUnitOfWork=1;function recomputeCurrentRendererTime(){var currentTimeMs=schedule.unstable_now()-originalStartTimeMs;currentRendererTime=msToExpirationTime(currentTimeMs);}function scheduleCallbackWithExpirationTime(root,expirationTime){if(callbackExpirationTime!==NoWork){// A callback is already scheduled. Check its expiration time (timeout).
6142if(expirationTime>callbackExpirationTime){// Existing callback has sufficient timeout. Exit.
6143return;}else{if(callbackID!==null){// Existing callback has insufficient timeout. Cancel and schedule a
6144// new one.
6145schedule.unstable_cancelScheduledWork(callbackID);}}// The request callback timer is already running. Don't start a new one.
6146}else{startRequestCallbackTimer();}callbackExpirationTime=expirationTime;var currentMs=schedule.unstable_now()-originalStartTimeMs;var expirationTimeMs=expirationTimeToMs(expirationTime);var timeout=expirationTimeMs-currentMs;callbackID=schedule.unstable_scheduleWork(performAsyncWork,{timeout:timeout});}// For every call to renderRoot, one of onFatal, onComplete, onSuspend, and
6147// onYield is called upon exiting. We use these in lieu of returning a tuple.
6148// I've also chosen not to inline them into renderRoot because these will
6149// eventually be lifted into the renderer.
6150function onFatal(root){root.finishedWork=null;}function onComplete(root,finishedWork,expirationTime){root.pendingCommitExpirationTime=expirationTime;root.finishedWork=finishedWork;}function onSuspend(root,finishedWork,suspendedExpirationTime,rootExpirationTime,msUntilTimeout){root.expirationTime=rootExpirationTime;if(enableSuspense&&msUntilTimeout===0&&!shouldYield()){// Don't wait an additional tick. Commit the tree immediately.
6151root.pendingCommitExpirationTime=suspendedExpirationTime;root.finishedWork=finishedWork;}else if(msUntilTimeout>0){// Wait `msUntilTimeout` milliseconds before committing.
6152root.timeoutHandle=scheduleTimeout(onTimeout.bind(null,root,finishedWork,suspendedExpirationTime),msUntilTimeout);}}function onYield(root){root.finishedWork=null;}function onTimeout(root,finishedWork,suspendedExpirationTime){if(enableSuspense){// The root timed out. Commit it.
6153root.pendingCommitExpirationTime=suspendedExpirationTime;root.finishedWork=finishedWork;// Read the current time before entering the commit phase. We can be
6154// certain this won't cause tearing related to batching of event updates
6155// because we're at the top of a timer event.
6156recomputeCurrentRendererTime();currentSchedulerTime=currentRendererTime;if(enableSchedulerTracing){// Don't update pending interaction counts for suspense timeouts,
6157// Because we know we still need to do more work in this case.
6158suspenseDidTimeout=true;flushRoot(root,suspendedExpirationTime);suspenseDidTimeout=false;}else{flushRoot(root,suspendedExpirationTime);}}}function onCommit(root,expirationTime){root.expirationTime=expirationTime;root.finishedWork=null;}function requestCurrentTime(){// requestCurrentTime is called by the scheduler to compute an expiration
6159// time.
6160//
6161// Expiration times are computed by adding to the current time (the start
6162// time). However, if two updates are scheduled within the same event, we
6163// should treat their start times as simultaneous, even if the actual clock
6164// time has advanced between the first and second call.
6165// In other words, because expiration times determine how updates are batched,
6166// we want all updates of like priority that occur within the same event to
6167// receive the same expiration time. Otherwise we get tearing.
6168//
6169// We keep track of two separate times: the current "renderer" time and the
6170// current "scheduler" time. The renderer time can be updated whenever; it
6171// only exists to minimize the calls performance.now.
6172//
6173// But the scheduler time can only be updated if there's no pending work, or
6174// if we know for certain that we're not in the middle of an event.
6175if(isRendering){// We're already rendering. Return the most recently read time.
6176return currentSchedulerTime;}// Check if there's pending work.
6177findHighestPriorityRoot();if(nextFlushedExpirationTime===NoWork||nextFlushedExpirationTime===Never){// If there's no pending work, or if the pending work is offscreen, we can
6178// read the current time without risk of tearing.
6179recomputeCurrentRendererTime();currentSchedulerTime=currentRendererTime;return currentSchedulerTime;}// There's already pending work. We might be in the middle of a browser
6180// event. If we were to read the current time, it could cause multiple updates
6181// within the same event to receive different expiration times, leading to
6182// tearing. Return the last read time. During the next idle callback, the
6183// time will be updated.
6184return currentSchedulerTime;}// requestWork is called by the scheduler whenever a root receives an update.
6185// It's up to the renderer to call renderRoot at some point in the future.
6186function requestWork(root,expirationTime){addRootToSchedule(root,expirationTime);if(isRendering){// Prevent reentrancy. Remaining work will be scheduled at the end of
6187// the currently rendering batch.
6188return;}if(isBatchingUpdates){// Flush work at the end of the batch.
6189if(isUnbatchingUpdates){// ...unless we're inside unbatchedUpdates, in which case we should
6190// flush it now.
6191nextFlushedRoot=root;nextFlushedExpirationTime=Sync;performWorkOnRoot(root,Sync,true);}return;}// TODO: Get rid of Sync and use current time?
6192if(expirationTime===Sync){performSyncWork();}else{scheduleCallbackWithExpirationTime(root,expirationTime);}}function addRootToSchedule(root,expirationTime){// Add the root to the schedule.
6193// Check if this root is already part of the schedule.
6194if(root.nextScheduledRoot===null){// This root is not already scheduled. Add it.
6195root.expirationTime=expirationTime;if(lastScheduledRoot===null){firstScheduledRoot=lastScheduledRoot=root;root.nextScheduledRoot=root;}else{lastScheduledRoot.nextScheduledRoot=root;lastScheduledRoot=root;lastScheduledRoot.nextScheduledRoot=firstScheduledRoot;}}else{// This root is already scheduled, but its priority may have increased.
6196var remainingExpirationTime=root.expirationTime;if(remainingExpirationTime===NoWork||expirationTime<remainingExpirationTime){// Update the priority.
6197root.expirationTime=expirationTime;}}}function findHighestPriorityRoot(){var highestPriorityWork=NoWork;var highestPriorityRoot=null;if(lastScheduledRoot!==null){var previousScheduledRoot=lastScheduledRoot;var root=firstScheduledRoot;while(root!==null){var remainingExpirationTime=root.expirationTime;if(remainingExpirationTime===NoWork){// This root no longer has work. Remove it from the scheduler.
6198// TODO: This check is redudant, but Flow is confused by the branch
6199// below where we set lastScheduledRoot to null, even though we break
6200// from the loop right after.
6201!(previousScheduledRoot!==null&&lastScheduledRoot!==null)?invariant(false,'Should have a previous and last root. This error is likely caused by a bug in React. Please file an issue.'):void 0;if(root===root.nextScheduledRoot){// This is the only root in the list.
6202root.nextScheduledRoot=null;firstScheduledRoot=lastScheduledRoot=null;break;}else if(root===firstScheduledRoot){// This is the first root in the list.
6203var next=root.nextScheduledRoot;firstScheduledRoot=next;lastScheduledRoot.nextScheduledRoot=next;root.nextScheduledRoot=null;}else if(root===lastScheduledRoot){// This is the last root in the list.
6204lastScheduledRoot=previousScheduledRoot;lastScheduledRoot.nextScheduledRoot=firstScheduledRoot;root.nextScheduledRoot=null;break;}else{previousScheduledRoot.nextScheduledRoot=root.nextScheduledRoot;root.nextScheduledRoot=null;}root=previousScheduledRoot.nextScheduledRoot;}else{if(highestPriorityWork===NoWork||remainingExpirationTime<highestPriorityWork){// Update the priority, if it's higher
6205highestPriorityWork=remainingExpirationTime;highestPriorityRoot=root;}if(root===lastScheduledRoot){break;}if(highestPriorityWork===Sync){// Sync is highest priority by definition so
6206// we can stop searching.
6207break;}previousScheduledRoot=root;root=root.nextScheduledRoot;}}}nextFlushedRoot=highestPriorityRoot;nextFlushedExpirationTime=highestPriorityWork;}function performAsyncWork(dl){if(dl.didTimeout){// The callback timed out. That means at least one update has expired.
6208// Iterate through the root schedule. If they contain expired work, set
6209// the next render expiration time to the current time. This has the effect
6210// of flushing all expired work in a single batch, instead of flushing each
6211// level one at a time.
6212if(firstScheduledRoot!==null){recomputeCurrentRendererTime();var root=firstScheduledRoot;do{didExpireAtExpirationTime(root,currentRendererTime);// The root schedule is circular, so this is never null.
6213root=root.nextScheduledRoot;}while(root!==firstScheduledRoot);}}performWork(NoWork,dl);}function performSyncWork(){performWork(Sync,null);}function performWork(minExpirationTime,dl){deadline=dl;// Keep working on roots until there's no more work, or until we reach
6214// the deadline.
6215findHighestPriorityRoot();if(deadline!==null){recomputeCurrentRendererTime();currentSchedulerTime=currentRendererTime;if(enableUserTimingAPI){var didExpire=nextFlushedExpirationTime<currentRendererTime;var timeout=expirationTimeToMs(nextFlushedExpirationTime);stopRequestCallbackTimer(didExpire,timeout);}while(nextFlushedRoot!==null&&nextFlushedExpirationTime!==NoWork&&(minExpirationTime===NoWork||minExpirationTime>=nextFlushedExpirationTime)&&(!deadlineDidExpire||currentRendererTime>=nextFlushedExpirationTime)){performWorkOnRoot(nextFlushedRoot,nextFlushedExpirationTime,currentRendererTime>=nextFlushedExpirationTime);findHighestPriorityRoot();recomputeCurrentRendererTime();currentSchedulerTime=currentRendererTime;}}else{while(nextFlushedRoot!==null&&nextFlushedExpirationTime!==NoWork&&(minExpirationTime===NoWork||minExpirationTime>=nextFlushedExpirationTime)){performWorkOnRoot(nextFlushedRoot,nextFlushedExpirationTime,true);findHighestPriorityRoot();}}// We're done flushing work. Either we ran out of time in this callback,
6216// or there's no more work left with sufficient priority.
6217// If we're inside a callback, set this to false since we just completed it.
6218if(deadline!==null){callbackExpirationTime=NoWork;callbackID=null;}// If there's work left over, schedule a new callback.
6219if(nextFlushedExpirationTime!==NoWork){scheduleCallbackWithExpirationTime(nextFlushedRoot,nextFlushedExpirationTime);}// Clean-up.
6220deadline=null;deadlineDidExpire=false;finishRendering();}function flushRoot(root,expirationTime){!!isRendering?invariant(false,'work.commit(): Cannot commit while already rendering. This likely means you attempted to commit from inside a lifecycle method.'):void 0;// Perform work on root as if the given expiration time is the current time.
6221// This has the effect of synchronously flushing all work up to and
6222// including the given time.
6223nextFlushedRoot=root;nextFlushedExpirationTime=expirationTime;performWorkOnRoot(root,expirationTime,true);// Flush any sync work that was scheduled by lifecycles
6224performSyncWork();}function finishRendering(){nestedUpdateCount=0;lastCommittedRootDuringThisBatch=null;if(completedBatches!==null){var batches=completedBatches;completedBatches=null;for(var i=0;i<batches.length;i++){var batch=batches[i];try{batch._onComplete();}catch(error){if(!hasUnhandledError){hasUnhandledError=true;unhandledError=error;}}}}if(hasUnhandledError){var error=unhandledError;unhandledError=null;hasUnhandledError=false;throw error;}}function performWorkOnRoot(root,expirationTime,isExpired){!!isRendering?invariant(false,'performWorkOnRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.'):void 0;isRendering=true;// Check if this is async work or sync/expired work.
6225if(deadline===null||isExpired){// Flush work without yielding.
6226// TODO: Non-yieldy work does not necessarily imply expired work. A renderer
6227// may want to perform some work without yielding, but also without
6228// requiring the root to complete (by triggering placeholders).
6229var finishedWork=root.finishedWork;if(finishedWork!==null){// This root is already complete. We can commit it.
6230completeRoot(root,finishedWork,expirationTime);}else{root.finishedWork=null;// If this root previously suspended, clear its existing timeout, since
6231// we're about to try rendering again.
6232var timeoutHandle=root.timeoutHandle;if(enableSuspense&&timeoutHandle!==noTimeout){root.timeoutHandle=noTimeout;// $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
6233cancelTimeout(timeoutHandle);}var isYieldy=false;renderRoot(root,isYieldy,isExpired);finishedWork=root.finishedWork;if(finishedWork!==null){// We've completed the root. Commit it.
6234completeRoot(root,finishedWork,expirationTime);}}}else{// Flush async work.
6235var _finishedWork=root.finishedWork;if(_finishedWork!==null){// This root is already complete. We can commit it.
6236completeRoot(root,_finishedWork,expirationTime);}else{root.finishedWork=null;// If this root previously suspended, clear its existing timeout, since
6237// we're about to try rendering again.
6238var _timeoutHandle=root.timeoutHandle;if(enableSuspense&&_timeoutHandle!==noTimeout){root.timeoutHandle=noTimeout;// $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
6239cancelTimeout(_timeoutHandle);}var _isYieldy=true;renderRoot(root,_isYieldy,isExpired);_finishedWork=root.finishedWork;if(_finishedWork!==null){// We've completed the root. Check the deadline one more time
6240// before committing.
6241if(!shouldYield()){// Still time left. Commit the root.
6242completeRoot(root,_finishedWork,expirationTime);}else{// There's no time left. Mark this root as complete. We'll come
6243// back and commit it later.
6244root.finishedWork=_finishedWork;}}}}isRendering=false;}function completeRoot(root,finishedWork,expirationTime){// Check if there's a batch that matches this expiration time.
6245var firstBatch=root.firstBatch;if(firstBatch!==null&&firstBatch._expirationTime<=expirationTime){if(completedBatches===null){completedBatches=[firstBatch];}else{completedBatches.push(firstBatch);}if(firstBatch._defer){// This root is blocked from committing by a batch. Unschedule it until
6246// we receive another update.
6247root.finishedWork=finishedWork;root.expirationTime=NoWork;return;}}// Commit the root.
6248root.finishedWork=null;// Check if this is a nested update (a sync update scheduled during the
6249// commit phase).
6250if(root===lastCommittedRootDuringThisBatch){// If the next root is the same as the previous root, this is a nested
6251// update. To prevent an infinite loop, increment the nested update count.
6252nestedUpdateCount++;}else{// Reset whenever we switch roots.
6253lastCommittedRootDuringThisBatch=root;nestedUpdateCount=0;}commitRoot(root,finishedWork);}// When working on async work, the reconciler asks the renderer if it should
6254// yield execution. For DOM, we implement this with requestIdleCallback.
6255function shouldYield(){if(deadlineDidExpire){return true;}if(deadline===null||deadline.timeRemaining()>timeHeuristicForUnitOfWork){// Disregard deadline.didTimeout. Only expired work should be flushed
6256// during a timeout. This path is only hit for non-expired work.
6257return false;}deadlineDidExpire=true;return true;}function onUncaughtError(error){!(nextFlushedRoot!==null)?invariant(false,'Should be working on a root. This error is likely caused by a bug in React. Please file an issue.'):void 0;// Unschedule this root so we don't work on it again until there's
6258// another update.
6259nextFlushedRoot.expirationTime=NoWork;if(!hasUnhandledError){hasUnhandledError=true;unhandledError=error;}}// TODO: Batching should be implemented at the renderer level, not inside
6260// the reconciler.
6261function batchedUpdates$1(fn,a){var previousIsBatchingUpdates=isBatchingUpdates;isBatchingUpdates=true;try{return fn(a);}finally{isBatchingUpdates=previousIsBatchingUpdates;if(!isBatchingUpdates&&!isRendering){performSyncWork();}}}// TODO: Batching should be implemented at the renderer level, not inside
6262// the reconciler.
6263function unbatchedUpdates(fn,a){if(isBatchingUpdates&&!isUnbatchingUpdates){isUnbatchingUpdates=true;try{return fn(a);}finally{isUnbatchingUpdates=false;}}return fn(a);}// TODO: Batching should be implemented at the renderer level, not within
6264// the reconciler.
6265function flushSync(fn,a){!!isRendering?invariant(false,'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.'):void 0;var previousIsBatchingUpdates=isBatchingUpdates;isBatchingUpdates=true;try{return syncUpdates(fn,a);}finally{isBatchingUpdates=previousIsBatchingUpdates;performSyncWork();}}function interactiveUpdates$1(fn,a,b){if(isBatchingInteractiveUpdates){return fn(a,b);}// If there are any pending interactive updates, synchronously flush them.
6266// This needs to happen before we read any handlers, because the effect of
6267// the previous event may influence which handlers are called during
6268// this event.
6269if(!isBatchingUpdates&&!isRendering&&lowestPriorityPendingInteractiveExpirationTime!==NoWork){// Synchronously flush pending interactive updates.
6270performWork(lowestPriorityPendingInteractiveExpirationTime,null);lowestPriorityPendingInteractiveExpirationTime=NoWork;}var previousIsBatchingInteractiveUpdates=isBatchingInteractiveUpdates;var previousIsBatchingUpdates=isBatchingUpdates;isBatchingInteractiveUpdates=true;isBatchingUpdates=true;try{return fn(a,b);}finally{isBatchingInteractiveUpdates=previousIsBatchingInteractiveUpdates;isBatchingUpdates=previousIsBatchingUpdates;if(!isBatchingUpdates&&!isRendering){performSyncWork();}}}function flushInteractiveUpdates$1(){if(!isRendering&&lowestPriorityPendingInteractiveExpirationTime!==NoWork){// Synchronously flush pending interactive updates.
6271performWork(lowestPriorityPendingInteractiveExpirationTime,null);lowestPriorityPendingInteractiveExpirationTime=NoWork;}}function flushControlled(fn){var previousIsBatchingUpdates=isBatchingUpdates;isBatchingUpdates=true;try{syncUpdates(fn);}finally{isBatchingUpdates=previousIsBatchingUpdates;if(!isBatchingUpdates&&!isRendering){performSyncWork();}}}// 0 is PROD, 1 is DEV.
6272// Might add PROFILE later.
6273var didWarnAboutNestedUpdates=void 0;{didWarnAboutNestedUpdates=false;}function getContextForSubtree(parentComponent){if(!parentComponent){return emptyContextObject;}var fiber=get(parentComponent);var parentContext=findCurrentUnmaskedContext(fiber);if(fiber.tag===ClassComponent){var Component=fiber.type;if(isContextProvider(Component)){return processChildContext(fiber,Component,parentContext);}}else if(fiber.tag===ClassComponentLazy){var _Component=getResultFromResolvedThenable(fiber.type);if(isContextProvider(_Component)){return processChildContext(fiber,_Component,parentContext);}}return parentContext;}function scheduleRootUpdate(current$$1,element,expirationTime,callback){{if(phase==='render'&&current!==null&&!didWarnAboutNestedUpdates){didWarnAboutNestedUpdates=true;warningWithoutStack$1(false,'Render methods should be a pure function of props and state; '+'triggering nested component updates from render is not allowed. '+'If necessary, trigger nested updates in componentDidUpdate.\n\n'+'Check the render method of %s.',getComponentName(current.type)||'Unknown');}}var update=createUpdate(expirationTime);// Caution: React DevTools currently depends on this property
6274// being called "element".
6275update.payload={element:element};callback=callback===undefined?null:callback;if(callback!==null){!(typeof callback==='function')?warningWithoutStack$1(false,'render(...): Expected the last optional `callback` argument to be a '+'function. Instead received: %s.',callback):void 0;update.callback=callback;}enqueueUpdate(current$$1,update);scheduleWork(current$$1,expirationTime);return expirationTime;}function updateContainerAtExpirationTime(element,container,parentComponent,expirationTime,callback){// TODO: If this is a nested container, this won't be the root.
6276var current$$1=container.current;{if(ReactFiberInstrumentation_1.debugTool){if(current$$1.alternate===null){ReactFiberInstrumentation_1.debugTool.onMountContainer(container);}else if(element===null){ReactFiberInstrumentation_1.debugTool.onUnmountContainer(container);}else{ReactFiberInstrumentation_1.debugTool.onUpdateContainer(container);}}}var context=getContextForSubtree(parentComponent);if(container.context===null){container.context=context;}else{container.pendingContext=context;}return scheduleRootUpdate(current$$1,element,expirationTime,callback);}function findHostInstance(component){var fiber=get(component);if(fiber===undefined){if(typeof component.render==='function'){invariant(false,'Unable to find node on an unmounted component.');}else{invariant(false,'Argument appears to not be a ReactComponent. Keys: %s',Object.keys(component));}}var hostFiber=findCurrentHostFiber(fiber);if(hostFiber===null){return null;}return hostFiber.stateNode;}function createContainer(containerInfo,isAsync,hydrate){return createFiberRoot(containerInfo,isAsync,hydrate);}function updateContainer(element,container,parentComponent,callback){var current$$1=container.current;var currentTime=requestCurrentTime();var expirationTime=computeExpirationForFiber(currentTime,current$$1);return updateContainerAtExpirationTime(element,container,parentComponent,expirationTime,callback);}function getPublicRootInstance(container){var containerFiber=container.current;if(!containerFiber.child){return null;}switch(containerFiber.child.tag){case HostComponent:return getPublicInstance(containerFiber.child.stateNode);default:return containerFiber.child.stateNode;}}function findHostInstanceWithNoPortals(fiber){var hostFiber=findCurrentHostFiberWithNoPortals(fiber);if(hostFiber===null){return null;}return hostFiber.stateNode;}function injectIntoDevTools(devToolsConfig){var findFiberByHostInstance=devToolsConfig.findFiberByHostInstance;return injectInternals(_assign({},devToolsConfig,{findHostInstanceByFiber:function(fiber){var hostFiber=findCurrentHostFiber(fiber);if(hostFiber===null){return null;}return hostFiber.stateNode;},findFiberByHostInstance:function(instance){if(!findFiberByHostInstance){// Might not be implemented by the renderer.
6277return null;}return findFiberByHostInstance(instance);}}));}// This file intentionally does *not* have the Flow annotation.
6278// Don't add it. See `./inline-typed.js` for an explanation.
6279function createPortal$1(children,containerInfo,// TODO: figure out the API for cross-renderer implementation.
6280implementation){var key=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;return{// This tag allow us to uniquely identify this as a React Portal
6281$$typeof:REACT_PORTAL_TYPE,key:key==null?null:''+key,children:children,containerInfo:containerInfo,implementation:implementation};}// TODO: this is special because it gets imported during build.
6282var ReactVersion='16.5.2';// TODO: This type is shared between the reconciler and ReactDOM, but will
6283// eventually be lifted out to the renderer.
6284var ReactCurrentOwner=ReactSharedInternals.ReactCurrentOwner;var topLevelUpdateWarnings=void 0;var warnOnInvalidCallback=void 0;var didWarnAboutUnstableCreatePortal=false;{if(typeof Map!=='function'||// $FlowIssue Flow incorrectly thinks Map has no prototype
6285Map.prototype==null||typeof Map.prototype.forEach!=='function'||typeof Set!=='function'||// $FlowIssue Flow incorrectly thinks Set has no prototype
6286Set.prototype==null||typeof Set.prototype.clear!=='function'||typeof Set.prototype.forEach!=='function'){warningWithoutStack$1(false,'React depends on Map and Set built-in types. Make sure that you load a '+'polyfill in older browsers. https://fb.me/react-polyfills');}topLevelUpdateWarnings=function(container){if(container._reactRootContainer&&container.nodeType!==COMMENT_NODE){var hostInstance=findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);if(hostInstance){!(hostInstance.parentNode===container)?warningWithoutStack$1(false,'render(...): It looks like the React-rendered content of this '+'container was removed without using React. This is not '+'supported and will cause errors. Instead, call '+'ReactDOM.unmountComponentAtNode to empty a container.'):void 0;}}var isRootRenderedBySomeReact=!!container._reactRootContainer;var rootEl=getReactRootElementInContainer(container);var hasNonRootReactChild=!!(rootEl&&getInstanceFromNode$1(rootEl));!(!hasNonRootReactChild||isRootRenderedBySomeReact)?warningWithoutStack$1(false,'render(...): Replacing React-rendered children with a new root '+'component. If you intended to update the children of this node, '+'you should instead have the existing children update their state '+'and render the new components instead of calling ReactDOM.render.'):void 0;!(container.nodeType!==ELEMENT_NODE||!container.tagName||container.tagName.toUpperCase()!=='BODY')?warningWithoutStack$1(false,'render(): Rendering components directly into document.body is '+'discouraged, since its children are often manipulated by third-party '+'scripts and browser extensions. This may lead to subtle '+'reconciliation issues. Try rendering into a container element created '+'for your app.'):void 0;};warnOnInvalidCallback=function(callback,callerName){!(callback===null||typeof callback==='function')?warningWithoutStack$1(false,'%s(...): Expected the last optional `callback` argument to be a '+'function. Instead received: %s.',callerName,callback):void 0;};}setRestoreImplementation(restoreControlledState$1);/* eslint-disable no-use-before-define */ /* eslint-enable no-use-before-define */function ReactBatch(root){var expirationTime=computeUniqueAsyncExpiration();this._expirationTime=expirationTime;this._root=root;this._next=null;this._callbacks=null;this._didComplete=false;this._hasChildren=false;this._children=null;this._defer=true;}ReactBatch.prototype.render=function(children){!this._defer?invariant(false,'batch.render: Cannot render a batch that already committed.'):void 0;this._hasChildren=true;this._children=children;var internalRoot=this._root._internalRoot;var expirationTime=this._expirationTime;var work=new ReactWork();updateContainerAtExpirationTime(children,internalRoot,null,expirationTime,work._onCommit);return work;};ReactBatch.prototype.then=function(onComplete){if(this._didComplete){onComplete();return;}var callbacks=this._callbacks;if(callbacks===null){callbacks=this._callbacks=[];}callbacks.push(onComplete);};ReactBatch.prototype.commit=function(){var internalRoot=this._root._internalRoot;var firstBatch=internalRoot.firstBatch;!(this._defer&&firstBatch!==null)?invariant(false,'batch.commit: Cannot commit a batch multiple times.'):void 0;if(!this._hasChildren){// This batch is empty. Return.
6287this._next=null;this._defer=false;return;}var expirationTime=this._expirationTime;// Ensure this is the first batch in the list.
6288if(firstBatch!==this){// This batch is not the earliest batch. We need to move it to the front.
6289// Update its expiration time to be the expiration time of the earliest
6290// batch, so that we can flush it without flushing the other batches.
6291if(this._hasChildren){expirationTime=this._expirationTime=firstBatch._expirationTime;// Rendering this batch again ensures its children will be the final state
6292// when we flush (updates are processed in insertion order: last
6293// update wins).
6294// TODO: This forces a restart. Should we print a warning?
6295this.render(this._children);}// Remove the batch from the list.
6296var previous=null;var batch=firstBatch;while(batch!==this){previous=batch;batch=batch._next;}!(previous!==null)?invariant(false,'batch.commit: Cannot commit a batch multiple times.'):void 0;previous._next=batch._next;// Add it to the front.
6297this._next=firstBatch;firstBatch=internalRoot.firstBatch=this;}// Synchronously flush all the work up to this batch's expiration time.
6298this._defer=false;flushRoot(internalRoot,expirationTime);// Pop the batch from the list.
6299var next=this._next;this._next=null;firstBatch=internalRoot.firstBatch=next;// Append the next earliest batch's children to the update queue.
6300if(firstBatch!==null&&firstBatch._hasChildren){firstBatch.render(firstBatch._children);}};ReactBatch.prototype._onComplete=function(){if(this._didComplete){return;}this._didComplete=true;var callbacks=this._callbacks;if(callbacks===null){return;}// TODO: Error handling.
6301for(var i=0;i<callbacks.length;i++){var _callback=callbacks[i];_callback();}};function ReactWork(){this._callbacks=null;this._didCommit=false;// TODO: Avoid need to bind by replacing callbacks in the update queue with
6302// list of Work objects.
6303this._onCommit=this._onCommit.bind(this);}ReactWork.prototype.then=function(onCommit){if(this._didCommit){onCommit();return;}var callbacks=this._callbacks;if(callbacks===null){callbacks=this._callbacks=[];}callbacks.push(onCommit);};ReactWork.prototype._onCommit=function(){if(this._didCommit){return;}this._didCommit=true;var callbacks=this._callbacks;if(callbacks===null){return;}// TODO: Error handling.
6304for(var i=0;i<callbacks.length;i++){var _callback2=callbacks[i];!(typeof _callback2==='function')?invariant(false,'Invalid argument passed as callback. Expected a function. Instead received: %s',_callback2):void 0;_callback2();}};function ReactRoot(container,isAsync,hydrate){var root=createContainer(container,isAsync,hydrate);this._internalRoot=root;}ReactRoot.prototype.render=function(children,callback){var root=this._internalRoot;var work=new ReactWork();callback=callback===undefined?null:callback;{warnOnInvalidCallback(callback,'render');}if(callback!==null){work.then(callback);}updateContainer(children,root,null,work._onCommit);return work;};ReactRoot.prototype.unmount=function(callback){var root=this._internalRoot;var work=new ReactWork();callback=callback===undefined?null:callback;{warnOnInvalidCallback(callback,'render');}if(callback!==null){work.then(callback);}updateContainer(null,root,null,work._onCommit);return work;};ReactRoot.prototype.legacy_renderSubtreeIntoContainer=function(parentComponent,children,callback){var root=this._internalRoot;var work=new ReactWork();callback=callback===undefined?null:callback;{warnOnInvalidCallback(callback,'render');}if(callback!==null){work.then(callback);}updateContainer(children,root,parentComponent,work._onCommit);return work;};ReactRoot.prototype.createBatch=function(){var batch=new ReactBatch(this);var expirationTime=batch._expirationTime;var internalRoot=this._internalRoot;var firstBatch=internalRoot.firstBatch;if(firstBatch===null){internalRoot.firstBatch=batch;batch._next=null;}else{// Insert sorted by expiration time then insertion order
6305var insertAfter=null;var insertBefore=firstBatch;while(insertBefore!==null&&insertBefore._expirationTime<=expirationTime){insertAfter=insertBefore;insertBefore=insertBefore._next;}batch._next=insertBefore;if(insertAfter!==null){insertAfter._next=batch;}}return batch;};/**
6306 * True if the supplied DOM node is a valid node element.
6307 *
6308 * @param {?DOMElement} node The candidate DOM node.
6309 * @return {boolean} True if the DOM is a valid DOM node.
6310 * @internal
6311 */function isValidContainer(node){return!!(node&&(node.nodeType===ELEMENT_NODE||node.nodeType===DOCUMENT_NODE||node.nodeType===DOCUMENT_FRAGMENT_NODE||node.nodeType===COMMENT_NODE&&node.nodeValue===' react-mount-point-unstable '));}function getReactRootElementInContainer(container){if(!container){return null;}if(container.nodeType===DOCUMENT_NODE){return container.documentElement;}else{return container.firstChild;}}function shouldHydrateDueToLegacyHeuristic(container){var rootElement=getReactRootElementInContainer(container);return!!(rootElement&&rootElement.nodeType===ELEMENT_NODE&&rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME));}setBatchingImplementation(batchedUpdates$1,interactiveUpdates$1,flushInteractiveUpdates$1);var warnedAboutHydrateAPI=false;function legacyCreateRootFromDOMContainer(container,forceHydrate){var shouldHydrate=forceHydrate||shouldHydrateDueToLegacyHeuristic(container);// First clear any existing content.
6312if(!shouldHydrate){var warned=false;var rootSibling=void 0;while(rootSibling=container.lastChild){{if(!warned&&rootSibling.nodeType===ELEMENT_NODE&&rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)){warned=true;warningWithoutStack$1(false,'render(): Target node has markup rendered by React, but there '+'are unrelated nodes as well. This is most commonly caused by '+'white-space inserted around server-rendered markup.');}}container.removeChild(rootSibling);}}{if(shouldHydrate&&!forceHydrate&&!warnedAboutHydrateAPI){warnedAboutHydrateAPI=true;lowPriorityWarning$1(false,'render(): Calling ReactDOM.render() to hydrate server-rendered markup '+'will stop working in React v17. Replace the ReactDOM.render() call '+'with ReactDOM.hydrate() if you want React to attach to the server HTML.');}}// Legacy roots are not async by default.
6313var isAsync=false;return new ReactRoot(container,isAsync,shouldHydrate);}function legacyRenderSubtreeIntoContainer(parentComponent,children,container,forceHydrate,callback){// TODO: Ensure all entry points contain this check
6314!isValidContainer(container)?invariant(false,'Target container is not a DOM element.'):void 0;{topLevelUpdateWarnings(container);}// TODO: Without `any` type, Flow says "Property cannot be accessed on any
6315// member of intersection type." Whyyyyyy.
6316var root=container._reactRootContainer;if(!root){// Initial mount
6317root=container._reactRootContainer=legacyCreateRootFromDOMContainer(container,forceHydrate);if(typeof callback==='function'){var originalCallback=callback;callback=function(){var instance=getPublicRootInstance(root._internalRoot);originalCallback.call(instance);};}// Initial mount should not be batched.
6318unbatchedUpdates(function(){if(parentComponent!=null){root.legacy_renderSubtreeIntoContainer(parentComponent,children,callback);}else{root.render(children,callback);}});}else{if(typeof callback==='function'){var _originalCallback=callback;callback=function(){var instance=getPublicRootInstance(root._internalRoot);_originalCallback.call(instance);};}// Update
6319if(parentComponent!=null){root.legacy_renderSubtreeIntoContainer(parentComponent,children,callback);}else{root.render(children,callback);}}return getPublicRootInstance(root._internalRoot);}function createPortal(children,container){var key=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;!isValidContainer(container)?invariant(false,'Target container is not a DOM element.'):void 0;// TODO: pass ReactDOM portal implementation as third argument
6320return createPortal$1(children,container,null,key);}var ReactDOM={createPortal:createPortal,findDOMNode:function(componentOrElement){{var owner=ReactCurrentOwner.current;if(owner!==null&&owner.stateNode!==null){var warnedAboutRefsInRender=owner.stateNode._warnedAboutRefsInRender;!warnedAboutRefsInRender?warningWithoutStack$1(false,'%s is accessing findDOMNode inside its render(). '+'render() should be a pure function of props and state. It should '+'never access something that requires stale data from the previous '+'render, such as refs. Move this logic to componentDidMount and '+'componentDidUpdate instead.',getComponentName(owner.type)||'A component'):void 0;owner.stateNode._warnedAboutRefsInRender=true;}}if(componentOrElement==null){return null;}if(componentOrElement.nodeType===ELEMENT_NODE){return componentOrElement;}return findHostInstance(componentOrElement);},hydrate:function(element,container,callback){// TODO: throw or warn if we couldn't hydrate?
6321return legacyRenderSubtreeIntoContainer(null,element,container,true,callback);},render:function(element,container,callback){return legacyRenderSubtreeIntoContainer(null,element,container,false,callback);},unstable_renderSubtreeIntoContainer:function(parentComponent,element,containerNode,callback){!(parentComponent!=null&&has(parentComponent))?invariant(false,'parentComponent must be a valid React Component'):void 0;return legacyRenderSubtreeIntoContainer(parentComponent,element,containerNode,false,callback);},unmountComponentAtNode:function(container){!isValidContainer(container)?invariant(false,'unmountComponentAtNode(...): Target container is not a DOM element.'):void 0;if(container._reactRootContainer){{var rootEl=getReactRootElementInContainer(container);var renderedByDifferentReact=rootEl&&!getInstanceFromNode$1(rootEl);!!renderedByDifferentReact?warningWithoutStack$1(false,"unmountComponentAtNode(): The node you're attempting to unmount "+'was rendered by another copy of React.'):void 0;}// Unmount should not be batched.
6322unbatchedUpdates(function(){legacyRenderSubtreeIntoContainer(null,null,container,false,function(){container._reactRootContainer=null;});});// If you call unmountComponentAtNode twice in quick succession, you'll
6323// get `true` twice. That's probably fine?
6324return true;}else{{var _rootEl=getReactRootElementInContainer(container);var hasNonRootReactChild=!!(_rootEl&&getInstanceFromNode$1(_rootEl));// Check if the container itself is a React root node.
6325var isContainerReactRoot=container.nodeType===ELEMENT_NODE&&isValidContainer(container.parentNode)&&!!container.parentNode._reactRootContainer;!!hasNonRootReactChild?warningWithoutStack$1(false,"unmountComponentAtNode(): The node you're attempting to unmount "+'was rendered by React and is not a top-level container. %s',isContainerReactRoot?'You may have accidentally passed in a React root node instead '+'of its container.':'Instead, have the parent component update its state and '+'rerender in order to remove this component.'):void 0;}return false;}},// Temporary alias since we already shipped React 16 RC with it.
6326// TODO: remove in React 17.
6327unstable_createPortal:function(){if(!didWarnAboutUnstableCreatePortal){didWarnAboutUnstableCreatePortal=true;lowPriorityWarning$1(false,'The ReactDOM.unstable_createPortal() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactDOM.createPortal() instead. It has the exact same API, '+'but without the "unstable_" prefix.');}return createPortal.apply(undefined,arguments);},unstable_batchedUpdates:batchedUpdates$1,unstable_interactiveUpdates:interactiveUpdates$1,flushSync:flushSync,unstable_flushControlled:flushControlled,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{// Keep in sync with ReactDOMUnstableNativeDependencies.js
6328// and ReactTestUtils.js. This is an array for better minification.
6329Events:[getInstanceFromNode$1,getNodeFromInstance$1,getFiberCurrentPropsFromNode$1,injection.injectEventPluginsByName,eventNameDispatchConfigs,accumulateTwoPhaseDispatches,accumulateDirectDispatches,enqueueStateRestore,restoreStateIfNeeded,dispatchEvent,runEventsInBatch]}};ReactDOM.unstable_createRoot=function createRoot(container,options){!isValidContainer(container)?invariant(false,'unstable_createRoot(...): Target container is not a DOM element.'):void 0;var hydrate=options!=null&&options.hydrate===true;return new ReactRoot(container,true,hydrate);};var foundDevTools=injectIntoDevTools({findFiberByHostInstance:getClosestInstanceFromNode,bundleType:1,version:ReactVersion,rendererPackageName:'react-dom'});{if(!foundDevTools&&canUseDOM&&window.top===window.self){// If we're in Chrome or Firefox, provide a download link if not installed.
6330if(navigator.userAgent.indexOf('Chrome')>-1&&navigator.userAgent.indexOf('Edge')===-1||navigator.userAgent.indexOf('Firefox')>-1){var protocol=window.location.protocol;// Don't warn in exotic cases like chrome-extension://.
6331if(/^(https?|file):$/.test(protocol)){console.info('%cDownload the React DevTools '+'for a better development experience: '+'https://fb.me/react-devtools'+(protocol==='file:'?'\nYou might need to use a local HTTP server (instead of file://): '+'https://fb.me/react-devtools-faq':''),'font-weight:bold');}}}}var ReactDOM$2=Object.freeze({default:ReactDOM});var ReactDOM$3=ReactDOM$2&&ReactDOM||ReactDOM$2;// TODO: decide on the top-level export form.
6332// This is hacky but makes it work with both Rollup and Jest.
6333var reactDom=ReactDOM$3.default||ReactDOM$3;module.exports=reactDom;})();}
6334
6335/***/ }),
6336
6337/***/ "./node_modules/react-dom/index.js":
6338/*!*****************************************!*\
6339 !*** ./node_modules/react-dom/index.js ***!
6340 \*****************************************/
6341/*! no static exports found */
6342/*! exports used: render */
6343/***/ (function(module, exports, __webpack_require__) {
6344
6345"use strict";
6346
6347
6348function checkDCE() {
6349 /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
6350 if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function') {
6351 return;
6352 }
6353
6354 if (true) {
6355 // This branch is unreachable because this function is only called
6356 // in production, but the condition is true only in development.
6357 // Therefore if the branch is still here, dead code elimination wasn't
6358 // properly applied.
6359 // Don't change the message. React DevTools relies on it. Also make sure
6360 // this message doesn't occur elsewhere in this function, or it will cause
6361 // a false positive.
6362 throw new Error('^_^');
6363 }
6364
6365 try {
6366 // Verify that the code above has been dead code eliminated (DCE'd).
6367 __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
6368 } catch (err) {
6369 // DevTools shouldn't crash React, no matter what.
6370 // We should still report in case we break this code.
6371 console.error(err);
6372 }
6373}
6374
6375if (false) {} else {
6376 module.exports = __webpack_require__(/*! ./cjs/react-dom.development.js */ "./node_modules/react-dom/cjs/react-dom.development.js");
6377}
6378
6379/***/ }),
6380
6381/***/ "./node_modules/react/cjs/react.development.js":
6382/*!*****************************************************!*\
6383 !*** ./node_modules/react/cjs/react.development.js ***!
6384 \*****************************************************/
6385/*! no static exports found */
6386/*! all exports used */
6387/***/ (function(module, exports, __webpack_require__) {
6388
6389"use strict";
6390/** @license React v16.5.2
6391 * react.development.js
6392 *
6393 * Copyright (c) Facebook, Inc. and its affiliates.
6394 *
6395 * This source code is licensed under the MIT license found in the
6396 * LICENSE file in the root directory of this source tree.
6397 */
6398
6399
6400if (true) {
6401 (function () {
6402 'use strict';
6403
6404 var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
6405
6406 var checkPropTypes = __webpack_require__(/*! prop-types/checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js"); // TODO: this is special because it gets imported during build.
6407
6408
6409 var ReactVersion = '16.5.2'; // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
6410 // nor polyfill, then a plain number is used for performance.
6411
6412 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
6413 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
6414 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
6415 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
6416 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
6417 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
6418 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
6419 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
6420 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
6421 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
6422 var REACT_PLACEHOLDER_TYPE = hasSymbol ? Symbol.for('react.placeholder') : 0xead1;
6423 var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
6424 var FAUX_ITERATOR_SYMBOL = '@@iterator';
6425
6426 function getIteratorFn(maybeIterable) {
6427 if (maybeIterable === null || typeof maybeIterable !== 'object') {
6428 return null;
6429 }
6430
6431 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
6432
6433 if (typeof maybeIterator === 'function') {
6434 return maybeIterator;
6435 }
6436
6437 return null;
6438 } // Exports ReactDOM.createRoot
6439 // Experimental error-boundary API that can recover from errors within a single
6440 // render phase
6441 // Suspense
6442
6443
6444 var enableSuspense = false; // Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
6445 // In some cases, StrictMode should also double-render lifecycles.
6446 // This can be confusing for tests though,
6447 // And it can be bad for performance in production.
6448 // This feature flag can be used to control the behavior:
6449 // To preserve the "Pause on caught exceptions" behavior of the debugger, we
6450 // replay the begin phase of a failed component inside invokeGuardedCallback.
6451 // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
6452 // Warn about legacy context API
6453 // Gather advanced timing metrics for Profiler subtrees.
6454 // Trace which interactions trigger each commit.
6455 // Only used in www builds.
6456 // Only used in www builds.
6457 // React Fire: prevent the value and checked attributes from syncing
6458 // with their related DOM properties
6459
6460 /**
6461 * Use invariant() to assert state which your program assumes to be true.
6462 *
6463 * Provide sprintf-style format (only %s is supported) and arguments
6464 * to provide information about what broke and what you were
6465 * expecting.
6466 *
6467 * The invariant message will be stripped in production, but the invariant
6468 * will remain to ensure logic does not differ in production.
6469 */
6470
6471 var validateFormat = function () {};
6472
6473 {
6474 validateFormat = function (format) {
6475 if (format === undefined) {
6476 throw new Error('invariant requires an error message argument');
6477 }
6478 };
6479 }
6480
6481 function invariant(condition, format, a, b, c, d, e, f) {
6482 validateFormat(format);
6483
6484 if (!condition) {
6485 var error = void 0;
6486
6487 if (format === undefined) {
6488 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
6489 } else {
6490 var args = [a, b, c, d, e, f];
6491 var argIndex = 0;
6492 error = new Error(format.replace(/%s/g, function () {
6493 return args[argIndex++];
6494 }));
6495 error.name = 'Invariant Violation';
6496 }
6497
6498 error.framesToPop = 1; // we don't care about invariant's own frame
6499
6500 throw error;
6501 }
6502 } // Relying on the `invariant()` implementation lets us
6503 // preserve the format and params in the www builds.
6504
6505 /**
6506 * Forked from fbjs/warning:
6507 * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
6508 *
6509 * Only change is we use console.warn instead of console.error,
6510 * and do nothing when 'console' is not supported.
6511 * This really simplifies the code.
6512 * ---
6513 * Similar to invariant but only logs a warning if the condition is not met.
6514 * This can be used to log issues in development environments in critical
6515 * paths. Removing the logging code for production environments will keep the
6516 * same logic and follow the same code paths.
6517 */
6518
6519
6520 var lowPriorityWarning = function () {};
6521
6522 {
6523 var printWarning = function (format) {
6524 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
6525 args[_key - 1] = arguments[_key];
6526 }
6527
6528 var argIndex = 0;
6529 var message = 'Warning: ' + format.replace(/%s/g, function () {
6530 return args[argIndex++];
6531 });
6532
6533 if (typeof console !== 'undefined') {
6534 console.warn(message);
6535 }
6536
6537 try {
6538 // --- Welcome to debugging React ---
6539 // This error was thrown as a convenience so that you can use this stack
6540 // to find the callsite that caused this warning to fire.
6541 throw new Error(message);
6542 } catch (x) {}
6543 };
6544
6545 lowPriorityWarning = function (condition, format) {
6546 if (format === undefined) {
6547 throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
6548 }
6549
6550 if (!condition) {
6551 for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
6552 args[_key2 - 2] = arguments[_key2];
6553 }
6554
6555 printWarning.apply(undefined, [format].concat(args));
6556 }
6557 };
6558 }
6559 var lowPriorityWarning$1 = lowPriorityWarning;
6560 /**
6561 * Similar to invariant but only logs a warning if the condition is not met.
6562 * This can be used to log issues in development environments in critical
6563 * paths. Removing the logging code for production environments will keep the
6564 * same logic and follow the same code paths.
6565 */
6566
6567 var warningWithoutStack = function () {};
6568
6569 {
6570 warningWithoutStack = function (condition, format) {
6571 for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
6572 args[_key - 2] = arguments[_key];
6573 }
6574
6575 if (format === undefined) {
6576 throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
6577 }
6578
6579 if (args.length > 8) {
6580 // Check before the condition to catch violations early.
6581 throw new Error('warningWithoutStack() currently supports at most 8 arguments.');
6582 }
6583
6584 if (condition) {
6585 return;
6586 }
6587
6588 if (typeof console !== 'undefined') {
6589 var _args$map = args.map(function (item) {
6590 return '' + item;
6591 }),
6592 a = _args$map[0],
6593 b = _args$map[1],
6594 c = _args$map[2],
6595 d = _args$map[3],
6596 e = _args$map[4],
6597 f = _args$map[5],
6598 g = _args$map[6],
6599 h = _args$map[7];
6600
6601 var message = 'Warning: ' + format; // We intentionally don't use spread (or .apply) because it breaks IE9:
6602 // https://github.com/facebook/react/issues/13610
6603
6604 switch (args.length) {
6605 case 0:
6606 console.error(message);
6607 break;
6608
6609 case 1:
6610 console.error(message, a);
6611 break;
6612
6613 case 2:
6614 console.error(message, a, b);
6615 break;
6616
6617 case 3:
6618 console.error(message, a, b, c);
6619 break;
6620
6621 case 4:
6622 console.error(message, a, b, c, d);
6623 break;
6624
6625 case 5:
6626 console.error(message, a, b, c, d, e);
6627 break;
6628
6629 case 6:
6630 console.error(message, a, b, c, d, e, f);
6631 break;
6632
6633 case 7:
6634 console.error(message, a, b, c, d, e, f, g);
6635 break;
6636
6637 case 8:
6638 console.error(message, a, b, c, d, e, f, g, h);
6639 break;
6640
6641 default:
6642 throw new Error('warningWithoutStack() currently supports at most 8 arguments.');
6643 }
6644 }
6645
6646 try {
6647 // --- Welcome to debugging React ---
6648 // This error was thrown as a convenience so that you can use this stack
6649 // to find the callsite that caused this warning to fire.
6650 var argIndex = 0;
6651
6652 var _message = 'Warning: ' + format.replace(/%s/g, function () {
6653 return args[argIndex++];
6654 });
6655
6656 throw new Error(_message);
6657 } catch (x) {}
6658 };
6659 }
6660 var warningWithoutStack$1 = warningWithoutStack;
6661 var didWarnStateUpdateForUnmountedComponent = {};
6662
6663 function warnNoop(publicInstance, callerName) {
6664 {
6665 var _constructor = publicInstance.constructor;
6666 var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
6667 var warningKey = componentName + '.' + callerName;
6668
6669 if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
6670 return;
6671 }
6672
6673 warningWithoutStack$1(false, "Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
6674 didWarnStateUpdateForUnmountedComponent[warningKey] = true;
6675 }
6676 }
6677 /**
6678 * This is the abstract API for an update queue.
6679 */
6680
6681
6682 var ReactNoopUpdateQueue = {
6683 /**
6684 * Checks whether or not this composite component is mounted.
6685 * @param {ReactClass} publicInstance The instance we want to test.
6686 * @return {boolean} True if mounted, false otherwise.
6687 * @protected
6688 * @final
6689 */
6690 isMounted: function (publicInstance) {
6691 return false;
6692 },
6693
6694 /**
6695 * Forces an update. This should only be invoked when it is known with
6696 * certainty that we are **not** in a DOM transaction.
6697 *
6698 * You may want to call this when you know that some deeper aspect of the
6699 * component's state has changed but `setState` was not called.
6700 *
6701 * This will not invoke `shouldComponentUpdate`, but it will invoke
6702 * `componentWillUpdate` and `componentDidUpdate`.
6703 *
6704 * @param {ReactClass} publicInstance The instance that should rerender.
6705 * @param {?function} callback Called after component is updated.
6706 * @param {?string} callerName name of the calling function in the public API.
6707 * @internal
6708 */
6709 enqueueForceUpdate: function (publicInstance, callback, callerName) {
6710 warnNoop(publicInstance, 'forceUpdate');
6711 },
6712
6713 /**
6714 * Replaces all of the state. Always use this or `setState` to mutate state.
6715 * You should treat `this.state` as immutable.
6716 *
6717 * There is no guarantee that `this.state` will be immediately updated, so
6718 * accessing `this.state` after calling this method may return the old value.
6719 *
6720 * @param {ReactClass} publicInstance The instance that should rerender.
6721 * @param {object} completeState Next state.
6722 * @param {?function} callback Called after component is updated.
6723 * @param {?string} callerName name of the calling function in the public API.
6724 * @internal
6725 */
6726 enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
6727 warnNoop(publicInstance, 'replaceState');
6728 },
6729
6730 /**
6731 * Sets a subset of the state. This only exists because _pendingState is
6732 * internal. This provides a merging strategy that is not available to deep
6733 * properties which is confusing. TODO: Expose pendingState or don't use it
6734 * during the merge.
6735 *
6736 * @param {ReactClass} publicInstance The instance that should rerender.
6737 * @param {object} partialState Next partial state to be merged with state.
6738 * @param {?function} callback Called after component is updated.
6739 * @param {?string} Name of the calling function in the public API.
6740 * @internal
6741 */
6742 enqueueSetState: function (publicInstance, partialState, callback, callerName) {
6743 warnNoop(publicInstance, 'setState');
6744 }
6745 };
6746 var emptyObject = {};
6747 {
6748 Object.freeze(emptyObject);
6749 }
6750 /**
6751 * Base class helpers for the updating state of a component.
6752 */
6753
6754 function Component(props, context, updater) {
6755 this.props = props;
6756 this.context = context; // If a component has string refs, we will assign a different object later.
6757
6758 this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
6759 // renderer.
6760
6761 this.updater = updater || ReactNoopUpdateQueue;
6762 }
6763
6764 Component.prototype.isReactComponent = {};
6765 /**
6766 * Sets a subset of the state. Always use this to mutate
6767 * state. You should treat `this.state` as immutable.
6768 *
6769 * There is no guarantee that `this.state` will be immediately updated, so
6770 * accessing `this.state` after calling this method may return the old value.
6771 *
6772 * There is no guarantee that calls to `setState` will run synchronously,
6773 * as they may eventually be batched together. You can provide an optional
6774 * callback that will be executed when the call to setState is actually
6775 * completed.
6776 *
6777 * When a function is provided to setState, it will be called at some point in
6778 * the future (not synchronously). It will be called with the up to date
6779 * component arguments (state, props, context). These values can be different
6780 * from this.* because your function may be called after receiveProps but before
6781 * shouldComponentUpdate, and this new state, props, and context will not yet be
6782 * assigned to this.
6783 *
6784 * @param {object|function} partialState Next partial state or function to
6785 * produce next partial state to be merged with current state.
6786 * @param {?function} callback Called after state is updated.
6787 * @final
6788 * @protected
6789 */
6790
6791 Component.prototype.setState = function (partialState, callback) {
6792 !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0;
6793 this.updater.enqueueSetState(this, partialState, callback, 'setState');
6794 };
6795 /**
6796 * Forces an update. This should only be invoked when it is known with
6797 * certainty that we are **not** in a DOM transaction.
6798 *
6799 * You may want to call this when you know that some deeper aspect of the
6800 * component's state has changed but `setState` was not called.
6801 *
6802 * This will not invoke `shouldComponentUpdate`, but it will invoke
6803 * `componentWillUpdate` and `componentDidUpdate`.
6804 *
6805 * @param {?function} callback Called after update is complete.
6806 * @final
6807 * @protected
6808 */
6809
6810
6811 Component.prototype.forceUpdate = function (callback) {
6812 this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
6813 };
6814 /**
6815 * Deprecated APIs. These APIs used to exist on classic React classes but since
6816 * we would like to deprecate them, we're not going to move them over to this
6817 * modern base class. Instead, we define a getter that warns if it's accessed.
6818 */
6819
6820
6821 {
6822 var deprecatedAPIs = {
6823 isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
6824 replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
6825 };
6826
6827 var defineDeprecationWarning = function (methodName, info) {
6828 Object.defineProperty(Component.prototype, methodName, {
6829 get: function () {
6830 lowPriorityWarning$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
6831 return undefined;
6832 }
6833 });
6834 };
6835
6836 for (var fnName in deprecatedAPIs) {
6837 if (deprecatedAPIs.hasOwnProperty(fnName)) {
6838 defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
6839 }
6840 }
6841 }
6842
6843 function ComponentDummy() {}
6844
6845 ComponentDummy.prototype = Component.prototype;
6846 /**
6847 * Convenience component with default shallow equality check for sCU.
6848 */
6849
6850 function PureComponent(props, context, updater) {
6851 this.props = props;
6852 this.context = context; // If a component has string refs, we will assign a different object later.
6853
6854 this.refs = emptyObject;
6855 this.updater = updater || ReactNoopUpdateQueue;
6856 }
6857
6858 var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
6859 pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
6860
6861 _assign(pureComponentPrototype, Component.prototype);
6862
6863 pureComponentPrototype.isPureReactComponent = true; // an immutable object with a single mutable value
6864
6865 function createRef() {
6866 var refObject = {
6867 current: null
6868 };
6869 {
6870 Object.seal(refObject);
6871 }
6872 return refObject;
6873 }
6874 /**
6875 * Keeps track of the current owner.
6876 *
6877 * The current owner is the component who should own any components that are
6878 * currently being constructed.
6879 */
6880
6881
6882 var ReactCurrentOwner = {
6883 /**
6884 * @internal
6885 * @type {ReactComponent}
6886 */
6887 current: null,
6888 currentDispatcher: null
6889 };
6890 var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
6891
6892 var describeComponentFrame = function (name, source, ownerName) {
6893 var sourceInfo = '';
6894
6895 if (source) {
6896 var path = source.fileName;
6897 var fileName = path.replace(BEFORE_SLASH_RE, '');
6898 {
6899 // In DEV, include code for a common special case:
6900 // prefer "folder/index.js" instead of just "index.js".
6901 if (/^index\./.test(fileName)) {
6902 var match = path.match(BEFORE_SLASH_RE);
6903
6904 if (match) {
6905 var pathBeforeSlash = match[1];
6906
6907 if (pathBeforeSlash) {
6908 var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
6909 fileName = folderName + '/' + fileName;
6910 }
6911 }
6912 }
6913 }
6914 sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
6915 } else if (ownerName) {
6916 sourceInfo = ' (created by ' + ownerName + ')';
6917 }
6918
6919 return '\n in ' + (name || 'Unknown') + sourceInfo;
6920 };
6921
6922 var Resolved = 1;
6923
6924 function refineResolvedThenable(thenable) {
6925 return thenable._reactStatus === Resolved ? thenable._reactResult : null;
6926 }
6927
6928 function getComponentName(type) {
6929 if (type == null) {
6930 // Host root, text node or just invalid type.
6931 return null;
6932 }
6933
6934 {
6935 if (typeof type.tag === 'number') {
6936 warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
6937 }
6938 }
6939
6940 if (typeof type === 'function') {
6941 return type.displayName || type.name || null;
6942 }
6943
6944 if (typeof type === 'string') {
6945 return type;
6946 }
6947
6948 switch (type) {
6949 case REACT_ASYNC_MODE_TYPE:
6950 return 'AsyncMode';
6951
6952 case REACT_FRAGMENT_TYPE:
6953 return 'Fragment';
6954
6955 case REACT_PORTAL_TYPE:
6956 return 'Portal';
6957
6958 case REACT_PROFILER_TYPE:
6959 return 'Profiler';
6960
6961 case REACT_STRICT_MODE_TYPE:
6962 return 'StrictMode';
6963
6964 case REACT_PLACEHOLDER_TYPE:
6965 return 'Placeholder';
6966 }
6967
6968 if (typeof type === 'object') {
6969 switch (type.$$typeof) {
6970 case REACT_CONTEXT_TYPE:
6971 return 'Context.Consumer';
6972
6973 case REACT_PROVIDER_TYPE:
6974 return 'Context.Provider';
6975
6976 case REACT_FORWARD_REF_TYPE:
6977 var renderFn = type.render;
6978 var functionName = renderFn.displayName || renderFn.name || '';
6979 return type.displayName || (functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef');
6980 }
6981
6982 if (typeof type.then === 'function') {
6983 var thenable = type;
6984 var resolvedThenable = refineResolvedThenable(thenable);
6985
6986 if (resolvedThenable) {
6987 return getComponentName(resolvedThenable);
6988 }
6989 }
6990 }
6991
6992 return null;
6993 }
6994
6995 var ReactDebugCurrentFrame = {};
6996 var currentlyValidatingElement = null;
6997
6998 function setCurrentlyValidatingElement(element) {
6999 {
7000 currentlyValidatingElement = element;
7001 }
7002 }
7003
7004 {
7005 // Stack implementation injected by the current renderer.
7006 ReactDebugCurrentFrame.getCurrentStack = null;
7007
7008 ReactDebugCurrentFrame.getStackAddendum = function () {
7009 var stack = ''; // Add an extra top frame while an element is being validated
7010
7011 if (currentlyValidatingElement) {
7012 var name = getComponentName(currentlyValidatingElement.type);
7013 var owner = currentlyValidatingElement._owner;
7014 stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
7015 } // Delegate to the injected renderer-specific implementation
7016
7017
7018 var impl = ReactDebugCurrentFrame.getCurrentStack;
7019
7020 if (impl) {
7021 stack += impl() || '';
7022 }
7023
7024 return stack;
7025 };
7026 }
7027 var ReactSharedInternals = {
7028 ReactCurrentOwner: ReactCurrentOwner,
7029 // Used by renderers to avoid bundling object-assign twice in UMD bundles:
7030 assign: _assign
7031 };
7032 {
7033 _assign(ReactSharedInternals, {
7034 // These should not be included in production.
7035 ReactDebugCurrentFrame: ReactDebugCurrentFrame,
7036 // Shim for React DOM 16.0.0 which still destructured (but not used) this.
7037 // TODO: remove in React 17.0.
7038 ReactComponentTreeHook: {}
7039 });
7040 }
7041 /**
7042 * Similar to invariant but only logs a warning if the condition is not met.
7043 * This can be used to log issues in development environments in critical
7044 * paths. Removing the logging code for production environments will keep the
7045 * same logic and follow the same code paths.
7046 */
7047
7048 var warning = warningWithoutStack$1;
7049 {
7050 warning = function (condition, format) {
7051 if (condition) {
7052 return;
7053 }
7054
7055 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
7056 var stack = ReactDebugCurrentFrame.getStackAddendum(); // eslint-disable-next-line react-internal/warning-and-invariant-args
7057
7058 for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
7059 args[_key - 2] = arguments[_key];
7060 }
7061
7062 warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));
7063 };
7064 }
7065 var warning$1 = warning;
7066 var hasOwnProperty = Object.prototype.hasOwnProperty;
7067 var RESERVED_PROPS = {
7068 key: true,
7069 ref: true,
7070 __self: true,
7071 __source: true
7072 };
7073 var specialPropKeyWarningShown = void 0;
7074 var specialPropRefWarningShown = void 0;
7075
7076 function hasValidRef(config) {
7077 {
7078 if (hasOwnProperty.call(config, 'ref')) {
7079 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
7080
7081 if (getter && getter.isReactWarning) {
7082 return false;
7083 }
7084 }
7085 }
7086 return config.ref !== undefined;
7087 }
7088
7089 function hasValidKey(config) {
7090 {
7091 if (hasOwnProperty.call(config, 'key')) {
7092 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
7093
7094 if (getter && getter.isReactWarning) {
7095 return false;
7096 }
7097 }
7098 }
7099 return config.key !== undefined;
7100 }
7101
7102 function defineKeyPropWarningGetter(props, displayName) {
7103 var warnAboutAccessingKey = function () {
7104 if (!specialPropKeyWarningShown) {
7105 specialPropKeyWarningShown = true;
7106 warningWithoutStack$1(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
7107 }
7108 };
7109
7110 warnAboutAccessingKey.isReactWarning = true;
7111 Object.defineProperty(props, 'key', {
7112 get: warnAboutAccessingKey,
7113 configurable: true
7114 });
7115 }
7116
7117 function defineRefPropWarningGetter(props, displayName) {
7118 var warnAboutAccessingRef = function () {
7119 if (!specialPropRefWarningShown) {
7120 specialPropRefWarningShown = true;
7121 warningWithoutStack$1(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
7122 }
7123 };
7124
7125 warnAboutAccessingRef.isReactWarning = true;
7126 Object.defineProperty(props, 'ref', {
7127 get: warnAboutAccessingRef,
7128 configurable: true
7129 });
7130 }
7131 /**
7132 * Factory method to create a new React element. This no longer adheres to
7133 * the class pattern, so do not use new to call it. Also, no instanceof check
7134 * will work. Instead test $$typeof field against Symbol.for('react.element') to check
7135 * if something is a React Element.
7136 *
7137 * @param {*} type
7138 * @param {*} key
7139 * @param {string|object} ref
7140 * @param {*} self A *temporary* helper to detect places where `this` is
7141 * different from the `owner` when React.createElement is called, so that we
7142 * can warn. We want to get rid of owner and replace string `ref`s with arrow
7143 * functions, and as long as `this` and owner are the same, there will be no
7144 * change in behavior.
7145 * @param {*} source An annotation object (added by a transpiler or otherwise)
7146 * indicating filename, line number, and/or other information.
7147 * @param {*} owner
7148 * @param {*} props
7149 * @internal
7150 */
7151
7152
7153 var ReactElement = function (type, key, ref, self, source, owner, props) {
7154 var element = {
7155 // This tag allows us to uniquely identify this as a React Element
7156 $$typeof: REACT_ELEMENT_TYPE,
7157 // Built-in properties that belong on the element
7158 type: type,
7159 key: key,
7160 ref: ref,
7161 props: props,
7162 // Record the component responsible for creating this element.
7163 _owner: owner
7164 };
7165 {
7166 // The validation flag is currently mutative. We put it on
7167 // an external backing store so that we can freeze the whole object.
7168 // This can be replaced with a WeakMap once they are implemented in
7169 // commonly used development environments.
7170 element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
7171 // the validation flag non-enumerable (where possible, which should
7172 // include every environment we run tests in), so the test framework
7173 // ignores it.
7174
7175 Object.defineProperty(element._store, 'validated', {
7176 configurable: false,
7177 enumerable: false,
7178 writable: true,
7179 value: false
7180 }); // self and source are DEV only properties.
7181
7182 Object.defineProperty(element, '_self', {
7183 configurable: false,
7184 enumerable: false,
7185 writable: false,
7186 value: self
7187 }); // Two elements created in two different places should be considered
7188 // equal for testing purposes and therefore we hide it from enumeration.
7189
7190 Object.defineProperty(element, '_source', {
7191 configurable: false,
7192 enumerable: false,
7193 writable: false,
7194 value: source
7195 });
7196
7197 if (Object.freeze) {
7198 Object.freeze(element.props);
7199 Object.freeze(element);
7200 }
7201 }
7202 return element;
7203 };
7204 /**
7205 * Create and return a new ReactElement of the given type.
7206 * See https://reactjs.org/docs/react-api.html#createelement
7207 */
7208
7209
7210 function createElement(type, config, children) {
7211 var propName = void 0; // Reserved names are extracted
7212
7213 var props = {};
7214 var key = null;
7215 var ref = null;
7216 var self = null;
7217 var source = null;
7218
7219 if (config != null) {
7220 if (hasValidRef(config)) {
7221 ref = config.ref;
7222 }
7223
7224 if (hasValidKey(config)) {
7225 key = '' + config.key;
7226 }
7227
7228 self = config.__self === undefined ? null : config.__self;
7229 source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
7230
7231 for (propName in config) {
7232 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
7233 props[propName] = config[propName];
7234 }
7235 }
7236 } // Children can be more than one argument, and those are transferred onto
7237 // the newly allocated props object.
7238
7239
7240 var childrenLength = arguments.length - 2;
7241
7242 if (childrenLength === 1) {
7243 props.children = children;
7244 } else if (childrenLength > 1) {
7245 var childArray = Array(childrenLength);
7246
7247 for (var i = 0; i < childrenLength; i++) {
7248 childArray[i] = arguments[i + 2];
7249 }
7250
7251 {
7252 if (Object.freeze) {
7253 Object.freeze(childArray);
7254 }
7255 }
7256 props.children = childArray;
7257 } // Resolve default props
7258
7259
7260 if (type && type.defaultProps) {
7261 var defaultProps = type.defaultProps;
7262
7263 for (propName in defaultProps) {
7264 if (props[propName] === undefined) {
7265 props[propName] = defaultProps[propName];
7266 }
7267 }
7268 }
7269
7270 {
7271 if (key || ref) {
7272 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
7273
7274 if (key) {
7275 defineKeyPropWarningGetter(props, displayName);
7276 }
7277
7278 if (ref) {
7279 defineRefPropWarningGetter(props, displayName);
7280 }
7281 }
7282 }
7283 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
7284 }
7285 /**
7286 * Return a function that produces ReactElements of a given type.
7287 * See https://reactjs.org/docs/react-api.html#createfactory
7288 */
7289
7290
7291 function cloneAndReplaceKey(oldElement, newKey) {
7292 var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
7293 return newElement;
7294 }
7295 /**
7296 * Clone and return a new ReactElement using element as the starting point.
7297 * See https://reactjs.org/docs/react-api.html#cloneelement
7298 */
7299
7300
7301 function cloneElement(element, config, children) {
7302 !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;
7303 var propName = void 0; // Original props are copied
7304
7305 var props = _assign({}, element.props); // Reserved names are extracted
7306
7307
7308 var key = element.key;
7309 var ref = element.ref; // Self is preserved since the owner is preserved.
7310
7311 var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
7312 // transpiler, and the original source is probably a better indicator of the
7313 // true owner.
7314
7315 var source = element._source; // Owner will be preserved, unless ref is overridden
7316
7317 var owner = element._owner;
7318
7319 if (config != null) {
7320 if (hasValidRef(config)) {
7321 // Silently steal the ref from the parent.
7322 ref = config.ref;
7323 owner = ReactCurrentOwner.current;
7324 }
7325
7326 if (hasValidKey(config)) {
7327 key = '' + config.key;
7328 } // Remaining properties override existing props
7329
7330
7331 var defaultProps = void 0;
7332
7333 if (element.type && element.type.defaultProps) {
7334 defaultProps = element.type.defaultProps;
7335 }
7336
7337 for (propName in config) {
7338 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
7339 if (config[propName] === undefined && defaultProps !== undefined) {
7340 // Resolve default props
7341 props[propName] = defaultProps[propName];
7342 } else {
7343 props[propName] = config[propName];
7344 }
7345 }
7346 }
7347 } // Children can be more than one argument, and those are transferred onto
7348 // the newly allocated props object.
7349
7350
7351 var childrenLength = arguments.length - 2;
7352
7353 if (childrenLength === 1) {
7354 props.children = children;
7355 } else if (childrenLength > 1) {
7356 var childArray = Array(childrenLength);
7357
7358 for (var i = 0; i < childrenLength; i++) {
7359 childArray[i] = arguments[i + 2];
7360 }
7361
7362 props.children = childArray;
7363 }
7364
7365 return ReactElement(element.type, key, ref, self, source, owner, props);
7366 }
7367 /**
7368 * Verifies the object is a ReactElement.
7369 * See https://reactjs.org/docs/react-api.html#isvalidelement
7370 * @param {?object} object
7371 * @return {boolean} True if `object` is a ReactElement.
7372 * @final
7373 */
7374
7375
7376 function isValidElement(object) {
7377 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
7378 }
7379
7380 var SEPARATOR = '.';
7381 var SUBSEPARATOR = ':';
7382 /**
7383 * Escape and wrap key so it is safe to use as a reactid
7384 *
7385 * @param {string} key to be escaped.
7386 * @return {string} the escaped key.
7387 */
7388
7389 function escape(key) {
7390 var escapeRegex = /[=:]/g;
7391 var escaperLookup = {
7392 '=': '=0',
7393 ':': '=2'
7394 };
7395 var escapedString = ('' + key).replace(escapeRegex, function (match) {
7396 return escaperLookup[match];
7397 });
7398 return '$' + escapedString;
7399 }
7400 /**
7401 * TODO: Test that a single child and an array with one item have the same key
7402 * pattern.
7403 */
7404
7405
7406 var didWarnAboutMaps = false;
7407 var userProvidedKeyEscapeRegex = /\/+/g;
7408
7409 function escapeUserProvidedKey(text) {
7410 return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
7411 }
7412
7413 var POOL_SIZE = 10;
7414 var traverseContextPool = [];
7415
7416 function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
7417 if (traverseContextPool.length) {
7418 var traverseContext = traverseContextPool.pop();
7419 traverseContext.result = mapResult;
7420 traverseContext.keyPrefix = keyPrefix;
7421 traverseContext.func = mapFunction;
7422 traverseContext.context = mapContext;
7423 traverseContext.count = 0;
7424 return traverseContext;
7425 } else {
7426 return {
7427 result: mapResult,
7428 keyPrefix: keyPrefix,
7429 func: mapFunction,
7430 context: mapContext,
7431 count: 0
7432 };
7433 }
7434 }
7435
7436 function releaseTraverseContext(traverseContext) {
7437 traverseContext.result = null;
7438 traverseContext.keyPrefix = null;
7439 traverseContext.func = null;
7440 traverseContext.context = null;
7441 traverseContext.count = 0;
7442
7443 if (traverseContextPool.length < POOL_SIZE) {
7444 traverseContextPool.push(traverseContext);
7445 }
7446 }
7447 /**
7448 * @param {?*} children Children tree container.
7449 * @param {!string} nameSoFar Name of the key path so far.
7450 * @param {!function} callback Callback to invoke with each child found.
7451 * @param {?*} traverseContext Used to pass information throughout the traversal
7452 * process.
7453 * @return {!number} The number of children in this subtree.
7454 */
7455
7456
7457 function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
7458 var type = typeof children;
7459
7460 if (type === 'undefined' || type === 'boolean') {
7461 // All of the above are perceived as null.
7462 children = null;
7463 }
7464
7465 var invokeCallback = false;
7466
7467 if (children === null) {
7468 invokeCallback = true;
7469 } else {
7470 switch (type) {
7471 case 'string':
7472 case 'number':
7473 invokeCallback = true;
7474 break;
7475
7476 case 'object':
7477 switch (children.$$typeof) {
7478 case REACT_ELEMENT_TYPE:
7479 case REACT_PORTAL_TYPE:
7480 invokeCallback = true;
7481 }
7482
7483 }
7484 }
7485
7486 if (invokeCallback) {
7487 callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array
7488 // so that it's consistent if the number of children grows.
7489 nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
7490 return 1;
7491 }
7492
7493 var child = void 0;
7494 var nextName = void 0;
7495 var subtreeCount = 0; // Count of children found in the current subtree.
7496
7497 var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
7498
7499 if (Array.isArray(children)) {
7500 for (var i = 0; i < children.length; i++) {
7501 child = children[i];
7502 nextName = nextNamePrefix + getComponentKey(child, i);
7503 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
7504 }
7505 } else {
7506 var iteratorFn = getIteratorFn(children);
7507
7508 if (typeof iteratorFn === 'function') {
7509 {
7510 // Warn about using Maps as children
7511 if (iteratorFn === children.entries) {
7512 !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;
7513 didWarnAboutMaps = true;
7514 }
7515 }
7516 var iterator = iteratorFn.call(children);
7517 var step = void 0;
7518 var ii = 0;
7519
7520 while (!(step = iterator.next()).done) {
7521 child = step.value;
7522 nextName = nextNamePrefix + getComponentKey(child, ii++);
7523 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
7524 }
7525 } else if (type === 'object') {
7526 var addendum = '';
7527 {
7528 addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
7529 }
7530 var childrenString = '' + children;
7531 invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum);
7532 }
7533 }
7534
7535 return subtreeCount;
7536 }
7537 /**
7538 * Traverses children that are typically specified as `props.children`, but
7539 * might also be specified through attributes:
7540 *
7541 * - `traverseAllChildren(this.props.children, ...)`
7542 * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
7543 *
7544 * The `traverseContext` is an optional argument that is passed through the
7545 * entire traversal. It can be used to store accumulations or anything else that
7546 * the callback might find relevant.
7547 *
7548 * @param {?*} children Children tree object.
7549 * @param {!function} callback To invoke upon traversing each child.
7550 * @param {?*} traverseContext Context for traversal.
7551 * @return {!number} The number of children in this subtree.
7552 */
7553
7554
7555 function traverseAllChildren(children, callback, traverseContext) {
7556 if (children == null) {
7557 return 0;
7558 }
7559
7560 return traverseAllChildrenImpl(children, '', callback, traverseContext);
7561 }
7562 /**
7563 * Generate a key string that identifies a component within a set.
7564 *
7565 * @param {*} component A component that could contain a manual key.
7566 * @param {number} index Index that is used if a manual key is not provided.
7567 * @return {string}
7568 */
7569
7570
7571 function getComponentKey(component, index) {
7572 // Do some typechecking here since we call this blindly. We want to ensure
7573 // that we don't block potential future ES APIs.
7574 if (typeof component === 'object' && component !== null && component.key != null) {
7575 // Explicit key
7576 return escape(component.key);
7577 } // Implicit key determined by the index in the set
7578
7579
7580 return index.toString(36);
7581 }
7582
7583 function forEachSingleChild(bookKeeping, child, name) {
7584 var func = bookKeeping.func,
7585 context = bookKeeping.context;
7586 func.call(context, child, bookKeeping.count++);
7587 }
7588 /**
7589 * Iterates through children that are typically specified as `props.children`.
7590 *
7591 * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
7592 *
7593 * The provided forEachFunc(child, index) will be called for each
7594 * leaf child.
7595 *
7596 * @param {?*} children Children tree container.
7597 * @param {function(*, int)} forEachFunc
7598 * @param {*} forEachContext Context for forEachContext.
7599 */
7600
7601
7602 function forEachChildren(children, forEachFunc, forEachContext) {
7603 if (children == null) {
7604 return children;
7605 }
7606
7607 var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
7608 traverseAllChildren(children, forEachSingleChild, traverseContext);
7609 releaseTraverseContext(traverseContext);
7610 }
7611
7612 function mapSingleChildIntoContext(bookKeeping, child, childKey) {
7613 var result = bookKeeping.result,
7614 keyPrefix = bookKeeping.keyPrefix,
7615 func = bookKeeping.func,
7616 context = bookKeeping.context;
7617 var mappedChild = func.call(context, child, bookKeeping.count++);
7618
7619 if (Array.isArray(mappedChild)) {
7620 mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
7621 return c;
7622 });
7623 } else if (mappedChild != null) {
7624 if (isValidElement(mappedChild)) {
7625 mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
7626 // traverseAllChildren used to do for objects as children
7627 keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
7628 }
7629
7630 result.push(mappedChild);
7631 }
7632 }
7633
7634 function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
7635 var escapedPrefix = '';
7636
7637 if (prefix != null) {
7638 escapedPrefix = escapeUserProvidedKey(prefix) + '/';
7639 }
7640
7641 var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
7642 traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
7643 releaseTraverseContext(traverseContext);
7644 }
7645 /**
7646 * Maps children that are typically specified as `props.children`.
7647 *
7648 * See https://reactjs.org/docs/react-api.html#reactchildrenmap
7649 *
7650 * The provided mapFunction(child, key, index) will be called for each
7651 * leaf child.
7652 *
7653 * @param {?*} children Children tree container.
7654 * @param {function(*, int)} func The map function.
7655 * @param {*} context Context for mapFunction.
7656 * @return {object} Object containing the ordered map of results.
7657 */
7658
7659
7660 function mapChildren(children, func, context) {
7661 if (children == null) {
7662 return children;
7663 }
7664
7665 var result = [];
7666 mapIntoWithKeyPrefixInternal(children, result, null, func, context);
7667 return result;
7668 }
7669 /**
7670 * Count the number of children that are typically specified as
7671 * `props.children`.
7672 *
7673 * See https://reactjs.org/docs/react-api.html#reactchildrencount
7674 *
7675 * @param {?*} children Children tree container.
7676 * @return {number} The number of children.
7677 */
7678
7679
7680 function countChildren(children) {
7681 return traverseAllChildren(children, function () {
7682 return null;
7683 }, null);
7684 }
7685 /**
7686 * Flatten a children object (typically specified as `props.children`) and
7687 * return an array with appropriately re-keyed children.
7688 *
7689 * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
7690 */
7691
7692
7693 function toArray(children) {
7694 var result = [];
7695 mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
7696 return child;
7697 });
7698 return result;
7699 }
7700 /**
7701 * Returns the first child in a collection of children and verifies that there
7702 * is only one child in the collection.
7703 *
7704 * See https://reactjs.org/docs/react-api.html#reactchildrenonly
7705 *
7706 * The current implementation of this function assumes that a single child gets
7707 * passed without a wrapper, but the purpose of this helper function is to
7708 * abstract away the particular structure of children.
7709 *
7710 * @param {?object} children Child collection structure.
7711 * @return {ReactElement} The first and only `ReactElement` contained in the
7712 * structure.
7713 */
7714
7715
7716 function onlyChild(children) {
7717 !isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0;
7718 return children;
7719 }
7720
7721 function readContext(context, observedBits) {
7722 var dispatcher = ReactCurrentOwner.currentDispatcher;
7723 !(dispatcher !== null) ? invariant(false, 'Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.') : void 0;
7724 return dispatcher.readContext(context, observedBits);
7725 }
7726
7727 function createContext(defaultValue, calculateChangedBits) {
7728 if (calculateChangedBits === undefined) {
7729 calculateChangedBits = null;
7730 } else {
7731 {
7732 !(calculateChangedBits === null || typeof calculateChangedBits === 'function') ? warningWithoutStack$1(false, 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits) : void 0;
7733 }
7734 }
7735
7736 var context = {
7737 $$typeof: REACT_CONTEXT_TYPE,
7738 _calculateChangedBits: calculateChangedBits,
7739 // As a workaround to support multiple concurrent renderers, we categorize
7740 // some renderers as primary and others as secondary. We only expect
7741 // there to be two concurrent renderers at most: React Native (primary) and
7742 // Fabric (secondary); React DOM (primary) and React ART (secondary).
7743 // Secondary renderers store their context values on separate fields.
7744 _currentValue: defaultValue,
7745 _currentValue2: defaultValue,
7746 // These are circular
7747 Provider: null,
7748 Consumer: null,
7749 unstable_read: null
7750 };
7751 context.Provider = {
7752 $$typeof: REACT_PROVIDER_TYPE,
7753 _context: context
7754 };
7755 context.Consumer = context;
7756 context.unstable_read = readContext.bind(null, context);
7757 {
7758 context._currentRenderer = null;
7759 context._currentRenderer2 = null;
7760 }
7761 return context;
7762 }
7763
7764 function lazy(ctor) {
7765 var thenable = null;
7766 return {
7767 then: function (resolve, reject) {
7768 if (thenable === null) {
7769 // Lazily create thenable by wrapping in an extra thenable.
7770 thenable = ctor();
7771 ctor = null;
7772 }
7773
7774 return thenable.then(resolve, reject);
7775 },
7776 // React uses these fields to store the result.
7777 _reactStatus: -1,
7778 _reactResult: null
7779 };
7780 }
7781
7782 function forwardRef(render) {
7783 {
7784 if (typeof render !== 'function') {
7785 warningWithoutStack$1(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
7786 } else {
7787 !( // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object
7788 render.length === 0 || render.length === 2) ? warningWithoutStack$1(false, 'forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.') : void 0;
7789 }
7790
7791 if (render != null) {
7792 !(render.defaultProps == null && render.propTypes == null) ? warningWithoutStack$1(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0;
7793 }
7794 }
7795 return {
7796 $$typeof: REACT_FORWARD_REF_TYPE,
7797 render: render
7798 };
7799 }
7800
7801 function isValidElementType(type) {
7802 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
7803 type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_PLACEHOLDER_TYPE || typeof type === 'object' && type !== null && (typeof type.then === 'function' || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
7804 }
7805 /**
7806 * ReactElementValidator provides a wrapper around a element factory
7807 * which validates the props passed to the element. This is intended to be
7808 * used only in DEV and could be replaced by a static type checker for languages
7809 * that support it.
7810 */
7811
7812
7813 var propTypesMisspellWarningShown = void 0;
7814 {
7815 propTypesMisspellWarningShown = false;
7816 }
7817
7818 function getDeclarationErrorAddendum() {
7819 if (ReactCurrentOwner.current) {
7820 var name = getComponentName(ReactCurrentOwner.current.type);
7821
7822 if (name) {
7823 return '\n\nCheck the render method of `' + name + '`.';
7824 }
7825 }
7826
7827 return '';
7828 }
7829
7830 function getSourceInfoErrorAddendum(elementProps) {
7831 if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
7832 var source = elementProps.__source;
7833 var fileName = source.fileName.replace(/^.*[\\\/]/, '');
7834 var lineNumber = source.lineNumber;
7835 return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
7836 }
7837
7838 return '';
7839 }
7840 /**
7841 * Warn if there's no key explicitly set on dynamic arrays of children or
7842 * object keys are not valid. This allows us to keep track of children between
7843 * updates.
7844 */
7845
7846
7847 var ownerHasKeyUseWarning = {};
7848
7849 function getCurrentComponentErrorInfo(parentType) {
7850 var info = getDeclarationErrorAddendum();
7851
7852 if (!info) {
7853 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
7854
7855 if (parentName) {
7856 info = '\n\nCheck the top-level render call using <' + parentName + '>.';
7857 }
7858 }
7859
7860 return info;
7861 }
7862 /**
7863 * Warn if the element doesn't have an explicit key assigned to it.
7864 * This element is in an array. The array could grow and shrink or be
7865 * reordered. All children that haven't already been validated are required to
7866 * have a "key" property assigned to it. Error statuses are cached so a warning
7867 * will only be shown once.
7868 *
7869 * @internal
7870 * @param {ReactElement} element Element that requires a key.
7871 * @param {*} parentType element's parent's type.
7872 */
7873
7874
7875 function validateExplicitKey(element, parentType) {
7876 if (!element._store || element._store.validated || element.key != null) {
7877 return;
7878 }
7879
7880 element._store.validated = true;
7881 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
7882
7883 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
7884 return;
7885 }
7886
7887 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
7888 // property, it may be the creator of the child that's responsible for
7889 // assigning it a key.
7890
7891 var childOwner = '';
7892
7893 if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
7894 // Give the component that originally created this child.
7895 childOwner = ' It was passed a child from ' + getComponentName(element._owner.type) + '.';
7896 }
7897
7898 setCurrentlyValidatingElement(element);
7899 {
7900 warning$1(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
7901 }
7902 setCurrentlyValidatingElement(null);
7903 }
7904 /**
7905 * Ensure that every element either is passed in a static location, in an
7906 * array with an explicit keys property defined, or in an object literal
7907 * with valid key property.
7908 *
7909 * @internal
7910 * @param {ReactNode} node Statically passed child of any type.
7911 * @param {*} parentType node's parent's type.
7912 */
7913
7914
7915 function validateChildKeys(node, parentType) {
7916 if (typeof node !== 'object') {
7917 return;
7918 }
7919
7920 if (Array.isArray(node)) {
7921 for (var i = 0; i < node.length; i++) {
7922 var child = node[i];
7923
7924 if (isValidElement(child)) {
7925 validateExplicitKey(child, parentType);
7926 }
7927 }
7928 } else if (isValidElement(node)) {
7929 // This element was passed in a valid location.
7930 if (node._store) {
7931 node._store.validated = true;
7932 }
7933 } else if (node) {
7934 var iteratorFn = getIteratorFn(node);
7935
7936 if (typeof iteratorFn === 'function') {
7937 // Entry iterators used to provide implicit keys,
7938 // but now we print a separate warning for them later.
7939 if (iteratorFn !== node.entries) {
7940 var iterator = iteratorFn.call(node);
7941 var step = void 0;
7942
7943 while (!(step = iterator.next()).done) {
7944 if (isValidElement(step.value)) {
7945 validateExplicitKey(step.value, parentType);
7946 }
7947 }
7948 }
7949 }
7950 }
7951 }
7952 /**
7953 * Given an element, validate that its props follow the propTypes definition,
7954 * provided by the type.
7955 *
7956 * @param {ReactElement} element
7957 */
7958
7959
7960 function validatePropTypes(element) {
7961 var type = element.type;
7962 var name = void 0,
7963 propTypes = void 0;
7964
7965 if (typeof type === 'function') {
7966 // Class or functional component
7967 name = type.displayName || type.name;
7968 propTypes = type.propTypes;
7969 } else if (typeof type === 'object' && type !== null && type.$$typeof === REACT_FORWARD_REF_TYPE) {
7970 // ForwardRef
7971 var functionName = type.render.displayName || type.render.name || '';
7972 name = type.displayName || (functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef');
7973 propTypes = type.propTypes;
7974 } else {
7975 return;
7976 }
7977
7978 if (propTypes) {
7979 setCurrentlyValidatingElement(element);
7980 checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
7981 setCurrentlyValidatingElement(null);
7982 } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
7983 propTypesMisspellWarningShown = true;
7984 warningWithoutStack$1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
7985 }
7986
7987 if (typeof type.getDefaultProps === 'function') {
7988 !type.getDefaultProps.isReactClassApproved ? warningWithoutStack$1(false, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
7989 }
7990 }
7991 /**
7992 * Given a fragment, validate that it can only be provided with fragment props
7993 * @param {ReactElement} fragment
7994 */
7995
7996
7997 function validateFragmentProps(fragment) {
7998 setCurrentlyValidatingElement(fragment);
7999 var keys = Object.keys(fragment.props);
8000
8001 for (var i = 0; i < keys.length; i++) {
8002 var key = keys[i];
8003
8004 if (key !== 'children' && key !== 'key') {
8005 warning$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
8006 break;
8007 }
8008 }
8009
8010 if (fragment.ref !== null) {
8011 warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.');
8012 }
8013
8014 setCurrentlyValidatingElement(null);
8015 }
8016
8017 function createElementWithValidation(type, props, children) {
8018 var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
8019 // succeed and there will likely be errors in render.
8020
8021 if (!validType) {
8022 var info = '';
8023
8024 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
8025 info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
8026 }
8027
8028 var sourceInfo = getSourceInfoErrorAddendum(props);
8029
8030 if (sourceInfo) {
8031 info += sourceInfo;
8032 } else {
8033 info += getDeclarationErrorAddendum();
8034 }
8035
8036 var typeString = void 0;
8037
8038 if (type === null) {
8039 typeString = 'null';
8040 } else if (Array.isArray(type)) {
8041 typeString = 'array';
8042 } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
8043 typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />';
8044 info = ' Did you accidentally export a JSX literal instead of a component?';
8045 } else {
8046 typeString = typeof type;
8047 }
8048
8049 warning$1(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
8050 }
8051
8052 var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
8053 // TODO: Drop this when these are no longer allowed as the type argument.
8054
8055 if (element == null) {
8056 return element;
8057 } // Skip key warning if the type isn't valid since our key validation logic
8058 // doesn't expect a non-string/function type and can throw confusing errors.
8059 // We don't want exception behavior to differ between dev and prod.
8060 // (Rendering will throw with a helpful message and as soon as the type is
8061 // fixed, the key warnings will appear.)
8062
8063
8064 if (validType) {
8065 for (var i = 2; i < arguments.length; i++) {
8066 validateChildKeys(arguments[i], type);
8067 }
8068 }
8069
8070 if (type === REACT_FRAGMENT_TYPE) {
8071 validateFragmentProps(element);
8072 } else {
8073 validatePropTypes(element);
8074 }
8075
8076 return element;
8077 }
8078
8079 function createFactoryWithValidation(type) {
8080 var validatedFactory = createElementWithValidation.bind(null, type);
8081 validatedFactory.type = type; // Legacy hook: remove it
8082
8083 {
8084 Object.defineProperty(validatedFactory, 'type', {
8085 enumerable: false,
8086 get: function () {
8087 lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
8088 Object.defineProperty(this, 'type', {
8089 value: type
8090 });
8091 return type;
8092 }
8093 });
8094 }
8095 return validatedFactory;
8096 }
8097
8098 function cloneElementWithValidation(element, props, children) {
8099 var newElement = cloneElement.apply(this, arguments);
8100
8101 for (var i = 2; i < arguments.length; i++) {
8102 validateChildKeys(arguments[i], newElement.type);
8103 }
8104
8105 validatePropTypes(newElement);
8106 return newElement;
8107 }
8108
8109 var React = {
8110 Children: {
8111 map: mapChildren,
8112 forEach: forEachChildren,
8113 count: countChildren,
8114 toArray: toArray,
8115 only: onlyChild
8116 },
8117 createRef: createRef,
8118 Component: Component,
8119 PureComponent: PureComponent,
8120 createContext: createContext,
8121 forwardRef: forwardRef,
8122 Fragment: REACT_FRAGMENT_TYPE,
8123 StrictMode: REACT_STRICT_MODE_TYPE,
8124 unstable_AsyncMode: REACT_ASYNC_MODE_TYPE,
8125 unstable_Profiler: REACT_PROFILER_TYPE,
8126 createElement: createElementWithValidation,
8127 cloneElement: cloneElementWithValidation,
8128 createFactory: createFactoryWithValidation,
8129 isValidElement: isValidElement,
8130 version: ReactVersion,
8131 __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals
8132 };
8133
8134 if (enableSuspense) {
8135 React.Placeholder = REACT_PLACEHOLDER_TYPE;
8136 React.lazy = lazy;
8137 }
8138
8139 var React$2 = Object.freeze({
8140 default: React
8141 });
8142 var React$3 = React$2 && React || React$2; // TODO: decide on the top-level export form.
8143 // This is hacky but makes it work with both Rollup and Jest.
8144
8145 var react = React$3.default || React$3;
8146 module.exports = react;
8147 })();
8148}
8149
8150/***/ }),
8151
8152/***/ "./node_modules/react/index.js":
8153/*!*************************************!*\
8154 !*** ./node_modules/react/index.js ***!
8155 \*************************************/
8156/*! no static exports found */
8157/*! all exports used */
8158/***/ (function(module, exports, __webpack_require__) {
8159
8160"use strict";
8161
8162
8163if (false) {} else {
8164 module.exports = __webpack_require__(/*! ./cjs/react.development.js */ "./node_modules/react/cjs/react.development.js");
8165}
8166
8167/***/ }),
8168
8169/***/ "./node_modules/schedule/cjs/schedule-tracing.development.js":
8170/*!*******************************************************************!*\
8171 !*** ./node_modules/schedule/cjs/schedule-tracing.development.js ***!
8172 \*******************************************************************/
8173/*! no static exports found */
8174/*! all exports used */
8175/***/ (function(module, exports, __webpack_require__) {
8176
8177"use strict";
8178/** @license React v16.5.2
8179 * schedule-tracing.development.js
8180 *
8181 * Copyright (c) Facebook, Inc. and its affiliates.
8182 *
8183 * This source code is licensed under the MIT license found in the
8184 * LICENSE file in the root directory of this source tree.
8185 */
8186
8187
8188if (true) {
8189 (function () {
8190 'use strict';
8191
8192 Object.defineProperty(exports, '__esModule', {
8193 value: true
8194 }); // Exports ReactDOM.createRoot
8195 // Experimental error-boundary API that can recover from errors within a single
8196 // render phase
8197 // Suspense
8198 // Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
8199 // In some cases, StrictMode should also double-render lifecycles.
8200 // This can be confusing for tests though,
8201 // And it can be bad for performance in production.
8202 // This feature flag can be used to control the behavior:
8203 // To preserve the "Pause on caught exceptions" behavior of the debugger, we
8204 // replay the begin phase of a failed component inside invokeGuardedCallback.
8205 // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
8206 // Warn about legacy context API
8207 // Gather advanced timing metrics for Profiler subtrees.
8208 // Trace which interactions trigger each commit.
8209
8210 var enableSchedulerTracing = true; // Only used in www builds.
8211 // Only used in www builds.
8212 // React Fire: prevent the value and checked attributes from syncing
8213 // with their related DOM properties
8214
8215 var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs.
8216
8217 var interactionIDCounter = 0;
8218 var threadIDCounter = 0; // Set of currently traced interactions.
8219 // Interactions "stack"–
8220 // Meaning that newly traced interactions are appended to the previously active set.
8221 // When an interaction goes out of scope, the previous set (if any) is restored.
8222
8223 exports.__interactionsRef = null; // Listener(s) to notify when interactions begin and end.
8224
8225 exports.__subscriberRef = null;
8226
8227 if (enableSchedulerTracing) {
8228 exports.__interactionsRef = {
8229 current: new Set()
8230 };
8231 exports.__subscriberRef = {
8232 current: null
8233 };
8234 }
8235
8236 function unstable_clear(callback) {
8237 if (!enableSchedulerTracing) {
8238 return callback();
8239 }
8240
8241 var prevInteractions = exports.__interactionsRef.current;
8242 exports.__interactionsRef.current = new Set();
8243
8244 try {
8245 return callback();
8246 } finally {
8247 exports.__interactionsRef.current = prevInteractions;
8248 }
8249 }
8250
8251 function unstable_getCurrent() {
8252 if (!enableSchedulerTracing) {
8253 return null;
8254 } else {
8255 return exports.__interactionsRef.current;
8256 }
8257 }
8258
8259 function unstable_getThreadID() {
8260 return ++threadIDCounter;
8261 }
8262
8263 function unstable_trace(name, timestamp, callback) {
8264 var threadID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;
8265
8266 if (!enableSchedulerTracing) {
8267 return callback();
8268 }
8269
8270 var interaction = {
8271 __count: 1,
8272 id: interactionIDCounter++,
8273 name: name,
8274 timestamp: timestamp
8275 };
8276 var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate.
8277 // To do that, clone the current interactions.
8278 // The previous set will be restored upon completion.
8279
8280 var interactions = new Set(prevInteractions);
8281 interactions.add(interaction);
8282 exports.__interactionsRef.current = interactions;
8283 var subscriber = exports.__subscriberRef.current;
8284 var returnValue = void 0;
8285
8286 try {
8287 if (subscriber !== null) {
8288 subscriber.onInteractionTraced(interaction);
8289 }
8290 } finally {
8291 try {
8292 if (subscriber !== null) {
8293 subscriber.onWorkStarted(interactions, threadID);
8294 }
8295 } finally {
8296 try {
8297 returnValue = callback();
8298 } finally {
8299 exports.__interactionsRef.current = prevInteractions;
8300
8301 try {
8302 if (subscriber !== null) {
8303 subscriber.onWorkStopped(interactions, threadID);
8304 }
8305 } finally {
8306 interaction.__count--; // If no async work was scheduled for this interaction,
8307 // Notify subscribers that it's completed.
8308
8309 if (subscriber !== null && interaction.__count === 0) {
8310 subscriber.onInteractionScheduledWorkCompleted(interaction);
8311 }
8312 }
8313 }
8314 }
8315 }
8316
8317 return returnValue;
8318 }
8319
8320 function unstable_wrap(callback) {
8321 var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;
8322
8323 if (!enableSchedulerTracing) {
8324 return callback;
8325 }
8326
8327 var wrappedInteractions = exports.__interactionsRef.current;
8328 var subscriber = exports.__subscriberRef.current;
8329
8330 if (subscriber !== null) {
8331 subscriber.onWorkScheduled(wrappedInteractions, threadID);
8332 } // Update the pending async work count for the current interactions.
8333 // Update after calling subscribers in case of error.
8334
8335
8336 wrappedInteractions.forEach(function (interaction) {
8337 interaction.__count++;
8338 });
8339 var hasRun = false;
8340
8341 function wrapped() {
8342 var prevInteractions = exports.__interactionsRef.current;
8343 exports.__interactionsRef.current = wrappedInteractions;
8344 subscriber = exports.__subscriberRef.current;
8345
8346 try {
8347 var returnValue = void 0;
8348
8349 try {
8350 if (subscriber !== null) {
8351 subscriber.onWorkStarted(wrappedInteractions, threadID);
8352 }
8353 } finally {
8354 try {
8355 returnValue = callback.apply(undefined, arguments);
8356 } finally {
8357 exports.__interactionsRef.current = prevInteractions;
8358
8359 if (subscriber !== null) {
8360 subscriber.onWorkStopped(wrappedInteractions, threadID);
8361 }
8362 }
8363 }
8364
8365 return returnValue;
8366 } finally {
8367 if (!hasRun) {
8368 // We only expect a wrapped function to be executed once,
8369 // But in the event that it's executed more than once–
8370 // Only decrement the outstanding interaction counts once.
8371 hasRun = true; // Update pending async counts for all wrapped interactions.
8372 // If this was the last scheduled async work for any of them,
8373 // Mark them as completed.
8374
8375 wrappedInteractions.forEach(function (interaction) {
8376 interaction.__count--;
8377
8378 if (subscriber !== null && interaction.__count === 0) {
8379 subscriber.onInteractionScheduledWorkCompleted(interaction);
8380 }
8381 });
8382 }
8383 }
8384 }
8385
8386 wrapped.cancel = function cancel() {
8387 subscriber = exports.__subscriberRef.current;
8388
8389 try {
8390 if (subscriber !== null) {
8391 subscriber.onWorkCanceled(wrappedInteractions, threadID);
8392 }
8393 } finally {
8394 // Update pending async counts for all wrapped interactions.
8395 // If this was the last scheduled async work for any of them,
8396 // Mark them as completed.
8397 wrappedInteractions.forEach(function (interaction) {
8398 interaction.__count--;
8399
8400 if (subscriber && interaction.__count === 0) {
8401 subscriber.onInteractionScheduledWorkCompleted(interaction);
8402 }
8403 });
8404 }
8405 };
8406
8407 return wrapped;
8408 }
8409
8410 var subscribers = null;
8411
8412 if (enableSchedulerTracing) {
8413 subscribers = new Set();
8414 }
8415
8416 function unstable_subscribe(subscriber) {
8417 if (enableSchedulerTracing) {
8418 subscribers.add(subscriber);
8419
8420 if (subscribers.size === 1) {
8421 exports.__subscriberRef.current = {
8422 onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,
8423 onInteractionTraced: onInteractionTraced,
8424 onWorkCanceled: onWorkCanceled,
8425 onWorkScheduled: onWorkScheduled,
8426 onWorkStarted: onWorkStarted,
8427 onWorkStopped: onWorkStopped
8428 };
8429 }
8430 }
8431 }
8432
8433 function unstable_unsubscribe(subscriber) {
8434 if (enableSchedulerTracing) {
8435 subscribers.delete(subscriber);
8436
8437 if (subscribers.size === 0) {
8438 exports.__subscriberRef.current = null;
8439 }
8440 }
8441 }
8442
8443 function onInteractionTraced(interaction) {
8444 var didCatchError = false;
8445 var caughtError = null;
8446 subscribers.forEach(function (subscriber) {
8447 try {
8448 subscriber.onInteractionTraced(interaction);
8449 } catch (error) {
8450 if (!didCatchError) {
8451 didCatchError = true;
8452 caughtError = error;
8453 }
8454 }
8455 });
8456
8457 if (didCatchError) {
8458 throw caughtError;
8459 }
8460 }
8461
8462 function onInteractionScheduledWorkCompleted(interaction) {
8463 var didCatchError = false;
8464 var caughtError = null;
8465 subscribers.forEach(function (subscriber) {
8466 try {
8467 subscriber.onInteractionScheduledWorkCompleted(interaction);
8468 } catch (error) {
8469 if (!didCatchError) {
8470 didCatchError = true;
8471 caughtError = error;
8472 }
8473 }
8474 });
8475
8476 if (didCatchError) {
8477 throw caughtError;
8478 }
8479 }
8480
8481 function onWorkScheduled(interactions, threadID) {
8482 var didCatchError = false;
8483 var caughtError = null;
8484 subscribers.forEach(function (subscriber) {
8485 try {
8486 subscriber.onWorkScheduled(interactions, threadID);
8487 } catch (error) {
8488 if (!didCatchError) {
8489 didCatchError = true;
8490 caughtError = error;
8491 }
8492 }
8493 });
8494
8495 if (didCatchError) {
8496 throw caughtError;
8497 }
8498 }
8499
8500 function onWorkStarted(interactions, threadID) {
8501 var didCatchError = false;
8502 var caughtError = null;
8503 subscribers.forEach(function (subscriber) {
8504 try {
8505 subscriber.onWorkStarted(interactions, threadID);
8506 } catch (error) {
8507 if (!didCatchError) {
8508 didCatchError = true;
8509 caughtError = error;
8510 }
8511 }
8512 });
8513
8514 if (didCatchError) {
8515 throw caughtError;
8516 }
8517 }
8518
8519 function onWorkStopped(interactions, threadID) {
8520 var didCatchError = false;
8521 var caughtError = null;
8522 subscribers.forEach(function (subscriber) {
8523 try {
8524 subscriber.onWorkStopped(interactions, threadID);
8525 } catch (error) {
8526 if (!didCatchError) {
8527 didCatchError = true;
8528 caughtError = error;
8529 }
8530 }
8531 });
8532
8533 if (didCatchError) {
8534 throw caughtError;
8535 }
8536 }
8537
8538 function onWorkCanceled(interactions, threadID) {
8539 var didCatchError = false;
8540 var caughtError = null;
8541 subscribers.forEach(function (subscriber) {
8542 try {
8543 subscriber.onWorkCanceled(interactions, threadID);
8544 } catch (error) {
8545 if (!didCatchError) {
8546 didCatchError = true;
8547 caughtError = error;
8548 }
8549 }
8550 });
8551
8552 if (didCatchError) {
8553 throw caughtError;
8554 }
8555 }
8556
8557 exports.unstable_clear = unstable_clear;
8558 exports.unstable_getCurrent = unstable_getCurrent;
8559 exports.unstable_getThreadID = unstable_getThreadID;
8560 exports.unstable_trace = unstable_trace;
8561 exports.unstable_wrap = unstable_wrap;
8562 exports.unstable_subscribe = unstable_subscribe;
8563 exports.unstable_unsubscribe = unstable_unsubscribe;
8564 })();
8565}
8566
8567/***/ }),
8568
8569/***/ "./node_modules/schedule/cjs/schedule.development.js":
8570/*!***********************************************************!*\
8571 !*** ./node_modules/schedule/cjs/schedule.development.js ***!
8572 \***********************************************************/
8573/*! no static exports found */
8574/*! all exports used */
8575/***/ (function(module, exports, __webpack_require__) {
8576
8577"use strict";
8578/** @license React v16.5.2
8579 * schedule.development.js
8580 *
8581 * Copyright (c) Facebook, Inc. and its affiliates.
8582 *
8583 * This source code is licensed under the MIT license found in the
8584 * LICENSE file in the root directory of this source tree.
8585 */
8586
8587
8588if (true) {
8589 (function () {
8590 'use strict';
8591
8592 Object.defineProperty(exports, '__esModule', {
8593 value: true
8594 });
8595 /* eslint-disable no-var */
8596 // TODO: Currently there's only a single priority level, Deferred. Will add
8597 // additional priorities.
8598
8599 var DEFERRED_TIMEOUT = 5000; // Callbacks are stored as a circular, doubly linked list.
8600
8601 var firstCallbackNode = null;
8602 var isPerformingWork = false;
8603 var isHostCallbackScheduled = false;
8604 var hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
8605 var timeRemaining;
8606
8607 if (hasNativePerformanceNow) {
8608 timeRemaining = function () {
8609 // We assume that if we have a performance timer that the rAF callback
8610 // gets a performance timer value. Not sure if this is always true.
8611 var remaining = getFrameDeadline() - performance.now();
8612 return remaining > 0 ? remaining : 0;
8613 };
8614 } else {
8615 timeRemaining = function () {
8616 // Fallback to Date.now()
8617 var remaining = getFrameDeadline() - Date.now();
8618 return remaining > 0 ? remaining : 0;
8619 };
8620 }
8621
8622 var deadlineObject = {
8623 timeRemaining: timeRemaining,
8624 didTimeout: false
8625 };
8626
8627 function ensureHostCallbackIsScheduled() {
8628 if (isPerformingWork) {
8629 // Don't schedule work yet; wait until the next time we yield.
8630 return;
8631 } // Schedule the host callback using the earliest timeout in the list.
8632
8633
8634 var timesOutAt = firstCallbackNode.timesOutAt;
8635
8636 if (!isHostCallbackScheduled) {
8637 isHostCallbackScheduled = true;
8638 } else {
8639 // Cancel the existing host callback.
8640 cancelCallback();
8641 }
8642
8643 requestCallback(flushWork, timesOutAt);
8644 }
8645
8646 function flushFirstCallback(node) {
8647 var flushedNode = firstCallbackNode; // Remove the node from the list before calling the callback. That way the
8648 // list is in a consistent state even if the callback throws.
8649
8650 var next = firstCallbackNode.next;
8651
8652 if (firstCallbackNode === next) {
8653 // This is the last callback in the list.
8654 firstCallbackNode = null;
8655 next = null;
8656 } else {
8657 var previous = firstCallbackNode.previous;
8658 firstCallbackNode = previous.next = next;
8659 next.previous = previous;
8660 }
8661
8662 flushedNode.next = flushedNode.previous = null; // Now it's safe to call the callback.
8663
8664 var callback = flushedNode.callback;
8665 callback(deadlineObject);
8666 }
8667
8668 function flushWork(didTimeout) {
8669 isPerformingWork = true;
8670 deadlineObject.didTimeout = didTimeout;
8671
8672 try {
8673 if (didTimeout) {
8674 // Flush all the timed out callbacks without yielding.
8675 while (firstCallbackNode !== null) {
8676 // Read the current time. Flush all the callbacks that expire at or
8677 // earlier than that time. Then read the current time again and repeat.
8678 // This optimizes for as few performance.now calls as possible.
8679 var currentTime = exports.unstable_now();
8680
8681 if (firstCallbackNode.timesOutAt <= currentTime) {
8682 do {
8683 flushFirstCallback();
8684 } while (firstCallbackNode !== null && firstCallbackNode.timesOutAt <= currentTime);
8685
8686 continue;
8687 }
8688
8689 break;
8690 }
8691 } else {
8692 // Keep flushing callbacks until we run out of time in the frame.
8693 if (firstCallbackNode !== null) {
8694 do {
8695 flushFirstCallback();
8696 } while (firstCallbackNode !== null && getFrameDeadline() - exports.unstable_now() > 0);
8697 }
8698 }
8699 } finally {
8700 isPerformingWork = false;
8701
8702 if (firstCallbackNode !== null) {
8703 // There's still work remaining. Request another callback.
8704 ensureHostCallbackIsScheduled(firstCallbackNode);
8705 } else {
8706 isHostCallbackScheduled = false;
8707 }
8708 }
8709 }
8710
8711 function unstable_scheduleWork(callback, options) {
8712 var currentTime = exports.unstable_now();
8713 var timesOutAt;
8714
8715 if (options !== undefined && options !== null && options.timeout !== null && options.timeout !== undefined) {
8716 // Check for an explicit timeout
8717 timesOutAt = currentTime + options.timeout;
8718 } else {
8719 // Compute an absolute timeout using the default constant.
8720 timesOutAt = currentTime + DEFERRED_TIMEOUT;
8721 }
8722
8723 var newNode = {
8724 callback: callback,
8725 timesOutAt: timesOutAt,
8726 next: null,
8727 previous: null
8728 }; // Insert the new callback into the list, sorted by its timeout.
8729
8730 if (firstCallbackNode === null) {
8731 // This is the first callback in the list.
8732 firstCallbackNode = newNode.next = newNode.previous = newNode;
8733 ensureHostCallbackIsScheduled(firstCallbackNode);
8734 } else {
8735 var next = null;
8736 var node = firstCallbackNode;
8737
8738 do {
8739 if (node.timesOutAt > timesOutAt) {
8740 // The new callback times out before this one.
8741 next = node;
8742 break;
8743 }
8744
8745 node = node.next;
8746 } while (node !== firstCallbackNode);
8747
8748 if (next === null) {
8749 // No callback with a later timeout was found, which means the new
8750 // callback has the latest timeout in the list.
8751 next = firstCallbackNode;
8752 } else if (next === firstCallbackNode) {
8753 // The new callback has the earliest timeout in the entire list.
8754 firstCallbackNode = newNode;
8755 ensureHostCallbackIsScheduled(firstCallbackNode);
8756 }
8757
8758 var previous = next.previous;
8759 previous.next = next.previous = newNode;
8760 newNode.next = next;
8761 newNode.previous = previous;
8762 }
8763
8764 return newNode;
8765 }
8766
8767 function unstable_cancelScheduledWork(callbackNode) {
8768 var next = callbackNode.next;
8769
8770 if (next === null) {
8771 // Already cancelled.
8772 return;
8773 }
8774
8775 if (next === callbackNode) {
8776 // This is the only scheduled callback. Clear the list.
8777 firstCallbackNode = null;
8778 } else {
8779 // Remove the callback from its position in the list.
8780 if (callbackNode === firstCallbackNode) {
8781 firstCallbackNode = next;
8782 }
8783
8784 var previous = callbackNode.previous;
8785 previous.next = next;
8786 next.previous = previous;
8787 }
8788
8789 callbackNode.next = callbackNode.previous = null;
8790 } // The remaining code is essentially a polyfill for requestIdleCallback. It
8791 // works by scheduling a requestAnimationFrame, storing the time for the start
8792 // of the frame, then scheduling a postMessage which gets scheduled after paint.
8793 // Within the postMessage handler do as much work as possible until time + frame
8794 // rate. By separating the idle call into a separate event tick we ensure that
8795 // layout, paint and other browser work is counted against the available time.
8796 // The frame rate is dynamically adjusted.
8797 // We capture a local reference to any global, in case it gets polyfilled after
8798 // this module is initially evaluated. We want to be using a
8799 // consistent implementation.
8800
8801
8802 var localDate = Date; // This initialization code may run even on server environments if a component
8803 // just imports ReactDOM (e.g. for findDOMNode). Some environments might not
8804 // have setTimeout or clearTimeout. However, we always expect them to be defined
8805 // on the client. https://github.com/facebook/react/pull/13088
8806
8807 var localSetTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;
8808 var localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined; // We don't expect either of these to necessarily be defined, but we will error
8809 // later if they are missing on the client.
8810
8811 var localRequestAnimationFrame = typeof requestAnimationFrame === 'function' ? requestAnimationFrame : undefined;
8812 var localCancelAnimationFrame = typeof cancelAnimationFrame === 'function' ? cancelAnimationFrame : undefined; // requestAnimationFrame does not run when the tab is in the background. If
8813 // we're backgrounded we prefer for that work to happen so that the page
8814 // continues to load in the background. So we also schedule a 'setTimeout' as
8815 // a fallback.
8816 // TODO: Need a better heuristic for backgrounded work.
8817
8818 var ANIMATION_FRAME_TIMEOUT = 100;
8819 var rAFID;
8820 var rAFTimeoutID;
8821
8822 var requestAnimationFrameWithTimeout = function (callback) {
8823 // schedule rAF and also a setTimeout
8824 rAFID = localRequestAnimationFrame(function (timestamp) {
8825 // cancel the setTimeout
8826 localClearTimeout(rAFTimeoutID);
8827 callback(timestamp);
8828 });
8829 rAFTimeoutID = localSetTimeout(function () {
8830 // cancel the requestAnimationFrame
8831 localCancelAnimationFrame(rAFID);
8832 callback(exports.unstable_now());
8833 }, ANIMATION_FRAME_TIMEOUT);
8834 };
8835
8836 if (hasNativePerformanceNow) {
8837 var Performance = performance;
8838
8839 exports.unstable_now = function () {
8840 return Performance.now();
8841 };
8842 } else {
8843 exports.unstable_now = function () {
8844 return localDate.now();
8845 };
8846 }
8847
8848 var requestCallback;
8849 var cancelCallback;
8850 var getFrameDeadline;
8851
8852 if (typeof window === 'undefined') {
8853 // If this accidentally gets imported in a non-browser environment, fallback
8854 // to a naive implementation.
8855 var timeoutID = -1;
8856
8857 requestCallback = function (callback, absoluteTimeout) {
8858 timeoutID = setTimeout(callback, 0, true);
8859 };
8860
8861 cancelCallback = function () {
8862 clearTimeout(timeoutID);
8863 };
8864
8865 getFrameDeadline = function () {
8866 return 0;
8867 };
8868 } else if (window._schedMock) {
8869 // Dynamic injection, only for testing purposes.
8870 var impl = window._schedMock;
8871 requestCallback = impl[0];
8872 cancelCallback = impl[1];
8873 getFrameDeadline = impl[2];
8874 } else {
8875 if (typeof console !== 'undefined') {
8876 if (typeof localRequestAnimationFrame !== 'function') {
8877 console.error("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
8878 }
8879
8880 if (typeof localCancelAnimationFrame !== 'function') {
8881 console.error("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
8882 }
8883 }
8884
8885 var scheduledCallback = null;
8886 var isIdleScheduled = false;
8887 var timeoutTime = -1;
8888 var isAnimationFrameScheduled = false;
8889 var isPerformingIdleWork = false;
8890 var frameDeadline = 0; // We start out assuming that we run at 30fps but then the heuristic tracking
8891 // will adjust this value to a faster fps if we get more frequent animation
8892 // frames.
8893
8894 var previousFrameTime = 33;
8895 var activeFrameTime = 33;
8896
8897 getFrameDeadline = function () {
8898 return frameDeadline;
8899 }; // We use the postMessage trick to defer idle work until after the repaint.
8900
8901
8902 var messageKey = '__reactIdleCallback$' + Math.random().toString(36).slice(2);
8903
8904 var idleTick = function (event) {
8905 if (event.source !== window || event.data !== messageKey) {
8906 return;
8907 }
8908
8909 isIdleScheduled = false;
8910 var currentTime = exports.unstable_now();
8911 var didTimeout = false;
8912
8913 if (frameDeadline - currentTime <= 0) {
8914 // There's no time left in this idle period. Check if the callback has
8915 // a timeout and whether it's been exceeded.
8916 if (timeoutTime !== -1 && timeoutTime <= currentTime) {
8917 // Exceeded the timeout. Invoke the callback even though there's no
8918 // time left.
8919 didTimeout = true;
8920 } else {
8921 // No timeout.
8922 if (!isAnimationFrameScheduled) {
8923 // Schedule another animation callback so we retry later.
8924 isAnimationFrameScheduled = true;
8925 requestAnimationFrameWithTimeout(animationTick);
8926 } // Exit without invoking the callback.
8927
8928
8929 return;
8930 }
8931 }
8932
8933 timeoutTime = -1;
8934 var callback = scheduledCallback;
8935 scheduledCallback = null;
8936
8937 if (callback !== null) {
8938 isPerformingIdleWork = true;
8939
8940 try {
8941 callback(didTimeout);
8942 } finally {
8943 isPerformingIdleWork = false;
8944 }
8945 }
8946 }; // Assumes that we have addEventListener in this environment. Might need
8947 // something better for old IE.
8948
8949
8950 window.addEventListener('message', idleTick, false);
8951
8952 var animationTick = function (rafTime) {
8953 isAnimationFrameScheduled = false;
8954 var nextFrameTime = rafTime - frameDeadline + activeFrameTime;
8955
8956 if (nextFrameTime < activeFrameTime && previousFrameTime < activeFrameTime) {
8957 if (nextFrameTime < 8) {
8958 // Defensive coding. We don't support higher frame rates than 120hz.
8959 // If we get lower than that, it is probably a bug.
8960 nextFrameTime = 8;
8961 } // If one frame goes long, then the next one can be short to catch up.
8962 // If two frames are short in a row, then that's an indication that we
8963 // actually have a higher frame rate than what we're currently optimizing.
8964 // We adjust our heuristic dynamically accordingly. For example, if we're
8965 // running on 120hz display or 90hz VR display.
8966 // Take the max of the two in case one of them was an anomaly due to
8967 // missed frame deadlines.
8968
8969
8970 activeFrameTime = nextFrameTime < previousFrameTime ? previousFrameTime : nextFrameTime;
8971 } else {
8972 previousFrameTime = nextFrameTime;
8973 }
8974
8975 frameDeadline = rafTime + activeFrameTime;
8976
8977 if (!isIdleScheduled) {
8978 isIdleScheduled = true;
8979 window.postMessage(messageKey, '*');
8980 }
8981 };
8982
8983 requestCallback = function (callback, absoluteTimeout) {
8984 scheduledCallback = callback;
8985 timeoutTime = absoluteTimeout;
8986
8987 if (isPerformingIdleWork) {
8988 // If we're already performing idle work, an error must have been thrown.
8989 // Don't wait for the next frame. Continue working ASAP, in a new event.
8990 window.postMessage(messageKey, '*');
8991 } else if (!isAnimationFrameScheduled) {
8992 // If rAF didn't already schedule one, we need to schedule a frame.
8993 // TODO: If this rAF doesn't materialize because the browser throttles, we
8994 // might want to still have setTimeout trigger rIC as a backup to ensure
8995 // that we keep performing work.
8996 isAnimationFrameScheduled = true;
8997 requestAnimationFrameWithTimeout(animationTick);
8998 }
8999 };
9000
9001 cancelCallback = function () {
9002 scheduledCallback = null;
9003 isIdleScheduled = false;
9004 timeoutTime = -1;
9005 };
9006 }
9007
9008 exports.unstable_scheduleWork = unstable_scheduleWork;
9009 exports.unstable_cancelScheduledWork = unstable_cancelScheduledWork;
9010 })();
9011}
9012
9013/***/ }),
9014
9015/***/ "./node_modules/schedule/index.js":
9016/*!****************************************!*\
9017 !*** ./node_modules/schedule/index.js ***!
9018 \****************************************/
9019/*! no static exports found */
9020/*! all exports used */
9021/***/ (function(module, exports, __webpack_require__) {
9022
9023"use strict";
9024
9025
9026if (false) {} else {
9027 module.exports = __webpack_require__(/*! ./cjs/schedule.development.js */ "./node_modules/schedule/cjs/schedule.development.js");
9028}
9029
9030/***/ }),
9031
9032/***/ "./node_modules/schedule/tracing.js":
9033/*!******************************************!*\
9034 !*** ./node_modules/schedule/tracing.js ***!
9035 \******************************************/
9036/*! no static exports found */
9037/*! all exports used */
9038/***/ (function(module, exports, __webpack_require__) {
9039
9040"use strict";
9041
9042
9043if (false) {} else {
9044 module.exports = __webpack_require__(/*! ./cjs/schedule-tracing.development.js */ "./node_modules/schedule/cjs/schedule-tracing.development.js");
9045}
9046
9047/***/ }),
9048
9049/***/ "./node_modules/strip-ansi/index.js":
9050/*!******************************************!*\
9051 !*** ./node_modules/strip-ansi/index.js ***!
9052 \******************************************/
9053/*! no static exports found */
9054/*! all exports used */
9055/***/ (function(module, exports, __webpack_require__) {
9056
9057"use strict";
9058
9059
9060var ansiRegex = __webpack_require__(/*! ansi-regex */ "./node_modules/ansi-regex/index.js")();
9061
9062module.exports = function (str) {
9063 return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
9064};
9065
9066/***/ }),
9067
9068/***/ "./node_modules/webpack-hot-middleware/client-overlay.js":
9069/*!**************************************************!*\
9070 !*** (webpack)-hot-middleware/client-overlay.js ***!
9071 \**************************************************/
9072/*! no static exports found */
9073/*! all exports used */
9074/***/ (function(module, exports, __webpack_require__) {
9075
9076/*eslint-env browser*/
9077var clientOverlay = document.createElement('div');
9078clientOverlay.id = 'webpack-hot-middleware-clientOverlay';
9079var styles = {
9080 background: 'rgba(0,0,0,0.85)',
9081 color: '#E8E8E8',
9082 lineHeight: '1.2',
9083 whiteSpace: 'pre',
9084 fontFamily: 'Menlo, Consolas, monospace',
9085 fontSize: '13px',
9086 position: 'fixed',
9087 zIndex: 9999,
9088 padding: '10px',
9089 left: 0,
9090 right: 0,
9091 top: 0,
9092 bottom: 0,
9093 overflow: 'auto',
9094 dir: 'ltr',
9095 textAlign: 'left'
9096};
9097
9098var ansiHTML = __webpack_require__(/*! ansi-html */ "./node_modules/ansi-html/index.js");
9099
9100var colors = {
9101 reset: ['transparent', 'transparent'],
9102 black: '181818',
9103 red: 'E36049',
9104 green: 'B3CB74',
9105 yellow: 'FFD080',
9106 blue: '7CAFC2',
9107 magenta: '7FACCA',
9108 cyan: 'C3C2EF',
9109 lightgrey: 'EBE7E3',
9110 darkgrey: '6D7891'
9111};
9112
9113var Entities = __webpack_require__(/*! html-entities */ "./node_modules/html-entities/index.js").AllHtmlEntities;
9114
9115var entities = new Entities();
9116
9117function showProblems(type, lines) {
9118 clientOverlay.innerHTML = '';
9119 lines.forEach(function (msg) {
9120 msg = ansiHTML(entities.encode(msg));
9121 var div = document.createElement('div');
9122 div.style.marginBottom = '26px';
9123 div.innerHTML = problemType(type) + ' in ' + msg;
9124 clientOverlay.appendChild(div);
9125 });
9126
9127 if (document.body) {
9128 document.body.appendChild(clientOverlay);
9129 }
9130}
9131
9132function clear() {
9133 if (document.body && clientOverlay.parentNode) {
9134 document.body.removeChild(clientOverlay);
9135 }
9136}
9137
9138function problemType(type) {
9139 var problemColors = {
9140 errors: colors.red,
9141 warnings: colors.yellow
9142 };
9143 var color = problemColors[type] || colors.red;
9144 return '<span style="background-color:#' + color + '; color:#fff; padding:2px 4px; border-radius: 2px">' + type.slice(0, -1).toUpperCase() + '</span>';
9145}
9146
9147module.exports = function (options) {
9148 for (var color in options.overlayColors) {
9149 if (color in colors) {
9150 colors[color] = options.overlayColors[color];
9151 }
9152
9153 ansiHTML.setColors(colors);
9154 }
9155
9156 for (var style in options.overlayStyles) {
9157 styles[style] = options.overlayStyles[style];
9158 }
9159
9160 for (var key in styles) {
9161 clientOverlay.style[key] = styles[key];
9162 }
9163
9164 return {
9165 showProblems: showProblems,
9166 clear: clear
9167 };
9168};
9169
9170module.exports.clear = clear;
9171module.exports.showProblems = showProblems;
9172
9173/***/ }),
9174
9175/***/ "./node_modules/webpack-hot-middleware/client.js?path=http://localhost:3000/__webpack_hmr":
9176/*!***********************************************************************************!*\
9177 !*** (webpack)-hot-middleware/client.js?path=http://localhost:3000/__webpack_hmr ***!
9178 \***********************************************************************************/
9179/*! no static exports found */
9180/*! all exports used */
9181/***/ (function(module, exports, __webpack_require__) {
9182
9183/* WEBPACK VAR INJECTION */(function(__resourceQuery, module) {/*eslint-env browser*/
9184
9185/*global __resourceQuery __webpack_public_path__*/
9186var options = {
9187 path: "/__webpack_hmr",
9188 timeout: 20 * 1000,
9189 overlay: true,
9190 reload: false,
9191 log: true,
9192 warn: true,
9193 name: '',
9194 autoConnect: true,
9195 overlayStyles: {},
9196 overlayWarnings: false,
9197 ansiColors: {}
9198};
9199
9200if (true) {
9201 var querystring = __webpack_require__(/*! querystring */ "./node_modules/querystring-es3/index.js");
9202
9203 var overrides = querystring.parse(__resourceQuery.slice(1));
9204 setOverrides(overrides);
9205}
9206
9207if (typeof window === 'undefined') {// do nothing
9208} else if (typeof window.EventSource === 'undefined') {
9209 console.warn("webpack-hot-middleware's client requires EventSource to work. " + "You should include a polyfill if you want to support this browser: " + "https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events#Tools");
9210} else {
9211 if (options.autoConnect) {
9212 connect();
9213 }
9214}
9215/* istanbul ignore next */
9216
9217
9218function setOptionsAndConnect(overrides) {
9219 setOverrides(overrides);
9220 connect();
9221}
9222
9223function setOverrides(overrides) {
9224 if (overrides.autoConnect) options.autoConnect = overrides.autoConnect == 'true';
9225 if (overrides.path) options.path = overrides.path;
9226 if (overrides.timeout) options.timeout = overrides.timeout;
9227 if (overrides.overlay) options.overlay = overrides.overlay !== 'false';
9228 if (overrides.reload) options.reload = overrides.reload !== 'false';
9229
9230 if (overrides.noInfo && overrides.noInfo !== 'false') {
9231 options.log = false;
9232 }
9233
9234 if (overrides.name) {
9235 options.name = overrides.name;
9236 }
9237
9238 if (overrides.quiet && overrides.quiet !== 'false') {
9239 options.log = false;
9240 options.warn = false;
9241 }
9242
9243 if (overrides.dynamicPublicPath) {
9244 options.path = __webpack_require__.p + options.path;
9245 }
9246
9247 if (overrides.ansiColors) options.ansiColors = JSON.parse(overrides.ansiColors);
9248 if (overrides.overlayStyles) options.overlayStyles = JSON.parse(overrides.overlayStyles);
9249
9250 if (overrides.overlayWarnings) {
9251 options.overlayWarnings = overrides.overlayWarnings == 'true';
9252 }
9253}
9254
9255function EventSourceWrapper() {
9256 var source;
9257 var lastActivity = new Date();
9258 var listeners = [];
9259 init();
9260 var timer = setInterval(function () {
9261 if (new Date() - lastActivity > options.timeout) {
9262 handleDisconnect();
9263 }
9264 }, options.timeout / 2);
9265
9266 function init() {
9267 source = new window.EventSource(options.path);
9268 source.onopen = handleOnline;
9269 source.onerror = handleDisconnect;
9270 source.onmessage = handleMessage;
9271 }
9272
9273 function handleOnline() {
9274 if (options.log) console.log("[HMR] connected");
9275 lastActivity = new Date();
9276 }
9277
9278 function handleMessage(event) {
9279 lastActivity = new Date();
9280
9281 for (var i = 0; i < listeners.length; i++) {
9282 listeners[i](event);
9283 }
9284 }
9285
9286 function handleDisconnect() {
9287 clearInterval(timer);
9288 source.close();
9289 setTimeout(init, options.timeout);
9290 }
9291
9292 return {
9293 addMessageListener: function (fn) {
9294 listeners.push(fn);
9295 }
9296 };
9297}
9298
9299function getEventSourceWrapper() {
9300 if (!window.__whmEventSourceWrapper) {
9301 window.__whmEventSourceWrapper = {};
9302 }
9303
9304 if (!window.__whmEventSourceWrapper[options.path]) {
9305 // cache the wrapper for other entries loaded on
9306 // the same page with the same options.path
9307 window.__whmEventSourceWrapper[options.path] = EventSourceWrapper();
9308 }
9309
9310 return window.__whmEventSourceWrapper[options.path];
9311}
9312
9313function connect() {
9314 getEventSourceWrapper().addMessageListener(handleMessage);
9315
9316 function handleMessage(event) {
9317 if (event.data == "\uD83D\uDC93") {
9318 return;
9319 }
9320
9321 try {
9322 processMessage(JSON.parse(event.data));
9323 } catch (ex) {
9324 if (options.warn) {
9325 console.warn("Invalid HMR message: " + event.data + "\n" + ex);
9326 }
9327 }
9328 }
9329} // the reporter needs to be a singleton on the page
9330// in case the client is being used by multiple bundles
9331// we only want to report once.
9332// all the errors will go to all clients
9333
9334
9335var singletonKey = '__webpack_hot_middleware_reporter__';
9336var reporter;
9337
9338if (typeof window !== 'undefined') {
9339 if (!window[singletonKey]) {
9340 window[singletonKey] = createReporter();
9341 }
9342
9343 reporter = window[singletonKey];
9344}
9345
9346function createReporter() {
9347 var strip = __webpack_require__(/*! strip-ansi */ "./node_modules/strip-ansi/index.js");
9348
9349 var overlay;
9350
9351 if (typeof document !== 'undefined' && options.overlay) {
9352 overlay = __webpack_require__(/*! ./client-overlay */ "./node_modules/webpack-hot-middleware/client-overlay.js")({
9353 ansiColors: options.ansiColors,
9354 overlayStyles: options.overlayStyles
9355 });
9356 }
9357
9358 var styles = {
9359 errors: "color: #ff0000;",
9360 warnings: "color: #999933;"
9361 };
9362 var previousProblems = null;
9363
9364 function log(type, obj) {
9365 var newProblems = obj[type].map(function (msg) {
9366 return strip(msg);
9367 }).join('\n');
9368
9369 if (previousProblems == newProblems) {
9370 return;
9371 } else {
9372 previousProblems = newProblems;
9373 }
9374
9375 var style = styles[type];
9376 var name = obj.name ? "'" + obj.name + "' " : "";
9377 var title = "[HMR] bundle " + name + "has " + obj[type].length + " " + type; // NOTE: console.warn or console.error will print the stack trace
9378 // which isn't helpful here, so using console.log to escape it.
9379
9380 if (console.group && console.groupEnd) {
9381 console.group("%c" + title, style);
9382 console.log("%c" + newProblems, style);
9383 console.groupEnd();
9384 } else {
9385 console.log("%c" + title + "\n\t%c" + newProblems.replace(/\n/g, "\n\t"), style + "font-weight: bold;", style + "font-weight: normal;");
9386 }
9387 }
9388
9389 return {
9390 cleanProblemsCache: function () {
9391 previousProblems = null;
9392 },
9393 problems: function (type, obj) {
9394 if (options.warn) {
9395 log(type, obj);
9396 }
9397
9398 if (overlay) {
9399 if (options.overlayWarnings || type === 'errors') {
9400 overlay.showProblems(type, obj[type]);
9401 return false;
9402 }
9403
9404 overlay.clear();
9405 }
9406
9407 return true;
9408 },
9409 success: function () {
9410 if (overlay) overlay.clear();
9411 },
9412 useCustomOverlay: function (customOverlay) {
9413 overlay = customOverlay;
9414 }
9415 };
9416}
9417
9418var processUpdate = __webpack_require__(/*! ./process-update */ "./node_modules/webpack-hot-middleware/process-update.js");
9419
9420var customHandler;
9421var subscribeAllHandler;
9422
9423function processMessage(obj) {
9424 switch (obj.action) {
9425 case "building":
9426 if (options.log) {
9427 console.log("[HMR] bundle " + (obj.name ? "'" + obj.name + "' " : "") + "rebuilding");
9428 }
9429
9430 break;
9431
9432 case "built":
9433 if (options.log) {
9434 console.log("[HMR] bundle " + (obj.name ? "'" + obj.name + "' " : "") + "rebuilt in " + obj.time + "ms");
9435 }
9436
9437 // fall through
9438
9439 case "sync":
9440 if (obj.name && options.name && obj.name !== options.name) {
9441 return;
9442 }
9443
9444 var applyUpdate = true;
9445
9446 if (obj.errors.length > 0) {
9447 if (reporter) reporter.problems('errors', obj);
9448 applyUpdate = false;
9449 } else if (obj.warnings.length > 0) {
9450 if (reporter) {
9451 var overlayShown = reporter.problems('warnings', obj);
9452 applyUpdate = overlayShown;
9453 }
9454 } else {
9455 if (reporter) {
9456 reporter.cleanProblemsCache();
9457 reporter.success();
9458 }
9459 }
9460
9461 if (applyUpdate) {
9462 processUpdate(obj.hash, obj.modules, options);
9463 }
9464
9465 break;
9466
9467 default:
9468 if (customHandler) {
9469 customHandler(obj);
9470 }
9471
9472 }
9473
9474 if (subscribeAllHandler) {
9475 subscribeAllHandler(obj);
9476 }
9477}
9478
9479if (module) {
9480 module.exports = {
9481 subscribeAll: function subscribeAll(handler) {
9482 subscribeAllHandler = handler;
9483 },
9484 subscribe: function subscribe(handler) {
9485 customHandler = handler;
9486 },
9487 useCustomOverlay: function useCustomOverlay(customOverlay) {
9488 if (reporter) reporter.useCustomOverlay(customOverlay);
9489 },
9490 setOptionsAndConnect: setOptionsAndConnect
9491 };
9492}
9493/* WEBPACK VAR INJECTION */}.call(this, "?path=http://localhost:3000/__webpack_hmr", __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
9494
9495/***/ }),
9496
9497/***/ "./node_modules/webpack-hot-middleware/process-update.js":
9498/*!**************************************************!*\
9499 !*** (webpack)-hot-middleware/process-update.js ***!
9500 \**************************************************/
9501/*! no static exports found */
9502/*! all exports used */
9503/***/ (function(module, exports, __webpack_require__) {
9504
9505/**
9506 * Based heavily on https://github.com/webpack/webpack/blob/
9507 * c0afdf9c6abc1dd70707c594e473802a566f7b6e/hot/only-dev-server.js
9508 * Original copyright Tobias Koppers @sokra (MIT license)
9509 */
9510
9511/* global window __webpack_hash__ */
9512if (false) {}
9513
9514var hmrDocsUrl = "https://webpack.js.org/concepts/hot-module-replacement/"; // eslint-disable-line max-len
9515
9516var lastHash;
9517var failureStatuses = {
9518 abort: 1,
9519 fail: 1
9520};
9521var applyOptions = {
9522 ignoreUnaccepted: true,
9523 ignoreDeclined: true,
9524 ignoreErrored: true,
9525 onUnaccepted: function (data) {
9526 console.warn("Ignored an update to unaccepted module " + data.chain.join(" -> "));
9527 },
9528 onDeclined: function (data) {
9529 console.warn("Ignored an update to declined module " + data.chain.join(" -> "));
9530 },
9531 onErrored: function (data) {
9532 console.error(data.error);
9533 console.warn("Ignored an error while updating module " + data.moduleId + " (" + data.type + ")");
9534 }
9535};
9536
9537function upToDate(hash) {
9538 if (hash) lastHash = hash;
9539 return lastHash == __webpack_require__.h();
9540}
9541
9542module.exports = function (hash, moduleMap, options) {
9543 var reload = options.reload;
9544
9545 if (!upToDate(hash) && module.hot.status() == "idle") {
9546 if (options.log) console.log("[HMR] Checking for updates on the server...");
9547 check();
9548 }
9549
9550 function check() {
9551 var cb = function (err, updatedModules) {
9552 if (err) return handleError(err);
9553
9554 if (!updatedModules) {
9555 if (options.warn) {
9556 console.warn("[HMR] Cannot find update (Full reload needed)");
9557 console.warn("[HMR] (Probably because of restarting the server)");
9558 }
9559
9560 performReload();
9561 return null;
9562 }
9563
9564 var applyCallback = function (applyErr, renewedModules) {
9565 if (applyErr) return handleError(applyErr);
9566 if (!upToDate()) check();
9567 logUpdates(updatedModules, renewedModules);
9568 };
9569
9570 var applyResult = module.hot.apply(applyOptions, applyCallback); // webpack 2 promise
9571
9572 if (applyResult && applyResult.then) {
9573 // HotModuleReplacement.runtime.js refers to the result as `outdatedModules`
9574 applyResult.then(function (outdatedModules) {
9575 applyCallback(null, outdatedModules);
9576 });
9577 applyResult.catch(applyCallback);
9578 }
9579 };
9580
9581 var result = module.hot.check(false, cb); // webpack 2 promise
9582
9583 if (result && result.then) {
9584 result.then(function (updatedModules) {
9585 cb(null, updatedModules);
9586 });
9587 result.catch(cb);
9588 }
9589 }
9590
9591 function logUpdates(updatedModules, renewedModules) {
9592 var unacceptedModules = updatedModules.filter(function (moduleId) {
9593 return renewedModules && renewedModules.indexOf(moduleId) < 0;
9594 });
9595
9596 if (unacceptedModules.length > 0) {
9597 if (options.warn) {
9598 console.warn("[HMR] The following modules couldn't be hot updated: " + "(Full reload needed)\n" + "This is usually because the modules which have changed " + "(and their parents) do not know how to hot reload themselves. " + "See " + hmrDocsUrl + " for more details.");
9599 unacceptedModules.forEach(function (moduleId) {
9600 console.warn("[HMR] - " + (moduleMap[moduleId] || moduleId));
9601 });
9602 }
9603
9604 performReload();
9605 return;
9606 }
9607
9608 if (options.log) {
9609 if (!renewedModules || renewedModules.length === 0) {
9610 console.log("[HMR] Nothing hot updated.");
9611 } else {
9612 console.log("[HMR] Updated modules:");
9613 renewedModules.forEach(function (moduleId) {
9614 console.log("[HMR] - " + (moduleMap[moduleId] || moduleId));
9615 });
9616 }
9617
9618 if (upToDate()) {
9619 console.log("[HMR] App is up to date.");
9620 }
9621 }
9622 }
9623
9624 function handleError(err) {
9625 if (module.hot.status() in failureStatuses) {
9626 if (options.warn) {
9627 console.warn("[HMR] Cannot check for update (Full reload needed)");
9628 console.warn("[HMR] " + (err.stack || err.message));
9629 }
9630
9631 performReload();
9632 return;
9633 }
9634
9635 if (options.warn) {
9636 console.warn("[HMR] Update check failed: " + (err.stack || err.message));
9637 }
9638 }
9639
9640 function performReload() {
9641 if (reload) {
9642 if (options.warn) console.warn("[HMR] Reloading page");
9643 window.location.reload();
9644 }
9645 }
9646};
9647
9648/***/ }),
9649
9650/***/ "./node_modules/webpack/buildin/module.js":
9651/*!***********************************!*\
9652 !*** (webpack)/buildin/module.js ***!
9653 \***********************************/
9654/*! no static exports found */
9655/*! all exports used */
9656/***/ (function(module, exports) {
9657
9658module.exports = function (module) {
9659 if (!module.webpackPolyfill) {
9660 module.deprecate = function () {};
9661
9662 module.paths = []; // module.parent = undefined by default
9663
9664 if (!module.children) module.children = [];
9665 Object.defineProperty(module, "loaded", {
9666 enumerable: true,
9667 get: function () {
9668 return module.l;
9669 }
9670 });
9671 Object.defineProperty(module, "id", {
9672 enumerable: true,
9673 get: function () {
9674 return module.i;
9675 }
9676 });
9677 module.webpackPolyfill = 1;
9678 }
9679
9680 return module;
9681};
9682
9683/***/ }),
9684
9685/***/ "./unused.js":
9686/*!*******************!*\
9687 !*** ./unused.js ***!
9688 \*******************/
9689/*! exports provided: abcdefgh, demo, xyz */
9690/*! exports used: demo, xyz */
9691/***/ (function(module, __webpack_exports__, __webpack_require__) {
9692
9693"use strict";
9694/* unused harmony export abcdefgh */
9695/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return demo; });
9696/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return xyz; });
9697function abcdefgh() {
9698 console.log(1);
9699}
9700function demo() {}
9701function xyz() {}
9702
9703/***/ }),
9704
9705/***/ 0:
9706/*!***********************************************************************************************!*\
9707 !*** multi webpack-hot-middleware/client?path=http://localhost:3000/__webpack_hmr ./index.js ***!
9708 \***********************************************************************************************/
9709/*! no static exports found */
9710/*! all exports used */
9711/***/ (function(module, exports, __webpack_require__) {
9712
9713__webpack_require__(/*! webpack-hot-middleware/client?path=http://localhost:3000/__webpack_hmr */"./node_modules/webpack-hot-middleware/client.js?path=http://localhost:3000/__webpack_hmr");
9714module.exports = __webpack_require__(/*! ./index.js */"./index.js");
9715
9716
9717/***/ })
9718
9719/******/ });
9720//# sourceMappingURL=bundle.js.map
\No newline at end of file