PluginProbe
Gutenberg / 23.4.0
Gutenberg v23.4.0
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / build / scripts / vendors / react-dom-19.js

react-dom-19.js in Gutenberg 23.4.0, at build/scripts/vendors/react-dom-19.js

20,641 lines 1.0 MB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var ReactDOM = (() => {
2 var __create = Object.create;
3 var __defProp = Object.defineProperty;
4 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5 var __getOwnPropNames = Object.getOwnPropertyNames;
6 var __getProtoOf = Object.getPrototypeOf;
7 var __hasOwnProp = Object.prototype.hasOwnProperty;
8 var __esm = (fn, res) => function __init() {
9 return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10 };
11 var __commonJS = (cb, mod) => function __require() {
12 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13 };
14 var __export = (target, all) => {
15 for (var name in all)
16 __defProp(target, name, { get: all[name], enumerable: true });
17 };
18 var __copyProps = (to, from, except, desc) => {
19 if (from && typeof from === "object" || typeof from === "function") {
20 for (let key of __getOwnPropNames(from))
21 if (!__hasOwnProp.call(to, key) && key !== except)
22 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23 }
24 return to;
25 };
26 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
27 // If the importer is in node compatibility mode or this is not an ESM
28 // file that has been converted to a CommonJS file using a Babel-
29 // compatible transform (i.e. "__esModule" has not been set), then set
30 // "default" to the CommonJS "module.exports" for node compatibility.
31 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
32 mod
33 ));
34 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
36 // react-external:react
37 var require_react = __commonJS({
38 "react-external:react"(exports, module) {
39 module.exports = globalThis.React;
40 }
41 });
42
43 // ../react-19/node_modules/react-dom/cjs/react-dom.development.js
44 var require_react_dom_development = __commonJS({
45 "../react-19/node_modules/react-dom/cjs/react-dom.development.js"(exports) {
46 "use strict";
47 (function() {
48 function noop() {
49 }
50 function testStringCoercion(value) {
51 return "" + value;
52 }
53 function createPortal$1(children, containerInfo, implementation) {
54 var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
55 try {
56 testStringCoercion(key);
57 var JSCompiler_inline_result = false;
58 } catch (e) {
59 JSCompiler_inline_result = true;
60 }
61 JSCompiler_inline_result && (console.error(
62 "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
63 "function" === typeof Symbol && Symbol.toStringTag && key[Symbol.toStringTag] || key.constructor.name || "Object"
64 ), testStringCoercion(key));
65 return {
66 $$typeof: REACT_PORTAL_TYPE,
67 key: null == key ? null : "" + key,
68 children,
69 containerInfo,
70 implementation
71 };
72 }
73 function getCrossOriginStringAs(as, input) {
74 if ("font" === as) return "";
75 if ("string" === typeof input)
76 return "use-credentials" === input ? input : "";
77 }
78 function getValueDescriptorExpectingObjectForWarning(thing) {
79 return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : 'something with type "' + typeof thing + '"';
80 }
81 function getValueDescriptorExpectingEnumForWarning(thing) {
82 return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "string" === typeof thing ? JSON.stringify(thing) : "number" === typeof thing ? "`" + thing + "`" : 'something with type "' + typeof thing + '"';
83 }
84 function resolveDispatcher() {
85 var dispatcher = ReactSharedInternals.H;
86 null === dispatcher && console.error(
87 "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
88 );
89 return dispatcher;
90 }
91 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
92 var React = require_react(), Internals = {
93 d: {
94 f: noop,
95 r: function() {
96 throw Error(
97 "Invalid form element. requestFormReset must be passed a form that was rendered by React."
98 );
99 },
100 D: noop,
101 C: noop,
102 L: noop,
103 m: noop,
104 X: noop,
105 S: noop,
106 M: noop
107 },
108 p: 0,
109 findDOMNode: null
110 }, REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
111 "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error(
112 "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
113 );
114 exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
115 exports.createPortal = function(children, container) {
116 var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
117 if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType)
118 throw Error("Target container is not a DOM element.");
119 return createPortal$1(children, container, null, key);
120 };
121 exports.flushSync = function(fn) {
122 var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
123 try {
124 if (ReactSharedInternals.T = null, Internals.p = 2, fn)
125 return fn();
126 } finally {
127 ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f() && console.error(
128 "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
129 );
130 }
131 };
132 exports.preconnect = function(href, options) {
133 "string" === typeof href && href ? null != options && "object" !== typeof options ? console.error(
134 "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
135 getValueDescriptorExpectingEnumForWarning(options)
136 ) : null != options && "string" !== typeof options.crossOrigin && console.error(
137 "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
138 getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
139 ) : console.error(
140 "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
141 getValueDescriptorExpectingObjectForWarning(href)
142 );
143 "string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options));
144 };
145 exports.prefetchDNS = function(href) {
146 if ("string" !== typeof href || !href)
147 console.error(
148 "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
149 getValueDescriptorExpectingObjectForWarning(href)
150 );
151 else if (1 < arguments.length) {
152 var options = arguments[1];
153 "object" === typeof options && options.hasOwnProperty("crossOrigin") ? console.error(
154 "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
155 getValueDescriptorExpectingEnumForWarning(options)
156 ) : console.error(
157 "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
158 getValueDescriptorExpectingEnumForWarning(options)
159 );
160 }
161 "string" === typeof href && Internals.d.D(href);
162 };
163 exports.preinit = function(href, options) {
164 "string" === typeof href && href ? null == options || "object" !== typeof options ? console.error(
165 "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
166 getValueDescriptorExpectingEnumForWarning(options)
167 ) : "style" !== options.as && "script" !== options.as && console.error(
168 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
169 getValueDescriptorExpectingEnumForWarning(options.as)
170 ) : console.error(
171 "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
172 getValueDescriptorExpectingObjectForWarning(href)
173 );
174 if ("string" === typeof href && options && "string" === typeof options.as) {
175 var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0;
176 "style" === as ? Internals.d.S(
177 href,
178 "string" === typeof options.precedence ? options.precedence : void 0,
179 {
180 crossOrigin,
181 integrity,
182 fetchPriority
183 }
184 ) : "script" === as && Internals.d.X(href, {
185 crossOrigin,
186 integrity,
187 fetchPriority,
188 nonce: "string" === typeof options.nonce ? options.nonce : void 0
189 });
190 }
191 };
192 exports.preinitModule = function(href, options) {
193 var encountered = "";
194 "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
195 void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "script" !== options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options.as) + ".");
196 if (encountered)
197 console.error(
198 "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
199 encountered
200 );
201 else
202 switch (encountered = options && "string" === typeof options.as ? options.as : "script", encountered) {
203 case "script":
204 break;
205 default:
206 encountered = getValueDescriptorExpectingEnumForWarning(encountered), console.error(
207 'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
208 encountered,
209 href
210 );
211 }
212 if ("string" === typeof href)
213 if ("object" === typeof options && null !== options) {
214 if (null == options.as || "script" === options.as)
215 encountered = getCrossOriginStringAs(
216 options.as,
217 options.crossOrigin
218 ), Internals.d.M(href, {
219 crossOrigin: encountered,
220 integrity: "string" === typeof options.integrity ? options.integrity : void 0,
221 nonce: "string" === typeof options.nonce ? options.nonce : void 0
222 });
223 } else null == options && Internals.d.M(href);
224 };
225 exports.preload = function(href, options) {
226 var encountered = "";
227 "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
228 null == options || "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : "string" === typeof options.as && options.as || (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
229 encountered && console.error(
230 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
231 encountered
232 );
233 if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
234 encountered = options.as;
235 var crossOrigin = getCrossOriginStringAs(
236 encountered,
237 options.crossOrigin
238 );
239 Internals.d.L(href, encountered, {
240 crossOrigin,
241 integrity: "string" === typeof options.integrity ? options.integrity : void 0,
242 nonce: "string" === typeof options.nonce ? options.nonce : void 0,
243 type: "string" === typeof options.type ? options.type : void 0,
244 fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
245 referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
246 imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
247 imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
248 media: "string" === typeof options.media ? options.media : void 0
249 });
250 }
251 };
252 exports.preloadModule = function(href, options) {
253 var encountered = "";
254 "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
255 void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "string" !== typeof options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
256 encountered && console.error(
257 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
258 encountered
259 );
260 "string" === typeof href && (options ? (encountered = getCrossOriginStringAs(
261 options.as,
262 options.crossOrigin
263 ), Internals.d.m(href, {
264 as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
265 crossOrigin: encountered,
266 integrity: "string" === typeof options.integrity ? options.integrity : void 0
267 })) : Internals.d.m(href));
268 };
269 exports.requestFormReset = function(form) {
270 Internals.d.r(form);
271 };
272 exports.unstable_batchedUpdates = function(fn, a) {
273 return fn(a);
274 };
275 exports.useFormState = function(action, initialState, permalink) {
276 return resolveDispatcher().useFormState(action, initialState, permalink);
277 };
278 exports.useFormStatus = function() {
279 return resolveDispatcher().useHostTransitionStatus();
280 };
281 exports.version = "19.2.7";
282 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
283 })();
284 }
285 });
286
287 // ../react-19/node_modules/react-dom/index.js
288 var require_react_dom = __commonJS({
289 "../react-19/node_modules/react-dom/index.js"(exports, module) {
290 "use strict";
291 if (false) {
292 checkDCE();
293 module.exports = null;
294 } else {
295 module.exports = require_react_dom_development();
296 }
297 }
298 });
299
300 // ../react-19/node_modules/scheduler/cjs/scheduler.development.js
301 var require_scheduler_development = __commonJS({
302 "../react-19/node_modules/scheduler/cjs/scheduler.development.js"(exports) {
303 "use strict";
304 (function() {
305 function performWorkUntilDeadline() {
306 needsPaint = false;
307 if (isMessageLoopRunning) {
308 var currentTime = exports.unstable_now();
309 startTime = currentTime;
310 var hasMoreWork = true;
311 try {
312 a: {
313 isHostCallbackScheduled = false;
314 isHostTimeoutScheduled && (isHostTimeoutScheduled = false, localClearTimeout(taskTimeoutID), taskTimeoutID = -1);
315 isPerformingWork = true;
316 var previousPriorityLevel = currentPriorityLevel;
317 try {
318 b: {
319 advanceTimers(currentTime);
320 for (currentTask = peek(taskQueue); null !== currentTask && !(currentTask.expirationTime > currentTime && shouldYieldToHost()); ) {
321 var callback = currentTask.callback;
322 if ("function" === typeof callback) {
323 currentTask.callback = null;
324 currentPriorityLevel = currentTask.priorityLevel;
325 var continuationCallback = callback(
326 currentTask.expirationTime <= currentTime
327 );
328 currentTime = exports.unstable_now();
329 if ("function" === typeof continuationCallback) {
330 currentTask.callback = continuationCallback;
331 advanceTimers(currentTime);
332 hasMoreWork = true;
333 break b;
334 }
335 currentTask === peek(taskQueue) && pop(taskQueue);
336 advanceTimers(currentTime);
337 } else pop(taskQueue);
338 currentTask = peek(taskQueue);
339 }
340 if (null !== currentTask) hasMoreWork = true;
341 else {
342 var firstTimer = peek(timerQueue);
343 null !== firstTimer && requestHostTimeout(
344 handleTimeout,
345 firstTimer.startTime - currentTime
346 );
347 hasMoreWork = false;
348 }
349 }
350 break a;
351 } finally {
352 currentTask = null, currentPriorityLevel = previousPriorityLevel, isPerformingWork = false;
353 }
354 hasMoreWork = void 0;
355 }
356 } finally {
357 hasMoreWork ? schedulePerformWorkUntilDeadline() : isMessageLoopRunning = false;
358 }
359 }
360 }
361 function push(heap, node) {
362 var index = heap.length;
363 heap.push(node);
364 a: for (; 0 < index; ) {
365 var parentIndex = index - 1 >>> 1, parent = heap[parentIndex];
366 if (0 < compare(parent, node))
367 heap[parentIndex] = node, heap[index] = parent, index = parentIndex;
368 else break a;
369 }
370 }
371 function peek(heap) {
372 return 0 === heap.length ? null : heap[0];
373 }
374 function pop(heap) {
375 if (0 === heap.length) return null;
376 var first = heap[0], last = heap.pop();
377 if (last !== first) {
378 heap[0] = last;
379 a: for (var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength; ) {
380 var leftIndex = 2 * (index + 1) - 1, left = heap[leftIndex], rightIndex = leftIndex + 1, right = heap[rightIndex];
381 if (0 > compare(left, last))
382 rightIndex < length && 0 > compare(right, left) ? (heap[index] = right, heap[rightIndex] = last, index = rightIndex) : (heap[index] = left, heap[leftIndex] = last, index = leftIndex);
383 else if (rightIndex < length && 0 > compare(right, last))
384 heap[index] = right, heap[rightIndex] = last, index = rightIndex;
385 else break a;
386 }
387 }
388 return first;
389 }
390 function compare(a, b) {
391 var diff = a.sortIndex - b.sortIndex;
392 return 0 !== diff ? diff : a.id - b.id;
393 }
394 function advanceTimers(currentTime) {
395 for (var timer = peek(timerQueue); null !== timer; ) {
396 if (null === timer.callback) pop(timerQueue);
397 else if (timer.startTime <= currentTime)
398 pop(timerQueue), timer.sortIndex = timer.expirationTime, push(taskQueue, timer);
399 else break;
400 timer = peek(timerQueue);
401 }
402 }
403 function handleTimeout(currentTime) {
404 isHostTimeoutScheduled = false;
405 advanceTimers(currentTime);
406 if (!isHostCallbackScheduled)
407 if (null !== peek(taskQueue))
408 isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline());
409 else {
410 var firstTimer = peek(timerQueue);
411 null !== firstTimer && requestHostTimeout(
412 handleTimeout,
413 firstTimer.startTime - currentTime
414 );
415 }
416 }
417 function shouldYieldToHost() {
418 return needsPaint ? true : exports.unstable_now() - startTime < frameInterval ? false : true;
419 }
420 function requestHostTimeout(callback, ms) {
421 taskTimeoutID = localSetTimeout(function() {
422 callback(exports.unstable_now());
423 }, ms);
424 }
425 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
426 exports.unstable_now = void 0;
427 if ("object" === typeof performance && "function" === typeof performance.now) {
428 var localPerformance = performance;
429 exports.unstable_now = function() {
430 return localPerformance.now();
431 };
432 } else {
433 var localDate = Date, initialTime = localDate.now();
434 exports.unstable_now = function() {
435 return localDate.now() - initialTime;
436 };
437 }
438 var taskQueue = [], timerQueue = [], taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = false, isHostCallbackScheduled = false, isHostTimeoutScheduled = false, needsPaint = false, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null, isMessageLoopRunning = false, taskTimeoutID = -1, frameInterval = 5, startTime = -1;
439 if ("function" === typeof localSetImmediate)
440 var schedulePerformWorkUntilDeadline = function() {
441 localSetImmediate(performWorkUntilDeadline);
442 };
443 else if ("undefined" !== typeof MessageChannel) {
444 var channel = new MessageChannel(), port = channel.port2;
445 channel.port1.onmessage = performWorkUntilDeadline;
446 schedulePerformWorkUntilDeadline = function() {
447 port.postMessage(null);
448 };
449 } else
450 schedulePerformWorkUntilDeadline = function() {
451 localSetTimeout(performWorkUntilDeadline, 0);
452 };
453 exports.unstable_IdlePriority = 5;
454 exports.unstable_ImmediatePriority = 1;
455 exports.unstable_LowPriority = 4;
456 exports.unstable_NormalPriority = 3;
457 exports.unstable_Profiling = null;
458 exports.unstable_UserBlockingPriority = 2;
459 exports.unstable_cancelCallback = function(task) {
460 task.callback = null;
461 };
462 exports.unstable_forceFrameRate = function(fps) {
463 0 > fps || 125 < fps ? console.error(
464 "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
465 ) : frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5;
466 };
467 exports.unstable_getCurrentPriorityLevel = function() {
468 return currentPriorityLevel;
469 };
470 exports.unstable_next = function(eventHandler) {
471 switch (currentPriorityLevel) {
472 case 1:
473 case 2:
474 case 3:
475 var priorityLevel = 3;
476 break;
477 default:
478 priorityLevel = currentPriorityLevel;
479 }
480 var previousPriorityLevel = currentPriorityLevel;
481 currentPriorityLevel = priorityLevel;
482 try {
483 return eventHandler();
484 } finally {
485 currentPriorityLevel = previousPriorityLevel;
486 }
487 };
488 exports.unstable_requestPaint = function() {
489 needsPaint = true;
490 };
491 exports.unstable_runWithPriority = function(priorityLevel, eventHandler) {
492 switch (priorityLevel) {
493 case 1:
494 case 2:
495 case 3:
496 case 4:
497 case 5:
498 break;
499 default:
500 priorityLevel = 3;
501 }
502 var previousPriorityLevel = currentPriorityLevel;
503 currentPriorityLevel = priorityLevel;
504 try {
505 return eventHandler();
506 } finally {
507 currentPriorityLevel = previousPriorityLevel;
508 }
509 };
510 exports.unstable_scheduleCallback = function(priorityLevel, callback, options) {
511 var currentTime = exports.unstable_now();
512 "object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime;
513 switch (priorityLevel) {
514 case 1:
515 var timeout = -1;
516 break;
517 case 2:
518 timeout = 250;
519 break;
520 case 5:
521 timeout = 1073741823;
522 break;
523 case 4:
524 timeout = 1e4;
525 break;
526 default:
527 timeout = 5e3;
528 }
529 timeout = options + timeout;
530 priorityLevel = {
531 id: taskIdCounter++,
532 callback,
533 priorityLevel,
534 startTime: options,
535 expirationTime: timeout,
536 sortIndex: -1
537 };
538 options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), null === peek(taskQueue) && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = true, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline())));
539 return priorityLevel;
540 };
541 exports.unstable_shouldYield = shouldYieldToHost;
542 exports.unstable_wrapCallback = function(callback) {
543 var parentPriorityLevel = currentPriorityLevel;
544 return function() {
545 var previousPriorityLevel = currentPriorityLevel;
546 currentPriorityLevel = parentPriorityLevel;
547 try {
548 return callback.apply(this, arguments);
549 } finally {
550 currentPriorityLevel = previousPriorityLevel;
551 }
552 };
553 };
554 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
555 })();
556 }
557 });
558
559 // ../react-19/node_modules/scheduler/index.js
560 var require_scheduler = __commonJS({
561 "../react-19/node_modules/scheduler/index.js"(exports, module) {
562 "use strict";
563 if (false) {
564 module.exports = null;
565 } else {
566 module.exports = require_scheduler_development();
567 }
568 }
569 });
570
571 // ../react-19/node_modules/react-dom/cjs/react-dom-client.development.js
572 var require_react_dom_client_development = __commonJS({
573 "../react-19/node_modules/react-dom/cjs/react-dom-client.development.js"(exports) {
574 "use strict";
575 (function() {
576 function findHook(fiber, id) {
577 for (fiber = fiber.memoizedState; null !== fiber && 0 < id; )
578 fiber = fiber.next, id--;
579 return fiber;
580 }
581 function copyWithSetImpl(obj, path, index, value) {
582 if (index >= path.length) return value;
583 var key = path[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
584 updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
585 return updated;
586 }
587 function copyWithRename(obj, oldPath, newPath) {
588 if (oldPath.length !== newPath.length)
589 console.warn("copyWithRename() expects paths of the same length");
590 else {
591 for (var i = 0; i < newPath.length - 1; i++)
592 if (oldPath[i] !== newPath[i]) {
593 console.warn(
594 "copyWithRename() expects paths to be the same except for the deepest key"
595 );
596 return;
597 }
598 return copyWithRenameImpl(obj, oldPath, newPath, 0);
599 }
600 }
601 function copyWithRenameImpl(obj, oldPath, newPath, index) {
602 var oldKey = oldPath[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
603 index + 1 === oldPath.length ? (updated[newPath[index]] = updated[oldKey], isArrayImpl(updated) ? updated.splice(oldKey, 1) : delete updated[oldKey]) : updated[oldKey] = copyWithRenameImpl(
604 obj[oldKey],
605 oldPath,
606 newPath,
607 index + 1
608 );
609 return updated;
610 }
611 function copyWithDeleteImpl(obj, path, index) {
612 var key = path[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
613 if (index + 1 === path.length)
614 return isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated;
615 updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);
616 return updated;
617 }
618 function shouldSuspendImpl() {
619 return false;
620 }
621 function shouldErrorImpl() {
622 return null;
623 }
624 function warnInvalidHookAccess() {
625 console.error(
626 "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks"
627 );
628 }
629 function warnInvalidContextAccess() {
630 console.error(
631 "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
632 );
633 }
634 function noop() {
635 }
636 function warnForMissingKey() {
637 }
638 function setToSortedString(set) {
639 var array = [];
640 set.forEach(function(value) {
641 array.push(value);
642 });
643 return array.sort().join(", ");
644 }
645 function createFiber(tag, pendingProps, key, mode) {
646 return new FiberNode(tag, pendingProps, key, mode);
647 }
648 function scheduleRoot(root2, element) {
649 root2.context === emptyContextObject && (updateContainerImpl(root2.current, 2, element, root2, null, null), flushSyncWork$1());
650 }
651 function scheduleRefresh(root2, update) {
652 if (null !== resolveFamily) {
653 var staleFamilies = update.staleFamilies;
654 update = update.updatedFamilies;
655 flushPendingEffects();
656 scheduleFibersWithFamiliesRecursively(
657 root2.current,
658 update,
659 staleFamilies
660 );
661 flushSyncWork$1();
662 }
663 }
664 function setRefreshHandler(handler) {
665 resolveFamily = handler;
666 }
667 function isValidContainer(node) {
668 return !(!node || 1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType);
669 }
670 function getNearestMountedFiber(fiber) {
671 var node = fiber, nearestMounted = fiber;
672 if (fiber.alternate) for (; node.return; ) node = node.return;
673 else {
674 fiber = node;
675 do
676 node = fiber, 0 !== (node.flags & 4098) && (nearestMounted = node.return), fiber = node.return;
677 while (fiber);
678 }
679 return 3 === node.tag ? nearestMounted : null;
680 }
681 function getSuspenseInstanceFromFiber(fiber) {
682 if (13 === fiber.tag) {
683 var suspenseState = fiber.memoizedState;
684 null === suspenseState && (fiber = fiber.alternate, null !== fiber && (suspenseState = fiber.memoizedState));
685 if (null !== suspenseState) return suspenseState.dehydrated;
686 }
687 return null;
688 }
689 function getActivityInstanceFromFiber(fiber) {
690 if (31 === fiber.tag) {
691 var activityState = fiber.memoizedState;
692 null === activityState && (fiber = fiber.alternate, null !== fiber && (activityState = fiber.memoizedState));
693 if (null !== activityState) return activityState.dehydrated;
694 }
695 return null;
696 }
697 function assertIsMounted(fiber) {
698 if (getNearestMountedFiber(fiber) !== fiber)
699 throw Error("Unable to find node on an unmounted component.");
700 }
701 function findCurrentFiberUsingSlowPath(fiber) {
702 var alternate = fiber.alternate;
703 if (!alternate) {
704 alternate = getNearestMountedFiber(fiber);
705 if (null === alternate)
706 throw Error("Unable to find node on an unmounted component.");
707 return alternate !== fiber ? null : fiber;
708 }
709 for (var a = fiber, b = alternate; ; ) {
710 var parentA = a.return;
711 if (null === parentA) break;
712 var parentB = parentA.alternate;
713 if (null === parentB) {
714 b = parentA.return;
715 if (null !== b) {
716 a = b;
717 continue;
718 }
719 break;
720 }
721 if (parentA.child === parentB.child) {
722 for (parentB = parentA.child; parentB; ) {
723 if (parentB === a) return assertIsMounted(parentA), fiber;
724 if (parentB === b) return assertIsMounted(parentA), alternate;
725 parentB = parentB.sibling;
726 }
727 throw Error("Unable to find node on an unmounted component.");
728 }
729 if (a.return !== b.return) a = parentA, b = parentB;
730 else {
731 for (var didFindChild = false, _child = parentA.child; _child; ) {
732 if (_child === a) {
733 didFindChild = true;
734 a = parentA;
735 b = parentB;
736 break;
737 }
738 if (_child === b) {
739 didFindChild = true;
740 b = parentA;
741 a = parentB;
742 break;
743 }
744 _child = _child.sibling;
745 }
746 if (!didFindChild) {
747 for (_child = parentB.child; _child; ) {
748 if (_child === a) {
749 didFindChild = true;
750 a = parentB;
751 b = parentA;
752 break;
753 }
754 if (_child === b) {
755 didFindChild = true;
756 b = parentB;
757 a = parentA;
758 break;
759 }
760 _child = _child.sibling;
761 }
762 if (!didFindChild)
763 throw Error(
764 "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."
765 );
766 }
767 }
768 if (a.alternate !== b)
769 throw Error(
770 "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."
771 );
772 }
773 if (3 !== a.tag)
774 throw Error("Unable to find node on an unmounted component.");
775 return a.stateNode.current === a ? fiber : alternate;
776 }
777 function findCurrentHostFiberImpl(node) {
778 var tag = node.tag;
779 if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
780 for (node = node.child; null !== node; ) {
781 tag = findCurrentHostFiberImpl(node);
782 if (null !== tag) return tag;
783 node = node.sibling;
784 }
785 return null;
786 }
787 function getIteratorFn(maybeIterable) {
788 if (null === maybeIterable || "object" !== typeof maybeIterable)
789 return null;
790 maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
791 return "function" === typeof maybeIterable ? maybeIterable : null;
792 }
793 function getComponentNameFromType(type) {
794 if (null == type) return null;
795 if ("function" === typeof type)
796 return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
797 if ("string" === typeof type) return type;
798 switch (type) {
799 case REACT_FRAGMENT_TYPE:
800 return "Fragment";
801 case REACT_PROFILER_TYPE:
802 return "Profiler";
803 case REACT_STRICT_MODE_TYPE:
804 return "StrictMode";
805 case REACT_SUSPENSE_TYPE:
806 return "Suspense";
807 case REACT_SUSPENSE_LIST_TYPE:
808 return "SuspenseList";
809 case REACT_ACTIVITY_TYPE:
810 return "Activity";
811 }
812 if ("object" === typeof type)
813 switch ("number" === typeof type.tag && console.error(
814 "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
815 ), type.$$typeof) {
816 case REACT_PORTAL_TYPE:
817 return "Portal";
818 case REACT_CONTEXT_TYPE:
819 return type.displayName || "Context";
820 case REACT_CONSUMER_TYPE:
821 return (type._context.displayName || "Context") + ".Consumer";
822 case REACT_FORWARD_REF_TYPE:
823 var innerType = type.render;
824 type = type.displayName;
825 type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
826 return type;
827 case REACT_MEMO_TYPE:
828 return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
829 case REACT_LAZY_TYPE:
830 innerType = type._payload;
831 type = type._init;
832 try {
833 return getComponentNameFromType(type(innerType));
834 } catch (x) {
835 }
836 }
837 return null;
838 }
839 function getComponentNameFromOwner(owner) {
840 return "number" === typeof owner.tag ? getComponentNameFromFiber(owner) : "string" === typeof owner.name ? owner.name : null;
841 }
842 function getComponentNameFromFiber(fiber) {
843 var type = fiber.type;
844 switch (fiber.tag) {
845 case 31:
846 return "Activity";
847 case 24:
848 return "Cache";
849 case 9:
850 return (type._context.displayName || "Context") + ".Consumer";
851 case 10:
852 return type.displayName || "Context";
853 case 18:
854 return "DehydratedFragment";
855 case 11:
856 return fiber = type.render, fiber = fiber.displayName || fiber.name || "", type.displayName || ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef");
857 case 7:
858 return "Fragment";
859 case 26:
860 case 27:
861 case 5:
862 return type;
863 case 4:
864 return "Portal";
865 case 3:
866 return "Root";
867 case 6:
868 return "Text";
869 case 16:
870 return getComponentNameFromType(type);
871 case 8:
872 return type === REACT_STRICT_MODE_TYPE ? "StrictMode" : "Mode";
873 case 22:
874 return "Offscreen";
875 case 12:
876 return "Profiler";
877 case 21:
878 return "Scope";
879 case 13:
880 return "Suspense";
881 case 19:
882 return "SuspenseList";
883 case 25:
884 return "TracingMarker";
885 case 1:
886 case 0:
887 case 14:
888 case 15:
889 if ("function" === typeof type)
890 return type.displayName || type.name || null;
891 if ("string" === typeof type) return type;
892 break;
893 case 29:
894 type = fiber._debugInfo;
895 if (null != type) {
896 for (var i = type.length - 1; 0 <= i; i--)
897 if ("string" === typeof type[i].name) return type[i].name;
898 }
899 if (null !== fiber.return)
900 return getComponentNameFromFiber(fiber.return);
901 }
902 return null;
903 }
904 function createCursor(defaultValue) {
905 return { current: defaultValue };
906 }
907 function pop(cursor, fiber) {
908 0 > index$jscomp$0 ? console.error("Unexpected pop.") : (fiber !== fiberStack[index$jscomp$0] && console.error("Unexpected Fiber popped."), cursor.current = valueStack[index$jscomp$0], valueStack[index$jscomp$0] = null, fiberStack[index$jscomp$0] = null, index$jscomp$0--);
909 }
910 function push(cursor, value, fiber) {
911 index$jscomp$0++;
912 valueStack[index$jscomp$0] = cursor.current;
913 fiberStack[index$jscomp$0] = fiber;
914 cursor.current = value;
915 }
916 function requiredContext(c) {
917 null === c && console.error(
918 "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."
919 );
920 return c;
921 }
922 function pushHostContainer(fiber, nextRootInstance) {
923 push(rootInstanceStackCursor, nextRootInstance, fiber);
924 push(contextFiberStackCursor, fiber, fiber);
925 push(contextStackCursor, null, fiber);
926 var nextRootContext = nextRootInstance.nodeType;
927 switch (nextRootContext) {
928 case 9:
929 case 11:
930 nextRootContext = 9 === nextRootContext ? "#document" : "#fragment";
931 nextRootInstance = (nextRootInstance = nextRootInstance.documentElement) ? (nextRootInstance = nextRootInstance.namespaceURI) ? getOwnHostContext(nextRootInstance) : HostContextNamespaceNone : HostContextNamespaceNone;
932 break;
933 default:
934 if (nextRootContext = nextRootInstance.tagName, nextRootInstance = nextRootInstance.namespaceURI)
935 nextRootInstance = getOwnHostContext(nextRootInstance), nextRootInstance = getChildHostContextProd(
936 nextRootInstance,
937 nextRootContext
938 );
939 else
940 switch (nextRootContext) {
941 case "svg":
942 nextRootInstance = HostContextNamespaceSvg;
943 break;
944 case "math":
945 nextRootInstance = HostContextNamespaceMath;
946 break;
947 default:
948 nextRootInstance = HostContextNamespaceNone;
949 }
950 }
951 nextRootContext = nextRootContext.toLowerCase();
952 nextRootContext = updatedAncestorInfoDev(null, nextRootContext);
953 nextRootContext = {
954 context: nextRootInstance,
955 ancestorInfo: nextRootContext
956 };
957 pop(contextStackCursor, fiber);
958 push(contextStackCursor, nextRootContext, fiber);
959 }
960 function popHostContainer(fiber) {
961 pop(contextStackCursor, fiber);
962 pop(contextFiberStackCursor, fiber);
963 pop(rootInstanceStackCursor, fiber);
964 }
965 function getHostContext() {
966 return requiredContext(contextStackCursor.current);
967 }
968 function pushHostContext(fiber) {
969 null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber, fiber);
970 var context = requiredContext(contextStackCursor.current);
971 var type = fiber.type;
972 var nextContext = getChildHostContextProd(context.context, type);
973 type = updatedAncestorInfoDev(context.ancestorInfo, type);
974 nextContext = { context: nextContext, ancestorInfo: type };
975 context !== nextContext && (push(contextFiberStackCursor, fiber, fiber), push(contextStackCursor, nextContext, fiber));
976 }
977 function popHostContext(fiber) {
978 contextFiberStackCursor.current === fiber && (pop(contextStackCursor, fiber), pop(contextFiberStackCursor, fiber));
979 hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor, fiber), HostTransitionContext._currentValue = NotPendingTransition);
980 }
981 function disabledLog() {
982 }
983 function disableLogs() {
984 if (0 === disabledDepth) {
985 prevLog = console.log;
986 prevInfo = console.info;
987 prevWarn = console.warn;
988 prevError = console.error;
989 prevGroup = console.group;
990 prevGroupCollapsed = console.groupCollapsed;
991 prevGroupEnd = console.groupEnd;
992 var props = {
993 configurable: true,
994 enumerable: true,
995 value: disabledLog,
996 writable: true
997 };
998 Object.defineProperties(console, {
999 info: props,
1000 log: props,
1001 warn: props,
1002 error: props,
1003 group: props,
1004 groupCollapsed: props,
1005 groupEnd: props
1006 });
1007 }
1008 disabledDepth++;
1009 }
1010 function reenableLogs() {
1011 disabledDepth--;
1012 if (0 === disabledDepth) {
1013 var props = { configurable: true, enumerable: true, writable: true };
1014 Object.defineProperties(console, {
1015 log: assign({}, props, { value: prevLog }),
1016 info: assign({}, props, { value: prevInfo }),
1017 warn: assign({}, props, { value: prevWarn }),
1018 error: assign({}, props, { value: prevError }),
1019 group: assign({}, props, { value: prevGroup }),
1020 groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
1021 groupEnd: assign({}, props, { value: prevGroupEnd })
1022 });
1023 }
1024 0 > disabledDepth && console.error(
1025 "disabledDepth fell below zero. This is a bug in React. Please file an issue."
1026 );
1027 }
1028 function formatOwnerStack(error) {
1029 var prevPrepareStackTrace = Error.prepareStackTrace;
1030 Error.prepareStackTrace = void 0;
1031 error = error.stack;
1032 Error.prepareStackTrace = prevPrepareStackTrace;
1033 error.startsWith("Error: react-stack-top-frame\n") && (error = error.slice(29));
1034 prevPrepareStackTrace = error.indexOf("\n");
1035 -1 !== prevPrepareStackTrace && (error = error.slice(prevPrepareStackTrace + 1));
1036 prevPrepareStackTrace = error.indexOf("react_stack_bottom_frame");
1037 -1 !== prevPrepareStackTrace && (prevPrepareStackTrace = error.lastIndexOf(
1038 "\n",
1039 prevPrepareStackTrace
1040 ));
1041 if (-1 !== prevPrepareStackTrace)
1042 error = error.slice(0, prevPrepareStackTrace);
1043 else return "";
1044 return error;
1045 }
1046 function describeBuiltInComponentFrame(name) {
1047 if (void 0 === prefix)
1048 try {
1049 throw Error();
1050 } catch (x) {
1051 var match = x.stack.trim().match(/\n( *(at )?)/);
1052 prefix = match && match[1] || "";
1053 suffix = -1 < x.stack.indexOf("\n at") ? " (<anonymous>)" : -1 < x.stack.indexOf("@") ? "@unknown:0:0" : "";
1054 }
1055 return "\n" + prefix + name + suffix;
1056 }
1057 function describeNativeComponentFrame(fn, construct) {
1058 if (!fn || reentry) return "";
1059 var frame = componentFrameCache.get(fn);
1060 if (void 0 !== frame) return frame;
1061 reentry = true;
1062 frame = Error.prepareStackTrace;
1063 Error.prepareStackTrace = void 0;
1064 var previousDispatcher2 = null;
1065 previousDispatcher2 = ReactSharedInternals.H;
1066 ReactSharedInternals.H = null;
1067 disableLogs();
1068 try {
1069 var RunInRootFrame = {
1070 DetermineComponentFrameRoot: function() {
1071 try {
1072 if (construct) {
1073 var Fake = function() {
1074 throw Error();
1075 };
1076 Object.defineProperty(Fake.prototype, "props", {
1077 set: function() {
1078 throw Error();
1079 }
1080 });
1081 if ("object" === typeof Reflect && Reflect.construct) {
1082 try {
1083 Reflect.construct(Fake, []);
1084 } catch (x) {
1085 var control = x;
1086 }
1087 Reflect.construct(fn, [], Fake);
1088 } else {
1089 try {
1090 Fake.call();
1091 } catch (x$0) {
1092 control = x$0;
1093 }
1094 fn.call(Fake.prototype);
1095 }
1096 } else {
1097 try {
1098 throw Error();
1099 } catch (x$1) {
1100 control = x$1;
1101 }
1102 (Fake = fn()) && "function" === typeof Fake.catch && Fake.catch(function() {
1103 });
1104 }
1105 } catch (sample) {
1106 if (sample && control && "string" === typeof sample.stack)
1107 return [sample.stack, control.stack];
1108 }
1109 return [null, null];
1110 }
1111 };
1112 RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
1113 var namePropDescriptor = Object.getOwnPropertyDescriptor(
1114 RunInRootFrame.DetermineComponentFrameRoot,
1115 "name"
1116 );
1117 namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty(
1118 RunInRootFrame.DetermineComponentFrameRoot,
1119 "name",
1120 { value: "DetermineComponentFrameRoot" }
1121 );
1122 var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1];
1123 if (sampleStack && controlStack) {
1124 var sampleLines = sampleStack.split("\n"), controlLines = controlStack.split("\n");
1125 for (_RunInRootFrame$Deter = namePropDescriptor = 0; namePropDescriptor < sampleLines.length && !sampleLines[namePropDescriptor].includes(
1126 "DetermineComponentFrameRoot"
1127 ); )
1128 namePropDescriptor++;
1129 for (; _RunInRootFrame$Deter < controlLines.length && !controlLines[_RunInRootFrame$Deter].includes(
1130 "DetermineComponentFrameRoot"
1131 ); )
1132 _RunInRootFrame$Deter++;
1133 if (namePropDescriptor === sampleLines.length || _RunInRootFrame$Deter === controlLines.length)
1134 for (namePropDescriptor = sampleLines.length - 1, _RunInRootFrame$Deter = controlLines.length - 1; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter && sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]; )
1135 _RunInRootFrame$Deter--;
1136 for (; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; namePropDescriptor--, _RunInRootFrame$Deter--)
1137 if (sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
1138 if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
1139 do
1140 if (namePropDescriptor--, _RunInRootFrame$Deter--, 0 > _RunInRootFrame$Deter || sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
1141 var _frame = "\n" + sampleLines[namePropDescriptor].replace(
1142 " at new ",
1143 " at "
1144 );
1145 fn.displayName && _frame.includes("<anonymous>") && (_frame = _frame.replace("<anonymous>", fn.displayName));
1146 "function" === typeof fn && componentFrameCache.set(fn, _frame);
1147 return _frame;
1148 }
1149 while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
1150 }
1151 break;
1152 }
1153 }
1154 } finally {
1155 reentry = false, ReactSharedInternals.H = previousDispatcher2, reenableLogs(), Error.prepareStackTrace = frame;
1156 }
1157 sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(sampleLines) : "";
1158 "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
1159 return sampleLines;
1160 }
1161 function describeFiber(fiber, childFiber) {
1162 switch (fiber.tag) {
1163 case 26:
1164 case 27:
1165 case 5:
1166 return describeBuiltInComponentFrame(fiber.type);
1167 case 16:
1168 return describeBuiltInComponentFrame("Lazy");
1169 case 13:
1170 return fiber.child !== childFiber && null !== childFiber ? describeBuiltInComponentFrame("Suspense Fallback") : describeBuiltInComponentFrame("Suspense");
1171 case 19:
1172 return describeBuiltInComponentFrame("SuspenseList");
1173 case 0:
1174 case 15:
1175 return describeNativeComponentFrame(fiber.type, false);
1176 case 11:
1177 return describeNativeComponentFrame(fiber.type.render, false);
1178 case 1:
1179 return describeNativeComponentFrame(fiber.type, true);
1180 case 31:
1181 return describeBuiltInComponentFrame("Activity");
1182 default:
1183 return "";
1184 }
1185 }
1186 function getStackByFiberInDevAndProd(workInProgress2) {
1187 try {
1188 var info = "", previous = null;
1189 do {
1190 info += describeFiber(workInProgress2, previous);
1191 var debugInfo = workInProgress2._debugInfo;
1192 if (debugInfo)
1193 for (var i = debugInfo.length - 1; 0 <= i; i--) {
1194 var entry = debugInfo[i];
1195 if ("string" === typeof entry.name) {
1196 var JSCompiler_temp_const = info;
1197 a: {
1198 var name = entry.name, env = entry.env, location = entry.debugLocation;
1199 if (null != location) {
1200 var childStack = formatOwnerStack(location), idx = childStack.lastIndexOf("\n"), lastLine = -1 === idx ? childStack : childStack.slice(idx + 1);
1201 if (-1 !== lastLine.indexOf(name)) {
1202 var JSCompiler_inline_result = "\n" + lastLine;
1203 break a;
1204 }
1205 }
1206 JSCompiler_inline_result = describeBuiltInComponentFrame(
1207 name + (env ? " [" + env + "]" : "")
1208 );
1209 }
1210 info = JSCompiler_temp_const + JSCompiler_inline_result;
1211 }
1212 }
1213 previous = workInProgress2;
1214 workInProgress2 = workInProgress2.return;
1215 } while (workInProgress2);
1216 return info;
1217 } catch (x) {
1218 return "\nError generating stack: " + x.message + "\n" + x.stack;
1219 }
1220 }
1221 function describeFunctionComponentFrameWithoutLineNumber(fn) {
1222 return (fn = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(fn) : "";
1223 }
1224 function getCurrentFiberOwnerNameInDevOrNull() {
1225 if (null === current) return null;
1226 var owner = current._debugOwner;
1227 return null != owner ? getComponentNameFromOwner(owner) : null;
1228 }
1229 function getCurrentFiberStackInDev() {
1230 if (null === current) return "";
1231 var workInProgress2 = current;
1232 try {
1233 var info = "";
1234 6 === workInProgress2.tag && (workInProgress2 = workInProgress2.return);
1235 switch (workInProgress2.tag) {
1236 case 26:
1237 case 27:
1238 case 5:
1239 info += describeBuiltInComponentFrame(workInProgress2.type);
1240 break;
1241 case 13:
1242 info += describeBuiltInComponentFrame("Suspense");
1243 break;
1244 case 19:
1245 info += describeBuiltInComponentFrame("SuspenseList");
1246 break;
1247 case 31:
1248 info += describeBuiltInComponentFrame("Activity");
1249 break;
1250 case 30:
1251 case 0:
1252 case 15:
1253 case 1:
1254 workInProgress2._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(
1255 workInProgress2.type
1256 ));
1257 break;
1258 case 11:
1259 workInProgress2._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(
1260 workInProgress2.type.render
1261 ));
1262 }
1263 for (; workInProgress2; )
1264 if ("number" === typeof workInProgress2.tag) {
1265 var fiber = workInProgress2;
1266 workInProgress2 = fiber._debugOwner;
1267 var debugStack = fiber._debugStack;
1268 if (workInProgress2 && debugStack) {
1269 var formattedStack = formatOwnerStack(debugStack);
1270 "" !== formattedStack && (info += "\n" + formattedStack);
1271 }
1272 } else if (null != workInProgress2.debugStack) {
1273 var ownerStack = workInProgress2.debugStack;
1274 (workInProgress2 = workInProgress2.owner) && ownerStack && (info += "\n" + formatOwnerStack(ownerStack));
1275 } else break;
1276 var JSCompiler_inline_result = info;
1277 } catch (x) {
1278 JSCompiler_inline_result = "\nError generating stack: " + x.message + "\n" + x.stack;
1279 }
1280 return JSCompiler_inline_result;
1281 }
1282 function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
1283 var previousFiber = current;
1284 setCurrentFiber(fiber);
1285 try {
1286 return null !== fiber && fiber._debugTask ? fiber._debugTask.run(
1287 callback.bind(null, arg0, arg1, arg2, arg3, arg4)
1288 ) : callback(arg0, arg1, arg2, arg3, arg4);
1289 } finally {
1290 setCurrentFiber(previousFiber);
1291 }
1292 throw Error(
1293 "runWithFiberInDEV should never be called in production. This is a bug in React."
1294 );
1295 }
1296 function setCurrentFiber(fiber) {
1297 ReactSharedInternals.getCurrentStack = null === fiber ? null : getCurrentFiberStackInDev;
1298 isRendering = false;
1299 current = fiber;
1300 }
1301 function typeName(value) {
1302 return "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
1303 }
1304 function willCoercionThrow(value) {
1305 try {
1306 return testStringCoercion(value), false;
1307 } catch (e) {
1308 return true;
1309 }
1310 }
1311 function testStringCoercion(value) {
1312 return "" + value;
1313 }
1314 function checkAttributeStringCoercion(value, attributeName) {
1315 if (willCoercionThrow(value))
1316 return console.error(
1317 "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",
1318 attributeName,
1319 typeName(value)
1320 ), testStringCoercion(value);
1321 }
1322 function checkCSSPropertyStringCoercion(value, propName) {
1323 if (willCoercionThrow(value))
1324 return console.error(
1325 "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",
1326 propName,
1327 typeName(value)
1328 ), testStringCoercion(value);
1329 }
1330 function checkFormFieldValueStringCoercion(value) {
1331 if (willCoercionThrow(value))
1332 return console.error(
1333 "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",
1334 typeName(value)
1335 ), testStringCoercion(value);
1336 }
1337 function injectInternals(internals) {
1338 if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return false;
1339 var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
1340 if (hook.isDisabled) return true;
1341 if (!hook.supportsFiber)
1342 return console.error(
1343 "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"
1344 ), true;
1345 try {
1346 rendererID = hook.inject(internals), injectedHook = hook;
1347 } catch (err) {
1348 console.error("React instrumentation encountered an error: %o.", err);
1349 }
1350 return hook.checkDCE ? true : false;
1351 }
1352 function setIsStrictModeForDevtools(newIsStrictMode) {
1353 "function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
1354 if (injectedHook && "function" === typeof injectedHook.setStrictMode)
1355 try {
1356 injectedHook.setStrictMode(rendererID, newIsStrictMode);
1357 } catch (err) {
1358 hasLoggedError || (hasLoggedError = true, console.error(
1359 "React instrumentation encountered an error: %o",
1360 err
1361 ));
1362 }
1363 }
1364 function clz32Fallback(x) {
1365 x >>>= 0;
1366 return 0 === x ? 32 : 31 - (log(x) / LN2 | 0) | 0;
1367 }
1368 function getHighestPriorityLanes(lanes) {
1369 var pendingSyncLanes = lanes & 42;
1370 if (0 !== pendingSyncLanes) return pendingSyncLanes;
1371 switch (lanes & -lanes) {
1372 case 1:
1373 return 1;
1374 case 2:
1375 return 2;
1376 case 4:
1377 return 4;
1378 case 8:
1379 return 8;
1380 case 16:
1381 return 16;
1382 case 32:
1383 return 32;
1384 case 64:
1385 return 64;
1386 case 128:
1387 return 128;
1388 case 256:
1389 case 512:
1390 case 1024:
1391 case 2048:
1392 case 4096:
1393 case 8192:
1394 case 16384:
1395 case 32768:
1396 case 65536:
1397 case 131072:
1398 return lanes & 261888;
1399 case 262144:
1400 case 524288:
1401 case 1048576:
1402 case 2097152:
1403 return lanes & 3932160;
1404 case 4194304:
1405 case 8388608:
1406 case 16777216:
1407 case 33554432:
1408 return lanes & 62914560;
1409 case 67108864:
1410 return 67108864;
1411 case 134217728:
1412 return 134217728;
1413 case 268435456:
1414 return 268435456;
1415 case 536870912:
1416 return 536870912;
1417 case 1073741824:
1418 return 0;
1419 default:
1420 return console.error(
1421 "Should have found matching lanes. This is a bug in React."
1422 ), lanes;
1423 }
1424 }
1425 function getNextLanes(root2, wipLanes, rootHasPendingCommit) {
1426 var pendingLanes = root2.pendingLanes;
1427 if (0 === pendingLanes) return 0;
1428 var nextLanes = 0, suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes;
1429 root2 = root2.warmLanes;
1430 var nonIdlePendingLanes = pendingLanes & 134217727;
1431 0 !== nonIdlePendingLanes ? (pendingLanes = nonIdlePendingLanes & ~suspendedLanes, 0 !== pendingLanes ? nextLanes = getHighestPriorityLanes(pendingLanes) : (pingedLanes &= nonIdlePendingLanes, 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = nonIdlePendingLanes & ~root2, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : (nonIdlePendingLanes = pendingLanes & ~suspendedLanes, 0 !== nonIdlePendingLanes ? nextLanes = getHighestPriorityLanes(nonIdlePendingLanes) : 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = pendingLanes & ~root2, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
1432 return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && (suspendedLanes = nextLanes & -nextLanes, rootHasPendingCommit = wipLanes & -wipLanes, suspendedLanes >= rootHasPendingCommit || 32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)) ? wipLanes : nextLanes;
1433 }
1434 function checkIfRootIsPrerendering(root2, renderLanes2) {
1435 return 0 === (root2.pendingLanes & ~(root2.suspendedLanes & ~root2.pingedLanes) & renderLanes2);
1436 }
1437 function computeExpirationTime(lane, currentTime) {
1438 switch (lane) {
1439 case 1:
1440 case 2:
1441 case 4:
1442 case 8:
1443 case 64:
1444 return currentTime + 250;
1445 case 16:
1446 case 32:
1447 case 128:
1448 case 256:
1449 case 512:
1450 case 1024:
1451 case 2048:
1452 case 4096:
1453 case 8192:
1454 case 16384:
1455 case 32768:
1456 case 65536:
1457 case 131072:
1458 case 262144:
1459 case 524288:
1460 case 1048576:
1461 case 2097152:
1462 return currentTime + 5e3;
1463 case 4194304:
1464 case 8388608:
1465 case 16777216:
1466 case 33554432:
1467 return -1;
1468 case 67108864:
1469 case 134217728:
1470 case 268435456:
1471 case 536870912:
1472 case 1073741824:
1473 return -1;
1474 default:
1475 return console.error(
1476 "Should have found matching lanes. This is a bug in React."
1477 ), -1;
1478 }
1479 }
1480 function claimNextRetryLane() {
1481 var lane = nextRetryLane;
1482 nextRetryLane <<= 1;
1483 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
1484 return lane;
1485 }
1486 function createLaneMap(initial) {
1487 for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
1488 return laneMap;
1489 }
1490 function markRootUpdated$1(root2, updateLane) {
1491 root2.pendingLanes |= updateLane;
1492 268435456 !== updateLane && (root2.suspendedLanes = 0, root2.pingedLanes = 0, root2.warmLanes = 0);
1493 }
1494 function markRootFinished(root2, finishedLanes, remainingLanes, spawnedLane, updatedLanes, suspendedRetryLanes) {
1495 var previouslyPendingLanes = root2.pendingLanes;
1496 root2.pendingLanes = remainingLanes;
1497 root2.suspendedLanes = 0;
1498 root2.pingedLanes = 0;
1499 root2.warmLanes = 0;
1500 root2.expiredLanes &= remainingLanes;
1501 root2.entangledLanes &= remainingLanes;
1502 root2.errorRecoveryDisabledLanes &= remainingLanes;
1503 root2.shellSuspendCounter = 0;
1504 var entanglements = root2.entanglements, expirationTimes = root2.expirationTimes, hiddenUpdates = root2.hiddenUpdates;
1505 for (remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) {
1506 var index = 31 - clz32(remainingLanes), lane = 1 << index;
1507 entanglements[index] = 0;
1508 expirationTimes[index] = -1;
1509 var hiddenUpdatesForLane = hiddenUpdates[index];
1510 if (null !== hiddenUpdatesForLane)
1511 for (hiddenUpdates[index] = null, index = 0; index < hiddenUpdatesForLane.length; index++) {
1512 var update = hiddenUpdatesForLane[index];
1513 null !== update && (update.lane &= -536870913);
1514 }
1515 remainingLanes &= ~lane;
1516 }
1517 0 !== spawnedLane && markSpawnedDeferredLane(root2, spawnedLane, 0);
1518 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root2.tag && (root2.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
1519 }
1520 function markSpawnedDeferredLane(root2, spawnedLane, entangledLanes) {
1521 root2.pendingLanes |= spawnedLane;
1522 root2.suspendedLanes &= ~spawnedLane;
1523 var spawnedLaneIndex = 31 - clz32(spawnedLane);
1524 root2.entangledLanes |= spawnedLane;
1525 root2.entanglements[spawnedLaneIndex] = root2.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes & 261930;
1526 }
1527 function markRootEntangled(root2, entangledLanes) {
1528 var rootEntangledLanes = root2.entangledLanes |= entangledLanes;
1529 for (root2 = root2.entanglements; rootEntangledLanes; ) {
1530 var index = 31 - clz32(rootEntangledLanes), lane = 1 << index;
1531 lane & entangledLanes | root2[index] & entangledLanes && (root2[index] |= entangledLanes);
1532 rootEntangledLanes &= ~lane;
1533 }
1534 }
1535 function getBumpedLaneForHydration(root2, renderLanes2) {
1536 var renderLane = renderLanes2 & -renderLanes2;
1537 renderLane = 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane);
1538 return 0 !== (renderLane & (root2.suspendedLanes | renderLanes2)) ? 0 : renderLane;
1539 }
1540 function getBumpedLaneForHydrationByLane(lane) {
1541 switch (lane) {
1542 case 2:
1543 lane = 1;
1544 break;
1545 case 8:
1546 lane = 4;
1547 break;
1548 case 32:
1549 lane = 16;
1550 break;
1551 case 256:
1552 case 512:
1553 case 1024:
1554 case 2048:
1555 case 4096:
1556 case 8192:
1557 case 16384:
1558 case 32768:
1559 case 65536:
1560 case 131072:
1561 case 262144:
1562 case 524288:
1563 case 1048576:
1564 case 2097152:
1565 case 4194304:
1566 case 8388608:
1567 case 16777216:
1568 case 33554432:
1569 lane = 128;
1570 break;
1571 case 268435456:
1572 lane = 134217728;
1573 break;
1574 default:
1575 lane = 0;
1576 }
1577 return lane;
1578 }
1579 function addFiberToLanesMap(root2, fiber, lanes) {
1580 if (isDevToolsPresent)
1581 for (root2 = root2.pendingUpdatersLaneMap; 0 < lanes; ) {
1582 var index = 31 - clz32(lanes), lane = 1 << index;
1583 root2[index].add(fiber);
1584 lanes &= ~lane;
1585 }
1586 }
1587 function movePendingFibersToMemoized(root2, lanes) {
1588 if (isDevToolsPresent)
1589 for (var pendingUpdatersLaneMap = root2.pendingUpdatersLaneMap, memoizedUpdaters = root2.memoizedUpdaters; 0 < lanes; ) {
1590 var index = 31 - clz32(lanes);
1591 root2 = 1 << index;
1592 index = pendingUpdatersLaneMap[index];
1593 0 < index.size && (index.forEach(function(fiber) {
1594 var alternate = fiber.alternate;
1595 null !== alternate && memoizedUpdaters.has(alternate) || memoizedUpdaters.add(fiber);
1596 }), index.clear());
1597 lanes &= ~root2;
1598 }
1599 }
1600 function lanesToEventPriority(lanes) {
1601 lanes &= -lanes;
1602 return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes ? 0 !== (lanes & 134217727) ? DefaultEventPriority : IdleEventPriority : ContinuousEventPriority : DiscreteEventPriority;
1603 }
1604 function resolveUpdatePriority() {
1605 var updatePriority = ReactDOMSharedInternals.p;
1606 if (0 !== updatePriority) return updatePriority;
1607 updatePriority = window.event;
1608 return void 0 === updatePriority ? DefaultEventPriority : getEventPriority(updatePriority.type);
1609 }
1610 function runWithPriority(priority, fn) {
1611 var previousPriority = ReactDOMSharedInternals.p;
1612 try {
1613 return ReactDOMSharedInternals.p = priority, fn();
1614 } finally {
1615 ReactDOMSharedInternals.p = previousPriority;
1616 }
1617 }
1618 function detachDeletedInstance(node) {
1619 delete node[internalInstanceKey];
1620 delete node[internalPropsKey];
1621 delete node[internalEventHandlersKey];
1622 delete node[internalEventHandlerListenersKey];
1623 delete node[internalEventHandlesSetKey];
1624 }
1625 function getClosestInstanceFromNode(targetNode) {
1626 var targetInst = targetNode[internalInstanceKey];
1627 if (targetInst) return targetInst;
1628 for (var parentNode = targetNode.parentNode; parentNode; ) {
1629 if (targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]) {
1630 parentNode = targetInst.alternate;
1631 if (null !== targetInst.child || null !== parentNode && null !== parentNode.child)
1632 for (targetNode = getParentHydrationBoundary(targetNode); null !== targetNode; ) {
1633 if (parentNode = targetNode[internalInstanceKey])
1634 return parentNode;
1635 targetNode = getParentHydrationBoundary(targetNode);
1636 }
1637 return targetInst;
1638 }
1639 targetNode = parentNode;
1640 parentNode = targetNode.parentNode;
1641 }
1642 return null;
1643 }
1644 function getInstanceFromNode(node) {
1645 if (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) {
1646 var tag = node.tag;
1647 if (5 === tag || 6 === tag || 13 === tag || 31 === tag || 26 === tag || 27 === tag || 3 === tag)
1648 return node;
1649 }
1650 return null;
1651 }
1652 function getNodeFromInstance(inst) {
1653 var tag = inst.tag;
1654 if (5 === tag || 26 === tag || 27 === tag || 6 === tag)
1655 return inst.stateNode;
1656 throw Error("getNodeFromInstance: Invalid argument.");
1657 }
1658 function getResourcesFromRoot(root2) {
1659 var resources = root2[internalRootNodeResourcesKey];
1660 resources || (resources = root2[internalRootNodeResourcesKey] = { hoistableStyles: /* @__PURE__ */ new Map(), hoistableScripts: /* @__PURE__ */ new Map() });
1661 return resources;
1662 }
1663 function markNodeAsHoistable(node) {
1664 node[internalHoistableMarker] = true;
1665 }
1666 function registerTwoPhaseEvent(registrationName, dependencies) {
1667 registerDirectEvent(registrationName, dependencies);
1668 registerDirectEvent(registrationName + "Capture", dependencies);
1669 }
1670 function registerDirectEvent(registrationName, dependencies) {
1671 registrationNameDependencies[registrationName] && console.error(
1672 "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",
1673 registrationName
1674 );
1675 registrationNameDependencies[registrationName] = dependencies;
1676 var lowerCasedName = registrationName.toLowerCase();
1677 possibleRegistrationNames[lowerCasedName] = registrationName;
1678 "onDoubleClick" === registrationName && (possibleRegistrationNames.ondblclick = registrationName);
1679 for (registrationName = 0; registrationName < dependencies.length; registrationName++)
1680 allNativeEvents.add(dependencies[registrationName]);
1681 }
1682 function checkControlledValueProps(tagName, props) {
1683 hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || null == props.value || ("select" === tagName ? console.error(
1684 "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 `onChange`."
1685 ) : console.error(
1686 "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`."
1687 ));
1688 props.onChange || props.readOnly || props.disabled || null == props.checked || console.error(
1689 "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`."
1690 );
1691 }
1692 function isAttributeNameSafe(attributeName) {
1693 if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
1694 return true;
1695 if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))
1696 return false;
1697 if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
1698 return validatedAttributeNameCache[attributeName] = true;
1699 illegalAttributeNameCache[attributeName] = true;
1700 console.error("Invalid attribute name: `%s`", attributeName);
1701 return false;
1702 }
1703 function getValueForAttributeOnCustomComponent(node, name, expected) {
1704 if (isAttributeNameSafe(name)) {
1705 if (!node.hasAttribute(name)) {
1706 switch (typeof expected) {
1707 case "symbol":
1708 case "object":
1709 return expected;
1710 case "function":
1711 return expected;
1712 case "boolean":
1713 if (false === expected) return expected;
1714 }
1715 return void 0 === expected ? void 0 : null;
1716 }
1717 node = node.getAttribute(name);
1718 if ("" === node && true === expected) return true;
1719 checkAttributeStringCoercion(expected, name);
1720 return node === "" + expected ? expected : node;
1721 }
1722 }
1723 function setValueForAttribute(node, name, value) {
1724 if (isAttributeNameSafe(name))
1725 if (null === value) node.removeAttribute(name);
1726 else {
1727 switch (typeof value) {
1728 case "undefined":
1729 case "function":
1730 case "symbol":
1731 node.removeAttribute(name);
1732 return;
1733 case "boolean":
1734 var prefix2 = name.toLowerCase().slice(0, 5);
1735 if ("data-" !== prefix2 && "aria-" !== prefix2) {
1736 node.removeAttribute(name);
1737 return;
1738 }
1739 }
1740 checkAttributeStringCoercion(value, name);
1741 node.setAttribute(name, "" + value);
1742 }
1743 }
1744 function setValueForKnownAttribute(node, name, value) {
1745 if (null === value) node.removeAttribute(name);
1746 else {
1747 switch (typeof value) {
1748 case "undefined":
1749 case "function":
1750 case "symbol":
1751 case "boolean":
1752 node.removeAttribute(name);
1753 return;
1754 }
1755 checkAttributeStringCoercion(value, name);
1756 node.setAttribute(name, "" + value);
1757 }
1758 }
1759 function setValueForNamespacedAttribute(node, namespace, name, value) {
1760 if (null === value) node.removeAttribute(name);
1761 else {
1762 switch (typeof value) {
1763 case "undefined":
1764 case "function":
1765 case "symbol":
1766 case "boolean":
1767 node.removeAttribute(name);
1768 return;
1769 }
1770 checkAttributeStringCoercion(value, name);
1771 node.setAttributeNS(namespace, name, "" + value);
1772 }
1773 }
1774 function getToStringValue(value) {
1775 switch (typeof value) {
1776 case "bigint":
1777 case "boolean":
1778 case "number":
1779 case "string":
1780 case "undefined":
1781 return value;
1782 case "object":
1783 return checkFormFieldValueStringCoercion(value), value;
1784 default:
1785 return "";
1786 }
1787 }
1788 function isCheckable(elem) {
1789 var type = elem.type;
1790 return (elem = elem.nodeName) && "input" === elem.toLowerCase() && ("checkbox" === type || "radio" === type);
1791 }
1792 function trackValueOnNode(node, valueField, currentValue) {
1793 var descriptor = Object.getOwnPropertyDescriptor(
1794 node.constructor.prototype,
1795 valueField
1796 );
1797 if (!node.hasOwnProperty(valueField) && "undefined" !== typeof descriptor && "function" === typeof descriptor.get && "function" === typeof descriptor.set) {
1798 var get = descriptor.get, set = descriptor.set;
1799 Object.defineProperty(node, valueField, {
1800 configurable: true,
1801 get: function() {
1802 return get.call(this);
1803 },
1804 set: function(value) {
1805 checkFormFieldValueStringCoercion(value);
1806 currentValue = "" + value;
1807 set.call(this, value);
1808 }
1809 });
1810 Object.defineProperty(node, valueField, {
1811 enumerable: descriptor.enumerable
1812 });
1813 return {
1814 getValue: function() {
1815 return currentValue;
1816 },
1817 setValue: function(value) {
1818 checkFormFieldValueStringCoercion(value);
1819 currentValue = "" + value;
1820 },
1821 stopTracking: function() {
1822 node._valueTracker = null;
1823 delete node[valueField];
1824 }
1825 };
1826 }
1827 }
1828 function track(node) {
1829 if (!node._valueTracker) {
1830 var valueField = isCheckable(node) ? "checked" : "value";
1831 node._valueTracker = trackValueOnNode(
1832 node,
1833 valueField,
1834 "" + node[valueField]
1835 );
1836 }
1837 }
1838 function updateValueIfChanged(node) {
1839 if (!node) return false;
1840 var tracker = node._valueTracker;
1841 if (!tracker) return true;
1842 var lastValue = tracker.getValue();
1843 var value = "";
1844 node && (value = isCheckable(node) ? node.checked ? "true" : "false" : node.value);
1845 node = value;
1846 return node !== lastValue ? (tracker.setValue(node), true) : false;
1847 }
1848 function getActiveElement(doc) {
1849 doc = doc || ("undefined" !== typeof document ? document : void 0);
1850 if ("undefined" === typeof doc) return null;
1851 try {
1852 return doc.activeElement || doc.body;
1853 } catch (e) {
1854 return doc.body;
1855 }
1856 }
1857 function escapeSelectorAttributeValueInsideDoubleQuotes(value) {
1858 return value.replace(
1859 escapeSelectorAttributeValueInsideDoubleQuotesRegex,
1860 function(ch) {
1861 return "\\" + ch.charCodeAt(0).toString(16) + " ";
1862 }
1863 );
1864 }
1865 function validateInputProps(element, props) {
1866 void 0 === props.checked || void 0 === props.defaultChecked || didWarnCheckedDefaultChecked || (console.error(
1867 "%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://react.dev/link/controlled-components",
1868 getCurrentFiberOwnerNameInDevOrNull() || "A component",
1869 props.type
1870 ), didWarnCheckedDefaultChecked = true);
1871 void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue$1 || (console.error(
1872 "%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://react.dev/link/controlled-components",
1873 getCurrentFiberOwnerNameInDevOrNull() || "A component",
1874 props.type
1875 ), didWarnValueDefaultValue$1 = true);
1876 }
1877 function updateInput(element, value, defaultValue, lastDefaultValue, checked, defaultChecked, type, name) {
1878 element.name = "";
1879 null != type && "function" !== typeof type && "symbol" !== typeof type && "boolean" !== typeof type ? (checkAttributeStringCoercion(type, "type"), element.type = type) : element.removeAttribute("type");
1880 if (null != value)
1881 if ("number" === type) {
1882 if (0 === value && "" === element.value || element.value != value)
1883 element.value = "" + getToStringValue(value);
1884 } else
1885 element.value !== "" + getToStringValue(value) && (element.value = "" + getToStringValue(value));
1886 else
1887 "submit" !== type && "reset" !== type || element.removeAttribute("value");
1888 null != value ? setDefaultValue(element, type, getToStringValue(value)) : null != defaultValue ? setDefaultValue(element, type, getToStringValue(defaultValue)) : null != lastDefaultValue && element.removeAttribute("value");
1889 null == checked && null != defaultChecked && (element.defaultChecked = !!defaultChecked);
1890 null != checked && (element.checked = checked && "function" !== typeof checked && "symbol" !== typeof checked);
1891 null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name ? (checkAttributeStringCoercion(name, "name"), element.name = "" + getToStringValue(name)) : element.removeAttribute("name");
1892 }
1893 function initInput(element, value, defaultValue, checked, defaultChecked, type, name, isHydrating2) {
1894 null != type && "function" !== typeof type && "symbol" !== typeof type && "boolean" !== typeof type && (checkAttributeStringCoercion(type, "type"), element.type = type);
1895 if (null != value || null != defaultValue) {
1896 if (!("submit" !== type && "reset" !== type || void 0 !== value && null !== value)) {
1897 track(element);
1898 return;
1899 }
1900 defaultValue = null != defaultValue ? "" + getToStringValue(defaultValue) : "";
1901 value = null != value ? "" + getToStringValue(value) : defaultValue;
1902 isHydrating2 || value === element.value || (element.value = value);
1903 element.defaultValue = value;
1904 }
1905 checked = null != checked ? checked : defaultChecked;
1906 checked = "function" !== typeof checked && "symbol" !== typeof checked && !!checked;
1907 element.checked = isHydrating2 ? element.checked : !!checked;
1908 element.defaultChecked = !!checked;
1909 null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name && (checkAttributeStringCoercion(name, "name"), element.name = name);
1910 track(element);
1911 }
1912 function setDefaultValue(node, type, value) {
1913 "number" === type && getActiveElement(node.ownerDocument) === node || node.defaultValue === "" + value || (node.defaultValue = "" + value);
1914 }
1915 function validateOptionProps(element, props) {
1916 null == props.value && ("object" === typeof props.children && null !== props.children ? React.Children.forEach(props.children, function(child) {
1917 null == child || "string" === typeof child || "number" === typeof child || "bigint" === typeof child || didWarnInvalidChild || (didWarnInvalidChild = true, console.error(
1918 "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."
1919 ));
1920 }) : null == props.dangerouslySetInnerHTML || didWarnInvalidInnerHTML || (didWarnInvalidInnerHTML = true, console.error(
1921 "Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."
1922 )));
1923 null == props.selected || didWarnSelectedSetOnOption || (console.error(
1924 "Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."
1925 ), didWarnSelectedSetOnOption = true);
1926 }
1927 function getDeclarationErrorAddendum() {
1928 var ownerName = getCurrentFiberOwnerNameInDevOrNull();
1929 return ownerName ? "\n\nCheck the render method of `" + ownerName + "`." : "";
1930 }
1931 function updateOptions(node, multiple, propValue, setDefaultSelected) {
1932 node = node.options;
1933 if (multiple) {
1934 multiple = {};
1935 for (var i = 0; i < propValue.length; i++)
1936 multiple["$" + propValue[i]] = true;
1937 for (propValue = 0; propValue < node.length; propValue++)
1938 i = multiple.hasOwnProperty("$" + node[propValue].value), node[propValue].selected !== i && (node[propValue].selected = i), i && setDefaultSelected && (node[propValue].defaultSelected = true);
1939 } else {
1940 propValue = "" + getToStringValue(propValue);
1941 multiple = null;
1942 for (i = 0; i < node.length; i++) {
1943 if (node[i].value === propValue) {
1944 node[i].selected = true;
1945 setDefaultSelected && (node[i].defaultSelected = true);
1946 return;
1947 }
1948 null !== multiple || node[i].disabled || (multiple = node[i]);
1949 }
1950 null !== multiple && (multiple.selected = true);
1951 }
1952 }
1953 function validateSelectProps(element, props) {
1954 for (element = 0; element < valuePropNames.length; element++) {
1955 var propName = valuePropNames[element];
1956 if (null != props[propName]) {
1957 var propNameIsArray = isArrayImpl(props[propName]);
1958 props.multiple && !propNameIsArray ? console.error(
1959 "The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",
1960 propName,
1961 getDeclarationErrorAddendum()
1962 ) : !props.multiple && propNameIsArray && console.error(
1963 "The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",
1964 propName,
1965 getDeclarationErrorAddendum()
1966 );
1967 }
1968 }
1969 void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue || (console.error(
1970 "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://react.dev/link/controlled-components"
1971 ), didWarnValueDefaultValue = true);
1972 }
1973 function validateTextareaProps(element, props) {
1974 void 0 === props.value || void 0 === props.defaultValue || didWarnValDefaultVal || (console.error(
1975 "%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://react.dev/link/controlled-components",
1976 getCurrentFiberOwnerNameInDevOrNull() || "A component"
1977 ), didWarnValDefaultVal = true);
1978 null != props.children && null == props.value && console.error(
1979 "Use the `defaultValue` or `value` props instead of setting children on <textarea>."
1980 );
1981 }
1982 function updateTextarea(element, value, defaultValue) {
1983 if (null != value && (value = "" + getToStringValue(value), value !== element.value && (element.value = value), null == defaultValue)) {
1984 element.defaultValue !== value && (element.defaultValue = value);
1985 return;
1986 }
1987 element.defaultValue = null != defaultValue ? "" + getToStringValue(defaultValue) : "";
1988 }
1989 function initTextarea(element, value, defaultValue, children) {
1990 if (null == value) {
1991 if (null != children) {
1992 if (null != defaultValue)
1993 throw Error(
1994 "If you supply `defaultValue` on a <textarea>, do not pass children."
1995 );
1996 if (isArrayImpl(children)) {
1997 if (1 < children.length)
1998 throw Error("<textarea> can only have at most one child.");
1999 children = children[0];
2000 }
2001 defaultValue = children;
2002 }
2003 null == defaultValue && (defaultValue = "");
2004 value = defaultValue;
2005 }
2006 defaultValue = getToStringValue(value);
2007 element.defaultValue = defaultValue;
2008 children = element.textContent;
2009 children === defaultValue && "" !== children && null !== children && (element.value = children);
2010 track(element);
2011 }
2012 function findNotableNode(node, indent) {
2013 return void 0 === node.serverProps && 0 === node.serverTail.length && 1 === node.children.length && 3 < node.distanceFromLeaf && node.distanceFromLeaf > 15 - indent ? findNotableNode(node.children[0], indent) : node;
2014 }
2015 function indentation(indent) {
2016 return " " + " ".repeat(indent);
2017 }
2018 function added(indent) {
2019 return "+ " + " ".repeat(indent);
2020 }
2021 function removed(indent) {
2022 return "- " + " ".repeat(indent);
2023 }
2024 function describeFiberType(fiber) {
2025 switch (fiber.tag) {
2026 case 26:
2027 case 27:
2028 case 5:
2029 return fiber.type;
2030 case 16:
2031 return "Lazy";
2032 case 31:
2033 return "Activity";
2034 case 13:
2035 return "Suspense";
2036 case 19:
2037 return "SuspenseList";
2038 case 0:
2039 case 15:
2040 return fiber = fiber.type, fiber.displayName || fiber.name || null;
2041 case 11:
2042 return fiber = fiber.type.render, fiber.displayName || fiber.name || null;
2043 case 1:
2044 return fiber = fiber.type, fiber.displayName || fiber.name || null;
2045 default:
2046 return null;
2047 }
2048 }
2049 function describeTextNode(content, maxLength) {
2050 return needsEscaping.test(content) ? (content = JSON.stringify(content), content.length > maxLength - 2 ? 8 > maxLength ? '{"..."}' : "{" + content.slice(0, maxLength - 7) + '..."}' : "{" + content + "}") : content.length > maxLength ? 5 > maxLength ? '{"..."}' : content.slice(0, maxLength - 3) + "..." : content;
2051 }
2052 function describeTextDiff(clientText, serverProps, indent) {
2053 var maxLength = 120 - 2 * indent;
2054 if (null === serverProps)
2055 return added(indent) + describeTextNode(clientText, maxLength) + "\n";
2056 if ("string" === typeof serverProps) {
2057 for (var firstDiff = 0; firstDiff < serverProps.length && firstDiff < clientText.length && serverProps.charCodeAt(firstDiff) === clientText.charCodeAt(firstDiff); firstDiff++) ;
2058 firstDiff > maxLength - 8 && 10 < firstDiff && (clientText = "..." + clientText.slice(firstDiff - 8), serverProps = "..." + serverProps.slice(firstDiff - 8));
2059 return added(indent) + describeTextNode(clientText, maxLength) + "\n" + removed(indent) + describeTextNode(serverProps, maxLength) + "\n";
2060 }
2061 return indentation(indent) + describeTextNode(clientText, maxLength) + "\n";
2062 }
2063 function objectName(object) {
2064 return Object.prototype.toString.call(object).replace(/^\[object (.*)\]$/, function(m, p0) {
2065 return p0;
2066 });
2067 }
2068 function describeValue(value, maxLength) {
2069 switch (typeof value) {
2070 case "string":
2071 return value = JSON.stringify(value), value.length > maxLength ? 5 > maxLength ? '"..."' : value.slice(0, maxLength - 4) + '..."' : value;
2072 case "object":
2073 if (null === value) return "null";
2074 if (isArrayImpl(value)) return "[...]";
2075 if ((value.$$typeof === REACT_ELEMENT_TYPE || value.$$typeof === REACT_LEGACY_ELEMENT_TYPE))
2076 return (maxLength = getComponentNameFromType(value.type)) ? "<" + maxLength + ">" : "<...>";
2077 var name = objectName(value);
2078 if ("Object" === name) {
2079 name = "";
2080 maxLength -= 2;
2081 for (var propName in value)
2082 if (value.hasOwnProperty(propName)) {
2083 var jsonPropName = JSON.stringify(propName);
2084 jsonPropName !== '"' + propName + '"' && (propName = jsonPropName);
2085 maxLength -= propName.length - 2;
2086 jsonPropName = describeValue(
2087 value[propName],
2088 15 > maxLength ? maxLength : 15
2089 );
2090 maxLength -= jsonPropName.length;
2091 if (0 > maxLength) {
2092 name += "" === name ? "..." : ", ...";
2093 break;
2094 }
2095 name += ("" === name ? "" : ",") + propName + ":" + jsonPropName;
2096 }
2097 return "{" + name + "}";
2098 }
2099 return name;
2100 case "function":
2101 return (maxLength = value.displayName || value.name) ? "function " + maxLength : "function";
2102 default:
2103 return String(value);
2104 }
2105 }
2106 function describePropValue(value, maxLength) {
2107 return "string" !== typeof value || needsEscaping.test(value) ? "{" + describeValue(value, maxLength - 2) + "}" : value.length > maxLength - 2 ? 5 > maxLength ? '"..."' : '"' + value.slice(0, maxLength - 5) + '..."' : '"' + value + '"';
2108 }
2109 function describeExpandedElement(type, props, rowPrefix) {
2110 var remainingRowLength = 120 - rowPrefix.length - type.length, properties = [], propName;
2111 for (propName in props)
2112 if (props.hasOwnProperty(propName) && "children" !== propName) {
2113 var propValue = describePropValue(
2114 props[propName],
2115 120 - rowPrefix.length - propName.length - 1
2116 );
2117 remainingRowLength -= propName.length + propValue.length + 2;
2118 properties.push(propName + "=" + propValue);
2119 }
2120 return 0 === properties.length ? rowPrefix + "<" + type + ">\n" : 0 < remainingRowLength ? rowPrefix + "<" + type + " " + properties.join(" ") + ">\n" : rowPrefix + "<" + type + "\n" + rowPrefix + " " + properties.join("\n" + rowPrefix + " ") + "\n" + rowPrefix + ">\n";
2121 }
2122 function describePropertiesDiff(clientObject, serverObject, indent) {
2123 var properties = "", remainingServerProperties = assign({}, serverObject), propName;
2124 for (propName in clientObject)
2125 if (clientObject.hasOwnProperty(propName)) {
2126 delete remainingServerProperties[propName];
2127 var maxLength = 120 - 2 * indent - propName.length - 2, clientPropValue = describeValue(clientObject[propName], maxLength);
2128 serverObject.hasOwnProperty(propName) ? (maxLength = describeValue(serverObject[propName], maxLength), properties += added(indent) + propName + ": " + clientPropValue + "\n", properties += removed(indent) + propName + ": " + maxLength + "\n") : properties += added(indent) + propName + ": " + clientPropValue + "\n";
2129 }
2130 for (var _propName in remainingServerProperties)
2131 remainingServerProperties.hasOwnProperty(_propName) && (clientObject = describeValue(
2132 remainingServerProperties[_propName],
2133 120 - 2 * indent - _propName.length - 2
2134 ), properties += removed(indent) + _propName + ": " + clientObject + "\n");
2135 return properties;
2136 }
2137 function describeElementDiff(type, clientProps, serverProps, indent) {
2138 var content = "", serverPropNames = /* @__PURE__ */ new Map();
2139 for (propName$jscomp$0 in serverProps)
2140 serverProps.hasOwnProperty(propName$jscomp$0) && serverPropNames.set(
2141 propName$jscomp$0.toLowerCase(),
2142 propName$jscomp$0
2143 );
2144 if (1 === serverPropNames.size && serverPropNames.has("children"))
2145 content += describeExpandedElement(
2146 type,
2147 clientProps,
2148 indentation(indent)
2149 );
2150 else {
2151 for (var _propName2 in clientProps)
2152 if (clientProps.hasOwnProperty(_propName2) && "children" !== _propName2) {
2153 var maxLength$jscomp$0 = 120 - 2 * (indent + 1) - _propName2.length - 1, serverPropName = serverPropNames.get(_propName2.toLowerCase());
2154 if (void 0 !== serverPropName) {
2155 serverPropNames.delete(_propName2.toLowerCase());
2156 var propName$jscomp$0 = clientProps[_propName2];
2157 serverPropName = serverProps[serverPropName];
2158 var clientPropValue = describePropValue(
2159 propName$jscomp$0,
2160 maxLength$jscomp$0
2161 );
2162 maxLength$jscomp$0 = describePropValue(
2163 serverPropName,
2164 maxLength$jscomp$0
2165 );
2166 "object" === typeof propName$jscomp$0 && null !== propName$jscomp$0 && "object" === typeof serverPropName && null !== serverPropName && "Object" === objectName(propName$jscomp$0) && "Object" === objectName(serverPropName) && (2 < Object.keys(propName$jscomp$0).length || 2 < Object.keys(serverPropName).length || -1 < clientPropValue.indexOf("...") || -1 < maxLength$jscomp$0.indexOf("...")) ? content += indentation(indent + 1) + _propName2 + "={{\n" + describePropertiesDiff(
2167 propName$jscomp$0,
2168 serverPropName,
2169 indent + 2
2170 ) + indentation(indent + 1) + "}}\n" : (content += added(indent + 1) + _propName2 + "=" + clientPropValue + "\n", content += removed(indent + 1) + _propName2 + "=" + maxLength$jscomp$0 + "\n");
2171 } else
2172 content += indentation(indent + 1) + _propName2 + "=" + describePropValue(clientProps[_propName2], maxLength$jscomp$0) + "\n";
2173 }
2174 serverPropNames.forEach(function(propName) {
2175 if ("children" !== propName) {
2176 var maxLength = 120 - 2 * (indent + 1) - propName.length - 1;
2177 content += removed(indent + 1) + propName + "=" + describePropValue(serverProps[propName], maxLength) + "\n";
2178 }
2179 });
2180 content = "" === content ? indentation(indent) + "<" + type + ">\n" : indentation(indent) + "<" + type + "\n" + content + indentation(indent) + ">\n";
2181 }
2182 type = serverProps.children;
2183 clientProps = clientProps.children;
2184 if ("string" === typeof type || "number" === typeof type || "bigint" === typeof type) {
2185 serverPropNames = "";
2186 if ("string" === typeof clientProps || "number" === typeof clientProps || "bigint" === typeof clientProps)
2187 serverPropNames = "" + clientProps;
2188 content += describeTextDiff(serverPropNames, "" + type, indent + 1);
2189 } else if ("string" === typeof clientProps || "number" === typeof clientProps || "bigint" === typeof clientProps)
2190 content = null == type ? content + describeTextDiff("" + clientProps, null, indent + 1) : content + describeTextDiff("" + clientProps, void 0, indent + 1);
2191 return content;
2192 }
2193 function describeSiblingFiber(fiber, indent) {
2194 var type = describeFiberType(fiber);
2195 if (null === type) {
2196 type = "";
2197 for (fiber = fiber.child; fiber; )
2198 type += describeSiblingFiber(fiber, indent), fiber = fiber.sibling;
2199 return type;
2200 }
2201 return indentation(indent) + "<" + type + ">\n";
2202 }
2203 function describeNode(node, indent) {
2204 var skipToNode = findNotableNode(node, indent);
2205 if (skipToNode !== node && (1 !== node.children.length || node.children[0] !== skipToNode))
2206 return indentation(indent) + "...\n" + describeNode(skipToNode, indent + 1);
2207 skipToNode = "";
2208 var debugInfo = node.fiber._debugInfo;
2209 if (debugInfo)
2210 for (var i = 0; i < debugInfo.length; i++) {
2211 var serverComponentName = debugInfo[i].name;
2212 "string" === typeof serverComponentName && (skipToNode += indentation(indent) + "<" + serverComponentName + ">\n", indent++);
2213 }
2214 debugInfo = "";
2215 i = node.fiber.pendingProps;
2216 if (6 === node.fiber.tag)
2217 debugInfo = describeTextDiff(i, node.serverProps, indent), indent++;
2218 else if (serverComponentName = describeFiberType(node.fiber), null !== serverComponentName)
2219 if (void 0 === node.serverProps) {
2220 debugInfo = indent;
2221 var maxLength = 120 - 2 * debugInfo - serverComponentName.length - 2, content = "";
2222 for (propName in i)
2223 if (i.hasOwnProperty(propName) && "children" !== propName) {
2224 var propValue = describePropValue(i[propName], 15);
2225 maxLength -= propName.length + propValue.length + 2;
2226 if (0 > maxLength) {
2227 content += " ...";
2228 break;
2229 }
2230 content += " " + propName + "=" + propValue;
2231 }
2232 debugInfo = indentation(debugInfo) + "<" + serverComponentName + content + ">\n";
2233 indent++;
2234 } else
2235 null === node.serverProps ? (debugInfo = describeExpandedElement(
2236 serverComponentName,
2237 i,
2238 added(indent)
2239 ), indent++) : "string" === typeof node.serverProps ? console.error(
2240 "Should not have matched a non HostText fiber to a Text node. This is a bug in React."
2241 ) : (debugInfo = describeElementDiff(
2242 serverComponentName,
2243 i,
2244 node.serverProps,
2245 indent
2246 ), indent++);
2247 var propName = "";
2248 i = node.fiber.child;
2249 for (serverComponentName = 0; i && serverComponentName < node.children.length; )
2250 maxLength = node.children[serverComponentName], maxLength.fiber === i ? (propName += describeNode(maxLength, indent), serverComponentName++) : propName += describeSiblingFiber(i, indent), i = i.sibling;
2251 i && 0 < node.children.length && (propName += indentation(indent) + "...\n");
2252 i = node.serverTail;
2253 null === node.serverProps && indent--;
2254 for (node = 0; node < i.length; node++)
2255 serverComponentName = i[node], propName = "string" === typeof serverComponentName ? propName + (removed(indent) + describeTextNode(serverComponentName, 120 - 2 * indent) + "\n") : propName + describeExpandedElement(
2256 serverComponentName.type,
2257 serverComponentName.props,
2258 removed(indent)
2259 );
2260 return skipToNode + debugInfo + propName;
2261 }
2262 function describeDiff(rootNode) {
2263 try {
2264 return "\n\n" + describeNode(rootNode, 0);
2265 } catch (x) {
2266 return "";
2267 }
2268 }
2269 function describeAncestors(ancestor, child, props) {
2270 for (var fiber = child, node = null, distanceFromLeaf = 0; fiber; )
2271 fiber === ancestor && (distanceFromLeaf = 0), node = {
2272 fiber,
2273 children: null !== node ? [node] : [],
2274 serverProps: fiber === child ? props : fiber === ancestor ? null : void 0,
2275 serverTail: [],
2276 distanceFromLeaf
2277 }, distanceFromLeaf++, fiber = fiber.return;
2278 return null !== node ? describeDiff(node).replaceAll(/^[+-]/gm, ">") : "";
2279 }
2280 function updatedAncestorInfoDev(oldInfo, tag) {
2281 var ancestorInfo = assign({}, oldInfo || emptyAncestorInfoDev), info = { tag };
2282 -1 !== inScopeTags.indexOf(tag) && (ancestorInfo.aTagInScope = null, ancestorInfo.buttonTagInScope = null, ancestorInfo.nobrTagInScope = null);
2283 -1 !== buttonScopeTags.indexOf(tag) && (ancestorInfo.pTagInButtonScope = null);
2284 -1 !== specialTags.indexOf(tag) && "address" !== tag && "div" !== tag && "p" !== tag && (ancestorInfo.listItemTagAutoclosing = null, ancestorInfo.dlItemTagAutoclosing = null);
2285 ancestorInfo.current = info;
2286 "form" === tag && (ancestorInfo.formTag = info);
2287 "a" === tag && (ancestorInfo.aTagInScope = info);
2288 "button" === tag && (ancestorInfo.buttonTagInScope = info);
2289 "nobr" === tag && (ancestorInfo.nobrTagInScope = info);
2290 "p" === tag && (ancestorInfo.pTagInButtonScope = info);
2291 "li" === tag && (ancestorInfo.listItemTagAutoclosing = info);
2292 if ("dd" === tag || "dt" === tag)
2293 ancestorInfo.dlItemTagAutoclosing = info;
2294 "#document" === tag || "html" === tag ? ancestorInfo.containerTagInScope = null : ancestorInfo.containerTagInScope || (ancestorInfo.containerTagInScope = info);
2295 null !== oldInfo || "#document" !== tag && "html" !== tag && "body" !== tag ? true === ancestorInfo.implicitRootScope && (ancestorInfo.implicitRootScope = false) : ancestorInfo.implicitRootScope = true;
2296 return ancestorInfo;
2297 }
2298 function isTagValidWithParent(tag, parentTag, implicitRootScope) {
2299 switch (parentTag) {
2300 case "select":
2301 return "hr" === tag || "option" === tag || "optgroup" === tag || "script" === tag || "template" === tag || "#text" === tag;
2302 case "optgroup":
2303 return "option" === tag || "#text" === tag;
2304 case "option":
2305 return "#text" === tag;
2306 case "tr":
2307 return "th" === tag || "td" === tag || "style" === tag || "script" === tag || "template" === tag;
2308 case "tbody":
2309 case "thead":
2310 case "tfoot":
2311 return "tr" === tag || "style" === tag || "script" === tag || "template" === tag;
2312 case "colgroup":
2313 return "col" === tag || "template" === tag;
2314 case "table":
2315 return "caption" === tag || "colgroup" === tag || "tbody" === tag || "tfoot" === tag || "thead" === tag || "style" === tag || "script" === tag || "template" === tag;
2316 case "head":
2317 return "base" === tag || "basefont" === tag || "bgsound" === tag || "link" === tag || "meta" === tag || "title" === tag || "noscript" === tag || "noframes" === tag || "style" === tag || "script" === tag || "template" === tag;
2318 case "html":
2319 if (implicitRootScope) break;
2320 return "head" === tag || "body" === tag || "frameset" === tag;
2321 case "frameset":
2322 return "frame" === tag;
2323 case "#document":
2324 if (!implicitRootScope) return "html" === tag;
2325 }
2326 switch (tag) {
2327 case "h1":
2328 case "h2":
2329 case "h3":
2330 case "h4":
2331 case "h5":
2332 case "h6":
2333 return "h1" !== parentTag && "h2" !== parentTag && "h3" !== parentTag && "h4" !== parentTag && "h5" !== parentTag && "h6" !== parentTag;
2334 case "rp":
2335 case "rt":
2336 return -1 === impliedEndTags.indexOf(parentTag);
2337 case "caption":
2338 case "col":
2339 case "colgroup":
2340 case "frameset":
2341 case "frame":
2342 case "tbody":
2343 case "td":
2344 case "tfoot":
2345 case "th":
2346 case "thead":
2347 case "tr":
2348 return null == parentTag;
2349 case "head":
2350 return implicitRootScope || null === parentTag;
2351 case "html":
2352 return implicitRootScope && "#document" === parentTag || null === parentTag;
2353 case "body":
2354 return implicitRootScope && ("#document" === parentTag || "html" === parentTag) || null === parentTag;
2355 }
2356 return true;
2357 }
2358 function findInvalidAncestorForTag(tag, ancestorInfo) {
2359 switch (tag) {
2360 case "address":
2361 case "article":
2362 case "aside":
2363 case "blockquote":
2364 case "center":
2365 case "details":
2366 case "dialog":
2367 case "dir":
2368 case "div":
2369 case "dl":
2370 case "fieldset":
2371 case "figcaption":
2372 case "figure":
2373 case "footer":
2374 case "header":
2375 case "hgroup":
2376 case "main":
2377 case "menu":
2378 case "nav":
2379 case "ol":
2380 case "p":
2381 case "section":
2382 case "summary":
2383 case "ul":
2384 case "pre":
2385 case "listing":
2386 case "table":
2387 case "hr":
2388 case "xmp":
2389 case "h1":
2390 case "h2":
2391 case "h3":
2392 case "h4":
2393 case "h5":
2394 case "h6":
2395 return ancestorInfo.pTagInButtonScope;
2396 case "form":
2397 return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
2398 case "li":
2399 return ancestorInfo.listItemTagAutoclosing;
2400 case "dd":
2401 case "dt":
2402 return ancestorInfo.dlItemTagAutoclosing;
2403 case "button":
2404 return ancestorInfo.buttonTagInScope;
2405 case "a":
2406 return ancestorInfo.aTagInScope;
2407 case "nobr":
2408 return ancestorInfo.nobrTagInScope;
2409 }
2410 return null;
2411 }
2412 function findAncestor(parent, tagName) {
2413 for (; parent; ) {
2414 switch (parent.tag) {
2415 case 5:
2416 case 26:
2417 case 27:
2418 if (parent.type === tagName) return parent;
2419 }
2420 parent = parent.return;
2421 }
2422 return null;
2423 }
2424 function validateDOMNesting(childTag, ancestorInfo) {
2425 ancestorInfo = ancestorInfo || emptyAncestorInfoDev;
2426 var parentInfo = ancestorInfo.current;
2427 ancestorInfo = (parentInfo = isTagValidWithParent(
2428 childTag,
2429 parentInfo && parentInfo.tag,
2430 ancestorInfo.implicitRootScope
2431 ) ? null : parentInfo) ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
2432 ancestorInfo = parentInfo || ancestorInfo;
2433 if (!ancestorInfo) return true;
2434 var ancestorTag = ancestorInfo.tag;
2435 ancestorInfo = String(!!parentInfo) + "|" + childTag + "|" + ancestorTag;
2436 if (didWarn[ancestorInfo]) return false;
2437 didWarn[ancestorInfo] = true;
2438 var ancestor = (ancestorInfo = current) ? findAncestor(ancestorInfo.return, ancestorTag) : null, ancestorDescription = null !== ancestorInfo && null !== ancestor ? describeAncestors(ancestor, ancestorInfo, null) : "", tagDisplayName = "<" + childTag + ">";
2439 parentInfo ? (parentInfo = "", "table" === ancestorTag && "tr" === childTag && (parentInfo += " Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."), console.error(
2440 "In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s",
2441 tagDisplayName,
2442 ancestorTag,
2443 parentInfo,
2444 ancestorDescription
2445 )) : console.error(
2446 "In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s",
2447 tagDisplayName,
2448 ancestorTag,
2449 ancestorDescription
2450 );
2451 ancestorInfo && (childTag = ancestorInfo.return, null === ancestor || null === childTag || ancestor === childTag && childTag._debugOwner === ancestorInfo._debugOwner || runWithFiberInDEV(ancestor, function() {
2452 console.error(
2453 "<%s> cannot contain a nested %s.\nSee this log for the ancestor stack trace.",
2454 ancestorTag,
2455 tagDisplayName
2456 );
2457 }));
2458 return false;
2459 }
2460 function validateTextNesting(childText, parentTag, implicitRootScope) {
2461 if (implicitRootScope || isTagValidWithParent("#text", parentTag, false))
2462 return true;
2463 implicitRootScope = "#text|" + parentTag;
2464 if (didWarn[implicitRootScope]) return false;
2465 didWarn[implicitRootScope] = true;
2466 var ancestor = (implicitRootScope = current) ? findAncestor(implicitRootScope, parentTag) : null;
2467 implicitRootScope = null !== implicitRootScope && null !== ancestor ? describeAncestors(
2468 ancestor,
2469 implicitRootScope,
2470 6 !== implicitRootScope.tag ? { children: null } : null
2471 ) : "";
2472 /\S/.test(childText) ? console.error(
2473 "In HTML, text nodes cannot be a child of <%s>.\nThis will cause a hydration error.%s",
2474 parentTag,
2475 implicitRootScope
2476 ) : console.error(
2477 "In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.\nThis will cause a hydration error.%s",
2478 parentTag,
2479 implicitRootScope
2480 );
2481 return false;
2482 }
2483 function setTextContent(node, text) {
2484 if (text) {
2485 var firstChild = node.firstChild;
2486 if (firstChild && firstChild === node.lastChild && 3 === firstChild.nodeType) {
2487 firstChild.nodeValue = text;
2488 return;
2489 }
2490 }
2491 node.textContent = text;
2492 }
2493 function camelize(string) {
2494 return string.replace(hyphenPattern, function(_, character) {
2495 return character.toUpperCase();
2496 });
2497 }
2498 function setValueForStyle(style2, styleName, value) {
2499 var isCustomProperty = 0 === styleName.indexOf("--");
2500 isCustomProperty || (-1 < styleName.indexOf("-") ? warnedStyleNames.hasOwnProperty(styleName) && warnedStyleNames[styleName] || (warnedStyleNames[styleName] = true, console.error(
2501 "Unsupported style property %s. Did you mean %s?",
2502 styleName,
2503 camelize(styleName.replace(msPattern, "ms-"))
2504 )) : badVendoredStyleNamePattern.test(styleName) ? warnedStyleNames.hasOwnProperty(styleName) && warnedStyleNames[styleName] || (warnedStyleNames[styleName] = true, console.error(
2505 "Unsupported vendor-prefixed style property %s. Did you mean %s?",
2506 styleName,
2507 styleName.charAt(0).toUpperCase() + styleName.slice(1)
2508 )) : !badStyleValueWithSemicolonPattern.test(value) || warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value] || (warnedStyleValues[value] = true, console.error(
2509 `Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,
2510 styleName,
2511 value.replace(badStyleValueWithSemicolonPattern, "")
2512 )), "number" === typeof value && (isNaN(value) ? warnedForNaNValue || (warnedForNaNValue = true, console.error(
2513 "`NaN` is an invalid value for the `%s` css style property.",
2514 styleName
2515 )) : isFinite(value) || warnedForInfinityValue || (warnedForInfinityValue = true, console.error(
2516 "`Infinity` is an invalid value for the `%s` css style property.",
2517 styleName
2518 ))));
2519 null == value || "boolean" === typeof value || "" === value ? isCustomProperty ? style2.setProperty(styleName, "") : "float" === styleName ? style2.cssFloat = "" : style2[styleName] = "" : isCustomProperty ? style2.setProperty(styleName, value) : "number" !== typeof value || 0 === value || unitlessNumbers.has(styleName) ? "float" === styleName ? style2.cssFloat = value : (checkCSSPropertyStringCoercion(value, styleName), style2[styleName] = ("" + value).trim()) : style2[styleName] = value + "px";
2520 }
2521 function setValueForStyles(node, styles, prevStyles) {
2522 if (null != styles && "object" !== typeof styles)
2523 throw Error(
2524 "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
2525 );
2526 styles && Object.freeze(styles);
2527 node = node.style;
2528 if (null != prevStyles) {
2529 if (styles) {
2530 var expandedUpdates = {};
2531 if (prevStyles) {
2532 for (var key in prevStyles)
2533 if (prevStyles.hasOwnProperty(key) && !styles.hasOwnProperty(key))
2534 for (var longhands = shorthandToLonghand[key] || [key], i = 0; i < longhands.length; i++)
2535 expandedUpdates[longhands[i]] = key;
2536 }
2537 for (var _key in styles)
2538 if (styles.hasOwnProperty(_key) && (!prevStyles || prevStyles[_key] !== styles[_key]))
2539 for (key = shorthandToLonghand[_key] || [_key], longhands = 0; longhands < key.length; longhands++)
2540 expandedUpdates[key[longhands]] = _key;
2541 _key = {};
2542 for (var key$jscomp$0 in styles)
2543 for (key = shorthandToLonghand[key$jscomp$0] || [key$jscomp$0], longhands = 0; longhands < key.length; longhands++)
2544 _key[key[longhands]] = key$jscomp$0;
2545 key$jscomp$0 = {};
2546 for (var _key2 in expandedUpdates)
2547 if (key = expandedUpdates[_key2], (longhands = _key[_key2]) && key !== longhands && (i = key + "," + longhands, !key$jscomp$0[i])) {
2548 key$jscomp$0[i] = true;
2549 i = console;
2550 var value = styles[key];
2551 i.error.call(
2552 i,
2553 "%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",
2554 null == value || "boolean" === typeof value || "" === value ? "Removing" : "Updating",
2555 key,
2556 longhands
2557 );
2558 }
2559 }
2560 for (var styleName in prevStyles)
2561 !prevStyles.hasOwnProperty(styleName) || null != styles && styles.hasOwnProperty(styleName) || (0 === styleName.indexOf("--") ? node.setProperty(styleName, "") : "float" === styleName ? node.cssFloat = "" : node[styleName] = "");
2562 for (var _styleName in styles)
2563 _key2 = styles[_styleName], styles.hasOwnProperty(_styleName) && prevStyles[_styleName] !== _key2 && setValueForStyle(node, _styleName, _key2);
2564 } else
2565 for (expandedUpdates in styles)
2566 styles.hasOwnProperty(expandedUpdates) && setValueForStyle(node, expandedUpdates, styles[expandedUpdates]);
2567 }
2568 function isCustomElement(tagName) {
2569 if (-1 === tagName.indexOf("-")) return false;
2570 switch (tagName) {
2571 case "annotation-xml":
2572 case "color-profile":
2573 case "font-face":
2574 case "font-face-src":
2575 case "font-face-uri":
2576 case "font-face-format":
2577 case "font-face-name":
2578 case "missing-glyph":
2579 return false;
2580 default:
2581 return true;
2582 }
2583 }
2584 function getAttributeAlias(name) {
2585 return aliases.get(name) || name;
2586 }
2587 function validateProperty$1(tagName, name) {
2588 if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name])
2589 return true;
2590 if (rARIACamel$1.test(name)) {
2591 tagName = "aria-" + name.slice(4).toLowerCase();
2592 tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
2593 if (null == tagName)
2594 return console.error(
2595 "Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",
2596 name
2597 ), warnedProperties$1[name] = true;
2598 if (name !== tagName)
2599 return console.error(
2600 "Invalid ARIA attribute `%s`. Did you mean `%s`?",
2601 name,
2602 tagName
2603 ), warnedProperties$1[name] = true;
2604 }
2605 if (rARIA$1.test(name)) {
2606 tagName = name.toLowerCase();
2607 tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
2608 if (null == tagName) return warnedProperties$1[name] = true, false;
2609 name !== tagName && (console.error(
2610 "Unknown ARIA attribute `%s`. Did you mean `%s`?",
2611 name,
2612 tagName
2613 ), warnedProperties$1[name] = true);
2614 }
2615 return true;
2616 }
2617 function validateProperties$2(type, props) {
2618 var invalidProps = [], key;
2619 for (key in props)
2620 validateProperty$1(type, key) || invalidProps.push(key);
2621 props = invalidProps.map(function(prop) {
2622 return "`" + prop + "`";
2623 }).join(", ");
2624 1 === invalidProps.length ? console.error(
2625 "Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",
2626 props,
2627 type
2628 ) : 1 < invalidProps.length && console.error(
2629 "Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",
2630 props,
2631 type
2632 );
2633 }
2634 function validateProperty(tagName, name, value, eventRegistry) {
2635 if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name])
2636 return true;
2637 var lowerCasedName = name.toLowerCase();
2638 if ("onfocusin" === lowerCasedName || "onfocusout" === lowerCasedName)
2639 return console.error(
2640 "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."
2641 ), warnedProperties[name] = true;
2642 if ("function" === typeof value && ("form" === tagName && "action" === name || "input" === tagName && "formAction" === name || "button" === tagName && "formAction" === name))
2643 return true;
2644 if (null != eventRegistry) {
2645 tagName = eventRegistry.possibleRegistrationNames;
2646 if (eventRegistry.registrationNameDependencies.hasOwnProperty(name))
2647 return true;
2648 eventRegistry = tagName.hasOwnProperty(lowerCasedName) ? tagName[lowerCasedName] : null;
2649 if (null != eventRegistry)
2650 return console.error(
2651 "Invalid event handler property `%s`. Did you mean `%s`?",
2652 name,
2653 eventRegistry
2654 ), warnedProperties[name] = true;
2655 if (EVENT_NAME_REGEX.test(name))
2656 return console.error(
2657 "Unknown event handler property `%s`. It will be ignored.",
2658 name
2659 ), warnedProperties[name] = true;
2660 } else if (EVENT_NAME_REGEX.test(name))
2661 return INVALID_EVENT_NAME_REGEX.test(name) && console.error(
2662 "Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",
2663 name
2664 ), warnedProperties[name] = true;
2665 if (rARIA.test(name) || rARIACamel.test(name)) return true;
2666 if ("innerhtml" === lowerCasedName)
2667 return console.error(
2668 "Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."
2669 ), warnedProperties[name] = true;
2670 if ("aria" === lowerCasedName)
2671 return console.error(
2672 "The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."
2673 ), warnedProperties[name] = true;
2674 if ("is" === lowerCasedName && null !== value && void 0 !== value && "string" !== typeof value)
2675 return console.error(
2676 "Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",
2677 typeof value
2678 ), warnedProperties[name] = true;
2679 if ("number" === typeof value && isNaN(value))
2680 return console.error(
2681 "Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",
2682 name
2683 ), warnedProperties[name] = true;
2684 if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
2685 if (lowerCasedName = possibleStandardNames[lowerCasedName], lowerCasedName !== name)
2686 return console.error(
2687 "Invalid DOM property `%s`. Did you mean `%s`?",
2688 name,
2689 lowerCasedName
2690 ), warnedProperties[name] = true;
2691 } else if (name !== lowerCasedName)
2692 return console.error(
2693 "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.",
2694 name,
2695 lowerCasedName
2696 ), warnedProperties[name] = true;
2697 switch (name) {
2698 case "dangerouslySetInnerHTML":
2699 case "children":
2700 case "style":
2701 case "suppressContentEditableWarning":
2702 case "suppressHydrationWarning":
2703 case "defaultValue":
2704 case "defaultChecked":
2705 case "innerHTML":
2706 case "ref":
2707 return true;
2708 case "innerText":
2709 case "textContent":
2710 return true;
2711 }
2712 switch (typeof value) {
2713 case "boolean":
2714 switch (name) {
2715 case "autoFocus":
2716 case "checked":
2717 case "multiple":
2718 case "muted":
2719 case "selected":
2720 case "contentEditable":
2721 case "spellCheck":
2722 case "draggable":
2723 case "value":
2724 case "autoReverse":
2725 case "externalResourcesRequired":
2726 case "focusable":
2727 case "preserveAlpha":
2728 case "allowFullScreen":
2729 case "async":
2730 case "autoPlay":
2731 case "controls":
2732 case "default":
2733 case "defer":
2734 case "disabled":
2735 case "disablePictureInPicture":
2736 case "disableRemotePlayback":
2737 case "formNoValidate":
2738 case "hidden":
2739 case "loop":
2740 case "noModule":
2741 case "noValidate":
2742 case "open":
2743 case "playsInline":
2744 case "readOnly":
2745 case "required":
2746 case "reversed":
2747 case "scoped":
2748 case "seamless":
2749 case "itemScope":
2750 case "capture":
2751 case "download":
2752 case "inert":
2753 return true;
2754 default:
2755 lowerCasedName = name.toLowerCase().slice(0, 5);
2756 if ("data-" === lowerCasedName || "aria-" === lowerCasedName)
2757 return true;
2758 value ? console.error(
2759 'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',
2760 value,
2761 name,
2762 name,
2763 value,
2764 name
2765 ) : console.error(
2766 'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',
2767 value,
2768 name,
2769 name,
2770 value,
2771 name,
2772 name,
2773 name
2774 );
2775 return warnedProperties[name] = true;
2776 }
2777 case "function":
2778 case "symbol":
2779 return warnedProperties[name] = true, false;
2780 case "string":
2781 if ("false" === value || "true" === value) {
2782 switch (name) {
2783 case "checked":
2784 case "selected":
2785 case "multiple":
2786 case "muted":
2787 case "allowFullScreen":
2788 case "async":
2789 case "autoPlay":
2790 case "controls":
2791 case "default":
2792 case "defer":
2793 case "disabled":
2794 case "disablePictureInPicture":
2795 case "disableRemotePlayback":
2796 case "formNoValidate":
2797 case "hidden":
2798 case "loop":
2799 case "noModule":
2800 case "noValidate":
2801 case "open":
2802 case "playsInline":
2803 case "readOnly":
2804 case "required":
2805 case "reversed":
2806 case "scoped":
2807 case "seamless":
2808 case "itemScope":
2809 case "inert":
2810 break;
2811 default:
2812 return true;
2813 }
2814 console.error(
2815 "Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",
2816 value,
2817 name,
2818 "false" === value ? "The browser will interpret it as a truthy value." : 'Although this works, it will not work as expected if you pass the string "false".',
2819 name,
2820 value
2821 );
2822 warnedProperties[name] = true;
2823 }
2824 }
2825 return true;
2826 }
2827 function warnUnknownProperties(type, props, eventRegistry) {
2828 var unknownProps = [], key;
2829 for (key in props)
2830 validateProperty(type, key, props[key], eventRegistry) || unknownProps.push(key);
2831 props = unknownProps.map(function(prop) {
2832 return "`" + prop + "`";
2833 }).join(", ");
2834 1 === unknownProps.length ? console.error(
2835 "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://react.dev/link/attribute-behavior ",
2836 props,
2837 type
2838 ) : 1 < unknownProps.length && console.error(
2839 "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://react.dev/link/attribute-behavior ",
2840 props,
2841 type
2842 );
2843 }
2844 function sanitizeURL(url) {
2845 return isJavaScriptProtocol.test("" + url) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : url;
2846 }
2847 function noop$1() {
2848 }
2849 function getEventTarget(nativeEvent) {
2850 nativeEvent = nativeEvent.target || nativeEvent.srcElement || window;
2851 nativeEvent.correspondingUseElement && (nativeEvent = nativeEvent.correspondingUseElement);
2852 return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent;
2853 }
2854 function restoreStateOfTarget(target) {
2855 var internalInstance = getInstanceFromNode(target);
2856 if (internalInstance && (target = internalInstance.stateNode)) {
2857 var props = target[internalPropsKey] || null;
2858 a: switch (target = internalInstance.stateNode, internalInstance.type) {
2859 case "input":
2860 updateInput(
2861 target,
2862 props.value,
2863 props.defaultValue,
2864 props.defaultValue,
2865 props.checked,
2866 props.defaultChecked,
2867 props.type,
2868 props.name
2869 );
2870 internalInstance = props.name;
2871 if ("radio" === props.type && null != internalInstance) {
2872 for (props = target; props.parentNode; ) props = props.parentNode;
2873 checkAttributeStringCoercion(internalInstance, "name");
2874 props = props.querySelectorAll(
2875 'input[name="' + escapeSelectorAttributeValueInsideDoubleQuotes(
2876 "" + internalInstance
2877 ) + '"][type="radio"]'
2878 );
2879 for (internalInstance = 0; internalInstance < props.length; internalInstance++) {
2880 var otherNode = props[internalInstance];
2881 if (otherNode !== target && otherNode.form === target.form) {
2882 var otherProps = otherNode[internalPropsKey] || null;
2883 if (!otherProps)
2884 throw Error(
2885 "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."
2886 );
2887 updateInput(
2888 otherNode,
2889 otherProps.value,
2890 otherProps.defaultValue,
2891 otherProps.defaultValue,
2892 otherProps.checked,
2893 otherProps.defaultChecked,
2894 otherProps.type,
2895 otherProps.name
2896 );
2897 }
2898 }
2899 for (internalInstance = 0; internalInstance < props.length; internalInstance++)
2900 otherNode = props[internalInstance], otherNode.form === target.form && updateValueIfChanged(otherNode);
2901 }
2902 break a;
2903 case "textarea":
2904 updateTextarea(target, props.value, props.defaultValue);
2905 break a;
2906 case "select":
2907 internalInstance = props.value, null != internalInstance && updateOptions(target, !!props.multiple, internalInstance, false);
2908 }
2909 }
2910 }
2911 function batchedUpdates$1(fn, a, b) {
2912 if (isInsideEventHandler) return fn(a, b);
2913 isInsideEventHandler = true;
2914 try {
2915 var JSCompiler_inline_result = fn(a);
2916 return JSCompiler_inline_result;
2917 } finally {
2918 if (isInsideEventHandler = false, null !== restoreTarget || null !== restoreQueue) {
2919 if (flushSyncWork$1(), restoreTarget && (a = restoreTarget, fn = restoreQueue, restoreQueue = restoreTarget = null, restoreStateOfTarget(a), fn))
2920 for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);
2921 }
2922 }
2923 }
2924 function getListener(inst, registrationName) {
2925 var stateNode = inst.stateNode;
2926 if (null === stateNode) return null;
2927 var props = stateNode[internalPropsKey] || null;
2928 if (null === props) return null;
2929 stateNode = props[registrationName];
2930 a: switch (registrationName) {
2931 case "onClick":
2932 case "onClickCapture":
2933 case "onDoubleClick":
2934 case "onDoubleClickCapture":
2935 case "onMouseDown":
2936 case "onMouseDownCapture":
2937 case "onMouseMove":
2938 case "onMouseMoveCapture":
2939 case "onMouseUp":
2940 case "onMouseUpCapture":
2941 case "onMouseEnter":
2942 (props = !props.disabled) || (inst = inst.type, props = !("button" === inst || "input" === inst || "select" === inst || "textarea" === inst));
2943 inst = !props;
2944 break a;
2945 default:
2946 inst = false;
2947 }
2948 if (inst) return null;
2949 if (stateNode && "function" !== typeof stateNode)
2950 throw Error(
2951 "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof stateNode + "` type."
2952 );
2953 return stateNode;
2954 }
2955 function getData() {
2956 if (fallbackText) return fallbackText;
2957 var start, startValue = startText, startLength = startValue.length, end, endValue = "value" in root ? root.value : root.textContent, endLength = endValue.length;
2958 for (start = 0; start < startLength && startValue[start] === endValue[start]; start++) ;
2959 var minEnd = startLength - start;
2960 for (end = 1; end <= minEnd && startValue[startLength - end] === endValue[endLength - end]; end++) ;
2961 return fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0);
2962 }
2963 function getEventCharCode(nativeEvent) {
2964 var keyCode = nativeEvent.keyCode;
2965 "charCode" in nativeEvent ? (nativeEvent = nativeEvent.charCode, 0 === nativeEvent && 13 === keyCode && (nativeEvent = 13)) : nativeEvent = keyCode;
2966 10 === nativeEvent && (nativeEvent = 13);
2967 return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0;
2968 }
2969 function functionThatReturnsTrue() {
2970 return true;
2971 }
2972 function functionThatReturnsFalse() {
2973 return false;
2974 }
2975 function createSyntheticEvent(Interface) {
2976 function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
2977 this._reactName = reactName;
2978 this._targetInst = targetInst;
2979 this.type = reactEventType;
2980 this.nativeEvent = nativeEvent;
2981 this.target = nativeEventTarget;
2982 this.currentTarget = null;
2983 for (var propName in Interface)
2984 Interface.hasOwnProperty(propName) && (reactName = Interface[propName], this[propName] = reactName ? reactName(nativeEvent) : nativeEvent[propName]);
2985 this.isDefaultPrevented = (null != nativeEvent.defaultPrevented ? nativeEvent.defaultPrevented : false === nativeEvent.returnValue) ? functionThatReturnsTrue : functionThatReturnsFalse;
2986 this.isPropagationStopped = functionThatReturnsFalse;
2987 return this;
2988 }
2989 assign(SyntheticBaseEvent.prototype, {
2990 preventDefault: function() {
2991 this.defaultPrevented = true;
2992 var event = this.nativeEvent;
2993 event && (event.preventDefault ? event.preventDefault() : "unknown" !== typeof event.returnValue && (event.returnValue = false), this.isDefaultPrevented = functionThatReturnsTrue);
2994 },
2995 stopPropagation: function() {
2996 var event = this.nativeEvent;
2997 event && (event.stopPropagation ? event.stopPropagation() : "unknown" !== typeof event.cancelBubble && (event.cancelBubble = true), this.isPropagationStopped = functionThatReturnsTrue);
2998 },
2999 persist: function() {
3000 },
3001 isPersistent: functionThatReturnsTrue
3002 });
3003 return SyntheticBaseEvent;
3004 }
3005 function modifierStateGetter(keyArg) {
3006 var nativeEvent = this.nativeEvent;
3007 return nativeEvent.getModifierState ? nativeEvent.getModifierState(keyArg) : (keyArg = modifierKeyToProp[keyArg]) ? !!nativeEvent[keyArg] : false;
3008 }
3009 function getEventModifierState() {
3010 return modifierStateGetter;
3011 }
3012 function isFallbackCompositionEnd(domEventName, nativeEvent) {
3013 switch (domEventName) {
3014 case "keyup":
3015 return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);
3016 case "keydown":
3017 return nativeEvent.keyCode !== START_KEYCODE;
3018 case "keypress":
3019 case "mousedown":
3020 case "focusout":
3021 return true;
3022 default:
3023 return false;
3024 }
3025 }
3026 function getDataFromCustomEvent(nativeEvent) {
3027 nativeEvent = nativeEvent.detail;
3028 return "object" === typeof nativeEvent && "data" in nativeEvent ? nativeEvent.data : null;
3029 }
3030 function getNativeBeforeInputChars(domEventName, nativeEvent) {
3031 switch (domEventName) {
3032 case "compositionend":
3033 return getDataFromCustomEvent(nativeEvent);
3034 case "keypress":
3035 if (nativeEvent.which !== SPACEBAR_CODE) return null;
3036 hasSpaceKeypress = true;
3037 return SPACEBAR_CHAR;
3038 case "textInput":
3039 return domEventName = nativeEvent.data, domEventName === SPACEBAR_CHAR && hasSpaceKeypress ? null : domEventName;
3040 default:
3041 return null;
3042 }
3043 }
3044 function getFallbackBeforeInputChars(domEventName, nativeEvent) {
3045 if (isComposing)
3046 return "compositionend" === domEventName || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent) ? (domEventName = getData(), fallbackText = startText = root = null, isComposing = false, domEventName) : null;
3047 switch (domEventName) {
3048 case "paste":
3049 return null;
3050 case "keypress":
3051 if (!(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) || nativeEvent.ctrlKey && nativeEvent.altKey) {
3052 if (nativeEvent.char && 1 < nativeEvent.char.length)
3053 return nativeEvent.char;
3054 if (nativeEvent.which)
3055 return String.fromCharCode(nativeEvent.which);
3056 }
3057 return null;
3058 case "compositionend":
3059 return useFallbackCompositionData && "ko" !== nativeEvent.locale ? null : nativeEvent.data;
3060 default:
3061 return null;
3062 }
3063 }
3064 function isTextInputElement(elem) {
3065 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
3066 return "input" === nodeName ? !!supportedInputTypes[elem.type] : "textarea" === nodeName ? true : false;
3067 }
3068 function isEventSupported(eventNameSuffix) {
3069 if (!canUseDOM) return false;
3070 eventNameSuffix = "on" + eventNameSuffix;
3071 var isSupported = eventNameSuffix in document;
3072 isSupported || (isSupported = document.createElement("div"), isSupported.setAttribute(eventNameSuffix, "return;"), isSupported = "function" === typeof isSupported[eventNameSuffix]);
3073 return isSupported;
3074 }
3075 function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
3076 restoreTarget ? restoreQueue ? restoreQueue.push(target) : restoreQueue = [target] : restoreTarget = target;
3077 inst = accumulateTwoPhaseListeners(inst, "onChange");
3078 0 < inst.length && (nativeEvent = new SyntheticEvent(
3079 "onChange",
3080 "change",
3081 null,
3082 nativeEvent,
3083 target
3084 ), dispatchQueue.push({ event: nativeEvent, listeners: inst }));
3085 }
3086 function runEventInBatch(dispatchQueue) {
3087 processDispatchQueue(dispatchQueue, 0);
3088 }
3089 function getInstIfValueChanged(targetInst) {
3090 var targetNode = getNodeFromInstance(targetInst);
3091 if (updateValueIfChanged(targetNode)) return targetInst;
3092 }
3093 function getTargetInstForChangeEvent(domEventName, targetInst) {
3094 if ("change" === domEventName) return targetInst;
3095 }
3096 function stopWatchingForValueChange() {
3097 activeElement$1 && (activeElement$1.detachEvent("onpropertychange", handlePropertyChange), activeElementInst$1 = activeElement$1 = null);
3098 }
3099 function handlePropertyChange(nativeEvent) {
3100 if ("value" === nativeEvent.propertyName && getInstIfValueChanged(activeElementInst$1)) {
3101 var dispatchQueue = [];
3102 createAndAccumulateChangeEvent(
3103 dispatchQueue,
3104 activeElementInst$1,
3105 nativeEvent,
3106 getEventTarget(nativeEvent)
3107 );
3108 batchedUpdates$1(runEventInBatch, dispatchQueue);
3109 }
3110 }
3111 function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
3112 "focusin" === domEventName ? (stopWatchingForValueChange(), activeElement$1 = target, activeElementInst$1 = targetInst, activeElement$1.attachEvent("onpropertychange", handlePropertyChange)) : "focusout" === domEventName && stopWatchingForValueChange();
3113 }
3114 function getTargetInstForInputEventPolyfill(domEventName) {
3115 if ("selectionchange" === domEventName || "keyup" === domEventName || "keydown" === domEventName)
3116 return getInstIfValueChanged(activeElementInst$1);
3117 }
3118 function getTargetInstForClickEvent(domEventName, targetInst) {
3119 if ("click" === domEventName) return getInstIfValueChanged(targetInst);
3120 }
3121 function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
3122 if ("input" === domEventName || "change" === domEventName)
3123 return getInstIfValueChanged(targetInst);
3124 }
3125 function is(x, y) {
3126 return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
3127 }
3128 function shallowEqual(objA, objB) {
3129 if (objectIs(objA, objB)) return true;
3130 if ("object" !== typeof objA || null === objA || "object" !== typeof objB || null === objB)
3131 return false;
3132 var keysA = Object.keys(objA), keysB = Object.keys(objB);
3133 if (keysA.length !== keysB.length) return false;
3134 for (keysB = 0; keysB < keysA.length; keysB++) {
3135 var currentKey = keysA[keysB];
3136 if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey]))
3137 return false;
3138 }
3139 return true;
3140 }
3141 function getLeafNode(node) {
3142 for (; node && node.firstChild; ) node = node.firstChild;
3143 return node;
3144 }
3145 function getNodeForCharacterOffset(root2, offset) {
3146 var node = getLeafNode(root2);
3147 root2 = 0;
3148 for (var nodeEnd; node; ) {
3149 if (3 === node.nodeType) {
3150 nodeEnd = root2 + node.textContent.length;
3151 if (root2 <= offset && nodeEnd >= offset)
3152 return { node, offset: offset - root2 };
3153 root2 = nodeEnd;
3154 }
3155 a: {
3156 for (; node; ) {
3157 if (node.nextSibling) {
3158 node = node.nextSibling;
3159 break a;
3160 }
3161 node = node.parentNode;
3162 }
3163 node = void 0;
3164 }
3165 node = getLeafNode(node);
3166 }
3167 }
3168 function containsNode(outerNode, innerNode) {
3169 return outerNode && innerNode ? outerNode === innerNode ? true : outerNode && 3 === outerNode.nodeType ? false : innerNode && 3 === innerNode.nodeType ? containsNode(outerNode, innerNode.parentNode) : "contains" in outerNode ? outerNode.contains(innerNode) : outerNode.compareDocumentPosition ? !!(outerNode.compareDocumentPosition(innerNode) & 16) : false : false;
3170 }
3171 function getActiveElementDeep(containerInfo) {
3172 containerInfo = null != containerInfo && null != containerInfo.ownerDocument && null != containerInfo.ownerDocument.defaultView ? containerInfo.ownerDocument.defaultView : window;
3173 for (var element = getActiveElement(containerInfo.document); element instanceof containerInfo.HTMLIFrameElement; ) {
3174 try {
3175 var JSCompiler_inline_result = "string" === typeof element.contentWindow.location.href;
3176 } catch (err) {
3177 JSCompiler_inline_result = false;
3178 }
3179 if (JSCompiler_inline_result) containerInfo = element.contentWindow;
3180 else break;
3181 element = getActiveElement(containerInfo.document);
3182 }
3183 return element;
3184 }
3185 function hasSelectionCapabilities(elem) {
3186 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
3187 return nodeName && ("input" === nodeName && ("text" === elem.type || "search" === elem.type || "tel" === elem.type || "url" === elem.type || "password" === elem.type) || "textarea" === nodeName || "true" === elem.contentEditable);
3188 }
3189 function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
3190 var doc = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget.document : 9 === nativeEventTarget.nodeType ? nativeEventTarget : nativeEventTarget.ownerDocument;
3191 mouseDown || null == activeElement || activeElement !== getActiveElement(doc) || (doc = activeElement, "selectionStart" in doc && hasSelectionCapabilities(doc) ? doc = { start: doc.selectionStart, end: doc.selectionEnd } : (doc = (doc.ownerDocument && doc.ownerDocument.defaultView || window).getSelection(), doc = {
3192 anchorNode: doc.anchorNode,
3193 anchorOffset: doc.anchorOffset,
3194 focusNode: doc.focusNode,
3195 focusOffset: doc.focusOffset
3196 }), lastSelection && shallowEqual(lastSelection, doc) || (lastSelection = doc, doc = accumulateTwoPhaseListeners(activeElementInst, "onSelect"), 0 < doc.length && (nativeEvent = new SyntheticEvent(
3197 "onSelect",
3198 "select",
3199 null,
3200 nativeEvent,
3201 nativeEventTarget
3202 ), dispatchQueue.push({ event: nativeEvent, listeners: doc }), nativeEvent.target = activeElement)));
3203 }
3204 function makePrefixMap(styleProp, eventName) {
3205 var prefixes = {};
3206 prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
3207 prefixes["Webkit" + styleProp] = "webkit" + eventName;
3208 prefixes["Moz" + styleProp] = "moz" + eventName;
3209 return prefixes;
3210 }
3211 function getVendorPrefixedEventName(eventName) {
3212 if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];
3213 if (!vendorPrefixes[eventName]) return eventName;
3214 var prefixMap = vendorPrefixes[eventName], styleProp;
3215 for (styleProp in prefixMap)
3216 if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)
3217 return prefixedEventNames[eventName] = prefixMap[styleProp];
3218 return eventName;
3219 }
3220 function registerSimpleEvent(domEventName, reactName) {
3221 topLevelEventsToReactNames.set(domEventName, reactName);
3222 registerTwoPhaseEvent(reactName, [domEventName]);
3223 }
3224 function getArrayKind(array) {
3225 for (var kind = EMPTY_ARRAY, i = 0; i < array.length; i++) {
3226 var value = array[i];
3227 if ("object" === typeof value && null !== value)
3228 if (isArrayImpl(value) && 2 === value.length && "string" === typeof value[0]) {
3229 if (kind !== EMPTY_ARRAY && kind !== ENTRIES_ARRAY)
3230 return COMPLEX_ARRAY;
3231 kind = ENTRIES_ARRAY;
3232 } else return COMPLEX_ARRAY;
3233 else {
3234 if ("function" === typeof value || "string" === typeof value && 50 < value.length || kind !== EMPTY_ARRAY && kind !== PRIMITIVE_ARRAY)
3235 return COMPLEX_ARRAY;
3236 kind = PRIMITIVE_ARRAY;
3237 }
3238 }
3239 return kind;
3240 }
3241 function addObjectToProperties(object, properties, indent, prefix2) {
3242 for (var key in object)
3243 hasOwnProperty.call(object, key) && "_" !== key[0] && addValueToProperties(key, object[key], properties, indent, prefix2);
3244 }
3245 function addValueToProperties(propertyName, value, properties, indent, prefix2) {
3246 switch (typeof value) {
3247 case "object":
3248 if (null === value) {
3249 value = "null";
3250 break;
3251 } else {
3252 if ((value.$$typeof === REACT_ELEMENT_TYPE || value.$$typeof === REACT_LEGACY_ELEMENT_TYPE)) {
3253 var typeName2 = getComponentNameFromType(value.type) || "\u2026", key = value.key;
3254 value = value.props;
3255 var propsKeys = Object.keys(value), propsLength = propsKeys.length;
3256 if (null == key && 0 === propsLength) {
3257 value = "<" + typeName2 + " />";
3258 break;
3259 }
3260 if (3 > indent || 1 === propsLength && "children" === propsKeys[0] && null == key) {
3261 value = "<" + typeName2 + " \u2026 />";
3262 break;
3263 }
3264 properties.push([
3265 prefix2 + "\xA0\xA0".repeat(indent) + propertyName,
3266 "<" + typeName2
3267 ]);
3268 null !== key && addValueToProperties(
3269 "key",
3270 key,
3271 properties,
3272 indent + 1,
3273 prefix2
3274 );
3275 propertyName = false;
3276 for (var propKey in value)
3277 "children" === propKey ? null != value.children && (!isArrayImpl(value.children) || 0 < value.children.length) && (propertyName = true) : hasOwnProperty.call(value, propKey) && "_" !== propKey[0] && addValueToProperties(
3278 propKey,
3279 value[propKey],
3280 properties,
3281 indent + 1,
3282 prefix2
3283 );
3284 properties.push([
3285 "",
3286 propertyName ? ">\u2026</" + typeName2 + ">" : "/>"
3287 ]);
3288 return;
3289 }
3290 typeName2 = Object.prototype.toString.call(value);
3291 typeName2 = typeName2.slice(8, typeName2.length - 1);
3292 if ("Array" === typeName2) {
3293 if (propKey = getArrayKind(value), propKey === PRIMITIVE_ARRAY || propKey === EMPTY_ARRAY) {
3294 value = JSON.stringify(value);
3295 break;
3296 } else if (propKey === ENTRIES_ARRAY) {
3297 properties.push([
3298 prefix2 + "\xA0\xA0".repeat(indent) + propertyName,
3299 ""
3300 ]);
3301 for (propertyName = 0; propertyName < value.length; propertyName++)
3302 typeName2 = value[propertyName], addValueToProperties(
3303 typeName2[0],
3304 typeName2[1],
3305 properties,
3306 indent + 1,
3307 prefix2
3308 );
3309 return;
3310 }
3311 }
3312 if ("Promise" === typeName2) {
3313 if ("fulfilled" === value.status) {
3314 if (typeName2 = properties.length, addValueToProperties(
3315 propertyName,
3316 value.value,
3317 properties,
3318 indent,
3319 prefix2
3320 ), properties.length > typeName2) {
3321 properties = properties[typeName2];
3322 properties[1] = "Promise<" + (properties[1] || "Object") + ">";
3323 return;
3324 }
3325 } else if ("rejected" === value.status && (typeName2 = properties.length, addValueToProperties(
3326 propertyName,
3327 value.reason,
3328 properties,
3329 indent,
3330 prefix2
3331 ), properties.length > typeName2)) {
3332 properties = properties[typeName2];
3333 properties[1] = "Rejected Promise<" + properties[1] + ">";
3334 return;
3335 }
3336 properties.push([
3337 "\xA0\xA0".repeat(indent) + propertyName,
3338 "Promise"
3339 ]);
3340 return;
3341 }
3342 "Object" === typeName2 && (propKey = Object.getPrototypeOf(value)) && "function" === typeof propKey.constructor && (typeName2 = propKey.constructor.name);
3343 properties.push([
3344 prefix2 + "\xA0\xA0".repeat(indent) + propertyName,
3345 "Object" === typeName2 ? 3 > indent ? "" : "\u2026" : typeName2
3346 ]);
3347 3 > indent && addObjectToProperties(value, properties, indent + 1, prefix2);
3348 return;
3349 }
3350 case "function":
3351 value = "" === value.name ? "() => {}" : value.name + "() {}";
3352 break;
3353 case "string":
3354 value = value === OMITTED_PROP_ERROR ? "\u2026" : JSON.stringify(value);
3355 break;
3356 case "undefined":
3357 value = "undefined";
3358 break;
3359 case "boolean":
3360 value = value ? "true" : "false";
3361 break;
3362 default:
3363 value = String(value);
3364 }
3365 properties.push([
3366 prefix2 + "\xA0\xA0".repeat(indent) + propertyName,
3367 value
3368 ]);
3369 }
3370 function addObjectDiffToProperties(prev, next, properties, indent) {
3371 var isDeeplyEqual = true;
3372 for (key in prev)
3373 key in next || (properties.push([
3374 REMOVED + "\xA0\xA0".repeat(indent) + key,
3375 "\u2026"
3376 ]), isDeeplyEqual = false);
3377 for (var _key in next)
3378 if (_key in prev) {
3379 var key = prev[_key];
3380 var nextValue = next[_key];
3381 if (key !== nextValue) {
3382 if (0 === indent && "children" === _key)
3383 isDeeplyEqual = "\xA0\xA0".repeat(indent) + _key, properties.push(
3384 [REMOVED + isDeeplyEqual, "\u2026"],
3385 [ADDED + isDeeplyEqual, "\u2026"]
3386 );
3387 else {
3388 if (!(3 <= indent)) {
3389 if ("object" === typeof key && "object" === typeof nextValue && null !== key && null !== nextValue && key.$$typeof === nextValue.$$typeof)
3390 if ((nextValue.$$typeof === REACT_ELEMENT_TYPE || nextValue.$$typeof === REACT_LEGACY_ELEMENT_TYPE)) {
3391 if (key.type === nextValue.type && key.key === nextValue.key) {
3392 key = getComponentNameFromType(nextValue.type) || "\u2026";
3393 isDeeplyEqual = "\xA0\xA0".repeat(indent) + _key;
3394 key = "<" + key + " \u2026 />";
3395 properties.push(
3396 [REMOVED + isDeeplyEqual, key],
3397 [ADDED + isDeeplyEqual, key]
3398 );
3399 isDeeplyEqual = false;
3400 continue;
3401 }
3402 } else {
3403 var prevKind = Object.prototype.toString.call(key), nextKind = Object.prototype.toString.call(nextValue);
3404 if (prevKind === nextKind && ("[object Object]" === nextKind || "[object Array]" === nextKind)) {
3405 prevKind = [
3406 UNCHANGED + "\xA0\xA0".repeat(indent) + _key,
3407 "[object Array]" === nextKind ? "Array" : ""
3408 ];
3409 properties.push(prevKind);
3410 nextKind = properties.length;
3411 addObjectDiffToProperties(
3412 key,
3413 nextValue,
3414 properties,
3415 indent + 1
3416 ) ? nextKind === properties.length && (prevKind[1] = "Referentially unequal but deeply equal objects. Consider memoization.") : isDeeplyEqual = false;
3417 continue;
3418 }
3419 }
3420 else if ("function" === typeof key && "function" === typeof nextValue && key.name === nextValue.name && key.length === nextValue.length && (prevKind = Function.prototype.toString.call(key), nextKind = Function.prototype.toString.call(nextValue), prevKind === nextKind)) {
3421 key = "" === nextValue.name ? "() => {}" : nextValue.name + "() {}";
3422 properties.push([
3423 UNCHANGED + "\xA0\xA0".repeat(indent) + _key,
3424 key + " Referentially unequal function closure. Consider memoization."
3425 ]);
3426 continue;
3427 }
3428 }
3429 addValueToProperties(_key, key, properties, indent, REMOVED);
3430 addValueToProperties(_key, nextValue, properties, indent, ADDED);
3431 }
3432 isDeeplyEqual = false;
3433 }
3434 } else
3435 properties.push([
3436 ADDED + "\xA0\xA0".repeat(indent) + _key,
3437 "\u2026"
3438 ]), isDeeplyEqual = false;
3439 return isDeeplyEqual;
3440 }
3441 function setCurrentTrackFromLanes(lanes) {
3442 currentTrack = lanes & 63 ? "Blocking" : lanes & 64 ? "Gesture" : lanes & 4194176 ? "Transition" : lanes & 62914560 ? "Suspense" : lanes & 2080374784 ? "Idle" : "Other";
3443 }
3444 function logComponentTrigger(fiber, startTime, endTime, trigger) {
3445 supportsUserTiming && (reusableComponentOptions.start = startTime, reusableComponentOptions.end = endTime, reusableComponentDevToolDetails.color = "warning", reusableComponentDevToolDetails.tooltipText = trigger, reusableComponentDevToolDetails.properties = null, (fiber = fiber._debugTask) ? fiber.run(
3446 performance.measure.bind(
3447 performance,
3448 trigger,
3449 reusableComponentOptions
3450 )
3451 ) : performance.measure(trigger, reusableComponentOptions));
3452 }
3453 function logComponentReappeared(fiber, startTime, endTime) {
3454 logComponentTrigger(fiber, startTime, endTime, "Reconnect");
3455 }
3456 function logComponentRender(fiber, startTime, endTime, wasHydrated, committedLanes) {
3457 var name = getComponentNameFromFiber(fiber);
3458 if (null !== name && supportsUserTiming) {
3459 var alternate = fiber.alternate, selfTime = fiber.actualDuration;
3460 if (null === alternate || alternate.child !== fiber.child)
3461 for (var child = fiber.child; null !== child; child = child.sibling)
3462 selfTime -= child.actualDuration;
3463 wasHydrated = 0.5 > selfTime ? wasHydrated ? "tertiary-light" : "primary-light" : 10 > selfTime ? wasHydrated ? "tertiary" : "primary" : 100 > selfTime ? wasHydrated ? "tertiary-dark" : "primary-dark" : "error";
3464 var props = fiber.memoizedProps;
3465 selfTime = fiber._debugTask;
3466 null !== props && null !== alternate && alternate.memoizedProps !== props ? (child = [resuableChangedPropsEntry], props = addObjectDiffToProperties(
3467 alternate.memoizedProps,
3468 props,
3469 child,
3470 0
3471 ), 1 < child.length && (props && !alreadyWarnedForDeepEquality && 0 === (alternate.lanes & committedLanes) && 100 < fiber.actualDuration ? (alreadyWarnedForDeepEquality = true, child[0] = reusableDeeplyEqualPropsEntry, reusableComponentDevToolDetails.color = "warning", reusableComponentDevToolDetails.tooltipText = DEEP_EQUALITY_WARNING) : (reusableComponentDevToolDetails.color = wasHydrated, reusableComponentDevToolDetails.tooltipText = name), reusableComponentDevToolDetails.properties = child, reusableComponentOptions.start = startTime, reusableComponentOptions.end = endTime, null != selfTime ? selfTime.run(
3472 performance.measure.bind(
3473 performance,
3474 "\u200B" + name,
3475 reusableComponentOptions
3476 )
3477 ) : performance.measure(
3478 "\u200B" + name,
3479 reusableComponentOptions
3480 ))) : null != selfTime ? selfTime.run(
3481 console.timeStamp.bind(
3482 console,
3483 name,
3484 startTime,
3485 endTime,
3486 COMPONENTS_TRACK,
3487 void 0,
3488 wasHydrated
3489 )
3490 ) : console.timeStamp(
3491 name,
3492 startTime,
3493 endTime,
3494 COMPONENTS_TRACK,
3495 void 0,
3496 wasHydrated
3497 );
3498 }
3499 }
3500 function logComponentErrored(fiber, startTime, endTime, errors) {
3501 if (supportsUserTiming) {
3502 var name = getComponentNameFromFiber(fiber);
3503 if (null !== name) {
3504 for (var debugTask = null, properties = [], i = 0; i < errors.length; i++) {
3505 var capturedValue = errors[i];
3506 null == debugTask && null !== capturedValue.source && (debugTask = capturedValue.source._debugTask);
3507 capturedValue = capturedValue.value;
3508 properties.push([
3509 "Error",
3510 "object" === typeof capturedValue && null !== capturedValue && "string" === typeof capturedValue.message ? String(capturedValue.message) : String(capturedValue)
3511 ]);
3512 }
3513 null !== fiber.key && addValueToProperties("key", fiber.key, properties, 0, "");
3514 null !== fiber.memoizedProps && addObjectToProperties(fiber.memoizedProps, properties, 0, "");
3515 null == debugTask && (debugTask = fiber._debugTask);
3516 fiber = {
3517 start: startTime,
3518 end: endTime,
3519 detail: {
3520 devtools: {
3521 color: "error",
3522 track: COMPONENTS_TRACK,
3523 tooltipText: 13 === fiber.tag ? "Hydration failed" : "Error boundary caught an error",
3524 properties
3525 }
3526 }
3527 };
3528 debugTask ? debugTask.run(
3529 performance.measure.bind(performance, "\u200B" + name, fiber)
3530 ) : performance.measure("\u200B" + name, fiber);
3531 }
3532 }
3533 }
3534 function logComponentEffect(fiber, startTime, endTime, selfTime, errors) {
3535 if (null !== errors) {
3536 if (supportsUserTiming) {
3537 var name = getComponentNameFromFiber(fiber);
3538 if (null !== name) {
3539 selfTime = [];
3540 for (var i = 0; i < errors.length; i++) {
3541 var error = errors[i].value;
3542 selfTime.push([
3543 "Error",
3544 "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error)
3545 ]);
3546 }
3547 null !== fiber.key && addValueToProperties("key", fiber.key, selfTime, 0, "");
3548 null !== fiber.memoizedProps && addObjectToProperties(fiber.memoizedProps, selfTime, 0, "");
3549 startTime = {
3550 start: startTime,
3551 end: endTime,
3552 detail: {
3553 devtools: {
3554 color: "error",
3555 track: COMPONENTS_TRACK,
3556 tooltipText: "A lifecycle or effect errored",
3557 properties: selfTime
3558 }
3559 }
3560 };
3561 (fiber = fiber._debugTask) ? fiber.run(
3562 performance.measure.bind(
3563 performance,
3564 "\u200B" + name,
3565 startTime
3566 )
3567 ) : performance.measure("\u200B" + name, startTime);
3568 }
3569 }
3570 } else
3571 name = getComponentNameFromFiber(fiber), null !== name && supportsUserTiming && (errors = 1 > selfTime ? "secondary-light" : 100 > selfTime ? "secondary" : 500 > selfTime ? "secondary-dark" : "error", (fiber = fiber._debugTask) ? fiber.run(
3572 console.timeStamp.bind(
3573 console,
3574 name,
3575 startTime,
3576 endTime,
3577 COMPONENTS_TRACK,
3578 void 0,
3579 errors
3580 )
3581 ) : console.timeStamp(
3582 name,
3583 startTime,
3584 endTime,
3585 COMPONENTS_TRACK,
3586 void 0,
3587 errors
3588 ));
3589 }
3590 function logRenderPhase(startTime, endTime, lanes, debugTask) {
3591 if (supportsUserTiming && !(endTime <= startTime)) {
3592 var color = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark";
3593 lanes = (lanes & 536870912) === lanes ? "Prepared" : (lanes & 201326741) === lanes ? "Hydrated" : "Render";
3594 debugTask ? debugTask.run(
3595 console.timeStamp.bind(
3596 console,
3597 lanes,
3598 startTime,
3599 endTime,
3600 currentTrack,
3601 LANES_TRACK_GROUP,
3602 color
3603 )
3604 ) : console.timeStamp(
3605 lanes,
3606 startTime,
3607 endTime,
3608 currentTrack,
3609 LANES_TRACK_GROUP,
3610 color
3611 );
3612 }
3613 }
3614 function logSuspendedRenderPhase(startTime, endTime, lanes, debugTask) {
3615 !supportsUserTiming || endTime <= startTime || (lanes = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark", debugTask ? debugTask.run(
3616 console.timeStamp.bind(
3617 console,
3618 "Prewarm",
3619 startTime,
3620 endTime,
3621 currentTrack,
3622 LANES_TRACK_GROUP,
3623 lanes
3624 )
3625 ) : console.timeStamp(
3626 "Prewarm",
3627 startTime,
3628 endTime,
3629 currentTrack,
3630 LANES_TRACK_GROUP,
3631 lanes
3632 ));
3633 }
3634 function logSuspendedWithDelayPhase(startTime, endTime, lanes, debugTask) {
3635 !supportsUserTiming || endTime <= startTime || (lanes = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark", debugTask ? debugTask.run(
3636 console.timeStamp.bind(
3637 console,
3638 "Suspended",
3639 startTime,
3640 endTime,
3641 currentTrack,
3642 LANES_TRACK_GROUP,
3643 lanes
3644 )
3645 ) : console.timeStamp(
3646 "Suspended",
3647 startTime,
3648 endTime,
3649 currentTrack,
3650 LANES_TRACK_GROUP,
3651 lanes
3652 ));
3653 }
3654 function logRecoveredRenderPhase(startTime, endTime, lanes, recoverableErrors, hydrationFailed, debugTask) {
3655 if (supportsUserTiming && !(endTime <= startTime)) {
3656 lanes = [];
3657 for (var i = 0; i < recoverableErrors.length; i++) {
3658 var error = recoverableErrors[i].value;
3659 lanes.push([
3660 "Recoverable Error",
3661 "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error)
3662 ]);
3663 }
3664 startTime = {
3665 start: startTime,
3666 end: endTime,
3667 detail: {
3668 devtools: {
3669 color: "primary-dark",
3670 track: currentTrack,
3671 trackGroup: LANES_TRACK_GROUP,
3672 tooltipText: hydrationFailed ? "Hydration Failed" : "Recovered after Error",
3673 properties: lanes
3674 }
3675 }
3676 };
3677 debugTask ? debugTask.run(
3678 performance.measure.bind(performance, "Recovered", startTime)
3679 ) : performance.measure("Recovered", startTime);
3680 }
3681 }
3682 function logErroredRenderPhase(startTime, endTime, lanes, debugTask) {
3683 !supportsUserTiming || endTime <= startTime || (debugTask ? debugTask.run(
3684 console.timeStamp.bind(
3685 console,
3686 "Errored",
3687 startTime,
3688 endTime,
3689 currentTrack,
3690 LANES_TRACK_GROUP,
3691 "error"
3692 )
3693 ) : console.timeStamp(
3694 "Errored",
3695 startTime,
3696 endTime,
3697 currentTrack,
3698 LANES_TRACK_GROUP,
3699 "error"
3700 ));
3701 }
3702 function logSuspendedCommitPhase(startTime, endTime, reason, debugTask) {
3703 !supportsUserTiming || endTime <= startTime || (debugTask ? debugTask.run(
3704 console.timeStamp.bind(
3705 console,
3706 reason,
3707 startTime,
3708 endTime,
3709 currentTrack,
3710 LANES_TRACK_GROUP,
3711 "secondary-light"
3712 )
3713 ) : console.timeStamp(
3714 reason,
3715 startTime,
3716 endTime,
3717 currentTrack,
3718 LANES_TRACK_GROUP,
3719 "secondary-light"
3720 ));
3721 }
3722 function logCommitErrored(startTime, endTime, errors, passive, debugTask) {
3723 if (supportsUserTiming && !(endTime <= startTime)) {
3724 for (var properties = [], i = 0; i < errors.length; i++) {
3725 var error = errors[i].value;
3726 properties.push([
3727 "Error",
3728 "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error)
3729 ]);
3730 }
3731 startTime = {
3732 start: startTime,
3733 end: endTime,
3734 detail: {
3735 devtools: {
3736 color: "error",
3737 track: currentTrack,
3738 trackGroup: LANES_TRACK_GROUP,
3739 tooltipText: passive ? "Remaining Effects Errored" : "Commit Errored",
3740 properties
3741 }
3742 }
3743 };
3744 debugTask ? debugTask.run(
3745 performance.measure.bind(performance, "Errored", startTime)
3746 ) : performance.measure("Errored", startTime);
3747 }
3748 }
3749 function logAnimatingPhase(startTime, endTime, debugTask) {
3750 !supportsUserTiming || endTime <= startTime || (debugTask ? debugTask.run(
3751 console.timeStamp.bind(
3752 console,
3753 "Animating",
3754 startTime,
3755 endTime,
3756 currentTrack,
3757 LANES_TRACK_GROUP,
3758 "secondary-dark"
3759 )
3760 ) : console.timeStamp(
3761 "Animating",
3762 startTime,
3763 endTime,
3764 currentTrack,
3765 LANES_TRACK_GROUP,
3766 "secondary-dark"
3767 ));
3768 }
3769 function finishQueueingConcurrentUpdates() {
3770 for (var endIndex = concurrentQueuesIndex, i = concurrentlyUpdatedLanes = concurrentQueuesIndex = 0; i < endIndex; ) {
3771 var fiber = concurrentQueues[i];
3772 concurrentQueues[i++] = null;
3773 var queue = concurrentQueues[i];
3774 concurrentQueues[i++] = null;
3775 var update = concurrentQueues[i];
3776 concurrentQueues[i++] = null;
3777 var lane = concurrentQueues[i];
3778 concurrentQueues[i++] = null;
3779 if (null !== queue && null !== update) {
3780 var pending = queue.pending;
3781 null === pending ? update.next = update : (update.next = pending.next, pending.next = update);
3782 queue.pending = update;
3783 }
3784 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);
3785 }
3786 }
3787 function enqueueUpdate$1(fiber, queue, update, lane) {
3788 concurrentQueues[concurrentQueuesIndex++] = fiber;
3789 concurrentQueues[concurrentQueuesIndex++] = queue;
3790 concurrentQueues[concurrentQueuesIndex++] = update;
3791 concurrentQueues[concurrentQueuesIndex++] = lane;
3792 concurrentlyUpdatedLanes |= lane;
3793 fiber.lanes |= lane;
3794 fiber = fiber.alternate;
3795 null !== fiber && (fiber.lanes |= lane);
3796 }
3797 function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
3798 enqueueUpdate$1(fiber, queue, update, lane);
3799 return getRootForUpdatedFiber(fiber);
3800 }
3801 function enqueueConcurrentRenderForLane(fiber, lane) {
3802 enqueueUpdate$1(fiber, null, null, lane);
3803 return getRootForUpdatedFiber(fiber);
3804 }
3805 function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {
3806 sourceFiber.lanes |= lane;
3807 var alternate = sourceFiber.alternate;
3808 null !== alternate && (alternate.lanes |= lane);
3809 for (var isHidden = false, parent = sourceFiber.return; null !== parent; )
3810 parent.childLanes |= lane, alternate = parent.alternate, null !== alternate && (alternate.childLanes |= lane), 22 === parent.tag && (sourceFiber = parent.stateNode, null === sourceFiber || sourceFiber._visibility & OffscreenVisible || (isHidden = true)), sourceFiber = parent, parent = parent.return;
3811 return 3 === sourceFiber.tag ? (parent = sourceFiber.stateNode, isHidden && null !== update && (isHidden = 31 - clz32(lane), sourceFiber = parent.hiddenUpdates, alternate = sourceFiber[isHidden], null === alternate ? sourceFiber[isHidden] = [update] : alternate.push(update), update.lane = lane | 536870912), parent) : null;
3812 }
3813 function getRootForUpdatedFiber(sourceFiber) {
3814 if (nestedUpdateCount > NESTED_UPDATE_LIMIT)
3815 throw nestedPassiveUpdateCount = nestedUpdateCount = 0, rootWithPassiveNestedUpdates = rootWithNestedUpdates = null, Error(
3816 "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."
3817 );
3818 nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT && (nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null, console.error(
3819 "Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."
3820 ));
3821 null === sourceFiber.alternate && 0 !== (sourceFiber.flags & 4098) && warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
3822 for (var node = sourceFiber, parent = node.return; null !== parent; )
3823 null === node.alternate && 0 !== (node.flags & 4098) && warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), node = parent, parent = node.return;
3824 return 3 === node.tag ? node.stateNode : null;
3825 }
3826 function resolveFunctionForHotReloading(type) {
3827 if (null === resolveFamily) return type;
3828 var family = resolveFamily(type);
3829 return void 0 === family ? type : family.current;
3830 }
3831 function resolveForwardRefForHotReloading(type) {
3832 if (null === resolveFamily) return type;
3833 var family = resolveFamily(type);
3834 return void 0 === family ? null !== type && void 0 !== type && "function" === typeof type.render && (family = resolveFunctionForHotReloading(type.render), type.render !== family) ? (family = { $$typeof: REACT_FORWARD_REF_TYPE, render: family }, void 0 !== type.displayName && (family.displayName = type.displayName), family) : type : family.current;
3835 }
3836 function isCompatibleFamilyForHotReloading(fiber, element) {
3837 if (null === resolveFamily) return false;
3838 var prevType = fiber.elementType;
3839 element = element.type;
3840 var needsCompareFamilies = false, $$typeofNextType = "object" === typeof element && null !== element ? element.$$typeof : null;
3841 switch (fiber.tag) {
3842 case 1:
3843 "function" === typeof element && (needsCompareFamilies = true);
3844 break;
3845 case 0:
3846 "function" === typeof element ? needsCompareFamilies = true : $$typeofNextType === REACT_LAZY_TYPE && (needsCompareFamilies = true);
3847 break;
3848 case 11:
3849 $$typeofNextType === REACT_FORWARD_REF_TYPE ? needsCompareFamilies = true : $$typeofNextType === REACT_LAZY_TYPE && (needsCompareFamilies = true);
3850 break;
3851 case 14:
3852 case 15:
3853 $$typeofNextType === REACT_MEMO_TYPE ? needsCompareFamilies = true : $$typeofNextType === REACT_LAZY_TYPE && (needsCompareFamilies = true);
3854 break;
3855 default:
3856 return false;
3857 }
3858 return needsCompareFamilies && (fiber = resolveFamily(prevType), void 0 !== fiber && fiber === resolveFamily(element)) ? true : false;
3859 }
3860 function markFailedErrorBoundaryForHotReloading(fiber) {
3861 null !== resolveFamily && "function" === typeof WeakSet && (null === failedBoundaries && (failedBoundaries = /* @__PURE__ */ new WeakSet()), failedBoundaries.add(fiber));
3862 }
3863 function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
3864 do {
3865 var _fiber = fiber, alternate = _fiber.alternate, child = _fiber.child, sibling = _fiber.sibling, tag = _fiber.tag;
3866 _fiber = _fiber.type;
3867 var candidateType = null;
3868 switch (tag) {
3869 case 0:
3870 case 15:
3871 case 1:
3872 candidateType = _fiber;
3873 break;
3874 case 11:
3875 candidateType = _fiber.render;
3876 }
3877 if (null === resolveFamily)
3878 throw Error("Expected resolveFamily to be set during hot reload.");
3879 var needsRender = false;
3880 _fiber = false;
3881 null !== candidateType && (candidateType = resolveFamily(candidateType), void 0 !== candidateType && (staleFamilies.has(candidateType) ? _fiber = true : updatedFamilies.has(candidateType) && (1 === tag ? _fiber = true : needsRender = true)));
3882 null !== failedBoundaries && (failedBoundaries.has(fiber) || null !== alternate && failedBoundaries.has(alternate)) && (_fiber = true);
3883 _fiber && (fiber._debugNeedsRemount = true);
3884 if (_fiber || needsRender)
3885 alternate = enqueueConcurrentRenderForLane(fiber, 2), null !== alternate && scheduleUpdateOnFiber(alternate, fiber, 2);
3886 null === child || _fiber || scheduleFibersWithFamiliesRecursively(
3887 child,
3888 updatedFamilies,
3889 staleFamilies
3890 );
3891 if (null === sibling) break;
3892 fiber = sibling;
3893 } while (1);
3894 }
3895 function FiberNode(tag, pendingProps, key, mode) {
3896 this.tag = tag;
3897 this.key = key;
3898 this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null;
3899 this.index = 0;
3900 this.refCleanup = this.ref = null;
3901 this.pendingProps = pendingProps;
3902 this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null;
3903 this.mode = mode;
3904 this.subtreeFlags = this.flags = 0;
3905 this.deletions = null;
3906 this.childLanes = this.lanes = 0;
3907 this.alternate = null;
3908 this.actualDuration = -0;
3909 this.actualStartTime = -1.1;
3910 this.treeBaseDuration = this.selfBaseDuration = -0;
3911 this._debugTask = this._debugStack = this._debugOwner = this._debugInfo = null;
3912 this._debugNeedsRemount = false;
3913 this._debugHookTypes = null;
3914 hasBadMapPolyfill || "function" !== typeof Object.preventExtensions || Object.preventExtensions(this);
3915 }
3916 function shouldConstruct(Component) {
3917 Component = Component.prototype;
3918 return !(!Component || !Component.isReactComponent);
3919 }
3920 function createWorkInProgress(current2, pendingProps) {
3921 var workInProgress2 = current2.alternate;
3922 null === workInProgress2 ? (workInProgress2 = createFiber(
3923 current2.tag,
3924 pendingProps,
3925 current2.key,
3926 current2.mode
3927 ), workInProgress2.elementType = current2.elementType, workInProgress2.type = current2.type, workInProgress2.stateNode = current2.stateNode, workInProgress2._debugOwner = current2._debugOwner, workInProgress2._debugStack = current2._debugStack, workInProgress2._debugTask = current2._debugTask, workInProgress2._debugHookTypes = current2._debugHookTypes, workInProgress2.alternate = current2, current2.alternate = workInProgress2) : (workInProgress2.pendingProps = pendingProps, workInProgress2.type = current2.type, workInProgress2.flags = 0, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null, workInProgress2.actualDuration = -0, workInProgress2.actualStartTime = -1.1);
3928 workInProgress2.flags = current2.flags & 65011712;
3929 workInProgress2.childLanes = current2.childLanes;
3930 workInProgress2.lanes = current2.lanes;
3931 workInProgress2.child = current2.child;
3932 workInProgress2.memoizedProps = current2.memoizedProps;
3933 workInProgress2.memoizedState = current2.memoizedState;
3934 workInProgress2.updateQueue = current2.updateQueue;
3935 pendingProps = current2.dependencies;
3936 workInProgress2.dependencies = null === pendingProps ? null : {
3937 lanes: pendingProps.lanes,
3938 firstContext: pendingProps.firstContext,
3939 _debugThenableState: pendingProps._debugThenableState
3940 };
3941 workInProgress2.sibling = current2.sibling;
3942 workInProgress2.index = current2.index;
3943 workInProgress2.ref = current2.ref;
3944 workInProgress2.refCleanup = current2.refCleanup;
3945 workInProgress2.selfBaseDuration = current2.selfBaseDuration;
3946 workInProgress2.treeBaseDuration = current2.treeBaseDuration;
3947 workInProgress2._debugInfo = current2._debugInfo;
3948 workInProgress2._debugNeedsRemount = current2._debugNeedsRemount;
3949 switch (workInProgress2.tag) {
3950 case 0:
3951 case 15:
3952 workInProgress2.type = resolveFunctionForHotReloading(current2.type);
3953 break;
3954 case 1:
3955 workInProgress2.type = resolveFunctionForHotReloading(current2.type);
3956 break;
3957 case 11:
3958 workInProgress2.type = resolveForwardRefForHotReloading(current2.type);
3959 }
3960 return workInProgress2;
3961 }
3962 function resetWorkInProgress(workInProgress2, renderLanes2) {
3963 workInProgress2.flags &= 65011714;
3964 var current2 = workInProgress2.alternate;
3965 null === current2 ? (workInProgress2.childLanes = 0, workInProgress2.lanes = renderLanes2, workInProgress2.child = null, workInProgress2.subtreeFlags = 0, workInProgress2.memoizedProps = null, workInProgress2.memoizedState = null, workInProgress2.updateQueue = null, workInProgress2.dependencies = null, workInProgress2.stateNode = null, workInProgress2.selfBaseDuration = 0, workInProgress2.treeBaseDuration = 0) : (workInProgress2.childLanes = current2.childLanes, workInProgress2.lanes = current2.lanes, workInProgress2.child = current2.child, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null, workInProgress2.memoizedProps = current2.memoizedProps, workInProgress2.memoizedState = current2.memoizedState, workInProgress2.updateQueue = current2.updateQueue, workInProgress2.type = current2.type, renderLanes2 = current2.dependencies, workInProgress2.dependencies = null === renderLanes2 ? null : {
3966 lanes: renderLanes2.lanes,
3967 firstContext: renderLanes2.firstContext,
3968 _debugThenableState: renderLanes2._debugThenableState
3969 }, workInProgress2.selfBaseDuration = current2.selfBaseDuration, workInProgress2.treeBaseDuration = current2.treeBaseDuration);
3970 return workInProgress2;
3971 }
3972 function createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes) {
3973 var fiberTag = 0, resolvedType = type;
3974 if ("function" === typeof type)
3975 shouldConstruct(type) && (fiberTag = 1), resolvedType = resolveFunctionForHotReloading(resolvedType);
3976 else if ("string" === typeof type)
3977 fiberTag = getHostContext(), fiberTag = isHostHoistableType(type, pendingProps, fiberTag) ? 26 : "html" === type || "head" === type || "body" === type ? 27 : 5;
3978 else
3979 a: switch (type) {
3980 case REACT_ACTIVITY_TYPE:
3981 return key = createFiber(31, pendingProps, key, mode), key.elementType = REACT_ACTIVITY_TYPE, key.lanes = lanes, key;
3982 case REACT_FRAGMENT_TYPE:
3983 return createFiberFromFragment(
3984 pendingProps.children,
3985 mode,
3986 lanes,
3987 key
3988 );
3989 case REACT_STRICT_MODE_TYPE:
3990 fiberTag = 8;
3991 mode |= StrictLegacyMode;
3992 mode |= StrictEffectsMode;
3993 break;
3994 case REACT_PROFILER_TYPE:
3995 return type = pendingProps, owner = mode, "string" !== typeof type.id && console.error(
3996 'Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',
3997 typeof type.id
3998 ), key = createFiber(12, type, key, owner | ProfileMode), key.elementType = REACT_PROFILER_TYPE, key.lanes = lanes, key.stateNode = { effectDuration: 0, passiveEffectDuration: 0 }, key;
3999 case REACT_SUSPENSE_TYPE:
4000 return key = createFiber(13, pendingProps, key, mode), key.elementType = REACT_SUSPENSE_TYPE, key.lanes = lanes, key;
4001 case REACT_SUSPENSE_LIST_TYPE:
4002 return key = createFiber(19, pendingProps, key, mode), key.elementType = REACT_SUSPENSE_LIST_TYPE, key.lanes = lanes, key;
4003 default:
4004 if ("object" === typeof type && null !== type)
4005 switch (type.$$typeof) {
4006 case REACT_CONTEXT_TYPE:
4007 fiberTag = 10;
4008 break a;
4009 case REACT_CONSUMER_TYPE:
4010 fiberTag = 9;
4011 break a;
4012 case REACT_FORWARD_REF_TYPE:
4013 fiberTag = 11;
4014 resolvedType = resolveForwardRefForHotReloading(resolvedType);
4015 break a;
4016 case REACT_MEMO_TYPE:
4017 fiberTag = 14;
4018 break a;
4019 case REACT_LAZY_TYPE:
4020 fiberTag = 16;
4021 resolvedType = null;
4022 break a;
4023 }
4024 resolvedType = "";
4025 if (void 0 === type || "object" === typeof type && null !== type && 0 === Object.keys(type).length)
4026 resolvedType += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
4027 null === type ? pendingProps = "null" : isArrayImpl(type) ? pendingProps = "array" : void 0 !== type && (type.$$typeof === REACT_ELEMENT_TYPE || type.$$typeof === REACT_LEGACY_ELEMENT_TYPE) ? (pendingProps = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />", resolvedType = " Did you accidentally export a JSX literal instead of a component?") : pendingProps = typeof type;
4028 (fiberTag = owner ? getComponentNameFromOwner(owner) : null) && (resolvedType += "\n\nCheck the render method of `" + fiberTag + "`.");
4029 fiberTag = 29;
4030 pendingProps = Error(
4031 "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (pendingProps + "." + resolvedType)
4032 );
4033 resolvedType = null;
4034 }
4035 key = createFiber(fiberTag, pendingProps, key, mode);
4036 key.elementType = type;
4037 key.type = resolvedType;
4038 key.lanes = lanes;
4039 key._debugOwner = owner;
4040 return key;
4041 }
4042 function createFiberFromElement(element, mode, lanes) {
4043 mode = createFiberFromTypeAndProps(
4044 element.type,
4045 element.key,
4046 element.props,
4047 element._owner,
4048 mode,
4049 lanes
4050 );
4051 mode._debugOwner = element._owner;
4052 mode._debugStack = element._debugStack;
4053 mode._debugTask = element._debugTask;
4054 return mode;
4055 }
4056 function createFiberFromFragment(elements, mode, lanes, key) {
4057 elements = createFiber(7, elements, key, mode);
4058 elements.lanes = lanes;
4059 return elements;
4060 }
4061 function createFiberFromText(content, mode, lanes) {
4062 content = createFiber(6, content, null, mode);
4063 content.lanes = lanes;
4064 return content;
4065 }
4066 function createFiberFromDehydratedFragment(dehydratedNode) {
4067 var fiber = createFiber(18, null, null, NoMode);
4068 fiber.stateNode = dehydratedNode;
4069 return fiber;
4070 }
4071 function createFiberFromPortal(portal, mode, lanes) {
4072 mode = createFiber(
4073 4,
4074 null !== portal.children ? portal.children : [],
4075 portal.key,
4076 mode
4077 );
4078 mode.lanes = lanes;
4079 mode.stateNode = {
4080 containerInfo: portal.containerInfo,
4081 pendingChildren: null,
4082 implementation: portal.implementation
4083 };
4084 return mode;
4085 }
4086 function createCapturedValueAtFiber(value, source) {
4087 if ("object" === typeof value && null !== value) {
4088 var existing = CapturedStacks.get(value);
4089 if (void 0 !== existing) return existing;
4090 source = {
4091 value,
4092 source,
4093 stack: getStackByFiberInDevAndProd(source)
4094 };
4095 CapturedStacks.set(value, source);
4096 return source;
4097 }
4098 return {
4099 value,
4100 source,
4101 stack: getStackByFiberInDevAndProd(source)
4102 };
4103 }
4104 function pushTreeFork(workInProgress2, totalChildren) {
4105 warnIfNotHydrating();
4106 forkStack[forkStackIndex++] = treeForkCount;
4107 forkStack[forkStackIndex++] = treeForkProvider;
4108 treeForkProvider = workInProgress2;
4109 treeForkCount = totalChildren;
4110 }
4111 function pushTreeId(workInProgress2, totalChildren, index) {
4112 warnIfNotHydrating();
4113 idStack[idStackIndex++] = treeContextId;
4114 idStack[idStackIndex++] = treeContextOverflow;
4115 idStack[idStackIndex++] = treeContextProvider;
4116 treeContextProvider = workInProgress2;
4117 var baseIdWithLeadingBit = treeContextId;
4118 workInProgress2 = treeContextOverflow;
4119 var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
4120 baseIdWithLeadingBit &= ~(1 << baseLength);
4121 index += 1;
4122 var length = 32 - clz32(totalChildren) + baseLength;
4123 if (30 < length) {
4124 var numberOfOverflowBits = baseLength - baseLength % 5;
4125 length = (baseIdWithLeadingBit & (1 << numberOfOverflowBits) - 1).toString(32);
4126 baseIdWithLeadingBit >>= numberOfOverflowBits;
4127 baseLength -= numberOfOverflowBits;
4128 treeContextId = 1 << 32 - clz32(totalChildren) + baseLength | index << baseLength | baseIdWithLeadingBit;
4129 treeContextOverflow = length + workInProgress2;
4130 } else
4131 treeContextId = 1 << length | index << baseLength | baseIdWithLeadingBit, treeContextOverflow = workInProgress2;
4132 }
4133 function pushMaterializedTreeId(workInProgress2) {
4134 warnIfNotHydrating();
4135 null !== workInProgress2.return && (pushTreeFork(workInProgress2, 1), pushTreeId(workInProgress2, 1, 0));
4136 }
4137 function popTreeContext(workInProgress2) {
4138 for (; workInProgress2 === treeForkProvider; )
4139 treeForkProvider = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null, treeForkCount = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null;
4140 for (; workInProgress2 === treeContextProvider; )
4141 treeContextProvider = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextOverflow = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextId = idStack[--idStackIndex], idStack[idStackIndex] = null;
4142 }
4143 function getSuspendedTreeContext() {
4144 warnIfNotHydrating();
4145 return null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null;
4146 }
4147 function restoreSuspendedTreeContext(workInProgress2, suspendedContext) {
4148 warnIfNotHydrating();
4149 idStack[idStackIndex++] = treeContextId;
4150 idStack[idStackIndex++] = treeContextOverflow;
4151 idStack[idStackIndex++] = treeContextProvider;
4152 treeContextId = suspendedContext.id;
4153 treeContextOverflow = suspendedContext.overflow;
4154 treeContextProvider = workInProgress2;
4155 }
4156 function warnIfNotHydrating() {
4157 isHydrating || console.error(
4158 "Expected to be hydrating. This is a bug in React. Please file an issue."
4159 );
4160 }
4161 function buildHydrationDiffNode(fiber, distanceFromLeaf) {
4162 if (null === fiber.return) {
4163 if (null === hydrationDiffRootDEV)
4164 hydrationDiffRootDEV = {
4165 fiber,
4166 children: [],
4167 serverProps: void 0,
4168 serverTail: [],
4169 distanceFromLeaf
4170 };
4171 else {
4172 if (hydrationDiffRootDEV.fiber !== fiber)
4173 throw Error(
4174 "Saw multiple hydration diff roots in a pass. This is a bug in React."
4175 );
4176 hydrationDiffRootDEV.distanceFromLeaf > distanceFromLeaf && (hydrationDiffRootDEV.distanceFromLeaf = distanceFromLeaf);
4177 }
4178 return hydrationDiffRootDEV;
4179 }
4180 var siblings = buildHydrationDiffNode(
4181 fiber.return,
4182 distanceFromLeaf + 1
4183 ).children;
4184 if (0 < siblings.length && siblings[siblings.length - 1].fiber === fiber)
4185 return siblings = siblings[siblings.length - 1], siblings.distanceFromLeaf > distanceFromLeaf && (siblings.distanceFromLeaf = distanceFromLeaf), siblings;
4186 distanceFromLeaf = {
4187 fiber,
4188 children: [],
4189 serverProps: void 0,
4190 serverTail: [],
4191 distanceFromLeaf
4192 };
4193 siblings.push(distanceFromLeaf);
4194 return distanceFromLeaf;
4195 }
4196 function warnIfHydrating() {
4197 isHydrating && console.error(
4198 "We should not be hydrating here. This is a bug in React. Please file a bug."
4199 );
4200 }
4201 function warnNonHydratedInstance(fiber, rejectedCandidate) {
4202 didSuspendOrErrorDEV || (fiber = buildHydrationDiffNode(fiber, 0), fiber.serverProps = null, null !== rejectedCandidate && (rejectedCandidate = describeHydratableInstanceForDevWarnings(rejectedCandidate), fiber.serverTail.push(rejectedCandidate)));
4203 }
4204 function throwOnHydrationMismatch(fiber) {
4205 var fromText = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : false, diff = "", diffRoot = hydrationDiffRootDEV;
4206 null !== diffRoot && (hydrationDiffRootDEV = null, diff = describeDiff(diffRoot));
4207 queueHydrationError(
4208 createCapturedValueAtFiber(
4209 Error(
4210 "Hydration failed because the server rendered " + (fromText ? "text" : "HTML") + " didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\nhttps://react.dev/link/hydration-mismatch" + diff
4211 ),
4212 fiber
4213 )
4214 );
4215 throw HydrationMismatchException;
4216 }
4217 function prepareToHydrateHostInstance(fiber) {
4218 var didHydrate = fiber.stateNode;
4219 var type = fiber.type, props = fiber.memoizedProps;
4220 didHydrate[internalInstanceKey] = fiber;
4221 didHydrate[internalPropsKey] = props;
4222 validatePropertiesInDevelopment(type, props);
4223 switch (type) {
4224 case "dialog":
4225 listenToNonDelegatedEvent("cancel", didHydrate);
4226 listenToNonDelegatedEvent("close", didHydrate);
4227 break;
4228 case "iframe":
4229 case "object":
4230 case "embed":
4231 listenToNonDelegatedEvent("load", didHydrate);
4232 break;
4233 case "video":
4234 case "audio":
4235 for (type = 0; type < mediaEventTypes.length; type++)
4236 listenToNonDelegatedEvent(mediaEventTypes[type], didHydrate);
4237 break;
4238 case "source":
4239 listenToNonDelegatedEvent("error", didHydrate);
4240 break;
4241 case "img":
4242 case "image":
4243 case "link":
4244 listenToNonDelegatedEvent("error", didHydrate);
4245 listenToNonDelegatedEvent("load", didHydrate);
4246 break;
4247 case "details":
4248 listenToNonDelegatedEvent("toggle", didHydrate);
4249 break;
4250 case "input":
4251 checkControlledValueProps("input", props);
4252 listenToNonDelegatedEvent("invalid", didHydrate);
4253 validateInputProps(didHydrate, props);
4254 initInput(
4255 didHydrate,
4256 props.value,
4257 props.defaultValue,
4258 props.checked,
4259 props.defaultChecked,
4260 props.type,
4261 props.name,
4262 true
4263 );
4264 break;
4265 case "option":
4266 validateOptionProps(didHydrate, props);
4267 break;
4268 case "select":
4269 checkControlledValueProps("select", props);
4270 listenToNonDelegatedEvent("invalid", didHydrate);
4271 validateSelectProps(didHydrate, props);
4272 break;
4273 case "textarea":
4274 checkControlledValueProps("textarea", props), listenToNonDelegatedEvent("invalid", didHydrate), validateTextareaProps(didHydrate, props), initTextarea(
4275 didHydrate,
4276 props.value,
4277 props.defaultValue,
4278 props.children
4279 );
4280 }
4281 type = props.children;
4282 "string" !== typeof type && "number" !== typeof type && "bigint" !== typeof type || didHydrate.textContent === "" + type || true === props.suppressHydrationWarning || checkForUnmatchedText(didHydrate.textContent, type) ? (null != props.popover && (listenToNonDelegatedEvent("beforetoggle", didHydrate), listenToNonDelegatedEvent("toggle", didHydrate)), null != props.onScroll && listenToNonDelegatedEvent("scroll", didHydrate), null != props.onScrollEnd && listenToNonDelegatedEvent("scrollend", didHydrate), null != props.onClick && (didHydrate.onclick = noop$1), didHydrate = true) : didHydrate = false;
4283 didHydrate || throwOnHydrationMismatch(fiber, true);
4284 }
4285 function popToNextHostParent(fiber) {
4286 for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
4287 switch (hydrationParentFiber.tag) {
4288 case 5:
4289 case 31:
4290 case 13:
4291 rootOrSingletonContext = false;
4292 return;
4293 case 27:
4294 case 3:
4295 rootOrSingletonContext = true;
4296 return;
4297 default:
4298 hydrationParentFiber = hydrationParentFiber.return;
4299 }
4300 }
4301 function popHydrationState(fiber) {
4302 if (fiber !== hydrationParentFiber) return false;
4303 if (!isHydrating)
4304 return popToNextHostParent(fiber), isHydrating = true, false;
4305 var tag = fiber.tag, JSCompiler_temp;
4306 if (JSCompiler_temp = 3 !== tag && 27 !== tag) {
4307 if (JSCompiler_temp = 5 === tag)
4308 JSCompiler_temp = fiber.type, JSCompiler_temp = !("form" !== JSCompiler_temp && "button" !== JSCompiler_temp) || shouldSetTextContent(fiber.type, fiber.memoizedProps);
4309 JSCompiler_temp = !JSCompiler_temp;
4310 }
4311 if (JSCompiler_temp && nextHydratableInstance) {
4312 for (JSCompiler_temp = nextHydratableInstance; JSCompiler_temp; ) {
4313 var diffNode = buildHydrationDiffNode(fiber, 0), description = describeHydratableInstanceForDevWarnings(JSCompiler_temp);
4314 diffNode.serverTail.push(description);
4315 JSCompiler_temp = "Suspense" === description.type ? getNextHydratableInstanceAfterHydrationBoundary(JSCompiler_temp) : getNextHydratable(JSCompiler_temp.nextSibling);
4316 }
4317 throwOnHydrationMismatch(fiber);
4318 }
4319 popToNextHostParent(fiber);
4320 if (13 === tag) {
4321 fiber = fiber.memoizedState;
4322 fiber = null !== fiber ? fiber.dehydrated : null;
4323 if (!fiber)
4324 throw Error(
4325 "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
4326 );
4327 nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber);
4328 } else if (31 === tag) {
4329 fiber = fiber.memoizedState;
4330 fiber = null !== fiber ? fiber.dehydrated : null;
4331 if (!fiber)
4332 throw Error(
4333 "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
4334 );
4335 nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber);
4336 } else
4337 27 === tag ? (tag = nextHydratableInstance, isSingletonScope(fiber.type) ? (fiber = previousHydratableOnEnteringScopedSingleton, previousHydratableOnEnteringScopedSingleton = null, nextHydratableInstance = fiber) : nextHydratableInstance = tag) : nextHydratableInstance = hydrationParentFiber ? getNextHydratable(fiber.stateNode.nextSibling) : null;
4338 return true;
4339 }
4340 function resetHydrationState() {
4341 nextHydratableInstance = hydrationParentFiber = null;
4342 didSuspendOrErrorDEV = isHydrating = false;
4343 }
4344 function upgradeHydrationErrorsToRecoverable() {
4345 var queuedErrors = hydrationErrors;
4346 null !== queuedErrors && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = queuedErrors : workInProgressRootRecoverableErrors.push.apply(
4347 workInProgressRootRecoverableErrors,
4348 queuedErrors
4349 ), hydrationErrors = null);
4350 return queuedErrors;
4351 }
4352 function queueHydrationError(error) {
4353 null === hydrationErrors ? hydrationErrors = [error] : hydrationErrors.push(error);
4354 }
4355 function emitPendingHydrationWarnings() {
4356 var diffRoot = hydrationDiffRootDEV;
4357 if (null !== diffRoot) {
4358 hydrationDiffRootDEV = null;
4359 for (var diff = describeDiff(diffRoot); 0 < diffRoot.children.length; )
4360 diffRoot = diffRoot.children[0];
4361 runWithFiberInDEV(diffRoot.fiber, function() {
4362 console.error(
4363 "A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\n%s%s",
4364 "https://react.dev/link/hydration-mismatch",
4365 diff
4366 );
4367 });
4368 }
4369 }
4370 function resetContextDependencies() {
4371 lastContextDependency = currentlyRenderingFiber$1 = null;
4372 isDisallowedContextReadInDEV = false;
4373 }
4374 function pushProvider(providerFiber, context, nextValue) {
4375 push(valueCursor, context._currentValue, providerFiber);
4376 context._currentValue = nextValue;
4377 push(rendererCursorDEV, context._currentRenderer, providerFiber);
4378 void 0 !== context._currentRenderer && null !== context._currentRenderer && context._currentRenderer !== rendererSigil && console.error(
4379 "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."
4380 );
4381 context._currentRenderer = rendererSigil;
4382 }
4383 function popProvider(context, providerFiber) {
4384 context._currentValue = valueCursor.current;
4385 var currentRenderer = rendererCursorDEV.current;
4386 pop(rendererCursorDEV, providerFiber);
4387 context._currentRenderer = currentRenderer;
4388 pop(valueCursor, providerFiber);
4389 }
4390 function scheduleContextWorkOnParentPath(parent, renderLanes2, propagationRoot) {
4391 for (; null !== parent; ) {
4392 var alternate = parent.alternate;
4393 (parent.childLanes & renderLanes2) !== renderLanes2 ? (parent.childLanes |= renderLanes2, null !== alternate && (alternate.childLanes |= renderLanes2)) : null !== alternate && (alternate.childLanes & renderLanes2) !== renderLanes2 && (alternate.childLanes |= renderLanes2);
4394 if (parent === propagationRoot) break;
4395 parent = parent.return;
4396 }
4397 parent !== propagationRoot && console.error(
4398 "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue."
4399 );
4400 }
4401 function propagateContextChanges(workInProgress2, contexts, renderLanes2, forcePropagateEntireTree) {
4402 var fiber = workInProgress2.child;
4403 null !== fiber && (fiber.return = workInProgress2);
4404 for (; null !== fiber; ) {
4405 var list = fiber.dependencies;
4406 if (null !== list) {
4407 var nextFiber = fiber.child;
4408 list = list.firstContext;
4409 a: for (; null !== list; ) {
4410 var dependency = list;
4411 list = fiber;
4412 for (var i = 0; i < contexts.length; i++)
4413 if (dependency.context === contexts[i]) {
4414 list.lanes |= renderLanes2;
4415 dependency = list.alternate;
4416 null !== dependency && (dependency.lanes |= renderLanes2);
4417 scheduleContextWorkOnParentPath(
4418 list.return,
4419 renderLanes2,
4420 workInProgress2
4421 );
4422 forcePropagateEntireTree || (nextFiber = null);
4423 break a;
4424 }
4425 list = dependency.next;
4426 }
4427 } else if (18 === fiber.tag) {
4428 nextFiber = fiber.return;
4429 if (null === nextFiber)
4430 throw Error(
4431 "We just came from a parent so we must have had a parent. This is a bug in React."
4432 );
4433 nextFiber.lanes |= renderLanes2;
4434 list = nextFiber.alternate;
4435 null !== list && (list.lanes |= renderLanes2);
4436 scheduleContextWorkOnParentPath(
4437 nextFiber,
4438 renderLanes2,
4439 workInProgress2
4440 );
4441 nextFiber = null;
4442 } else nextFiber = fiber.child;
4443 if (null !== nextFiber) nextFiber.return = fiber;
4444 else
4445 for (nextFiber = fiber; null !== nextFiber; ) {
4446 if (nextFiber === workInProgress2) {
4447 nextFiber = null;
4448 break;
4449 }
4450 fiber = nextFiber.sibling;
4451 if (null !== fiber) {
4452 fiber.return = nextFiber.return;
4453 nextFiber = fiber;
4454 break;
4455 }
4456 nextFiber = nextFiber.return;
4457 }
4458 fiber = nextFiber;
4459 }
4460 }
4461 function propagateParentContextChanges(current2, workInProgress2, renderLanes2, forcePropagateEntireTree) {
4462 current2 = null;
4463 for (var parent = workInProgress2, isInsidePropagationBailout = false; null !== parent; ) {
4464 if (!isInsidePropagationBailout) {
4465 if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = true;
4466 else if (0 !== (parent.flags & 262144)) break;
4467 }
4468 if (10 === parent.tag) {
4469 var currentParent = parent.alternate;
4470 if (null === currentParent)
4471 throw Error("Should have a current fiber. This is a bug in React.");
4472 currentParent = currentParent.memoizedProps;
4473 if (null !== currentParent) {
4474 var context = parent.type;
4475 objectIs(parent.pendingProps.value, currentParent.value) || (null !== current2 ? current2.push(context) : current2 = [context]);
4476 }
4477 } else if (parent === hostTransitionProviderCursor.current) {
4478 currentParent = parent.alternate;
4479 if (null === currentParent)
4480 throw Error("Should have a current fiber. This is a bug in React.");
4481 currentParent.memoizedState.memoizedState !== parent.memoizedState.memoizedState && (null !== current2 ? current2.push(HostTransitionContext) : current2 = [HostTransitionContext]);
4482 }
4483 parent = parent.return;
4484 }
4485 null !== current2 && propagateContextChanges(
4486 workInProgress2,
4487 current2,
4488 renderLanes2,
4489 forcePropagateEntireTree
4490 );
4491 workInProgress2.flags |= 262144;
4492 }
4493 function checkIfContextChanged(currentDependencies) {
4494 for (currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) {
4495 if (!objectIs(
4496 currentDependencies.context._currentValue,
4497 currentDependencies.memoizedValue
4498 ))
4499 return true;
4500 currentDependencies = currentDependencies.next;
4501 }
4502 return false;
4503 }
4504 function prepareToReadContext(workInProgress2) {
4505 currentlyRenderingFiber$1 = workInProgress2;
4506 lastContextDependency = null;
4507 workInProgress2 = workInProgress2.dependencies;
4508 null !== workInProgress2 && (workInProgress2.firstContext = null);
4509 }
4510 function readContext(context) {
4511 isDisallowedContextReadInDEV && console.error(
4512 "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
4513 );
4514 return readContextForConsumer(currentlyRenderingFiber$1, context);
4515 }
4516 function readContextDuringReconciliation(consumer, context) {
4517 null === currentlyRenderingFiber$1 && prepareToReadContext(consumer);
4518 return readContextForConsumer(consumer, context);
4519 }
4520 function readContextForConsumer(consumer, context) {
4521 var value = context._currentValue;
4522 context = { context, memoizedValue: value, next: null };
4523 if (null === lastContextDependency) {
4524 if (null === consumer)
4525 throw Error(
4526 "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
4527 );
4528 lastContextDependency = context;
4529 consumer.dependencies = {
4530 lanes: 0,
4531 firstContext: context,
4532 _debugThenableState: null
4533 };
4534 consumer.flags |= 524288;
4535 } else lastContextDependency = lastContextDependency.next = context;
4536 return value;
4537 }
4538 function createCache() {
4539 return {
4540 controller: new AbortControllerLocal(),
4541 data: /* @__PURE__ */ new Map(),
4542 refCount: 0
4543 };
4544 }
4545 function retainCache(cache) {
4546 cache.controller.signal.aborted && console.warn(
4547 "A cache instance was retained after it was already freed. This likely indicates a bug in React."
4548 );
4549 cache.refCount++;
4550 }
4551 function releaseCache(cache) {
4552 cache.refCount--;
4553 0 > cache.refCount && console.warn(
4554 "A cache instance was released after it was already freed. This likely indicates a bug in React."
4555 );
4556 0 === cache.refCount && scheduleCallback$2(NormalPriority, function() {
4557 cache.controller.abort();
4558 });
4559 }
4560 function startUpdateTimerByLane(lane, method, fiber) {
4561 if (0 !== (lane & 127))
4562 0 > blockingUpdateTime && (blockingUpdateTime = now(), blockingUpdateTask = createTask(method), blockingUpdateMethodName = method, null != fiber && (blockingUpdateComponentName = getComponentNameFromFiber(fiber)), (executionContext & (RenderContext | CommitContext)) !== NoContext && (componentEffectSpawnedUpdate = true, blockingUpdateType = SPAWNED_UPDATE), lane = resolveEventTimeStamp(), method = resolveEventType(), lane !== blockingEventRepeatTime || method !== blockingEventType ? blockingEventRepeatTime = -1.1 : null !== method && (blockingUpdateType = SPAWNED_UPDATE), blockingEventTime = lane, blockingEventType = method);
4563 else if (0 !== (lane & 4194048) && 0 > transitionUpdateTime && (transitionUpdateTime = now(), transitionUpdateTask = createTask(method), transitionUpdateMethodName = method, null != fiber && (transitionUpdateComponentName = getComponentNameFromFiber(fiber)), 0 > transitionStartTime)) {
4564 lane = resolveEventTimeStamp();
4565 method = resolveEventType();
4566 if (lane !== transitionEventRepeatTime || method !== transitionEventType)
4567 transitionEventRepeatTime = -1.1;
4568 transitionEventTime = lane;
4569 transitionEventType = method;
4570 }
4571 }
4572 function startHostActionTimer(fiber) {
4573 if (0 > blockingUpdateTime) {
4574 blockingUpdateTime = now();
4575 blockingUpdateTask = null != fiber._debugTask ? fiber._debugTask : null;
4576 (executionContext & (RenderContext | CommitContext)) !== NoContext && (blockingUpdateType = SPAWNED_UPDATE);
4577 var newEventTime = resolveEventTimeStamp(), newEventType = resolveEventType();
4578 newEventTime !== blockingEventRepeatTime || newEventType !== blockingEventType ? blockingEventRepeatTime = -1.1 : null !== newEventType && (blockingUpdateType = SPAWNED_UPDATE);
4579 blockingEventTime = newEventTime;
4580 blockingEventType = newEventType;
4581 }
4582 if (0 > transitionUpdateTime && (transitionUpdateTime = now(), transitionUpdateTask = null != fiber._debugTask ? fiber._debugTask : null, 0 > transitionStartTime)) {
4583 fiber = resolveEventTimeStamp();
4584 newEventTime = resolveEventType();
4585 if (fiber !== transitionEventRepeatTime || newEventTime !== transitionEventType)
4586 transitionEventRepeatTime = -1.1;
4587 transitionEventTime = fiber;
4588 transitionEventType = newEventTime;
4589 }
4590 }
4591 function pushNestedEffectDurations() {
4592 var prevEffectDuration = profilerEffectDuration;
4593 profilerEffectDuration = 0;
4594 return prevEffectDuration;
4595 }
4596 function popNestedEffectDurations(prevEffectDuration) {
4597 var elapsedTime = profilerEffectDuration;
4598 profilerEffectDuration = prevEffectDuration;
4599 return elapsedTime;
4600 }
4601 function bubbleNestedEffectDurations(prevEffectDuration) {
4602 var elapsedTime = profilerEffectDuration;
4603 profilerEffectDuration += prevEffectDuration;
4604 return elapsedTime;
4605 }
4606 function resetComponentEffectTimers() {
4607 componentEffectEndTime = componentEffectStartTime = -1.1;
4608 }
4609 function pushComponentEffectStart() {
4610 var prevEffectStart = componentEffectStartTime;
4611 componentEffectStartTime = -1.1;
4612 return prevEffectStart;
4613 }
4614 function popComponentEffectStart(prevEffectStart) {
4615 0 <= prevEffectStart && (componentEffectStartTime = prevEffectStart);
4616 }
4617 function pushComponentEffectDuration() {
4618 var prevEffectDuration = componentEffectDuration;
4619 componentEffectDuration = -0;
4620 return prevEffectDuration;
4621 }
4622 function popComponentEffectDuration(prevEffectDuration) {
4623 0 <= prevEffectDuration && (componentEffectDuration = prevEffectDuration);
4624 }
4625 function pushComponentEffectErrors() {
4626 var prevErrors = componentEffectErrors;
4627 componentEffectErrors = null;
4628 return prevErrors;
4629 }
4630 function pushComponentEffectDidSpawnUpdate() {
4631 var prev = componentEffectSpawnedUpdate;
4632 componentEffectSpawnedUpdate = false;
4633 return prev;
4634 }
4635 function startProfilerTimer(fiber) {
4636 profilerStartTime = now();
4637 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
4638 }
4639 function stopProfilerTimerIfRunningAndRecordDuration(fiber) {
4640 if (0 <= profilerStartTime) {
4641 var elapsedTime = now() - profilerStartTime;
4642 fiber.actualDuration += elapsedTime;
4643 fiber.selfBaseDuration = elapsedTime;
4644 profilerStartTime = -1;
4645 }
4646 }
4647 function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {
4648 if (0 <= profilerStartTime) {
4649 var elapsedTime = now() - profilerStartTime;
4650 fiber.actualDuration += elapsedTime;
4651 profilerStartTime = -1;
4652 }
4653 }
4654 function recordEffectDuration() {
4655 if (0 <= profilerStartTime) {
4656 var endTime = now(), elapsedTime = endTime - profilerStartTime;
4657 profilerStartTime = -1;
4658 profilerEffectDuration += elapsedTime;
4659 componentEffectDuration += elapsedTime;
4660 componentEffectEndTime = endTime;
4661 }
4662 }
4663 function recordEffectError(errorInfo) {
4664 null === componentEffectErrors && (componentEffectErrors = []);
4665 componentEffectErrors.push(errorInfo);
4666 null === commitErrors && (commitErrors = []);
4667 commitErrors.push(errorInfo);
4668 }
4669 function startEffectTimer() {
4670 profilerStartTime = now();
4671 0 > componentEffectStartTime && (componentEffectStartTime = profilerStartTime);
4672 }
4673 function transferActualDuration(fiber) {
4674 for (var child = fiber.child; child; )
4675 fiber.actualDuration += child.actualDuration, child = child.sibling;
4676 }
4677 function entangleAsyncAction(transition, thenable) {
4678 if (null === currentEntangledListeners) {
4679 var entangledListeners = currentEntangledListeners = [];
4680 currentEntangledPendingCount = 0;
4681 currentEntangledLane = requestTransitionLane();
4682 currentEntangledActionThenable = {
4683 status: "pending",
4684 value: void 0,
4685 then: function(resolve) {
4686 entangledListeners.push(resolve);
4687 }
4688 };
4689 }
4690 currentEntangledPendingCount++;
4691 thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);
4692 return thenable;
4693 }
4694 function pingEngtangledActionScope() {
4695 if (0 === --currentEntangledPendingCount && (-1 < transitionUpdateTime || (transitionStartTime = -1.1), null !== currentEntangledListeners)) {
4696 null !== currentEntangledActionThenable && (currentEntangledActionThenable.status = "fulfilled");
4697 var listeners = currentEntangledListeners;
4698 currentEntangledListeners = null;
4699 currentEntangledLane = 0;
4700 currentEntangledActionThenable = null;
4701 for (var i = 0; i < listeners.length; i++) (0, listeners[i])();
4702 }
4703 }
4704 function chainThenableValue(thenable, result) {
4705 var listeners = [], thenableWithOverride = {
4706 status: "pending",
4707 value: null,
4708 reason: null,
4709 then: function(resolve) {
4710 listeners.push(resolve);
4711 }
4712 };
4713 thenable.then(
4714 function() {
4715 thenableWithOverride.status = "fulfilled";
4716 thenableWithOverride.value = result;
4717 for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);
4718 },
4719 function(error) {
4720 thenableWithOverride.status = "rejected";
4721 thenableWithOverride.reason = error;
4722 for (error = 0; error < listeners.length; error++)
4723 (0, listeners[error])(void 0);
4724 }
4725 );
4726 return thenableWithOverride;
4727 }
4728 function peekCacheFromPool() {
4729 var cacheResumedFromPreviousRender = resumedCache.current;
4730 return null !== cacheResumedFromPreviousRender ? cacheResumedFromPreviousRender : workInProgressRoot.pooledCache;
4731 }
4732 function pushTransition(offscreenWorkInProgress, prevCachePool) {
4733 null === prevCachePool ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress);
4734 }
4735 function getSuspendedCache() {
4736 var cacheFromPool = peekCacheFromPool();
4737 return null === cacheFromPool ? null : { parent: CacheContext._currentValue, pool: cacheFromPool };
4738 }
4739 function createThenableState() {
4740 return { didWarnAboutUncachedPromise: false, thenables: [] };
4741 }
4742 function isThenableResolved(thenable) {
4743 thenable = thenable.status;
4744 return "fulfilled" === thenable || "rejected" === thenable;
4745 }
4746 function trackUsedThenable(thenableState2, thenable, index) {
4747 null !== ReactSharedInternals.actQueue && (ReactSharedInternals.didUsePromise = true);
4748 var trackedThenables = thenableState2.thenables;
4749 index = trackedThenables[index];
4750 void 0 === index ? trackedThenables.push(thenable) : index !== thenable && (thenableState2.didWarnAboutUncachedPromise || (thenableState2.didWarnAboutUncachedPromise = true, console.error(
4751 "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework."
4752 )), thenable.then(noop$1, noop$1), thenable = index);
4753 if (void 0 === thenable._debugInfo) {
4754 thenableState2 = performance.now();
4755 trackedThenables = thenable.displayName;
4756 var ioInfo = {
4757 name: "string" === typeof trackedThenables ? trackedThenables : "Promise",
4758 start: thenableState2,
4759 end: thenableState2,
4760 value: thenable
4761 };
4762 thenable._debugInfo = [{ awaited: ioInfo }];
4763 "fulfilled" !== thenable.status && "rejected" !== thenable.status && (thenableState2 = function() {
4764 ioInfo.end = performance.now();
4765 }, thenable.then(thenableState2, thenableState2));
4766 }
4767 switch (thenable.status) {
4768 case "fulfilled":
4769 return thenable.value;
4770 case "rejected":
4771 throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
4772 default:
4773 if ("string" === typeof thenable.status)
4774 thenable.then(noop$1, noop$1);
4775 else {
4776 thenableState2 = workInProgressRoot;
4777 if (null !== thenableState2 && 100 < thenableState2.shellSuspendCounter)
4778 throw Error(
4779 "An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
4780 );
4781 thenableState2 = thenable;
4782 thenableState2.status = "pending";
4783 thenableState2.then(
4784 function(fulfilledValue) {
4785 if ("pending" === thenable.status) {
4786 var fulfilledThenable = thenable;
4787 fulfilledThenable.status = "fulfilled";
4788 fulfilledThenable.value = fulfilledValue;
4789 }
4790 },
4791 function(error) {
4792 if ("pending" === thenable.status) {
4793 var rejectedThenable = thenable;
4794 rejectedThenable.status = "rejected";
4795 rejectedThenable.reason = error;
4796 }
4797 }
4798 );
4799 }
4800 switch (thenable.status) {
4801 case "fulfilled":
4802 return thenable.value;
4803 case "rejected":
4804 throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
4805 }
4806 suspendedThenable = thenable;
4807 needsToResetSuspendedThenableDEV = true;
4808 throw SuspenseException;
4809 }
4810 }
4811 function resolveLazy(lazyType) {
4812 try {
4813 return callLazyInitInDEV(lazyType);
4814 } catch (x) {
4815 if (null !== x && "object" === typeof x && "function" === typeof x.then)
4816 throw suspendedThenable = x, needsToResetSuspendedThenableDEV = true, SuspenseException;
4817 throw x;
4818 }
4819 }
4820 function getSuspendedThenable() {
4821 if (null === suspendedThenable)
4822 throw Error(
4823 "Expected a suspended thenable. This is a bug in React. Please file an issue."
4824 );
4825 var thenable = suspendedThenable;
4826 suspendedThenable = null;
4827 needsToResetSuspendedThenableDEV = false;
4828 return thenable;
4829 }
4830 function checkIfUseWrappedInAsyncCatch(rejectedReason) {
4831 if (rejectedReason === SuspenseException || rejectedReason === SuspenseActionException)
4832 throw Error(
4833 "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
4834 );
4835 }
4836 function pushDebugInfo(debugInfo) {
4837 var previousDebugInfo = currentDebugInfo;
4838 null != debugInfo && (currentDebugInfo = null === previousDebugInfo ? debugInfo : previousDebugInfo.concat(debugInfo));
4839 return previousDebugInfo;
4840 }
4841 function getCurrentDebugTask() {
4842 var debugInfo = currentDebugInfo;
4843 if (null != debugInfo) {
4844 for (var i = debugInfo.length - 1; 0 <= i; i--)
4845 if (null != debugInfo[i].name) {
4846 var debugTask = debugInfo[i].debugTask;
4847 if (null != debugTask) return debugTask;
4848 }
4849 }
4850 return null;
4851 }
4852 function validateFragmentProps(element, fiber, returnFiber) {
4853 for (var keys = Object.keys(element.props), i = 0; i < keys.length; i++) {
4854 var key = keys[i];
4855 if ("children" !== key && "key" !== key) {
4856 null === fiber && (fiber = createFiberFromElement(element, returnFiber.mode, 0), fiber._debugInfo = currentDebugInfo, fiber.return = returnFiber);
4857 runWithFiberInDEV(
4858 fiber,
4859 function(erroredKey) {
4860 console.error(
4861 "Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
4862 erroredKey
4863 );
4864 },
4865 key
4866 );
4867 break;
4868 }
4869 }
4870 }
4871 function unwrapThenable(thenable) {
4872 var index = thenableIndexCounter$1;
4873 thenableIndexCounter$1 += 1;
4874 null === thenableState$1 && (thenableState$1 = createThenableState());
4875 return trackUsedThenable(thenableState$1, thenable, index);
4876 }
4877 function coerceRef(workInProgress2, element) {
4878 element = (element.props.ref ?? element.ref);
4879 workInProgress2.ref = void 0 !== element ? element : null;
4880 }
4881 function throwOnInvalidObjectTypeImpl(returnFiber, newChild) {
4882 if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)
4883 throw Error(
4884 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.'
4885 );
4886 returnFiber = Object.prototype.toString.call(newChild);
4887 throw Error(
4888 "Objects are not valid as a React child (found: " + ("[object Object]" === returnFiber ? "object with keys {" + Object.keys(newChild).join(", ") + "}" : returnFiber) + "). If you meant to render a collection of children, use an array instead."
4889 );
4890 }
4891 function throwOnInvalidObjectType(returnFiber, newChild) {
4892 var debugTask = getCurrentDebugTask();
4893 null !== debugTask ? debugTask.run(
4894 throwOnInvalidObjectTypeImpl.bind(null, returnFiber, newChild)
4895 ) : throwOnInvalidObjectTypeImpl(returnFiber, newChild);
4896 }
4897 function warnOnFunctionTypeImpl(returnFiber, invalidChild) {
4898 var parentName = getComponentNameFromFiber(returnFiber) || "Component";
4899 ownerHasFunctionTypeWarning[parentName] || (ownerHasFunctionTypeWarning[parentName] = true, invalidChild = invalidChild.displayName || invalidChild.name || "Component", 3 === returnFiber.tag ? console.error(
4900 "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n root.render(%s)",
4901 invalidChild,
4902 invalidChild,
4903 invalidChild
4904 ) : console.error(
4905 "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n <%s>{%s}</%s>",
4906 invalidChild,
4907 invalidChild,
4908 parentName,
4909 invalidChild,
4910 parentName
4911 ));
4912 }
4913 function warnOnFunctionType(returnFiber, invalidChild) {
4914 var debugTask = getCurrentDebugTask();
4915 null !== debugTask ? debugTask.run(
4916 warnOnFunctionTypeImpl.bind(null, returnFiber, invalidChild)
4917 ) : warnOnFunctionTypeImpl(returnFiber, invalidChild);
4918 }
4919 function warnOnSymbolTypeImpl(returnFiber, invalidChild) {
4920 var parentName = getComponentNameFromFiber(returnFiber) || "Component";
4921 ownerHasSymbolTypeWarning[parentName] || (ownerHasSymbolTypeWarning[parentName] = true, invalidChild = String(invalidChild), 3 === returnFiber.tag ? console.error(
4922 "Symbols are not valid as a React child.\n root.render(%s)",
4923 invalidChild
4924 ) : console.error(
4925 "Symbols are not valid as a React child.\n <%s>%s</%s>",
4926 parentName,
4927 invalidChild,
4928 parentName
4929 ));
4930 }
4931 function warnOnSymbolType(returnFiber, invalidChild) {
4932 var debugTask = getCurrentDebugTask();
4933 null !== debugTask ? debugTask.run(
4934 warnOnSymbolTypeImpl.bind(null, returnFiber, invalidChild)
4935 ) : warnOnSymbolTypeImpl(returnFiber, invalidChild);
4936 }
4937 function createChildReconciler(shouldTrackSideEffects) {
4938 function deleteChild(returnFiber, childToDelete) {
4939 if (shouldTrackSideEffects) {
4940 var deletions = returnFiber.deletions;
4941 null === deletions ? (returnFiber.deletions = [childToDelete], returnFiber.flags |= 16) : deletions.push(childToDelete);
4942 }
4943 }
4944 function deleteRemainingChildren(returnFiber, currentFirstChild) {
4945 if (!shouldTrackSideEffects) return null;
4946 for (; null !== currentFirstChild; )
4947 deleteChild(returnFiber, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
4948 return null;
4949 }
4950 function mapRemainingChildren(currentFirstChild) {
4951 for (var existingChildren = /* @__PURE__ */ new Map(); null !== currentFirstChild; )
4952 null !== currentFirstChild.key ? existingChildren.set(currentFirstChild.key, currentFirstChild) : existingChildren.set(currentFirstChild.index, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
4953 return existingChildren;
4954 }
4955 function useFiber(fiber, pendingProps) {
4956 fiber = createWorkInProgress(fiber, pendingProps);
4957 fiber.index = 0;
4958 fiber.sibling = null;
4959 return fiber;
4960 }
4961 function placeChild(newFiber, lastPlacedIndex, newIndex) {
4962 newFiber.index = newIndex;
4963 if (!shouldTrackSideEffects)
4964 return newFiber.flags |= 1048576, lastPlacedIndex;
4965 newIndex = newFiber.alternate;
4966 if (null !== newIndex)
4967 return newIndex = newIndex.index, newIndex < lastPlacedIndex ? (newFiber.flags |= 67108866, lastPlacedIndex) : newIndex;
4968 newFiber.flags |= 67108866;
4969 return lastPlacedIndex;
4970 }
4971 function placeSingleChild(newFiber) {
4972 shouldTrackSideEffects && null === newFiber.alternate && (newFiber.flags |= 67108866);
4973 return newFiber;
4974 }
4975 function updateTextNode(returnFiber, current2, textContent, lanes) {
4976 if (null === current2 || 6 !== current2.tag)
4977 return current2 = createFiberFromText(
4978 textContent,
4979 returnFiber.mode,
4980 lanes
4981 ), current2.return = returnFiber, current2._debugOwner = returnFiber, current2._debugTask = returnFiber._debugTask, current2._debugInfo = currentDebugInfo, current2;
4982 current2 = useFiber(current2, textContent);
4983 current2.return = returnFiber;
4984 current2._debugInfo = currentDebugInfo;
4985 return current2;
4986 }
4987 function updateElement(returnFiber, current2, element, lanes) {
4988 var elementType = element.type;
4989 if (elementType === REACT_FRAGMENT_TYPE)
4990 return current2 = updateFragment(
4991 returnFiber,
4992 current2,
4993 element.props.children,
4994 lanes,
4995 element.key
4996 ), validateFragmentProps(element, current2, returnFiber), current2;
4997 if (null !== current2 && (current2.elementType === elementType || isCompatibleFamilyForHotReloading(current2, element) || "object" === typeof elementType && null !== elementType && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current2.type))
4998 return current2 = useFiber(current2, element.props), coerceRef(current2, element), current2.return = returnFiber, current2._debugOwner = element._owner, current2._debugInfo = currentDebugInfo, current2;
4999 current2 = createFiberFromElement(element, returnFiber.mode, lanes);
5000 coerceRef(current2, element);
5001 current2.return = returnFiber;
5002 current2._debugInfo = currentDebugInfo;
5003 return current2;
5004 }
5005 function updatePortal(returnFiber, current2, portal, lanes) {
5006 if (null === current2 || 4 !== current2.tag || current2.stateNode.containerInfo !== portal.containerInfo || current2.stateNode.implementation !== portal.implementation)
5007 return current2 = createFiberFromPortal(portal, returnFiber.mode, lanes), current2.return = returnFiber, current2._debugInfo = currentDebugInfo, current2;
5008 current2 = useFiber(current2, portal.children || []);
5009 current2.return = returnFiber;
5010 current2._debugInfo = currentDebugInfo;
5011 return current2;
5012 }
5013 function updateFragment(returnFiber, current2, fragment, lanes, key) {
5014 if (null === current2 || 7 !== current2.tag)
5015 return current2 = createFiberFromFragment(
5016 fragment,
5017 returnFiber.mode,
5018 lanes,
5019 key
5020 ), current2.return = returnFiber, current2._debugOwner = returnFiber, current2._debugTask = returnFiber._debugTask, current2._debugInfo = currentDebugInfo, current2;
5021 current2 = useFiber(current2, fragment);
5022 current2.return = returnFiber;
5023 current2._debugInfo = currentDebugInfo;
5024 return current2;
5025 }
5026 function createChild(returnFiber, newChild, lanes) {
5027 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
5028 return newChild = createFiberFromText(
5029 "" + newChild,
5030 returnFiber.mode,
5031 lanes
5032 ), newChild.return = returnFiber, newChild._debugOwner = returnFiber, newChild._debugTask = returnFiber._debugTask, newChild._debugInfo = currentDebugInfo, newChild;
5033 if ("object" === typeof newChild && null !== newChild) {
5034 switch (newChild.$$typeof) {
5035 case REACT_LEGACY_ELEMENT_TYPE: case REACT_ELEMENT_TYPE:
5036 return lanes = createFiberFromElement(
5037 newChild,
5038 returnFiber.mode,
5039 lanes
5040 ), coerceRef(lanes, newChild), lanes.return = returnFiber, returnFiber = pushDebugInfo(newChild._debugInfo), lanes._debugInfo = currentDebugInfo, currentDebugInfo = returnFiber, lanes;
5041 case REACT_PORTAL_TYPE:
5042 return newChild = createFiberFromPortal(
5043 newChild,
5044 returnFiber.mode,
5045 lanes
5046 ), newChild.return = returnFiber, newChild._debugInfo = currentDebugInfo, newChild;
5047 case REACT_LAZY_TYPE:
5048 var _prevDebugInfo = pushDebugInfo(newChild._debugInfo);
5049 newChild = resolveLazy(newChild);
5050 returnFiber = createChild(returnFiber, newChild, lanes);
5051 currentDebugInfo = _prevDebugInfo;
5052 return returnFiber;
5053 }
5054 if (isArrayImpl(newChild) || getIteratorFn(newChild))
5055 return lanes = createFiberFromFragment(
5056 newChild,
5057 returnFiber.mode,
5058 lanes,
5059 null
5060 ), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, returnFiber = pushDebugInfo(newChild._debugInfo), lanes._debugInfo = currentDebugInfo, currentDebugInfo = returnFiber, lanes;
5061 if ("function" === typeof newChild.then)
5062 return _prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = createChild(
5063 returnFiber,
5064 unwrapThenable(newChild),
5065 lanes
5066 ), currentDebugInfo = _prevDebugInfo, returnFiber;
5067 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5068 return createChild(
5069 returnFiber,
5070 readContextDuringReconciliation(returnFiber, newChild),
5071 lanes
5072 );
5073 throwOnInvalidObjectType(returnFiber, newChild);
5074 }
5075 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
5076 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
5077 return null;
5078 }
5079 function updateSlot(returnFiber, oldFiber, newChild, lanes) {
5080 var key = null !== oldFiber ? oldFiber.key : null;
5081 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
5082 return null !== key ? null : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes);
5083 if ("object" === typeof newChild && null !== newChild) {
5084 switch (newChild.$$typeof) {
5085 case REACT_LEGACY_ELEMENT_TYPE: case REACT_ELEMENT_TYPE:
5086 return newChild.key === key ? (key = pushDebugInfo(newChild._debugInfo), returnFiber = updateElement(
5087 returnFiber,
5088 oldFiber,
5089 newChild,
5090 lanes
5091 ), currentDebugInfo = key, returnFiber) : null;
5092 case REACT_PORTAL_TYPE:
5093 return newChild.key === key ? updatePortal(returnFiber, oldFiber, newChild, lanes) : null;
5094 case REACT_LAZY_TYPE:
5095 return key = pushDebugInfo(newChild._debugInfo), newChild = resolveLazy(newChild), returnFiber = updateSlot(
5096 returnFiber,
5097 oldFiber,
5098 newChild,
5099 lanes
5100 ), currentDebugInfo = key, returnFiber;
5101 }
5102 if (isArrayImpl(newChild) || getIteratorFn(newChild)) {
5103 if (null !== key) return null;
5104 key = pushDebugInfo(newChild._debugInfo);
5105 returnFiber = updateFragment(
5106 returnFiber,
5107 oldFiber,
5108 newChild,
5109 lanes,
5110 null
5111 );
5112 currentDebugInfo = key;
5113 return returnFiber;
5114 }
5115 if ("function" === typeof newChild.then)
5116 return key = pushDebugInfo(newChild._debugInfo), returnFiber = updateSlot(
5117 returnFiber,
5118 oldFiber,
5119 unwrapThenable(newChild),
5120 lanes
5121 ), currentDebugInfo = key, returnFiber;
5122 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5123 return updateSlot(
5124 returnFiber,
5125 oldFiber,
5126 readContextDuringReconciliation(returnFiber, newChild),
5127 lanes
5128 );
5129 throwOnInvalidObjectType(returnFiber, newChild);
5130 }
5131 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
5132 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
5133 return null;
5134 }
5135 function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
5136 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
5137 return existingChildren = existingChildren.get(newIdx) || null, updateTextNode(returnFiber, existingChildren, "" + newChild, lanes);
5138 if ("object" === typeof newChild && null !== newChild) {
5139 switch (newChild.$$typeof) {
5140 case REACT_LEGACY_ELEMENT_TYPE: case REACT_ELEMENT_TYPE:
5141 return newIdx = existingChildren.get(
5142 null === newChild.key ? newIdx : newChild.key
5143 ) || null, existingChildren = pushDebugInfo(newChild._debugInfo), returnFiber = updateElement(
5144 returnFiber,
5145 newIdx,
5146 newChild,
5147 lanes
5148 ), currentDebugInfo = existingChildren, returnFiber;
5149 case REACT_PORTAL_TYPE:
5150 return existingChildren = existingChildren.get(
5151 null === newChild.key ? newIdx : newChild.key
5152 ) || null, updatePortal(returnFiber, existingChildren, newChild, lanes);
5153 case REACT_LAZY_TYPE:
5154 var _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo);
5155 newChild = resolveLazy(newChild);
5156 returnFiber = updateFromMap(
5157 existingChildren,
5158 returnFiber,
5159 newIdx,
5160 newChild,
5161 lanes
5162 );
5163 currentDebugInfo = _prevDebugInfo7;
5164 return returnFiber;
5165 }
5166 if (isArrayImpl(newChild) || getIteratorFn(newChild))
5167 return newIdx = existingChildren.get(newIdx) || null, existingChildren = pushDebugInfo(newChild._debugInfo), returnFiber = updateFragment(
5168 returnFiber,
5169 newIdx,
5170 newChild,
5171 lanes,
5172 null
5173 ), currentDebugInfo = existingChildren, returnFiber;
5174 if ("function" === typeof newChild.then)
5175 return _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo), returnFiber = updateFromMap(
5176 existingChildren,
5177 returnFiber,
5178 newIdx,
5179 unwrapThenable(newChild),
5180 lanes
5181 ), currentDebugInfo = _prevDebugInfo7, returnFiber;
5182 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5183 return updateFromMap(
5184 existingChildren,
5185 returnFiber,
5186 newIdx,
5187 readContextDuringReconciliation(returnFiber, newChild),
5188 lanes
5189 );
5190 throwOnInvalidObjectType(returnFiber, newChild);
5191 }
5192 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
5193 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
5194 return null;
5195 }
5196 function warnOnInvalidKey(returnFiber, workInProgress2, child, knownKeys) {
5197 if ("object" !== typeof child || null === child) return knownKeys;
5198 switch (child.$$typeof) {
5199 case REACT_LEGACY_ELEMENT_TYPE: case REACT_ELEMENT_TYPE:
5200 case REACT_PORTAL_TYPE:
5201 warnForMissingKey(returnFiber, workInProgress2, child);
5202 var key = child.key;
5203 if ("string" !== typeof key) break;
5204 if (null === knownKeys) {
5205 knownKeys = /* @__PURE__ */ new Set();
5206 knownKeys.add(key);
5207 break;
5208 }
5209 if (!knownKeys.has(key)) {
5210 knownKeys.add(key);
5211 break;
5212 }
5213 runWithFiberInDEV(workInProgress2, function() {
5214 console.error(
5215 "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 \u2014 the behavior is unsupported and could change in a future version.",
5216 key
5217 );
5218 });
5219 break;
5220 case REACT_LAZY_TYPE:
5221 child = resolveLazy(child), warnOnInvalidKey(returnFiber, workInProgress2, child, knownKeys);
5222 }
5223 return knownKeys;
5224 }
5225 function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
5226 for (var knownKeys = null, resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null; null !== oldFiber && newIdx < newChildren.length; newIdx++) {
5227 oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
5228 var newFiber = updateSlot(
5229 returnFiber,
5230 oldFiber,
5231 newChildren[newIdx],
5232 lanes
5233 );
5234 if (null === newFiber) {
5235 null === oldFiber && (oldFiber = nextOldFiber);
5236 break;
5237 }
5238 knownKeys = warnOnInvalidKey(
5239 returnFiber,
5240 newFiber,
5241 newChildren[newIdx],
5242 knownKeys
5243 );
5244 shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
5245 currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
5246 null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber;
5247 previousNewFiber = newFiber;
5248 oldFiber = nextOldFiber;
5249 }
5250 if (newIdx === newChildren.length)
5251 return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
5252 if (null === oldFiber) {
5253 for (; newIdx < newChildren.length; newIdx++)
5254 oldFiber = createChild(returnFiber, newChildren[newIdx], lanes), null !== oldFiber && (knownKeys = warnOnInvalidKey(
5255 returnFiber,
5256 oldFiber,
5257 newChildren[newIdx],
5258 knownKeys
5259 ), currentFirstChild = placeChild(
5260 oldFiber,
5261 currentFirstChild,
5262 newIdx
5263 ), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber);
5264 isHydrating && pushTreeFork(returnFiber, newIdx);
5265 return resultingFirstChild;
5266 }
5267 for (oldFiber = mapRemainingChildren(oldFiber); newIdx < newChildren.length; newIdx++)
5268 nextOldFiber = updateFromMap(
5269 oldFiber,
5270 returnFiber,
5271 newIdx,
5272 newChildren[newIdx],
5273 lanes
5274 ), null !== nextOldFiber && (knownKeys = warnOnInvalidKey(
5275 returnFiber,
5276 nextOldFiber,
5277 newChildren[newIdx],
5278 knownKeys
5279 ), shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete(
5280 null === nextOldFiber.key ? newIdx : nextOldFiber.key
5281 ), currentFirstChild = placeChild(
5282 nextOldFiber,
5283 currentFirstChild,
5284 newIdx
5285 ), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber);
5286 shouldTrackSideEffects && oldFiber.forEach(function(child) {
5287 return deleteChild(returnFiber, child);
5288 });
5289 isHydrating && pushTreeFork(returnFiber, newIdx);
5290 return resultingFirstChild;
5291 }
5292 function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes) {
5293 if (null == newChildren)
5294 throw Error("An iterable object provided no iterator.");
5295 for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null, knownKeys = null, step = newChildren.next(); null !== oldFiber && !step.done; newIdx++, step = newChildren.next()) {
5296 oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
5297 var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
5298 if (null === newFiber) {
5299 null === oldFiber && (oldFiber = nextOldFiber);
5300 break;
5301 }
5302 knownKeys = warnOnInvalidKey(
5303 returnFiber,
5304 newFiber,
5305 step.value,
5306 knownKeys
5307 );
5308 shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
5309 currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
5310 null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber;
5311 previousNewFiber = newFiber;
5312 oldFiber = nextOldFiber;
5313 }
5314 if (step.done)
5315 return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
5316 if (null === oldFiber) {
5317 for (; !step.done; newIdx++, step = newChildren.next())
5318 oldFiber = createChild(returnFiber, step.value, lanes), null !== oldFiber && (knownKeys = warnOnInvalidKey(
5319 returnFiber,
5320 oldFiber,
5321 step.value,
5322 knownKeys
5323 ), currentFirstChild = placeChild(
5324 oldFiber,
5325 currentFirstChild,
5326 newIdx
5327 ), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber);
5328 isHydrating && pushTreeFork(returnFiber, newIdx);
5329 return resultingFirstChild;
5330 }
5331 for (oldFiber = mapRemainingChildren(oldFiber); !step.done; newIdx++, step = newChildren.next())
5332 nextOldFiber = updateFromMap(
5333 oldFiber,
5334 returnFiber,
5335 newIdx,
5336 step.value,
5337 lanes
5338 ), null !== nextOldFiber && (knownKeys = warnOnInvalidKey(
5339 returnFiber,
5340 nextOldFiber,
5341 step.value,
5342 knownKeys
5343 ), shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete(
5344 null === nextOldFiber.key ? newIdx : nextOldFiber.key
5345 ), currentFirstChild = placeChild(
5346 nextOldFiber,
5347 currentFirstChild,
5348 newIdx
5349 ), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber);
5350 shouldTrackSideEffects && oldFiber.forEach(function(child) {
5351 return deleteChild(returnFiber, child);
5352 });
5353 isHydrating && pushTreeFork(returnFiber, newIdx);
5354 return resultingFirstChild;
5355 }
5356 function reconcileChildFibersImpl(returnFiber, currentFirstChild, newChild, lanes) {
5357 "object" === typeof newChild && null !== newChild && newChild.type === REACT_FRAGMENT_TYPE && null === newChild.key && (validateFragmentProps(newChild, null, returnFiber), newChild = newChild.props.children);
5358 if ("object" === typeof newChild && null !== newChild) {
5359 switch (newChild.$$typeof) {
5360 case REACT_LEGACY_ELEMENT_TYPE: case REACT_ELEMENT_TYPE:
5361 var prevDebugInfo = pushDebugInfo(newChild._debugInfo);
5362 a: {
5363 for (var key = newChild.key; null !== currentFirstChild; ) {
5364 if (currentFirstChild.key === key) {
5365 key = newChild.type;
5366 if (key === REACT_FRAGMENT_TYPE) {
5367 if (7 === currentFirstChild.tag) {
5368 deleteRemainingChildren(
5369 returnFiber,
5370 currentFirstChild.sibling
5371 );
5372 lanes = useFiber(
5373 currentFirstChild,
5374 newChild.props.children
5375 );
5376 lanes.return = returnFiber;
5377 lanes._debugOwner = newChild._owner;
5378 lanes._debugInfo = currentDebugInfo;
5379 validateFragmentProps(newChild, lanes, returnFiber);
5380 returnFiber = lanes;
5381 break a;
5382 }
5383 } else if (currentFirstChild.elementType === key || isCompatibleFamilyForHotReloading(
5384 currentFirstChild,
5385 newChild
5386 ) || "object" === typeof key && null !== key && key.$$typeof === REACT_LAZY_TYPE && resolveLazy(key) === currentFirstChild.type) {
5387 deleteRemainingChildren(
5388 returnFiber,
5389 currentFirstChild.sibling
5390 );
5391 lanes = useFiber(currentFirstChild, newChild.props);
5392 coerceRef(lanes, newChild);
5393 lanes.return = returnFiber;
5394 lanes._debugOwner = newChild._owner;
5395 lanes._debugInfo = currentDebugInfo;
5396 returnFiber = lanes;
5397 break a;
5398 }
5399 deleteRemainingChildren(returnFiber, currentFirstChild);
5400 break;
5401 } else deleteChild(returnFiber, currentFirstChild);
5402 currentFirstChild = currentFirstChild.sibling;
5403 }
5404 newChild.type === REACT_FRAGMENT_TYPE ? (lanes = createFiberFromFragment(
5405 newChild.props.children,
5406 returnFiber.mode,
5407 lanes,
5408 newChild.key
5409 ), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, lanes._debugInfo = currentDebugInfo, validateFragmentProps(newChild, lanes, returnFiber), returnFiber = lanes) : (lanes = createFiberFromElement(
5410 newChild,
5411 returnFiber.mode,
5412 lanes
5413 ), coerceRef(lanes, newChild), lanes.return = returnFiber, lanes._debugInfo = currentDebugInfo, returnFiber = lanes);
5414 }
5415 returnFiber = placeSingleChild(returnFiber);
5416 currentDebugInfo = prevDebugInfo;
5417 return returnFiber;
5418 case REACT_PORTAL_TYPE:
5419 a: {
5420 prevDebugInfo = newChild;
5421 for (newChild = prevDebugInfo.key; null !== currentFirstChild; ) {
5422 if (currentFirstChild.key === newChild)
5423 if (4 === currentFirstChild.tag && currentFirstChild.stateNode.containerInfo === prevDebugInfo.containerInfo && currentFirstChild.stateNode.implementation === prevDebugInfo.implementation) {
5424 deleteRemainingChildren(
5425 returnFiber,
5426 currentFirstChild.sibling
5427 );
5428 lanes = useFiber(
5429 currentFirstChild,
5430 prevDebugInfo.children || []
5431 );
5432 lanes.return = returnFiber;
5433 returnFiber = lanes;
5434 break a;
5435 } else {
5436 deleteRemainingChildren(returnFiber, currentFirstChild);
5437 break;
5438 }
5439 else deleteChild(returnFiber, currentFirstChild);
5440 currentFirstChild = currentFirstChild.sibling;
5441 }
5442 lanes = createFiberFromPortal(
5443 prevDebugInfo,
5444 returnFiber.mode,
5445 lanes
5446 );
5447 lanes.return = returnFiber;
5448 returnFiber = lanes;
5449 }
5450 return placeSingleChild(returnFiber);
5451 case REACT_LAZY_TYPE:
5452 return prevDebugInfo = pushDebugInfo(newChild._debugInfo), newChild = resolveLazy(newChild), returnFiber = reconcileChildFibersImpl(
5453 returnFiber,
5454 currentFirstChild,
5455 newChild,
5456 lanes
5457 ), currentDebugInfo = prevDebugInfo, returnFiber;
5458 }
5459 if (isArrayImpl(newChild))
5460 return prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = reconcileChildrenArray(
5461 returnFiber,
5462 currentFirstChild,
5463 newChild,
5464 lanes
5465 ), currentDebugInfo = prevDebugInfo, returnFiber;
5466 if (getIteratorFn(newChild)) {
5467 prevDebugInfo = pushDebugInfo(newChild._debugInfo);
5468 key = getIteratorFn(newChild);
5469 if ("function" !== typeof key)
5470 throw Error(
5471 "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."
5472 );
5473 var newChildren = key.call(newChild);
5474 if (newChildren === newChild) {
5475 if (0 !== returnFiber.tag || "[object GeneratorFunction]" !== Object.prototype.toString.call(returnFiber.type) || "[object Generator]" !== Object.prototype.toString.call(newChildren))
5476 didWarnAboutGenerators || console.error(
5477 "Using Iterators 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. You can also use an Iterable that can iterate multiple times over the same items."
5478 ), didWarnAboutGenerators = true;
5479 } else
5480 newChild.entries !== key || didWarnAboutMaps || (console.error(
5481 "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
5482 ), didWarnAboutMaps = true);
5483 returnFiber = reconcileChildrenIterator(
5484 returnFiber,
5485 currentFirstChild,
5486 newChildren,
5487 lanes
5488 );
5489 currentDebugInfo = prevDebugInfo;
5490 return returnFiber;
5491 }
5492 if ("function" === typeof newChild.then)
5493 return prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = reconcileChildFibersImpl(
5494 returnFiber,
5495 currentFirstChild,
5496 unwrapThenable(newChild),
5497 lanes
5498 ), currentDebugInfo = prevDebugInfo, returnFiber;
5499 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5500 return reconcileChildFibersImpl(
5501 returnFiber,
5502 currentFirstChild,
5503 readContextDuringReconciliation(returnFiber, newChild),
5504 lanes
5505 );
5506 throwOnInvalidObjectType(returnFiber, newChild);
5507 }
5508 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
5509 return prevDebugInfo = "" + newChild, null !== currentFirstChild && 6 === currentFirstChild.tag ? (deleteRemainingChildren(
5510 returnFiber,
5511 currentFirstChild.sibling
5512 ), lanes = useFiber(currentFirstChild, prevDebugInfo), lanes.return = returnFiber, returnFiber = lanes) : (deleteRemainingChildren(returnFiber, currentFirstChild), lanes = createFiberFromText(
5513 prevDebugInfo,
5514 returnFiber.mode,
5515 lanes
5516 ), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, lanes._debugInfo = currentDebugInfo, returnFiber = lanes), placeSingleChild(returnFiber);
5517 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
5518 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
5519 return deleteRemainingChildren(returnFiber, currentFirstChild);
5520 }
5521 return function(returnFiber, currentFirstChild, newChild, lanes) {
5522 var prevDebugInfo = currentDebugInfo;
5523 currentDebugInfo = null;
5524 try {
5525 thenableIndexCounter$1 = 0;
5526 var firstChildFiber = reconcileChildFibersImpl(
5527 returnFiber,
5528 currentFirstChild,
5529 newChild,
5530 lanes
5531 );
5532 thenableState$1 = null;
5533 return firstChildFiber;
5534 } catch (x) {
5535 if (x === SuspenseException || x === SuspenseActionException) throw x;
5536 var fiber = createFiber(29, x, null, returnFiber.mode);
5537 fiber.lanes = lanes;
5538 fiber.return = returnFiber;
5539 var debugInfo = fiber._debugInfo = currentDebugInfo;
5540 fiber._debugOwner = returnFiber._debugOwner;
5541 fiber._debugTask = returnFiber._debugTask;
5542 if (null != debugInfo) {
5543 for (var i = debugInfo.length - 1; 0 <= i; i--)
5544 if ("string" === typeof debugInfo[i].stack) {
5545 fiber._debugOwner = debugInfo[i];
5546 fiber._debugTask = debugInfo[i].debugTask;
5547 break;
5548 }
5549 }
5550 return fiber;
5551 } finally {
5552 currentDebugInfo = prevDebugInfo;
5553 }
5554 };
5555 }
5556 function validateSuspenseListNestedChild(childSlot, index) {
5557 var isAnArray = isArrayImpl(childSlot);
5558 childSlot = !isAnArray && "function" === typeof getIteratorFn(childSlot);
5559 return isAnArray || childSlot ? (isAnArray = isAnArray ? "array" : "iterable", console.error(
5560 "A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",
5561 isAnArray,
5562 index,
5563 isAnArray
5564 ), false) : true;
5565 }
5566 function initializeUpdateQueue(fiber) {
5567 fiber.updateQueue = {
5568 baseState: fiber.memoizedState,
5569 firstBaseUpdate: null,
5570 lastBaseUpdate: null,
5571 shared: { pending: null, lanes: 0, hiddenCallbacks: null },
5572 callbacks: null
5573 };
5574 }
5575 function cloneUpdateQueue(current2, workInProgress2) {
5576 current2 = current2.updateQueue;
5577 workInProgress2.updateQueue === current2 && (workInProgress2.updateQueue = {
5578 baseState: current2.baseState,
5579 firstBaseUpdate: current2.firstBaseUpdate,
5580 lastBaseUpdate: current2.lastBaseUpdate,
5581 shared: current2.shared,
5582 callbacks: null
5583 });
5584 }
5585 function createUpdate(lane) {
5586 return {
5587 lane,
5588 tag: UpdateState,
5589 payload: null,
5590 callback: null,
5591 next: null
5592 };
5593 }
5594 function enqueueUpdate(fiber, update, lane) {
5595 var updateQueue = fiber.updateQueue;
5596 if (null === updateQueue) return null;
5597 updateQueue = updateQueue.shared;
5598 if (currentlyProcessingQueue === updateQueue && !didWarnUpdateInsideUpdate) {
5599 var componentName2 = getComponentNameFromFiber(fiber);
5600 console.error(
5601 "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.\n\nPlease update the following component: %s",
5602 componentName2
5603 );
5604 didWarnUpdateInsideUpdate = true;
5605 }
5606 if ((executionContext & RenderContext) !== NoContext)
5607 return componentName2 = updateQueue.pending, null === componentName2 ? update.next = update : (update.next = componentName2.next, componentName2.next = update), updateQueue.pending = update, update = getRootForUpdatedFiber(fiber), markUpdateLaneFromFiberToRoot(fiber, null, lane), update;
5608 enqueueUpdate$1(fiber, updateQueue, update, lane);
5609 return getRootForUpdatedFiber(fiber);
5610 }
5611 function entangleTransitions(root2, fiber, lane) {
5612 fiber = fiber.updateQueue;
5613 if (null !== fiber && (fiber = fiber.shared, 0 !== (lane & 4194048))) {
5614 var queueLanes = fiber.lanes;
5615 queueLanes &= root2.pendingLanes;
5616 lane |= queueLanes;
5617 fiber.lanes = lane;
5618 markRootEntangled(root2, lane);
5619 }
5620 }
5621 function enqueueCapturedUpdate(workInProgress2, capturedUpdate) {
5622 var queue = workInProgress2.updateQueue, current2 = workInProgress2.alternate;
5623 if (null !== current2 && (current2 = current2.updateQueue, queue === current2)) {
5624 var newFirst = null, newLast = null;
5625 queue = queue.firstBaseUpdate;
5626 if (null !== queue) {
5627 do {
5628 var clone = {
5629 lane: queue.lane,
5630 tag: queue.tag,
5631 payload: queue.payload,
5632 callback: null,
5633 next: null
5634 };
5635 null === newLast ? newFirst = newLast = clone : newLast = newLast.next = clone;
5636 queue = queue.next;
5637 } while (null !== queue);
5638 null === newLast ? newFirst = newLast = capturedUpdate : newLast = newLast.next = capturedUpdate;
5639 } else newFirst = newLast = capturedUpdate;
5640 queue = {
5641 baseState: current2.baseState,
5642 firstBaseUpdate: newFirst,
5643 lastBaseUpdate: newLast,
5644 shared: current2.shared,
5645 callbacks: current2.callbacks
5646 };
5647 workInProgress2.updateQueue = queue;
5648 return;
5649 }
5650 workInProgress2 = queue.lastBaseUpdate;
5651 null === workInProgress2 ? queue.firstBaseUpdate = capturedUpdate : workInProgress2.next = capturedUpdate;
5652 queue.lastBaseUpdate = capturedUpdate;
5653 }
5654 function suspendIfUpdateReadFromEntangledAsyncAction() {
5655 if (didReadFromEntangledAsyncAction) {
5656 var entangledActionThenable = currentEntangledActionThenable;
5657 if (null !== entangledActionThenable) throw entangledActionThenable;
5658 }
5659 }
5660 function processUpdateQueue(workInProgress2, props, instance$jscomp$0, renderLanes2) {
5661 didReadFromEntangledAsyncAction = false;
5662 var queue = workInProgress2.updateQueue;
5663 hasForceUpdate = false;
5664 currentlyProcessingQueue = queue.shared;
5665 var firstBaseUpdate = queue.firstBaseUpdate, lastBaseUpdate = queue.lastBaseUpdate, pendingQueue = queue.shared.pending;
5666 if (null !== pendingQueue) {
5667 queue.shared.pending = null;
5668 var lastPendingUpdate = pendingQueue, firstPendingUpdate = lastPendingUpdate.next;
5669 lastPendingUpdate.next = null;
5670 null === lastBaseUpdate ? firstBaseUpdate = firstPendingUpdate : lastBaseUpdate.next = firstPendingUpdate;
5671 lastBaseUpdate = lastPendingUpdate;
5672 var current2 = workInProgress2.alternate;
5673 null !== current2 && (current2 = current2.updateQueue, pendingQueue = current2.lastBaseUpdate, pendingQueue !== lastBaseUpdate && (null === pendingQueue ? current2.firstBaseUpdate = firstPendingUpdate : pendingQueue.next = firstPendingUpdate, current2.lastBaseUpdate = lastPendingUpdate));
5674 }
5675 if (null !== firstBaseUpdate) {
5676 var newState = queue.baseState;
5677 lastBaseUpdate = 0;
5678 current2 = firstPendingUpdate = lastPendingUpdate = null;
5679 pendingQueue = firstBaseUpdate;
5680 do {
5681 var updateLane = pendingQueue.lane & -536870913, isHiddenUpdate = updateLane !== pendingQueue.lane;
5682 if (isHiddenUpdate ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes2 & updateLane) === updateLane) {
5683 0 !== updateLane && updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction = true);
5684 null !== current2 && (current2 = current2.next = {
5685 lane: 0,
5686 tag: pendingQueue.tag,
5687 payload: pendingQueue.payload,
5688 callback: null,
5689 next: null
5690 });
5691 a: {
5692 updateLane = workInProgress2;
5693 var partialState = pendingQueue;
5694 var nextProps = props, instance = instance$jscomp$0;
5695 switch (partialState.tag) {
5696 case ReplaceState:
5697 partialState = partialState.payload;
5698 if ("function" === typeof partialState) {
5699 isDisallowedContextReadInDEV = true;
5700 var nextState = partialState.call(
5701 instance,
5702 newState,
5703 nextProps
5704 );
5705 if (updateLane.mode & StrictLegacyMode) {
5706 setIsStrictModeForDevtools(true);
5707 try {
5708 partialState.call(instance, newState, nextProps);
5709 } finally {
5710 setIsStrictModeForDevtools(false);
5711 }
5712 }
5713 isDisallowedContextReadInDEV = false;
5714 newState = nextState;
5715 break a;
5716 }
5717 newState = partialState;
5718 break a;
5719 case CaptureUpdate:
5720 updateLane.flags = updateLane.flags & -65537 | 128;
5721 case UpdateState:
5722 nextState = partialState.payload;
5723 if ("function" === typeof nextState) {
5724 isDisallowedContextReadInDEV = true;
5725 partialState = nextState.call(
5726 instance,
5727 newState,
5728 nextProps
5729 );
5730 if (updateLane.mode & StrictLegacyMode) {
5731 setIsStrictModeForDevtools(true);
5732 try {
5733 nextState.call(instance, newState, nextProps);
5734 } finally {
5735 setIsStrictModeForDevtools(false);
5736 }
5737 }
5738 isDisallowedContextReadInDEV = false;
5739 } else partialState = nextState;
5740 if (null === partialState || void 0 === partialState) break a;
5741 newState = assign({}, newState, partialState);
5742 break a;
5743 case ForceUpdate:
5744 hasForceUpdate = true;
5745 }
5746 }
5747 updateLane = pendingQueue.callback;
5748 null !== updateLane && (workInProgress2.flags |= 64, isHiddenUpdate && (workInProgress2.flags |= 8192), isHiddenUpdate = queue.callbacks, null === isHiddenUpdate ? queue.callbacks = [updateLane] : isHiddenUpdate.push(updateLane));
5749 } else
5750 isHiddenUpdate = {
5751 lane: updateLane,
5752 tag: pendingQueue.tag,
5753 payload: pendingQueue.payload,
5754 callback: pendingQueue.callback,
5755 next: null
5756 }, null === current2 ? (firstPendingUpdate = current2 = isHiddenUpdate, lastPendingUpdate = newState) : current2 = current2.next = isHiddenUpdate, lastBaseUpdate |= updateLane;
5757 pendingQueue = pendingQueue.next;
5758 if (null === pendingQueue)
5759 if (pendingQueue = queue.shared.pending, null === pendingQueue)
5760 break;
5761 else
5762 isHiddenUpdate = pendingQueue, pendingQueue = isHiddenUpdate.next, isHiddenUpdate.next = null, queue.lastBaseUpdate = isHiddenUpdate, queue.shared.pending = null;
5763 } while (1);
5764 null === current2 && (lastPendingUpdate = newState);
5765 queue.baseState = lastPendingUpdate;
5766 queue.firstBaseUpdate = firstPendingUpdate;
5767 queue.lastBaseUpdate = current2;
5768 null === firstBaseUpdate && (queue.shared.lanes = 0);
5769 workInProgressRootSkippedLanes |= lastBaseUpdate;
5770 workInProgress2.lanes = lastBaseUpdate;
5771 workInProgress2.memoizedState = newState;
5772 }
5773 currentlyProcessingQueue = null;
5774 }
5775 function callCallback(callback, context) {
5776 if ("function" !== typeof callback)
5777 throw Error(
5778 "Invalid argument passed as callback. Expected a function. Instead received: " + callback
5779 );
5780 callback.call(context);
5781 }
5782 function commitHiddenCallbacks(updateQueue, context) {
5783 var hiddenCallbacks = updateQueue.shared.hiddenCallbacks;
5784 if (null !== hiddenCallbacks)
5785 for (updateQueue.shared.hiddenCallbacks = null, updateQueue = 0; updateQueue < hiddenCallbacks.length; updateQueue++)
5786 callCallback(hiddenCallbacks[updateQueue], context);
5787 }
5788 function commitCallbacks(updateQueue, context) {
5789 var callbacks = updateQueue.callbacks;
5790 if (null !== callbacks)
5791 for (updateQueue.callbacks = null, updateQueue = 0; updateQueue < callbacks.length; updateQueue++)
5792 callCallback(callbacks[updateQueue], context);
5793 }
5794 function pushHiddenContext(fiber, context) {
5795 var prevEntangledRenderLanes = entangledRenderLanes;
5796 push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber);
5797 push(currentTreeHiddenStackCursor, context, fiber);
5798 entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes;
5799 }
5800 function reuseHiddenContextOnStack(fiber) {
5801 push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber);
5802 push(
5803 currentTreeHiddenStackCursor,
5804 currentTreeHiddenStackCursor.current,
5805 fiber
5806 );
5807 }
5808 function popHiddenContext(fiber) {
5809 entangledRenderLanes = prevEntangledRenderLanesCursor.current;
5810 pop(currentTreeHiddenStackCursor, fiber);
5811 pop(prevEntangledRenderLanesCursor, fiber);
5812 }
5813 function pushPrimaryTreeSuspenseHandler(handler) {
5814 var current2 = handler.alternate;
5815 push(
5816 suspenseStackCursor,
5817 suspenseStackCursor.current & SubtreeSuspenseContextMask,
5818 handler
5819 );
5820 push(suspenseHandlerStackCursor, handler, handler);
5821 null === shellBoundary && (null === current2 || null !== currentTreeHiddenStackCursor.current ? shellBoundary = handler : null !== current2.memoizedState && (shellBoundary = handler));
5822 }
5823 function pushDehydratedActivitySuspenseHandler(fiber) {
5824 push(suspenseStackCursor, suspenseStackCursor.current, fiber);
5825 push(suspenseHandlerStackCursor, fiber, fiber);
5826 null === shellBoundary && (shellBoundary = fiber);
5827 }
5828 function pushOffscreenSuspenseHandler(fiber) {
5829 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), push(suspenseHandlerStackCursor, fiber, fiber), null === shellBoundary && (shellBoundary = fiber)) : reuseSuspenseHandlerOnStack(fiber);
5830 }
5831 function reuseSuspenseHandlerOnStack(fiber) {
5832 push(suspenseStackCursor, suspenseStackCursor.current, fiber);
5833 push(
5834 suspenseHandlerStackCursor,
5835 suspenseHandlerStackCursor.current,
5836 fiber
5837 );
5838 }
5839 function popSuspenseHandler(fiber) {
5840 pop(suspenseHandlerStackCursor, fiber);
5841 shellBoundary === fiber && (shellBoundary = null);
5842 pop(suspenseStackCursor, fiber);
5843 }
5844 function findFirstSuspended(row) {
5845 for (var node = row; null !== node; ) {
5846 if (13 === node.tag) {
5847 var state = node.memoizedState;
5848 if (null !== state && (state = state.dehydrated, null === state || isSuspenseInstancePending(state) || isSuspenseInstanceFallback(state)))
5849 return node;
5850 } else if (19 === node.tag && ("forwards" === node.memoizedProps.revealOrder || "backwards" === node.memoizedProps.revealOrder || "unstable_legacy-backwards" === node.memoizedProps.revealOrder || "together" === node.memoizedProps.revealOrder)) {
5851 if (0 !== (node.flags & 128)) return node;
5852 } else if (null !== node.child) {
5853 node.child.return = node;
5854 node = node.child;
5855 continue;
5856 }
5857 if (node === row) break;
5858 for (; null === node.sibling; ) {
5859 if (null === node.return || node.return === row) return null;
5860 node = node.return;
5861 }
5862 node.sibling.return = node.return;
5863 node = node.sibling;
5864 }
5865 return null;
5866 }
5867 function mountHookTypesDev() {
5868 var hookName = currentHookNameInDev;
5869 null === hookTypesDev ? hookTypesDev = [hookName] : hookTypesDev.push(hookName);
5870 }
5871 function updateHookTypesDev() {
5872 var hookName = currentHookNameInDev;
5873 if (null !== hookTypesDev && (hookTypesUpdateIndexDev++, hookTypesDev[hookTypesUpdateIndexDev] !== hookName)) {
5874 var componentName2 = getComponentNameFromFiber(currentlyRenderingFiber);
5875 if (!didWarnAboutMismatchedHooksForComponent.has(componentName2) && (didWarnAboutMismatchedHooksForComponent.add(componentName2), null !== hookTypesDev)) {
5876 for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) {
5877 var oldHookName = hookTypesDev[i], newHookName = i === hookTypesUpdateIndexDev ? hookName : oldHookName;
5878 for (oldHookName = i + 1 + ". " + oldHookName; 30 > oldHookName.length; )
5879 oldHookName += " ";
5880 oldHookName += newHookName + "\n";
5881 table += oldHookName;
5882 }
5883 console.error(
5884 "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
5885 componentName2,
5886 table
5887 );
5888 }
5889 }
5890 }
5891 function checkDepsAreArrayDev(deps) {
5892 void 0 === deps || null === deps || isArrayImpl(deps) || console.error(
5893 "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",
5894 currentHookNameInDev,
5895 typeof deps
5896 );
5897 }
5898 function warnOnUseFormStateInDev() {
5899 var componentName2 = getComponentNameFromFiber(currentlyRenderingFiber);
5900 didWarnAboutUseFormState.has(componentName2) || (didWarnAboutUseFormState.add(componentName2), console.error(
5901 "ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",
5902 componentName2
5903 ));
5904 }
5905 function throwInvalidHookError() {
5906 throw Error(
5907 "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
5908 );
5909 }
5910 function areHookInputsEqual(nextDeps, prevDeps) {
5911 if (ignorePreviousDependencies) return false;
5912 if (null === prevDeps)
5913 return console.error(
5914 "%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",
5915 currentHookNameInDev
5916 ), false;
5917 nextDeps.length !== prevDeps.length && console.error(
5918 "The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s",
5919 currentHookNameInDev,
5920 "[" + prevDeps.join(", ") + "]",
5921 "[" + nextDeps.join(", ") + "]"
5922 );
5923 for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
5924 if (!objectIs(nextDeps[i], prevDeps[i])) return false;
5925 return true;
5926 }
5927 function renderWithHooks(current2, workInProgress2, Component, props, secondArg, nextRenderLanes) {
5928 renderLanes = nextRenderLanes;
5929 currentlyRenderingFiber = workInProgress2;
5930 hookTypesDev = null !== current2 ? current2._debugHookTypes : null;
5931 hookTypesUpdateIndexDev = -1;
5932 ignorePreviousDependencies = null !== current2 && current2.type !== workInProgress2.type;
5933 if ("[object AsyncFunction]" === Object.prototype.toString.call(Component) || "[object AsyncGeneratorFunction]" === Object.prototype.toString.call(Component))
5934 nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), console.error(
5935 "%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",
5936 null === nextRenderLanes ? "An unknown Component" : "<" + nextRenderLanes + ">"
5937 ));
5938 workInProgress2.memoizedState = null;
5939 workInProgress2.updateQueue = null;
5940 workInProgress2.lanes = 0;
5941 ReactSharedInternals.H = null !== current2 && null !== current2.memoizedState ? HooksDispatcherOnUpdateInDEV : null !== hookTypesDev ? HooksDispatcherOnMountWithHookTypesInDEV : HooksDispatcherOnMountInDEV;
5942 shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes = (workInProgress2.mode & StrictLegacyMode) !== NoMode;
5943 var children = callComponentInDEV(Component, props, secondArg);
5944 shouldDoubleInvokeUserFnsInHooksDEV = false;
5945 didScheduleRenderPhaseUpdateDuringThisPass && (children = renderWithHooksAgain(
5946 workInProgress2,
5947 Component,
5948 props,
5949 secondArg
5950 ));
5951 if (nextRenderLanes) {
5952 setIsStrictModeForDevtools(true);
5953 try {
5954 children = renderWithHooksAgain(
5955 workInProgress2,
5956 Component,
5957 props,
5958 secondArg
5959 );
5960 } finally {
5961 setIsStrictModeForDevtools(false);
5962 }
5963 }
5964 finishRenderingHooks(current2, workInProgress2);
5965 return children;
5966 }
5967 function finishRenderingHooks(current2, workInProgress2) {
5968 workInProgress2._debugHookTypes = hookTypesDev;
5969 null === workInProgress2.dependencies ? null !== thenableState && (workInProgress2.dependencies = {
5970 lanes: 0,
5971 firstContext: null,
5972 _debugThenableState: thenableState
5973 }) : workInProgress2.dependencies._debugThenableState = thenableState;
5974 ReactSharedInternals.H = ContextOnlyDispatcher;
5975 var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
5976 renderLanes = 0;
5977 hookTypesDev = currentHookNameInDev = workInProgressHook = currentHook = currentlyRenderingFiber = null;
5978 hookTypesUpdateIndexDev = -1;
5979 null !== current2 && (current2.flags & 65011712) !== (workInProgress2.flags & 65011712) && console.error(
5980 "Internal React error: Expected static flag was missing. Please notify the React team."
5981 );
5982 didScheduleRenderPhaseUpdate = false;
5983 thenableIndexCounter = 0;
5984 thenableState = null;
5985 if (didRenderTooFewHooks)
5986 throw Error(
5987 "Rendered fewer hooks than expected. This may be caused by an accidental early return statement."
5988 );
5989 null === current2 || didReceiveUpdate || (current2 = current2.dependencies, null !== current2 && checkIfContextChanged(current2) && (didReceiveUpdate = true));
5990 needsToResetSuspendedThenableDEV ? (needsToResetSuspendedThenableDEV = false, current2 = true) : current2 = false;
5991 current2 && (workInProgress2 = getComponentNameFromFiber(workInProgress2) || "Unknown", didWarnAboutUseWrappedInTryCatch.has(workInProgress2) || didWarnAboutAsyncClientComponent.has(workInProgress2) || (didWarnAboutUseWrappedInTryCatch.add(workInProgress2), console.error(
5992 "`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary."
5993 )));
5994 }
5995 function renderWithHooksAgain(workInProgress2, Component, props, secondArg) {
5996 currentlyRenderingFiber = workInProgress2;
5997 var numberOfReRenders = 0;
5998 do {
5999 didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);
6000 thenableIndexCounter = 0;
6001 didScheduleRenderPhaseUpdateDuringThisPass = false;
6002 if (numberOfReRenders >= RE_RENDER_LIMIT)
6003 throw Error(
6004 "Too many re-renders. React limits the number of renders to prevent an infinite loop."
6005 );
6006 numberOfReRenders += 1;
6007 ignorePreviousDependencies = false;
6008 workInProgressHook = currentHook = null;
6009 if (null != workInProgress2.updateQueue) {
6010 var children = workInProgress2.updateQueue;
6011 children.lastEffect = null;
6012 children.events = null;
6013 children.stores = null;
6014 null != children.memoCache && (children.memoCache.index = 0);
6015 }
6016 hookTypesUpdateIndexDev = -1;
6017 ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV;
6018 children = callComponentInDEV(Component, props, secondArg);
6019 } while (didScheduleRenderPhaseUpdateDuringThisPass);
6020 return children;
6021 }
6022 function TransitionAwareHostComponent() {
6023 var dispatcher = ReactSharedInternals.H, maybeThenable = dispatcher.useState()[0];
6024 maybeThenable = "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable;
6025 dispatcher = dispatcher.useState()[0];
6026 (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && (currentlyRenderingFiber.flags |= 1024);
6027 return maybeThenable;
6028 }
6029 function checkDidRenderIdHook() {
6030 var didRenderIdHook = 0 !== localIdCounter;
6031 localIdCounter = 0;
6032 return didRenderIdHook;
6033 }
6034 function bailoutHooks(current2, workInProgress2, lanes) {
6035 workInProgress2.updateQueue = current2.updateQueue;
6036 workInProgress2.flags = (workInProgress2.mode & StrictEffectsMode) !== NoMode ? workInProgress2.flags & -402655237 : workInProgress2.flags & -2053;
6037 current2.lanes &= ~lanes;
6038 }
6039 function resetHooksOnUnwind(workInProgress2) {
6040 if (didScheduleRenderPhaseUpdate) {
6041 for (workInProgress2 = workInProgress2.memoizedState; null !== workInProgress2; ) {
6042 var queue = workInProgress2.queue;
6043 null !== queue && (queue.pending = null);
6044 workInProgress2 = workInProgress2.next;
6045 }
6046 didScheduleRenderPhaseUpdate = false;
6047 }
6048 renderLanes = 0;
6049 hookTypesDev = workInProgressHook = currentHook = currentlyRenderingFiber = null;
6050 hookTypesUpdateIndexDev = -1;
6051 currentHookNameInDev = null;
6052 didScheduleRenderPhaseUpdateDuringThisPass = false;
6053 thenableIndexCounter = localIdCounter = 0;
6054 thenableState = null;
6055 }
6056 function mountWorkInProgressHook() {
6057 var hook = {
6058 memoizedState: null,
6059 baseState: null,
6060 baseQueue: null,
6061 queue: null,
6062 next: null
6063 };
6064 null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = hook : workInProgressHook = workInProgressHook.next = hook;
6065 return workInProgressHook;
6066 }
6067 function updateWorkInProgressHook() {
6068 if (null === currentHook) {
6069 var nextCurrentHook = currentlyRenderingFiber.alternate;
6070 nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;
6071 } else nextCurrentHook = currentHook.next;
6072 var nextWorkInProgressHook = null === workInProgressHook ? currentlyRenderingFiber.memoizedState : workInProgressHook.next;
6073 if (null !== nextWorkInProgressHook)
6074 workInProgressHook = nextWorkInProgressHook, currentHook = nextCurrentHook;
6075 else {
6076 if (null === nextCurrentHook) {
6077 if (null === currentlyRenderingFiber.alternate)
6078 throw Error(
6079 "Update hook called on initial render. This is likely a bug in React. Please file an issue."
6080 );
6081 throw Error("Rendered more hooks than during the previous render.");
6082 }
6083 currentHook = nextCurrentHook;
6084 nextCurrentHook = {
6085 memoizedState: currentHook.memoizedState,
6086 baseState: currentHook.baseState,
6087 baseQueue: currentHook.baseQueue,
6088 queue: currentHook.queue,
6089 next: null
6090 };
6091 null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook : workInProgressHook = workInProgressHook.next = nextCurrentHook;
6092 }
6093 return workInProgressHook;
6094 }
6095 function createFunctionComponentUpdateQueue() {
6096 return { lastEffect: null, events: null, stores: null, memoCache: null };
6097 }
6098 function useThenable(thenable) {
6099 var index = thenableIndexCounter;
6100 thenableIndexCounter += 1;
6101 null === thenableState && (thenableState = createThenableState());
6102 thenable = trackUsedThenable(thenableState, thenable, index);
6103 index = currentlyRenderingFiber;
6104 null === (null === workInProgressHook ? index.memoizedState : workInProgressHook.next) && (index = index.alternate, ReactSharedInternals.H = null !== index && null !== index.memoizedState ? HooksDispatcherOnUpdateInDEV : HooksDispatcherOnMountInDEV);
6105 return thenable;
6106 }
6107 function use(usable) {
6108 if (null !== usable && "object" === typeof usable) {
6109 if ("function" === typeof usable.then) return useThenable(usable);
6110 if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);
6111 }
6112 throw Error("An unsupported type was passed to use(): " + String(usable));
6113 }
6114 function useMemoCache(size) {
6115 var memoCache = null, updateQueue = currentlyRenderingFiber.updateQueue;
6116 null !== updateQueue && (memoCache = updateQueue.memoCache);
6117 if (null == memoCache) {
6118 var current2 = currentlyRenderingFiber.alternate;
6119 null !== current2 && (current2 = current2.updateQueue, null !== current2 && (current2 = current2.memoCache, null != current2 && (memoCache = {
6120 data: current2.data.map(function(array) {
6121 return array.slice();
6122 }),
6123 index: 0
6124 })));
6125 }
6126 null == memoCache && (memoCache = { data: [], index: 0 });
6127 null === updateQueue && (updateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = updateQueue);
6128 updateQueue.memoCache = memoCache;
6129 updateQueue = memoCache.data[memoCache.index];
6130 if (void 0 === updateQueue || ignorePreviousDependencies)
6131 for (updateQueue = memoCache.data[memoCache.index] = Array(size), current2 = 0; current2 < size; current2++)
6132 updateQueue[current2] = REACT_MEMO_CACHE_SENTINEL;
6133 else
6134 updateQueue.length !== size && console.error(
6135 "Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",
6136 updateQueue.length,
6137 size
6138 );
6139 memoCache.index++;
6140 return updateQueue;
6141 }
6142 function basicStateReducer(state, action) {
6143 return "function" === typeof action ? action(state) : action;
6144 }
6145 function mountReducer(reducer, initialArg, init) {
6146 var hook = mountWorkInProgressHook();
6147 if (void 0 !== init) {
6148 var initialState = init(initialArg);
6149 if (shouldDoubleInvokeUserFnsInHooksDEV) {
6150 setIsStrictModeForDevtools(true);
6151 try {
6152 init(initialArg);
6153 } finally {
6154 setIsStrictModeForDevtools(false);
6155 }
6156 }
6157 } else initialState = initialArg;
6158 hook.memoizedState = hook.baseState = initialState;
6159 reducer = {
6160 pending: null,
6161 lanes: 0,
6162 dispatch: null,
6163 lastRenderedReducer: reducer,
6164 lastRenderedState: initialState
6165 };
6166 hook.queue = reducer;
6167 reducer = reducer.dispatch = dispatchReducerAction.bind(
6168 null,
6169 currentlyRenderingFiber,
6170 reducer
6171 );
6172 return [hook.memoizedState, reducer];
6173 }
6174 function updateReducer(reducer) {
6175 var hook = updateWorkInProgressHook();
6176 return updateReducerImpl(hook, currentHook, reducer);
6177 }
6178 function updateReducerImpl(hook, current2, reducer) {
6179 var queue = hook.queue;
6180 if (null === queue)
6181 throw Error(
6182 "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
6183 );
6184 queue.lastRenderedReducer = reducer;
6185 var baseQueue = hook.baseQueue, pendingQueue = queue.pending;
6186 if (null !== pendingQueue) {
6187 if (null !== baseQueue) {
6188 var baseFirst = baseQueue.next;
6189 baseQueue.next = pendingQueue.next;
6190 pendingQueue.next = baseFirst;
6191 }
6192 current2.baseQueue !== baseQueue && console.error(
6193 "Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."
6194 );
6195 current2.baseQueue = baseQueue = pendingQueue;
6196 queue.pending = null;
6197 }
6198 pendingQueue = hook.baseState;
6199 if (null === baseQueue) hook.memoizedState = pendingQueue;
6200 else {
6201 current2 = baseQueue.next;
6202 var newBaseQueueFirst = baseFirst = null, newBaseQueueLast = null, update = current2, didReadFromEntangledAsyncAction2 = false;
6203 do {
6204 var updateLane = update.lane & -536870913;
6205 if (updateLane !== update.lane ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes & updateLane) === updateLane) {
6206 var revertLane = update.revertLane;
6207 if (0 === revertLane)
6208 null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = {
6209 lane: 0,
6210 revertLane: 0,
6211 gesture: null,
6212 action: update.action,
6213 hasEagerState: update.hasEagerState,
6214 eagerState: update.eagerState,
6215 next: null
6216 }), updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction2 = true);
6217 else if ((renderLanes & revertLane) === revertLane) {
6218 update = update.next;
6219 revertLane === currentEntangledLane && (didReadFromEntangledAsyncAction2 = true);
6220 continue;
6221 } else
6222 updateLane = {
6223 lane: 0,
6224 revertLane: update.revertLane,
6225 gesture: null,
6226 action: update.action,
6227 hasEagerState: update.hasEagerState,
6228 eagerState: update.eagerState,
6229 next: null
6230 }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = updateLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = updateLane, currentlyRenderingFiber.lanes |= revertLane, workInProgressRootSkippedLanes |= revertLane;
6231 updateLane = update.action;
6232 shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane);
6233 pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane);
6234 } else
6235 revertLane = {
6236 lane: updateLane,
6237 revertLane: update.revertLane,
6238 gesture: update.gesture,
6239 action: update.action,
6240 hasEagerState: update.hasEagerState,
6241 eagerState: update.eagerState,
6242 next: null
6243 }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = revertLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = revertLane, currentlyRenderingFiber.lanes |= updateLane, workInProgressRootSkippedLanes |= updateLane;
6244 update = update.next;
6245 } while (null !== update && update !== current2);
6246 null === newBaseQueueLast ? baseFirst = pendingQueue : newBaseQueueLast.next = newBaseQueueFirst;
6247 if (!objectIs(pendingQueue, hook.memoizedState) && (didReceiveUpdate = true, didReadFromEntangledAsyncAction2 && (reducer = currentEntangledActionThenable, null !== reducer)))
6248 throw reducer;
6249 hook.memoizedState = pendingQueue;
6250 hook.baseState = baseFirst;
6251 hook.baseQueue = newBaseQueueLast;
6252 queue.lastRenderedState = pendingQueue;
6253 }
6254 null === baseQueue && (queue.lanes = 0);
6255 return [hook.memoizedState, queue.dispatch];
6256 }
6257 function rerenderReducer(reducer) {
6258 var hook = updateWorkInProgressHook(), queue = hook.queue;
6259 if (null === queue)
6260 throw Error(
6261 "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
6262 );
6263 queue.lastRenderedReducer = reducer;
6264 var dispatch = queue.dispatch, lastRenderPhaseUpdate = queue.pending, newState = hook.memoizedState;
6265 if (null !== lastRenderPhaseUpdate) {
6266 queue.pending = null;
6267 var update = lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
6268 do
6269 newState = reducer(newState, update.action), update = update.next;
6270 while (update !== lastRenderPhaseUpdate);
6271 objectIs(newState, hook.memoizedState) || (didReceiveUpdate = true);
6272 hook.memoizedState = newState;
6273 null === hook.baseQueue && (hook.baseState = newState);
6274 queue.lastRenderedState = newState;
6275 }
6276 return [newState, dispatch];
6277 }
6278 function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
6279 var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook();
6280 if (isHydrating) {
6281 if (void 0 === getServerSnapshot)
6282 throw Error(
6283 "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
6284 );
6285 var nextSnapshot = getServerSnapshot();
6286 didWarnUncachedGetSnapshot || nextSnapshot === getServerSnapshot() || (console.error(
6287 "The result of getServerSnapshot should be cached to avoid an infinite loop"
6288 ), didWarnUncachedGetSnapshot = true);
6289 } else {
6290 nextSnapshot = getSnapshot();
6291 didWarnUncachedGetSnapshot || (getServerSnapshot = getSnapshot(), objectIs(nextSnapshot, getServerSnapshot) || (console.error(
6292 "The result of getSnapshot should be cached to avoid an infinite loop"
6293 ), didWarnUncachedGetSnapshot = true));
6294 if (null === workInProgressRoot)
6295 throw Error(
6296 "Expected a work-in-progress root. This is a bug in React. Please file an issue."
6297 );
6298 0 !== (workInProgressRootRenderLanes & 127) || pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
6299 }
6300 hook.memoizedState = nextSnapshot;
6301 getServerSnapshot = { value: nextSnapshot, getSnapshot };
6302 hook.queue = getServerSnapshot;
6303 mountEffect(
6304 subscribeToStore.bind(null, fiber, getServerSnapshot, subscribe),
6305 [subscribe]
6306 );
6307 fiber.flags |= 2048;
6308 pushSimpleEffect(
6309 HasEffect | Passive,
6310 { destroy: void 0 },
6311 updateStoreInstance.bind(
6312 null,
6313 fiber,
6314 getServerSnapshot,
6315 nextSnapshot,
6316 getSnapshot
6317 ),
6318 null
6319 );
6320 return nextSnapshot;
6321 }
6322 function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
6323 var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating;
6324 if (isHydrating$jscomp$0) {
6325 if (void 0 === getServerSnapshot)
6326 throw Error(
6327 "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
6328 );
6329 getServerSnapshot = getServerSnapshot();
6330 } else if (getServerSnapshot = getSnapshot(), !didWarnUncachedGetSnapshot) {
6331 var cachedSnapshot = getSnapshot();
6332 objectIs(getServerSnapshot, cachedSnapshot) || (console.error(
6333 "The result of getSnapshot should be cached to avoid an infinite loop"
6334 ), didWarnUncachedGetSnapshot = true);
6335 }
6336 if (cachedSnapshot = !objectIs(
6337 (currentHook || hook).memoizedState,
6338 getServerSnapshot
6339 ))
6340 hook.memoizedState = getServerSnapshot, didReceiveUpdate = true;
6341 hook = hook.queue;
6342 var create = subscribeToStore.bind(null, fiber, hook, subscribe);
6343 updateEffectImpl(2048, Passive, create, [subscribe]);
6344 if (hook.getSnapshot !== getSnapshot || cachedSnapshot || null !== workInProgressHook && workInProgressHook.memoizedState.tag & HasEffect) {
6345 fiber.flags |= 2048;
6346 pushSimpleEffect(
6347 HasEffect | Passive,
6348 { destroy: void 0 },
6349 updateStoreInstance.bind(
6350 null,
6351 fiber,
6352 hook,
6353 getServerSnapshot,
6354 getSnapshot
6355 ),
6356 null
6357 );
6358 if (null === workInProgressRoot)
6359 throw Error(
6360 "Expected a work-in-progress root. This is a bug in React. Please file an issue."
6361 );
6362 isHydrating$jscomp$0 || 0 !== (renderLanes & 127) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
6363 }
6364 return getServerSnapshot;
6365 }
6366 function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
6367 fiber.flags |= 16384;
6368 fiber = { getSnapshot, value: renderedSnapshot };
6369 getSnapshot = currentlyRenderingFiber.updateQueue;
6370 null === getSnapshot ? (getSnapshot = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = getSnapshot, getSnapshot.stores = [fiber]) : (renderedSnapshot = getSnapshot.stores, null === renderedSnapshot ? getSnapshot.stores = [fiber] : renderedSnapshot.push(fiber));
6371 }
6372 function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
6373 inst.value = nextSnapshot;
6374 inst.getSnapshot = getSnapshot;
6375 checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
6376 }
6377 function subscribeToStore(fiber, inst, subscribe) {
6378 return subscribe(function() {
6379 checkIfSnapshotChanged(inst) && (startUpdateTimerByLane(2, "updateSyncExternalStore()", fiber), forceStoreRerender(fiber));
6380 });
6381 }
6382 function checkIfSnapshotChanged(inst) {
6383 var latestGetSnapshot = inst.getSnapshot;
6384 inst = inst.value;
6385 try {
6386 var nextValue = latestGetSnapshot();
6387 return !objectIs(inst, nextValue);
6388 } catch (error) {
6389 return true;
6390 }
6391 }
6392 function forceStoreRerender(fiber) {
6393 var root2 = enqueueConcurrentRenderForLane(fiber, 2);
6394 null !== root2 && scheduleUpdateOnFiber(root2, fiber, 2);
6395 }
6396 function mountStateImpl(initialState) {
6397 var hook = mountWorkInProgressHook();
6398 if ("function" === typeof initialState) {
6399 var initialStateInitializer = initialState;
6400 initialState = initialStateInitializer();
6401 if (shouldDoubleInvokeUserFnsInHooksDEV) {
6402 setIsStrictModeForDevtools(true);
6403 try {
6404 initialStateInitializer();
6405 } finally {
6406 setIsStrictModeForDevtools(false);
6407 }
6408 }
6409 }
6410 hook.memoizedState = hook.baseState = initialState;
6411 hook.queue = {
6412 pending: null,
6413 lanes: 0,
6414 dispatch: null,
6415 lastRenderedReducer: basicStateReducer,
6416 lastRenderedState: initialState
6417 };
6418 return hook;
6419 }
6420 function mountState(initialState) {
6421 initialState = mountStateImpl(initialState);
6422 var queue = initialState.queue, dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
6423 queue.dispatch = dispatch;
6424 return [initialState.memoizedState, dispatch];
6425 }
6426 function mountOptimistic(passthrough) {
6427 var hook = mountWorkInProgressHook();
6428 hook.memoizedState = hook.baseState = passthrough;
6429 var queue = {
6430 pending: null,
6431 lanes: 0,
6432 dispatch: null,
6433 lastRenderedReducer: null,
6434 lastRenderedState: null
6435 };
6436 hook.queue = queue;
6437 hook = dispatchOptimisticSetState.bind(
6438 null,
6439 currentlyRenderingFiber,
6440 true,
6441 queue
6442 );
6443 queue.dispatch = hook;
6444 return [passthrough, hook];
6445 }
6446 function updateOptimistic(passthrough, reducer) {
6447 var hook = updateWorkInProgressHook();
6448 return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
6449 }
6450 function updateOptimisticImpl(hook, current2, passthrough, reducer) {
6451 hook.baseState = passthrough;
6452 return updateReducerImpl(
6453 hook,
6454 currentHook,
6455 "function" === typeof reducer ? reducer : basicStateReducer
6456 );
6457 }
6458 function rerenderOptimistic(passthrough, reducer) {
6459 var hook = updateWorkInProgressHook();
6460 if (null !== currentHook)
6461 return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
6462 hook.baseState = passthrough;
6463 return [passthrough, hook.queue.dispatch];
6464 }
6465 function dispatchActionState(fiber, actionQueue, setPendingState, setState, payload) {
6466 if (isRenderPhaseUpdate(fiber))
6467 throw Error("Cannot update form state while rendering.");
6468 fiber = actionQueue.action;
6469 if (null !== fiber) {
6470 var actionNode = {
6471 payload,
6472 action: fiber,
6473 next: null,
6474 isTransition: true,
6475 status: "pending",
6476 value: null,
6477 reason: null,
6478 listeners: [],
6479 then: function(listener) {
6480 actionNode.listeners.push(listener);
6481 }
6482 };
6483 null !== ReactSharedInternals.T ? setPendingState(true) : actionNode.isTransition = false;
6484 setState(actionNode);
6485 setPendingState = actionQueue.pending;
6486 null === setPendingState ? (actionNode.next = actionQueue.pending = actionNode, runActionStateAction(actionQueue, actionNode)) : (actionNode.next = setPendingState.next, actionQueue.pending = setPendingState.next = actionNode);
6487 }
6488 }
6489 function runActionStateAction(actionQueue, node) {
6490 var action = node.action, payload = node.payload, prevState = actionQueue.state;
6491 if (node.isTransition) {
6492 var prevTransition = ReactSharedInternals.T, currentTransition = {};
6493 currentTransition._updatedFibers = /* @__PURE__ */ new Set();
6494 ReactSharedInternals.T = currentTransition;
6495 try {
6496 var returnValue = action(prevState, payload), onStartTransitionFinish = ReactSharedInternals.S;
6497 null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
6498 handleActionReturnValue(actionQueue, node, returnValue);
6499 } catch (error) {
6500 onActionError(actionQueue, node, error);
6501 } finally {
6502 null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
6503 "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
6504 ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition, null === prevTransition && currentTransition._updatedFibers && (actionQueue = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < actionQueue && console.warn(
6505 "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
6506 ));
6507 }
6508 } else
6509 try {
6510 currentTransition = action(prevState, payload), handleActionReturnValue(actionQueue, node, currentTransition);
6511 } catch (error$4) {
6512 onActionError(actionQueue, node, error$4);
6513 }
6514 }
6515 function handleActionReturnValue(actionQueue, node, returnValue) {
6516 null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then ? (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(
6517 function(nextState) {
6518 onActionSuccess(actionQueue, node, nextState);
6519 },
6520 function(error) {
6521 return onActionError(actionQueue, node, error);
6522 }
6523 ), node.isTransition || console.error(
6524 "An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop."
6525 )) : onActionSuccess(actionQueue, node, returnValue);
6526 }
6527 function onActionSuccess(actionQueue, actionNode, nextState) {
6528 actionNode.status = "fulfilled";
6529 actionNode.value = nextState;
6530 notifyActionListeners(actionNode);
6531 actionQueue.state = nextState;
6532 actionNode = actionQueue.pending;
6533 null !== actionNode && (nextState = actionNode.next, nextState === actionNode ? actionQueue.pending = null : (nextState = nextState.next, actionNode.next = nextState, runActionStateAction(actionQueue, nextState)));
6534 }
6535 function onActionError(actionQueue, actionNode, error) {
6536 var last = actionQueue.pending;
6537 actionQueue.pending = null;
6538 if (null !== last) {
6539 last = last.next;
6540 do
6541 actionNode.status = "rejected", actionNode.reason = error, notifyActionListeners(actionNode), actionNode = actionNode.next;
6542 while (actionNode !== last);
6543 }
6544 actionQueue.action = null;
6545 }
6546 function notifyActionListeners(actionNode) {
6547 actionNode = actionNode.listeners;
6548 for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])();
6549 }
6550 function actionStateReducer(oldState, newState) {
6551 return newState;
6552 }
6553 function mountActionState(action, initialStateProp) {
6554 if (isHydrating) {
6555 var ssrFormState = workInProgressRoot.formState;
6556 if (null !== ssrFormState) {
6557 a: {
6558 var isMatching = currentlyRenderingFiber;
6559 if (isHydrating) {
6560 if (nextHydratableInstance) {
6561 b: {
6562 var markerInstance = nextHydratableInstance;
6563 for (var inRootOrSingleton = rootOrSingletonContext; 8 !== markerInstance.nodeType; ) {
6564 if (!inRootOrSingleton) {
6565 markerInstance = null;
6566 break b;
6567 }
6568 markerInstance = getNextHydratable(
6569 markerInstance.nextSibling
6570 );
6571 if (null === markerInstance) {
6572 markerInstance = null;
6573 break b;
6574 }
6575 }
6576 inRootOrSingleton = markerInstance.data;
6577 markerInstance = inRootOrSingleton === FORM_STATE_IS_MATCHING || inRootOrSingleton === FORM_STATE_IS_NOT_MATCHING ? markerInstance : null;
6578 }
6579 if (markerInstance) {
6580 nextHydratableInstance = getNextHydratable(
6581 markerInstance.nextSibling
6582 );
6583 isMatching = markerInstance.data === FORM_STATE_IS_MATCHING;
6584 break a;
6585 }
6586 }
6587 throwOnHydrationMismatch(isMatching);
6588 }
6589 isMatching = false;
6590 }
6591 isMatching && (initialStateProp = ssrFormState[0]);
6592 }
6593 }
6594 ssrFormState = mountWorkInProgressHook();
6595 ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;
6596 isMatching = {
6597 pending: null,
6598 lanes: 0,
6599 dispatch: null,
6600 lastRenderedReducer: actionStateReducer,
6601 lastRenderedState: initialStateProp
6602 };
6603 ssrFormState.queue = isMatching;
6604 ssrFormState = dispatchSetState.bind(
6605 null,
6606 currentlyRenderingFiber,
6607 isMatching
6608 );
6609 isMatching.dispatch = ssrFormState;
6610 isMatching = mountStateImpl(false);
6611 inRootOrSingleton = dispatchOptimisticSetState.bind(
6612 null,
6613 currentlyRenderingFiber,
6614 false,
6615 isMatching.queue
6616 );
6617 isMatching = mountWorkInProgressHook();
6618 markerInstance = {
6619 state: initialStateProp,
6620 dispatch: null,
6621 action,
6622 pending: null
6623 };
6624 isMatching.queue = markerInstance;
6625 ssrFormState = dispatchActionState.bind(
6626 null,
6627 currentlyRenderingFiber,
6628 markerInstance,
6629 inRootOrSingleton,
6630 ssrFormState
6631 );
6632 markerInstance.dispatch = ssrFormState;
6633 isMatching.memoizedState = action;
6634 return [initialStateProp, ssrFormState, false];
6635 }
6636 function updateActionState(action) {
6637 var stateHook = updateWorkInProgressHook();
6638 return updateActionStateImpl(stateHook, currentHook, action);
6639 }
6640 function updateActionStateImpl(stateHook, currentStateHook, action) {
6641 currentStateHook = updateReducerImpl(
6642 stateHook,
6643 currentStateHook,
6644 actionStateReducer
6645 )[0];
6646 stateHook = updateReducer(basicStateReducer)[0];
6647 if ("object" === typeof currentStateHook && null !== currentStateHook && "function" === typeof currentStateHook.then)
6648 try {
6649 var state = useThenable(currentStateHook);
6650 } catch (x) {
6651 if (x === SuspenseException) throw SuspenseActionException;
6652 throw x;
6653 }
6654 else state = currentStateHook;
6655 currentStateHook = updateWorkInProgressHook();
6656 var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch;
6657 action !== currentStateHook.memoizedState && (currentlyRenderingFiber.flags |= 2048, pushSimpleEffect(
6658 HasEffect | Passive,
6659 { destroy: void 0 },
6660 actionStateActionEffect.bind(null, actionQueue, action),
6661 null
6662 ));
6663 return [state, dispatch, stateHook];
6664 }
6665 function actionStateActionEffect(actionQueue, action) {
6666 actionQueue.action = action;
6667 }
6668 function rerenderActionState(action) {
6669 var stateHook = updateWorkInProgressHook(), currentStateHook = currentHook;
6670 if (null !== currentStateHook)
6671 return updateActionStateImpl(stateHook, currentStateHook, action);
6672 updateWorkInProgressHook();
6673 stateHook = stateHook.memoizedState;
6674 currentStateHook = updateWorkInProgressHook();
6675 var dispatch = currentStateHook.queue.dispatch;
6676 currentStateHook.memoizedState = action;
6677 return [stateHook, dispatch, false];
6678 }
6679 function pushSimpleEffect(tag, inst, create, deps) {
6680 tag = { tag, create, deps, inst, next: null };
6681 inst = currentlyRenderingFiber.updateQueue;
6682 null === inst && (inst = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = inst);
6683 create = inst.lastEffect;
6684 null === create ? inst.lastEffect = tag.next = tag : (deps = create.next, create.next = tag, tag.next = deps, inst.lastEffect = tag);
6685 return tag;
6686 }
6687 function mountRef(initialValue) {
6688 var hook = mountWorkInProgressHook();
6689 initialValue = { current: initialValue };
6690 return hook.memoizedState = initialValue;
6691 }
6692 function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
6693 var hook = mountWorkInProgressHook();
6694 currentlyRenderingFiber.flags |= fiberFlags;
6695 hook.memoizedState = pushSimpleEffect(
6696 HasEffect | hookFlags,
6697 { destroy: void 0 },
6698 create,
6699 void 0 === deps ? null : deps
6700 );
6701 }
6702 function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
6703 var hook = updateWorkInProgressHook();
6704 deps = void 0 === deps ? null : deps;
6705 var inst = hook.memoizedState.inst;
6706 null !== currentHook && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps) : (currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(
6707 HasEffect | hookFlags,
6708 inst,
6709 create,
6710 deps
6711 ));
6712 }
6713 function mountEffect(create, deps) {
6714 (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode ? mountEffectImpl(276826112, Passive, create, deps) : mountEffectImpl(8390656, Passive, create, deps);
6715 }
6716 function useEffectEventImpl(payload) {
6717 currentlyRenderingFiber.flags |= 4;
6718 var componentUpdateQueue = currentlyRenderingFiber.updateQueue;
6719 if (null === componentUpdateQueue)
6720 componentUpdateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = componentUpdateQueue, componentUpdateQueue.events = [payload];
6721 else {
6722 var events = componentUpdateQueue.events;
6723 null === events ? componentUpdateQueue.events = [payload] : events.push(payload);
6724 }
6725 }
6726 function mountEvent(callback) {
6727 var hook = mountWorkInProgressHook(), ref = { impl: callback };
6728 hook.memoizedState = ref;
6729 return function() {
6730 if ((executionContext & RenderContext) !== NoContext)
6731 throw Error(
6732 "A function wrapped in useEffectEvent can't be called during rendering."
6733 );
6734 return ref.impl.apply(void 0, arguments);
6735 };
6736 }
6737 function updateEvent(callback) {
6738 var ref = updateWorkInProgressHook().memoizedState;
6739 useEffectEventImpl({ ref, nextImpl: callback });
6740 return function() {
6741 if ((executionContext & RenderContext) !== NoContext)
6742 throw Error(
6743 "A function wrapped in useEffectEvent can't be called during rendering."
6744 );
6745 return ref.impl.apply(void 0, arguments);
6746 };
6747 }
6748 function mountLayoutEffect(create, deps) {
6749 var fiberFlags = 4194308;
6750 (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 134217728);
6751 return mountEffectImpl(fiberFlags, Layout, create, deps);
6752 }
6753 function imperativeHandleEffect(create, ref) {
6754 if ("function" === typeof ref) {
6755 create = create();
6756 var refCleanup = ref(create);
6757 return function() {
6758 "function" === typeof refCleanup ? refCleanup() : ref(null);
6759 };
6760 }
6761 if (null !== ref && void 0 !== ref)
6762 return ref.hasOwnProperty("current") || console.error(
6763 "Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.",
6764 "an object with keys {" + Object.keys(ref).join(", ") + "}"
6765 ), create = create(), ref.current = create, function() {
6766 ref.current = null;
6767 };
6768 }
6769 function mountImperativeHandle(ref, create, deps) {
6770 "function" !== typeof create && console.error(
6771 "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
6772 null !== create ? typeof create : "null"
6773 );
6774 deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
6775 var fiberFlags = 4194308;
6776 (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 134217728);
6777 mountEffectImpl(
6778 fiberFlags,
6779 Layout,
6780 imperativeHandleEffect.bind(null, create, ref),
6781 deps
6782 );
6783 }
6784 function updateImperativeHandle(ref, create, deps) {
6785 "function" !== typeof create && console.error(
6786 "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
6787 null !== create ? typeof create : "null"
6788 );
6789 deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
6790 updateEffectImpl(
6791 4,
6792 Layout,
6793 imperativeHandleEffect.bind(null, create, ref),
6794 deps
6795 );
6796 }
6797 function mountCallback(callback, deps) {
6798 mountWorkInProgressHook().memoizedState = [
6799 callback,
6800 void 0 === deps ? null : deps
6801 ];
6802 return callback;
6803 }
6804 function updateCallback(callback, deps) {
6805 var hook = updateWorkInProgressHook();
6806 deps = void 0 === deps ? null : deps;
6807 var prevState = hook.memoizedState;
6808 if (null !== deps && areHookInputsEqual(deps, prevState[1]))
6809 return prevState[0];
6810 hook.memoizedState = [callback, deps];
6811 return callback;
6812 }
6813 function mountMemo(nextCreate, deps) {
6814 var hook = mountWorkInProgressHook();
6815 deps = void 0 === deps ? null : deps;
6816 var nextValue = nextCreate();
6817 if (shouldDoubleInvokeUserFnsInHooksDEV) {
6818 setIsStrictModeForDevtools(true);
6819 try {
6820 nextCreate();
6821 } finally {
6822 setIsStrictModeForDevtools(false);
6823 }
6824 }
6825 hook.memoizedState = [nextValue, deps];
6826 return nextValue;
6827 }
6828 function updateMemo(nextCreate, deps) {
6829 var hook = updateWorkInProgressHook();
6830 deps = void 0 === deps ? null : deps;
6831 var prevState = hook.memoizedState;
6832 if (null !== deps && areHookInputsEqual(deps, prevState[1]))
6833 return prevState[0];
6834 prevState = nextCreate();
6835 if (shouldDoubleInvokeUserFnsInHooksDEV) {
6836 setIsStrictModeForDevtools(true);
6837 try {
6838 nextCreate();
6839 } finally {
6840 setIsStrictModeForDevtools(false);
6841 }
6842 }
6843 hook.memoizedState = [prevState, deps];
6844 return prevState;
6845 }
6846 function mountDeferredValue(value, initialValue) {
6847 var hook = mountWorkInProgressHook();
6848 return mountDeferredValueImpl(hook, value, initialValue);
6849 }
6850 function updateDeferredValue(value, initialValue) {
6851 var hook = updateWorkInProgressHook();
6852 return updateDeferredValueImpl(
6853 hook,
6854 currentHook.memoizedState,
6855 value,
6856 initialValue
6857 );
6858 }
6859 function rerenderDeferredValue(value, initialValue) {
6860 var hook = updateWorkInProgressHook();
6861 return null === currentHook ? mountDeferredValueImpl(hook, value, initialValue) : updateDeferredValueImpl(
6862 hook,
6863 currentHook.memoizedState,
6864 value,
6865 initialValue
6866 );
6867 }
6868 function mountDeferredValueImpl(hook, value, initialValue) {
6869 if (void 0 === initialValue || 0 !== (renderLanes & 1073741824) && 0 === (workInProgressRootRenderLanes & 261930))
6870 return hook.memoizedState = value;
6871 hook.memoizedState = initialValue;
6872 hook = requestDeferredLane();
6873 currentlyRenderingFiber.lanes |= hook;
6874 workInProgressRootSkippedLanes |= hook;
6875 return initialValue;
6876 }
6877 function updateDeferredValueImpl(hook, prevValue, value, initialValue) {
6878 if (objectIs(value, prevValue)) return value;
6879 if (null !== currentTreeHiddenStackCursor.current)
6880 return hook = mountDeferredValueImpl(hook, value, initialValue), objectIs(hook, prevValue) || (didReceiveUpdate = true), hook;
6881 if (0 === (renderLanes & 42) || 0 !== (renderLanes & 1073741824) && 0 === (workInProgressRootRenderLanes & 261930))
6882 return didReceiveUpdate = true, hook.memoizedState = value;
6883 hook = requestDeferredLane();
6884 currentlyRenderingFiber.lanes |= hook;
6885 workInProgressRootSkippedLanes |= hook;
6886 return prevValue;
6887 }
6888 function releaseAsyncTransition() {
6889 ReactSharedInternals.asyncTransitions--;
6890 }
6891 function startTransition(fiber, queue, pendingState, finishedState, callback) {
6892 var previousPriority = ReactDOMSharedInternals.p;
6893 ReactDOMSharedInternals.p = 0 !== previousPriority && previousPriority < ContinuousEventPriority ? previousPriority : ContinuousEventPriority;
6894 var prevTransition = ReactSharedInternals.T, currentTransition = {};
6895 currentTransition._updatedFibers = /* @__PURE__ */ new Set();
6896 ReactSharedInternals.T = currentTransition;
6897 dispatchOptimisticSetState(fiber, false, queue, pendingState);
6898 try {
6899 var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals.S;
6900 null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
6901 if (null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then) {
6902 ReactSharedInternals.asyncTransitions++;
6903 returnValue.then(releaseAsyncTransition, releaseAsyncTransition);
6904 var thenableForFinishedState = chainThenableValue(
6905 returnValue,
6906 finishedState
6907 );
6908 dispatchSetStateInternal(
6909 fiber,
6910 queue,
6911 thenableForFinishedState,
6912 requestUpdateLane(fiber)
6913 );
6914 } else
6915 dispatchSetStateInternal(
6916 fiber,
6917 queue,
6918 finishedState,
6919 requestUpdateLane(fiber)
6920 );
6921 } catch (error) {
6922 dispatchSetStateInternal(
6923 fiber,
6924 queue,
6925 { then: function() {
6926 }, status: "rejected", reason: error },
6927 requestUpdateLane(fiber)
6928 );
6929 } finally {
6930 ReactDOMSharedInternals.p = previousPriority, null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
6931 "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
6932 ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition, null === prevTransition && currentTransition._updatedFibers && (fiber = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < fiber && console.warn(
6933 "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
6934 ));
6935 }
6936 }
6937 function startHostTransition(formFiber, pendingState, action, formData) {
6938 if (5 !== formFiber.tag)
6939 throw Error(
6940 "Expected the form instance to be a HostComponent. This is a bug in React."
6941 );
6942 var queue = ensureFormComponentIsStateful(formFiber).queue;
6943 startHostActionTimer(formFiber);
6944 startTransition(
6945 formFiber,
6946 queue,
6947 pendingState,
6948 NotPendingTransition,
6949 null === action ? noop : function() {
6950 requestFormReset$1(formFiber);
6951 return action(formData);
6952 }
6953 );
6954 }
6955 function ensureFormComponentIsStateful(formFiber) {
6956 var existingStateHook = formFiber.memoizedState;
6957 if (null !== existingStateHook) return existingStateHook;
6958 existingStateHook = {
6959 memoizedState: NotPendingTransition,
6960 baseState: NotPendingTransition,
6961 baseQueue: null,
6962 queue: {
6963 pending: null,
6964 lanes: 0,
6965 dispatch: null,
6966 lastRenderedReducer: basicStateReducer,
6967 lastRenderedState: NotPendingTransition
6968 },
6969 next: null
6970 };
6971 var initialResetState = {};
6972 existingStateHook.next = {
6973 memoizedState: initialResetState,
6974 baseState: initialResetState,
6975 baseQueue: null,
6976 queue: {
6977 pending: null,
6978 lanes: 0,
6979 dispatch: null,
6980 lastRenderedReducer: basicStateReducer,
6981 lastRenderedState: initialResetState
6982 },
6983 next: null
6984 };
6985 formFiber.memoizedState = existingStateHook;
6986 formFiber = formFiber.alternate;
6987 null !== formFiber && (formFiber.memoizedState = existingStateHook);
6988 return existingStateHook;
6989 }
6990 function requestFormReset$1(formFiber) {
6991 null === ReactSharedInternals.T && console.error(
6992 "requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition."
6993 );
6994 var stateHook = ensureFormComponentIsStateful(formFiber);
6995 null === stateHook.next && (stateHook = formFiber.alternate.memoizedState);
6996 dispatchSetStateInternal(
6997 formFiber,
6998 stateHook.next.queue,
6999 {},
7000 requestUpdateLane(formFiber)
7001 );
7002 }
7003 function mountTransition() {
7004 var stateHook = mountStateImpl(false);
7005 stateHook = startTransition.bind(
7006 null,
7007 currentlyRenderingFiber,
7008 stateHook.queue,
7009 true,
7010 false
7011 );
7012 mountWorkInProgressHook().memoizedState = stateHook;
7013 return [false, stateHook];
7014 }
7015 function updateTransition() {
7016 var booleanOrThenable = updateReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
7017 return [
7018 "boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable),
7019 start
7020 ];
7021 }
7022 function rerenderTransition() {
7023 var booleanOrThenable = rerenderReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
7024 return [
7025 "boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable),
7026 start
7027 ];
7028 }
7029 function useHostTransitionStatus() {
7030 return readContext(HostTransitionContext);
7031 }
7032 function mountId() {
7033 var hook = mountWorkInProgressHook(), identifierPrefix = workInProgressRoot.identifierPrefix;
7034 if (isHydrating) {
7035 var treeId = treeContextOverflow;
7036 var idWithLeadingBit = treeContextId;
7037 treeId = (idWithLeadingBit & ~(1 << 32 - clz32(idWithLeadingBit) - 1)).toString(32) + treeId;
7038 identifierPrefix = "_" + identifierPrefix + "R_" + treeId;
7039 treeId = localIdCounter++;
7040 0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
7041 identifierPrefix += "_";
7042 } else
7043 treeId = globalClientIdCounter++, identifierPrefix = "_" + identifierPrefix + "r_" + treeId.toString(32) + "_";
7044 return hook.memoizedState = identifierPrefix;
7045 }
7046 function mountRefresh() {
7047 return mountWorkInProgressHook().memoizedState = refreshCache.bind(
7048 null,
7049 currentlyRenderingFiber
7050 );
7051 }
7052 function refreshCache(fiber, seedKey) {
7053 for (var provider = fiber.return; null !== provider; ) {
7054 switch (provider.tag) {
7055 case 24:
7056 case 3:
7057 var lane = requestUpdateLane(provider), refreshUpdate = createUpdate(lane), root2 = enqueueUpdate(provider, refreshUpdate, lane);
7058 null !== root2 && (startUpdateTimerByLane(lane, "refresh()", fiber), scheduleUpdateOnFiber(root2, provider, lane), entangleTransitions(root2, provider, lane));
7059 fiber = createCache();
7060 null !== seedKey && void 0 !== seedKey && null !== root2 && console.error(
7061 "The seed argument is not enabled outside experimental channels."
7062 );
7063 refreshUpdate.payload = { cache: fiber };
7064 return;
7065 }
7066 provider = provider.return;
7067 }
7068 }
7069 function dispatchReducerAction(fiber, queue, action) {
7070 var args = arguments;
7071 "function" === typeof args[3] && console.error(
7072 "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."
7073 );
7074 args = requestUpdateLane(fiber);
7075 var update = {
7076 lane: args,
7077 revertLane: 0,
7078 gesture: null,
7079 action,
7080 hasEagerState: false,
7081 eagerState: null,
7082 next: null
7083 };
7084 isRenderPhaseUpdate(fiber) ? enqueueRenderPhaseUpdate(queue, update) : (update = enqueueConcurrentHookUpdate(fiber, queue, update, args), null !== update && (startUpdateTimerByLane(args, "dispatch()", fiber), scheduleUpdateOnFiber(update, fiber, args), entangleTransitionUpdate(update, queue, args)));
7085 }
7086 function dispatchSetState(fiber, queue, action) {
7087 var args = arguments;
7088 "function" === typeof args[3] && console.error(
7089 "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."
7090 );
7091 args = requestUpdateLane(fiber);
7092 dispatchSetStateInternal(fiber, queue, action, args) && startUpdateTimerByLane(args, "setState()", fiber);
7093 }
7094 function dispatchSetStateInternal(fiber, queue, action, lane) {
7095 var update = {
7096 lane,
7097 revertLane: 0,
7098 gesture: null,
7099 action,
7100 hasEagerState: false,
7101 eagerState: null,
7102 next: null
7103 };
7104 if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);
7105 else {
7106 var alternate = fiber.alternate;
7107 if (0 === fiber.lanes && (null === alternate || 0 === alternate.lanes) && (alternate = queue.lastRenderedReducer, null !== alternate)) {
7108 var prevDispatcher = ReactSharedInternals.H;
7109 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
7110 try {
7111 var currentState = queue.lastRenderedState, eagerState = alternate(currentState, action);
7112 update.hasEagerState = true;
7113 update.eagerState = eagerState;
7114 if (objectIs(eagerState, currentState))
7115 return enqueueUpdate$1(fiber, queue, update, 0), null === workInProgressRoot && finishQueueingConcurrentUpdates(), false;
7116 } catch (error) {
7117 } finally {
7118 ReactSharedInternals.H = prevDispatcher;
7119 }
7120 }
7121 action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
7122 if (null !== action)
7123 return scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane), true;
7124 }
7125 return false;
7126 }
7127 function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {
7128 null === ReactSharedInternals.T && 0 === currentEntangledLane && console.error(
7129 "An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."
7130 );
7131 action = {
7132 lane: 2,
7133 revertLane: requestTransitionLane(),
7134 gesture: null,
7135 action,
7136 hasEagerState: false,
7137 eagerState: null,
7138 next: null
7139 };
7140 if (isRenderPhaseUpdate(fiber)) {
7141 if (throwIfDuringRender)
7142 throw Error("Cannot update optimistic state while rendering.");
7143 console.error("Cannot call startTransition while rendering.");
7144 } else
7145 throwIfDuringRender = enqueueConcurrentHookUpdate(
7146 fiber,
7147 queue,
7148 action,
7149 2
7150 ), null !== throwIfDuringRender && (startUpdateTimerByLane(2, "setOptimistic()", fiber), scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2));
7151 }
7152 function isRenderPhaseUpdate(fiber) {
7153 var alternate = fiber.alternate;
7154 return fiber === currentlyRenderingFiber || null !== alternate && alternate === currentlyRenderingFiber;
7155 }
7156 function enqueueRenderPhaseUpdate(queue, update) {
7157 didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
7158 var pending = queue.pending;
7159 null === pending ? update.next = update : (update.next = pending.next, pending.next = update);
7160 queue.pending = update;
7161 }
7162 function entangleTransitionUpdate(root2, queue, lane) {
7163 if (0 !== (lane & 4194048)) {
7164 var queueLanes = queue.lanes;
7165 queueLanes &= root2.pendingLanes;
7166 lane |= queueLanes;
7167 queue.lanes = lane;
7168 markRootEntangled(root2, lane);
7169 }
7170 }
7171 function warnOnInvalidCallback(callback) {
7172 if (null !== callback && "function" !== typeof callback) {
7173 var key = String(callback);
7174 didWarnOnInvalidCallback.has(key) || (didWarnOnInvalidCallback.add(key), console.error(
7175 "Expected the last optional `callback` argument to be a function. Instead received: %s.",
7176 callback
7177 ));
7178 }
7179 }
7180 function applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, nextProps) {
7181 var prevState = workInProgress2.memoizedState, partialState = getDerivedStateFromProps(nextProps, prevState);
7182 if (workInProgress2.mode & StrictLegacyMode) {
7183 setIsStrictModeForDevtools(true);
7184 try {
7185 partialState = getDerivedStateFromProps(nextProps, prevState);
7186 } finally {
7187 setIsStrictModeForDevtools(false);
7188 }
7189 }
7190 void 0 === partialState && (ctor = getComponentNameFromType(ctor) || "Component", didWarnAboutUndefinedDerivedState.has(ctor) || (didWarnAboutUndefinedDerivedState.add(ctor), console.error(
7191 "%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",
7192 ctor
7193 )));
7194 prevState = null === partialState || void 0 === partialState ? prevState : assign({}, prevState, partialState);
7195 workInProgress2.memoizedState = prevState;
7196 0 === workInProgress2.lanes && (workInProgress2.updateQueue.baseState = prevState);
7197 }
7198 function checkShouldComponentUpdate(workInProgress2, ctor, oldProps, newProps, oldState, newState, nextContext) {
7199 var instance = workInProgress2.stateNode;
7200 if ("function" === typeof instance.shouldComponentUpdate) {
7201 oldProps = instance.shouldComponentUpdate(
7202 newProps,
7203 newState,
7204 nextContext
7205 );
7206 if (workInProgress2.mode & StrictLegacyMode) {
7207 setIsStrictModeForDevtools(true);
7208 try {
7209 oldProps = instance.shouldComponentUpdate(
7210 newProps,
7211 newState,
7212 nextContext
7213 );
7214 } finally {
7215 setIsStrictModeForDevtools(false);
7216 }
7217 }
7218 void 0 === oldProps && console.error(
7219 "%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",
7220 getComponentNameFromType(ctor) || "Component"
7221 );
7222 return oldProps;
7223 }
7224 return ctor.prototype && ctor.prototype.isPureReactComponent ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : true;
7225 }
7226 function callComponentWillReceiveProps(workInProgress2, instance, newProps, nextContext) {
7227 var oldState = instance.state;
7228 "function" === typeof instance.componentWillReceiveProps && instance.componentWillReceiveProps(newProps, nextContext);
7229 "function" === typeof instance.UNSAFE_componentWillReceiveProps && instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
7230 instance.state !== oldState && (workInProgress2 = getComponentNameFromFiber(workInProgress2) || "Component", didWarnAboutStateAssignmentForComponent.has(workInProgress2) || (didWarnAboutStateAssignmentForComponent.add(workInProgress2), console.error(
7231 "%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
7232 workInProgress2
7233 )), classComponentUpdater.enqueueReplaceState(
7234 instance,
7235 instance.state,
7236 null
7237 ));
7238 }
7239 function resolveClassComponentProps(Component, baseProps) {
7240 var newProps = baseProps;
7241 if ("ref" in baseProps) {
7242 newProps = {};
7243 for (var propName in baseProps)
7244 "ref" !== propName && (newProps[propName] = baseProps[propName]);
7245 }
7246 if (Component = Component.defaultProps) {
7247 newProps === baseProps && (newProps = assign({}, newProps));
7248 for (var _propName in Component)
7249 void 0 === newProps[_propName] && (newProps[_propName] = Component[_propName]);
7250 }
7251 return newProps;
7252 }
7253 function defaultOnUncaughtError(error) {
7254 reportGlobalError(error);
7255 console.warn(
7256 "%s\n\n%s\n",
7257 componentName ? "An error occurred in the <" + componentName + "> component." : "An error occurred in one of your React components.",
7258 "Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries."
7259 );
7260 }
7261 function defaultOnCaughtError(error) {
7262 var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component." : "The above error occurred in one of your React components.", recreateMessage = "React will try to recreate this component tree from scratch using the error boundary you provided, " + ((errorBoundaryName || "Anonymous") + ".");
7263 if ("object" === typeof error && null !== error && "string" === typeof error.environmentName) {
7264 var JSCompiler_inline_result = error.environmentName;
7265 error = [
7266 "%o\n\n%s\n\n%s\n",
7267 error,
7268 componentNameMessage,
7269 recreateMessage
7270 ].slice(0);
7271 "string" === typeof error[0] ? error.splice(
7272 0,
7273 1,
7274 badgeFormat + " " + error[0],
7275 badgeStyle,
7276 pad + JSCompiler_inline_result + pad,
7277 resetStyle
7278 ) : error.splice(
7279 0,
7280 0,
7281 badgeFormat,
7282 badgeStyle,
7283 pad + JSCompiler_inline_result + pad,
7284 resetStyle
7285 );
7286 error.unshift(console);
7287 JSCompiler_inline_result = bind.apply(console.error, error);
7288 JSCompiler_inline_result();
7289 } else
7290 console.error(
7291 "%o\n\n%s\n\n%s\n",
7292 error,
7293 componentNameMessage,
7294 recreateMessage
7295 );
7296 }
7297 function defaultOnRecoverableError(error) {
7298 reportGlobalError(error);
7299 }
7300 function logUncaughtError(root2, errorInfo) {
7301 try {
7302 componentName = errorInfo.source ? getComponentNameFromFiber(errorInfo.source) : null;
7303 errorBoundaryName = null;
7304 var error = errorInfo.value;
7305 if (null !== ReactSharedInternals.actQueue)
7306 ReactSharedInternals.thrownErrors.push(error);
7307 else {
7308 var onUncaughtError = root2.onUncaughtError;
7309 onUncaughtError(error, { componentStack: errorInfo.stack });
7310 }
7311 } catch (e$5) {
7312 setTimeout(function() {
7313 throw e$5;
7314 });
7315 }
7316 }
7317 function logCaughtError(root2, boundary, errorInfo) {
7318 try {
7319 componentName = errorInfo.source ? getComponentNameFromFiber(errorInfo.source) : null;
7320 errorBoundaryName = getComponentNameFromFiber(boundary);
7321 var onCaughtError = root2.onCaughtError;
7322 onCaughtError(errorInfo.value, {
7323 componentStack: errorInfo.stack,
7324 errorBoundary: 1 === boundary.tag ? boundary.stateNode : null
7325 });
7326 } catch (e$6) {
7327 setTimeout(function() {
7328 throw e$6;
7329 });
7330 }
7331 }
7332 function createRootErrorUpdate(root2, errorInfo, lane) {
7333 lane = createUpdate(lane);
7334 lane.tag = CaptureUpdate;
7335 lane.payload = { element: null };
7336 lane.callback = function() {
7337 runWithFiberInDEV(errorInfo.source, logUncaughtError, root2, errorInfo);
7338 };
7339 return lane;
7340 }
7341 function createClassErrorUpdate(lane) {
7342 lane = createUpdate(lane);
7343 lane.tag = CaptureUpdate;
7344 return lane;
7345 }
7346 function initializeClassErrorUpdate(update, root2, fiber, errorInfo) {
7347 var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
7348 if ("function" === typeof getDerivedStateFromError) {
7349 var error = errorInfo.value;
7350 update.payload = function() {
7351 return getDerivedStateFromError(error);
7352 };
7353 update.callback = function() {
7354 markFailedErrorBoundaryForHotReloading(fiber);
7355 runWithFiberInDEV(
7356 errorInfo.source,
7357 logCaughtError,
7358 root2,
7359 fiber,
7360 errorInfo
7361 );
7362 };
7363 }
7364 var inst = fiber.stateNode;
7365 null !== inst && "function" === typeof inst.componentDidCatch && (update.callback = function() {
7366 markFailedErrorBoundaryForHotReloading(fiber);
7367 runWithFiberInDEV(
7368 errorInfo.source,
7369 logCaughtError,
7370 root2,
7371 fiber,
7372 errorInfo
7373 );
7374 "function" !== typeof getDerivedStateFromError && (null === legacyErrorBoundariesThatAlreadyFailed ? legacyErrorBoundariesThatAlreadyFailed = /* @__PURE__ */ new Set([this]) : legacyErrorBoundariesThatAlreadyFailed.add(this));
7375 callComponentDidCatchInDEV(this, errorInfo);
7376 "function" === typeof getDerivedStateFromError || 0 === (fiber.lanes & 2) && console.error(
7377 "%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",
7378 getComponentNameFromFiber(fiber) || "Unknown"
7379 );
7380 });
7381 }
7382 function throwException(root2, returnFiber, sourceFiber, value, rootRenderLanes) {
7383 sourceFiber.flags |= 32768;
7384 isDevToolsPresent && restorePendingUpdaters(root2, rootRenderLanes);
7385 if (null !== value && "object" === typeof value && "function" === typeof value.then) {
7386 returnFiber = sourceFiber.alternate;
7387 null !== returnFiber && propagateParentContextChanges(
7388 returnFiber,
7389 sourceFiber,
7390 rootRenderLanes,
7391 true
7392 );
7393 isHydrating && (didSuspendOrErrorDEV = true);
7394 sourceFiber = suspenseHandlerStackCursor.current;
7395 if (null !== sourceFiber) {
7396 switch (sourceFiber.tag) {
7397 case 31:
7398 case 13:
7399 return null === shellBoundary ? renderDidSuspendDelayIfPossible() : null === sourceFiber.alternate && workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootSuspended), sourceFiber.flags &= -257, sourceFiber.flags |= 65536, sourceFiber.lanes = rootRenderLanes, value === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, null === returnFiber ? sourceFiber.updateQueue = /* @__PURE__ */ new Set([value]) : returnFiber.add(value), attachPingListener(root2, value, rootRenderLanes)), false;
7400 case 22:
7401 return sourceFiber.flags |= 65536, value === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, null === returnFiber ? (returnFiber = {
7402 transitions: null,
7403 markerInstances: null,
7404 retryQueue: /* @__PURE__ */ new Set([value])
7405 }, sourceFiber.updateQueue = returnFiber) : (sourceFiber = returnFiber.retryQueue, null === sourceFiber ? returnFiber.retryQueue = /* @__PURE__ */ new Set([value]) : sourceFiber.add(value)), attachPingListener(root2, value, rootRenderLanes)), false;
7406 }
7407 throw Error(
7408 "Unexpected Suspense handler tag (" + sourceFiber.tag + "). This is a bug in React."
7409 );
7410 }
7411 attachPingListener(root2, value, rootRenderLanes);
7412 renderDidSuspendDelayIfPossible();
7413 return false;
7414 }
7415 if (isHydrating)
7416 return didSuspendOrErrorDEV = true, returnFiber = suspenseHandlerStackCursor.current, null !== returnFiber ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), returnFiber.flags |= 65536, returnFiber.lanes = rootRenderLanes, value !== HydrationMismatchException && queueHydrationError(
7417 createCapturedValueAtFiber(
7418 Error(
7419 "There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",
7420 { cause: value }
7421 ),
7422 sourceFiber
7423 )
7424 )) : (value !== HydrationMismatchException && queueHydrationError(
7425 createCapturedValueAtFiber(
7426 Error(
7427 "There was an error while hydrating but React was able to recover by instead client rendering the entire root.",
7428 { cause: value }
7429 ),
7430 sourceFiber
7431 )
7432 ), root2 = root2.current.alternate, root2.flags |= 65536, rootRenderLanes &= -rootRenderLanes, root2.lanes |= rootRenderLanes, value = createCapturedValueAtFiber(value, sourceFiber), rootRenderLanes = createRootErrorUpdate(
7433 root2.stateNode,
7434 value,
7435 rootRenderLanes
7436 ), enqueueCapturedUpdate(root2, rootRenderLanes), workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored)), false;
7437 var error = createCapturedValueAtFiber(
7438 Error(
7439 "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",
7440 { cause: value }
7441 ),
7442 sourceFiber
7443 );
7444 null === workInProgressRootConcurrentErrors ? workInProgressRootConcurrentErrors = [error] : workInProgressRootConcurrentErrors.push(error);
7445 workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored);
7446 if (null === returnFiber) return true;
7447 value = createCapturedValueAtFiber(value, sourceFiber);
7448 sourceFiber = returnFiber;
7449 do {
7450 switch (sourceFiber.tag) {
7451 case 3:
7452 return sourceFiber.flags |= 65536, root2 = rootRenderLanes & -rootRenderLanes, sourceFiber.lanes |= root2, root2 = createRootErrorUpdate(
7453 sourceFiber.stateNode,
7454 value,
7455 root2
7456 ), enqueueCapturedUpdate(sourceFiber, root2), false;
7457 case 1:
7458 if (returnFiber = sourceFiber.type, error = sourceFiber.stateNode, 0 === (sourceFiber.flags & 128) && ("function" === typeof returnFiber.getDerivedStateFromError || null !== error && "function" === typeof error.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(error))))
7459 return sourceFiber.flags |= 65536, rootRenderLanes &= -rootRenderLanes, sourceFiber.lanes |= rootRenderLanes, rootRenderLanes = createClassErrorUpdate(rootRenderLanes), initializeClassErrorUpdate(
7460 rootRenderLanes,
7461 root2,
7462 sourceFiber,
7463 value
7464 ), enqueueCapturedUpdate(sourceFiber, rootRenderLanes), false;
7465 }
7466 sourceFiber = sourceFiber.return;
7467 } while (null !== sourceFiber);
7468 return false;
7469 }
7470 function reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2) {
7471 workInProgress2.child = null === current2 ? mountChildFibers(workInProgress2, null, nextChildren, renderLanes2) : reconcileChildFibers(
7472 workInProgress2,
7473 current2.child,
7474 nextChildren,
7475 renderLanes2
7476 );
7477 }
7478 function updateForwardRef(current2, workInProgress2, Component, nextProps, renderLanes2) {
7479 Component = Component.render;
7480 var ref = workInProgress2.ref;
7481 if ("ref" in nextProps) {
7482 var propsWithoutRef = {};
7483 for (var key in nextProps)
7484 "ref" !== key && (propsWithoutRef[key] = nextProps[key]);
7485 } else propsWithoutRef = nextProps;
7486 prepareToReadContext(workInProgress2);
7487 nextProps = renderWithHooks(
7488 current2,
7489 workInProgress2,
7490 Component,
7491 propsWithoutRef,
7492 ref,
7493 renderLanes2
7494 );
7495 key = checkDidRenderIdHook();
7496 if (null !== current2 && !didReceiveUpdate)
7497 return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
7498 isHydrating && key && pushMaterializedTreeId(workInProgress2);
7499 workInProgress2.flags |= 1;
7500 reconcileChildren(current2, workInProgress2, nextProps, renderLanes2);
7501 return workInProgress2.child;
7502 }
7503 function updateMemoComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
7504 if (null === current2) {
7505 var type = Component.type;
7506 if ("function" === typeof type && !shouldConstruct(type) && void 0 === type.defaultProps && null === Component.compare)
7507 return Component = resolveFunctionForHotReloading(type), workInProgress2.tag = 15, workInProgress2.type = Component, validateFunctionComponentInDev(workInProgress2, type), updateSimpleMemoComponent(
7508 current2,
7509 workInProgress2,
7510 Component,
7511 nextProps,
7512 renderLanes2
7513 );
7514 current2 = createFiberFromTypeAndProps(
7515 Component.type,
7516 null,
7517 nextProps,
7518 workInProgress2,
7519 workInProgress2.mode,
7520 renderLanes2
7521 );
7522 current2.ref = workInProgress2.ref;
7523 current2.return = workInProgress2;
7524 return workInProgress2.child = current2;
7525 }
7526 type = current2.child;
7527 if (!checkScheduledUpdateOrContext(current2, renderLanes2)) {
7528 var prevProps = type.memoizedProps;
7529 Component = Component.compare;
7530 Component = null !== Component ? Component : shallowEqual;
7531 if (Component(prevProps, nextProps) && current2.ref === workInProgress2.ref)
7532 return bailoutOnAlreadyFinishedWork(
7533 current2,
7534 workInProgress2,
7535 renderLanes2
7536 );
7537 }
7538 workInProgress2.flags |= 1;
7539 current2 = createWorkInProgress(type, nextProps);
7540 current2.ref = workInProgress2.ref;
7541 current2.return = workInProgress2;
7542 return workInProgress2.child = current2;
7543 }
7544 function updateSimpleMemoComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
7545 if (null !== current2) {
7546 var prevProps = current2.memoizedProps;
7547 if (shallowEqual(prevProps, nextProps) && current2.ref === workInProgress2.ref && workInProgress2.type === current2.type)
7548 if (didReceiveUpdate = false, workInProgress2.pendingProps = nextProps = prevProps, checkScheduledUpdateOrContext(current2, renderLanes2))
7549 0 !== (current2.flags & 131072) && (didReceiveUpdate = true);
7550 else
7551 return workInProgress2.lanes = current2.lanes, bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
7552 }
7553 return updateFunctionComponent(
7554 current2,
7555 workInProgress2,
7556 Component,
7557 nextProps,
7558 renderLanes2
7559 );
7560 }
7561 function updateOffscreenComponent(current2, workInProgress2, renderLanes2, nextProps) {
7562 var nextChildren = nextProps.children, prevState = null !== current2 ? current2.memoizedState : null;
7563 null === current2 && null === workInProgress2.stateNode && (workInProgress2.stateNode = {
7564 _visibility: OffscreenVisible,
7565 _pendingMarkers: null,
7566 _retryCache: null,
7567 _transitions: null
7568 });
7569 if ("hidden" === nextProps.mode) {
7570 if (0 !== (workInProgress2.flags & 128)) {
7571 prevState = null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2;
7572 if (null !== current2) {
7573 nextProps = workInProgress2.child = current2.child;
7574 for (nextChildren = 0; null !== nextProps; )
7575 nextChildren = nextChildren | nextProps.lanes | nextProps.childLanes, nextProps = nextProps.sibling;
7576 nextProps = nextChildren & ~prevState;
7577 } else nextProps = 0, workInProgress2.child = null;
7578 return deferHiddenOffscreenComponent(
7579 current2,
7580 workInProgress2,
7581 prevState,
7582 renderLanes2,
7583 nextProps
7584 );
7585 }
7586 if (0 !== (renderLanes2 & 536870912))
7587 workInProgress2.memoizedState = { baseLanes: 0, cachePool: null }, null !== current2 && pushTransition(
7588 workInProgress2,
7589 null !== prevState ? prevState.cachePool : null
7590 ), null !== prevState ? pushHiddenContext(workInProgress2, prevState) : reuseHiddenContextOnStack(workInProgress2), pushOffscreenSuspenseHandler(workInProgress2);
7591 else
7592 return nextProps = workInProgress2.lanes = 536870912, deferHiddenOffscreenComponent(
7593 current2,
7594 workInProgress2,
7595 null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2,
7596 renderLanes2,
7597 nextProps
7598 );
7599 } else
7600 null !== prevState ? (pushTransition(workInProgress2, prevState.cachePool), pushHiddenContext(workInProgress2, prevState), reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.memoizedState = null) : (null !== current2 && pushTransition(workInProgress2, null), reuseHiddenContextOnStack(workInProgress2), reuseSuspenseHandlerOnStack(workInProgress2));
7601 reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2);
7602 return workInProgress2.child;
7603 }
7604 function bailoutOffscreenComponent(current2, workInProgress2) {
7605 null !== current2 && 22 === current2.tag || null !== workInProgress2.stateNode || (workInProgress2.stateNode = {
7606 _visibility: OffscreenVisible,
7607 _pendingMarkers: null,
7608 _retryCache: null,
7609 _transitions: null
7610 });
7611 return workInProgress2.sibling;
7612 }
7613 function deferHiddenOffscreenComponent(current2, workInProgress2, nextBaseLanes, renderLanes2, remainingChildLanes) {
7614 var JSCompiler_inline_result = peekCacheFromPool();
7615 JSCompiler_inline_result = null === JSCompiler_inline_result ? null : {
7616 parent: CacheContext._currentValue,
7617 pool: JSCompiler_inline_result
7618 };
7619 workInProgress2.memoizedState = {
7620 baseLanes: nextBaseLanes,
7621 cachePool: JSCompiler_inline_result
7622 };
7623 null !== current2 && pushTransition(workInProgress2, null);
7624 reuseHiddenContextOnStack(workInProgress2);
7625 pushOffscreenSuspenseHandler(workInProgress2);
7626 null !== current2 && propagateParentContextChanges(current2, workInProgress2, renderLanes2, true);
7627 workInProgress2.childLanes = remainingChildLanes;
7628 return null;
7629 }
7630 function mountActivityChildren(workInProgress2, nextProps) {
7631 var hiddenProp = nextProps.hidden;
7632 void 0 !== hiddenProp && console.error(
7633 `<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
7634 - <Activity %s>
7635 + <Activity %s>`,
7636 true === hiddenProp ? "hidden" : false === hiddenProp ? "hidden={false}" : "hidden={...}",
7637 hiddenProp ? 'mode="hidden"' : 'mode="visible"'
7638 );
7639 nextProps = mountWorkInProgressOffscreenFiber(
7640 { mode: nextProps.mode, children: nextProps.children },
7641 workInProgress2.mode
7642 );
7643 nextProps.ref = workInProgress2.ref;
7644 workInProgress2.child = nextProps;
7645 nextProps.return = workInProgress2;
7646 return nextProps;
7647 }
7648 function retryActivityComponentWithoutHydrating(current2, workInProgress2, renderLanes2) {
7649 reconcileChildFibers(workInProgress2, current2.child, null, renderLanes2);
7650 current2 = mountActivityChildren(
7651 workInProgress2,
7652 workInProgress2.pendingProps
7653 );
7654 current2.flags |= 2;
7655 popSuspenseHandler(workInProgress2);
7656 workInProgress2.memoizedState = null;
7657 return current2;
7658 }
7659 function updateActivityComponent(current2, workInProgress2, renderLanes2) {
7660 var nextProps = workInProgress2.pendingProps, didSuspend = 0 !== (workInProgress2.flags & 128);
7661 workInProgress2.flags &= -129;
7662 if (null === current2) {
7663 if (isHydrating) {
7664 if ("hidden" === nextProps.mode)
7665 return current2 = mountActivityChildren(workInProgress2, nextProps), workInProgress2.lanes = 536870912, bailoutOffscreenComponent(null, current2);
7666 pushDehydratedActivitySuspenseHandler(workInProgress2);
7667 (current2 = nextHydratableInstance) ? (renderLanes2 = canHydrateHydrationBoundary(
7668 current2,
7669 rootOrSingletonContext
7670 ), renderLanes2 = null !== renderLanes2 && renderLanes2.data === ACTIVITY_START_DATA ? renderLanes2 : null, null !== renderLanes2 && (nextProps = {
7671 dehydrated: renderLanes2,
7672 treeContext: getSuspendedTreeContext(),
7673 retryLane: 536870912,
7674 hydrationErrors: null
7675 }, workInProgress2.memoizedState = nextProps, nextProps = createFiberFromDehydratedFragment(renderLanes2), nextProps.return = workInProgress2, workInProgress2.child = nextProps, hydrationParentFiber = workInProgress2, nextHydratableInstance = null)) : renderLanes2 = null;
7676 if (null === renderLanes2)
7677 throw warnNonHydratedInstance(workInProgress2, current2), throwOnHydrationMismatch(workInProgress2);
7678 workInProgress2.lanes = 536870912;
7679 return null;
7680 }
7681 return mountActivityChildren(workInProgress2, nextProps);
7682 }
7683 var prevState = current2.memoizedState;
7684 if (null !== prevState) {
7685 var activityInstance = prevState.dehydrated;
7686 pushDehydratedActivitySuspenseHandler(workInProgress2);
7687 if (didSuspend)
7688 if (workInProgress2.flags & 256)
7689 workInProgress2.flags &= -257, workInProgress2 = retryActivityComponentWithoutHydrating(
7690 current2,
7691 workInProgress2,
7692 renderLanes2
7693 );
7694 else if (null !== workInProgress2.memoizedState)
7695 workInProgress2.child = current2.child, workInProgress2.flags |= 128, workInProgress2 = null;
7696 else
7697 throw Error(
7698 "Client rendering an Activity suspended it again. This is a bug in React."
7699 );
7700 else if (warnIfHydrating(), 0 !== (renderLanes2 & 536870912) && markRenderDerivedCause(workInProgress2), didReceiveUpdate || propagateParentContextChanges(
7701 current2,
7702 workInProgress2,
7703 renderLanes2,
7704 false
7705 ), didSuspend = 0 !== (renderLanes2 & current2.childLanes), didReceiveUpdate || didSuspend) {
7706 nextProps = workInProgressRoot;
7707 if (null !== nextProps && (activityInstance = getBumpedLaneForHydration(
7708 nextProps,
7709 renderLanes2
7710 ), 0 !== activityInstance && activityInstance !== prevState.retryLane))
7711 throw prevState.retryLane = activityInstance, enqueueConcurrentRenderForLane(current2, activityInstance), scheduleUpdateOnFiber(nextProps, current2, activityInstance), SelectiveHydrationException;
7712 renderDidSuspendDelayIfPossible();
7713 workInProgress2 = retryActivityComponentWithoutHydrating(
7714 current2,
7715 workInProgress2,
7716 renderLanes2
7717 );
7718 } else
7719 current2 = prevState.treeContext, nextHydratableInstance = getNextHydratable(
7720 activityInstance.nextSibling
7721 ), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, didSuspendOrErrorDEV = false, hydrationDiffRootDEV = null, rootOrSingletonContext = false, null !== current2 && restoreSuspendedTreeContext(workInProgress2, current2), workInProgress2 = mountActivityChildren(workInProgress2, nextProps), workInProgress2.flags |= 4096;
7722 return workInProgress2;
7723 }
7724 prevState = current2.child;
7725 nextProps = { mode: nextProps.mode, children: nextProps.children };
7726 0 !== (renderLanes2 & 536870912) && 0 !== (renderLanes2 & current2.lanes) && markRenderDerivedCause(workInProgress2);
7727 current2 = createWorkInProgress(prevState, nextProps);
7728 current2.ref = workInProgress2.ref;
7729 workInProgress2.child = current2;
7730 current2.return = workInProgress2;
7731 return current2;
7732 }
7733 function markRef(current2, workInProgress2) {
7734 var ref = workInProgress2.ref;
7735 if (null === ref)
7736 null !== current2 && null !== current2.ref && (workInProgress2.flags |= 4194816);
7737 else {
7738 if ("function" !== typeof ref && "object" !== typeof ref)
7739 throw Error(
7740 "Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
7741 );
7742 if (null === current2 || current2.ref !== ref)
7743 workInProgress2.flags |= 4194816;
7744 }
7745 }
7746 function updateFunctionComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
7747 if (Component.prototype && "function" === typeof Component.prototype.render) {
7748 var componentName2 = getComponentNameFromType(Component) || "Unknown";
7749 didWarnAboutBadClass[componentName2] || (console.error(
7750 "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.",
7751 componentName2,
7752 componentName2
7753 ), didWarnAboutBadClass[componentName2] = true);
7754 }
7755 workInProgress2.mode & StrictLegacyMode && ReactStrictModeWarnings.recordLegacyContextWarning(
7756 workInProgress2,
7757 null
7758 );
7759 null === current2 && (validateFunctionComponentInDev(workInProgress2, workInProgress2.type), Component.contextTypes && (componentName2 = getComponentNameFromType(Component) || "Unknown", didWarnAboutContextTypes[componentName2] || (didWarnAboutContextTypes[componentName2] = true, console.error(
7760 "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",
7761 componentName2
7762 ))));
7763 prepareToReadContext(workInProgress2);
7764 Component = renderWithHooks(
7765 current2,
7766 workInProgress2,
7767 Component,
7768 nextProps,
7769 void 0,
7770 renderLanes2
7771 );
7772 nextProps = checkDidRenderIdHook();
7773 if (null !== current2 && !didReceiveUpdate)
7774 return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
7775 isHydrating && nextProps && pushMaterializedTreeId(workInProgress2);
7776 workInProgress2.flags |= 1;
7777 reconcileChildren(current2, workInProgress2, Component, renderLanes2);
7778 return workInProgress2.child;
7779 }
7780 function replayFunctionComponent(current2, workInProgress2, nextProps, Component, secondArg, renderLanes2) {
7781 prepareToReadContext(workInProgress2);
7782 hookTypesUpdateIndexDev = -1;
7783 ignorePreviousDependencies = null !== current2 && current2.type !== workInProgress2.type;
7784 workInProgress2.updateQueue = null;
7785 nextProps = renderWithHooksAgain(
7786 workInProgress2,
7787 Component,
7788 nextProps,
7789 secondArg
7790 );
7791 finishRenderingHooks(current2, workInProgress2);
7792 Component = checkDidRenderIdHook();
7793 if (null !== current2 && !didReceiveUpdate)
7794 return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
7795 isHydrating && Component && pushMaterializedTreeId(workInProgress2);
7796 workInProgress2.flags |= 1;
7797 reconcileChildren(current2, workInProgress2, nextProps, renderLanes2);
7798 return workInProgress2.child;
7799 }
7800 function updateClassComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
7801 switch (shouldErrorImpl(workInProgress2)) {
7802 case false:
7803 var _instance = workInProgress2.stateNode, state = new workInProgress2.type(
7804 workInProgress2.memoizedProps,
7805 _instance.context
7806 ).state;
7807 _instance.updater.enqueueSetState(_instance, state, null);
7808 break;
7809 case true:
7810 workInProgress2.flags |= 128;
7811 workInProgress2.flags |= 65536;
7812 _instance = Error("Simulated error coming from DevTools");
7813 var lane = renderLanes2 & -renderLanes2;
7814 workInProgress2.lanes |= lane;
7815 state = workInProgressRoot;
7816 if (null === state)
7817 throw Error(
7818 "Expected a work-in-progress root. This is a bug in React. Please file an issue."
7819 );
7820 lane = createClassErrorUpdate(lane);
7821 initializeClassErrorUpdate(
7822 lane,
7823 state,
7824 workInProgress2,
7825 createCapturedValueAtFiber(_instance, workInProgress2)
7826 );
7827 enqueueCapturedUpdate(workInProgress2, lane);
7828 }
7829 prepareToReadContext(workInProgress2);
7830 if (null === workInProgress2.stateNode) {
7831 state = emptyContextObject;
7832 _instance = Component.contextType;
7833 "contextType" in Component && null !== _instance && (void 0 === _instance || _instance.$$typeof !== REACT_CONTEXT_TYPE) && !didWarnAboutInvalidateContextType.has(Component) && (didWarnAboutInvalidateContextType.add(Component), lane = void 0 === _instance ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." : "object" !== typeof _instance ? " However, it is set to a " + typeof _instance + "." : _instance.$$typeof === REACT_CONSUMER_TYPE ? " Did you accidentally pass the Context.Consumer instead?" : " However, it is set to an object with keys {" + Object.keys(_instance).join(", ") + "}.", console.error(
7834 "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",
7835 getComponentNameFromType(Component) || "Component",
7836 lane
7837 ));
7838 "object" === typeof _instance && null !== _instance && (state = readContext(_instance));
7839 _instance = new Component(nextProps, state);
7840 if (workInProgress2.mode & StrictLegacyMode) {
7841 setIsStrictModeForDevtools(true);
7842 try {
7843 _instance = new Component(nextProps, state);
7844 } finally {
7845 setIsStrictModeForDevtools(false);
7846 }
7847 }
7848 state = workInProgress2.memoizedState = null !== _instance.state && void 0 !== _instance.state ? _instance.state : null;
7849 _instance.updater = classComponentUpdater;
7850 workInProgress2.stateNode = _instance;
7851 _instance._reactInternals = workInProgress2;
7852 _instance._reactInternalInstance = fakeInternalInstance;
7853 "function" === typeof Component.getDerivedStateFromProps && null === state && (state = getComponentNameFromType(Component) || "Component", didWarnAboutUninitializedState.has(state) || (didWarnAboutUninitializedState.add(state), console.error(
7854 "`%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.",
7855 state,
7856 null === _instance.state ? "null" : "undefined",
7857 state
7858 )));
7859 if ("function" === typeof Component.getDerivedStateFromProps || "function" === typeof _instance.getSnapshotBeforeUpdate) {
7860 var foundWillUpdateName = lane = state = null;
7861 "function" === typeof _instance.componentWillMount && true !== _instance.componentWillMount.__suppressDeprecationWarning ? state = "componentWillMount" : "function" === typeof _instance.UNSAFE_componentWillMount && (state = "UNSAFE_componentWillMount");
7862 "function" === typeof _instance.componentWillReceiveProps && true !== _instance.componentWillReceiveProps.__suppressDeprecationWarning ? lane = "componentWillReceiveProps" : "function" === typeof _instance.UNSAFE_componentWillReceiveProps && (lane = "UNSAFE_componentWillReceiveProps");
7863 "function" === typeof _instance.componentWillUpdate && true !== _instance.componentWillUpdate.__suppressDeprecationWarning ? foundWillUpdateName = "componentWillUpdate" : "function" === typeof _instance.UNSAFE_componentWillUpdate && (foundWillUpdateName = "UNSAFE_componentWillUpdate");
7864 if (null !== state || null !== lane || null !== foundWillUpdateName) {
7865 _instance = getComponentNameFromType(Component) || "Component";
7866 var newApiName = "function" === typeof Component.getDerivedStateFromProps ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
7867 didWarnAboutLegacyLifecyclesAndDerivedState.has(_instance) || (didWarnAboutLegacyLifecyclesAndDerivedState.add(_instance), console.error(
7868 "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\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles",
7869 _instance,
7870 newApiName,
7871 null !== state ? "\n " + state : "",
7872 null !== lane ? "\n " + lane : "",
7873 null !== foundWillUpdateName ? "\n " + foundWillUpdateName : ""
7874 ));
7875 }
7876 }
7877 _instance = workInProgress2.stateNode;
7878 state = getComponentNameFromType(Component) || "Component";
7879 _instance.render || (Component.prototype && "function" === typeof Component.prototype.render ? console.error(
7880 "No `render` method found on the %s instance: did you accidentally return an object from the constructor?",
7881 state
7882 ) : console.error(
7883 "No `render` method found on the %s instance: you may have forgotten to define `render`.",
7884 state
7885 ));
7886 !_instance.getInitialState || _instance.getInitialState.isReactClassApproved || _instance.state || console.error(
7887 "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?",
7888 state
7889 );
7890 _instance.getDefaultProps && !_instance.getDefaultProps.isReactClassApproved && console.error(
7891 "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.",
7892 state
7893 );
7894 _instance.contextType && console.error(
7895 "contextType was defined as an instance property on %s. Use a static property to define contextType instead.",
7896 state
7897 );
7898 Component.childContextTypes && !didWarnAboutChildContextTypes.has(Component) && (didWarnAboutChildContextTypes.add(Component), console.error(
7899 "%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",
7900 state
7901 ));
7902 Component.contextTypes && !didWarnAboutContextTypes$1.has(Component) && (didWarnAboutContextTypes$1.add(Component), console.error(
7903 "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",
7904 state
7905 ));
7906 "function" === typeof _instance.componentShouldUpdate && console.error(
7907 "%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.",
7908 state
7909 );
7910 Component.prototype && Component.prototype.isPureReactComponent && "undefined" !== typeof _instance.shouldComponentUpdate && console.error(
7911 "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",
7912 getComponentNameFromType(Component) || "A pure component"
7913 );
7914 "function" === typeof _instance.componentDidUnmount && console.error(
7915 "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",
7916 state
7917 );
7918 "function" === typeof _instance.componentDidReceiveProps && console.error(
7919 "%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().",
7920 state
7921 );
7922 "function" === typeof _instance.componentWillRecieveProps && console.error(
7923 "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",
7924 state
7925 );
7926 "function" === typeof _instance.UNSAFE_componentWillRecieveProps && console.error(
7927 "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",
7928 state
7929 );
7930 lane = _instance.props !== nextProps;
7931 void 0 !== _instance.props && lane && console.error(
7932 "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",
7933 state
7934 );
7935 _instance.defaultProps && console.error(
7936 "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",
7937 state,
7938 state
7939 );
7940 "function" !== typeof _instance.getSnapshotBeforeUpdate || "function" === typeof _instance.componentDidUpdate || didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) || (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component), console.error(
7941 "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",
7942 getComponentNameFromType(Component)
7943 ));
7944 "function" === typeof _instance.getDerivedStateFromProps && console.error(
7945 "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
7946 state
7947 );
7948 "function" === typeof _instance.getDerivedStateFromError && console.error(
7949 "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
7950 state
7951 );
7952 "function" === typeof Component.getSnapshotBeforeUpdate && console.error(
7953 "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",
7954 state
7955 );
7956 (lane = _instance.state) && ("object" !== typeof lane || isArrayImpl(lane)) && console.error("%s.state: must be set to an object or null", state);
7957 "function" === typeof _instance.getChildContext && "object" !== typeof Component.childContextTypes && console.error(
7958 "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",
7959 state
7960 );
7961 _instance = workInProgress2.stateNode;
7962 _instance.props = nextProps;
7963 _instance.state = workInProgress2.memoizedState;
7964 _instance.refs = {};
7965 initializeUpdateQueue(workInProgress2);
7966 state = Component.contextType;
7967 _instance.context = "object" === typeof state && null !== state ? readContext(state) : emptyContextObject;
7968 _instance.state === nextProps && (state = getComponentNameFromType(Component) || "Component", didWarnAboutDirectlyAssigningPropsToState.has(state) || (didWarnAboutDirectlyAssigningPropsToState.add(state), console.error(
7969 "%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.",
7970 state
7971 )));
7972 workInProgress2.mode & StrictLegacyMode && ReactStrictModeWarnings.recordLegacyContextWarning(
7973 workInProgress2,
7974 _instance
7975 );
7976 ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(
7977 workInProgress2,
7978 _instance
7979 );
7980 _instance.state = workInProgress2.memoizedState;
7981 state = Component.getDerivedStateFromProps;
7982 "function" === typeof state && (applyDerivedStateFromProps(
7983 workInProgress2,
7984 Component,
7985 state,
7986 nextProps
7987 ), _instance.state = workInProgress2.memoizedState);
7988 "function" === typeof Component.getDerivedStateFromProps || "function" === typeof _instance.getSnapshotBeforeUpdate || "function" !== typeof _instance.UNSAFE_componentWillMount && "function" !== typeof _instance.componentWillMount || (state = _instance.state, "function" === typeof _instance.componentWillMount && _instance.componentWillMount(), "function" === typeof _instance.UNSAFE_componentWillMount && _instance.UNSAFE_componentWillMount(), state !== _instance.state && (console.error(
7989 "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
7990 getComponentNameFromFiber(workInProgress2) || "Component"
7991 ), classComponentUpdater.enqueueReplaceState(
7992 _instance,
7993 _instance.state,
7994 null
7995 )), processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction(), _instance.state = workInProgress2.memoizedState);
7996 "function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308);
7997 (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728);
7998 _instance = true;
7999 } else if (null === current2) {
8000 _instance = workInProgress2.stateNode;
8001 var unresolvedOldProps = workInProgress2.memoizedProps;
8002 lane = resolveClassComponentProps(Component, unresolvedOldProps);
8003 _instance.props = lane;
8004 var oldContext = _instance.context;
8005 foundWillUpdateName = Component.contextType;
8006 state = emptyContextObject;
8007 "object" === typeof foundWillUpdateName && null !== foundWillUpdateName && (state = readContext(foundWillUpdateName));
8008 newApiName = Component.getDerivedStateFromProps;
8009 foundWillUpdateName = "function" === typeof newApiName || "function" === typeof _instance.getSnapshotBeforeUpdate;
8010 unresolvedOldProps = workInProgress2.pendingProps !== unresolvedOldProps;
8011 foundWillUpdateName || "function" !== typeof _instance.UNSAFE_componentWillReceiveProps && "function" !== typeof _instance.componentWillReceiveProps || (unresolvedOldProps || oldContext !== state) && callComponentWillReceiveProps(
8012 workInProgress2,
8013 _instance,
8014 nextProps,
8015 state
8016 );
8017 hasForceUpdate = false;
8018 var oldState = workInProgress2.memoizedState;
8019 _instance.state = oldState;
8020 processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2);
8021 suspendIfUpdateReadFromEntangledAsyncAction();
8022 oldContext = workInProgress2.memoizedState;
8023 unresolvedOldProps || oldState !== oldContext || hasForceUpdate ? ("function" === typeof newApiName && (applyDerivedStateFromProps(
8024 workInProgress2,
8025 Component,
8026 newApiName,
8027 nextProps
8028 ), oldContext = workInProgress2.memoizedState), (lane = hasForceUpdate || checkShouldComponentUpdate(
8029 workInProgress2,
8030 Component,
8031 lane,
8032 nextProps,
8033 oldState,
8034 oldContext,
8035 state
8036 )) ? (foundWillUpdateName || "function" !== typeof _instance.UNSAFE_componentWillMount && "function" !== typeof _instance.componentWillMount || ("function" === typeof _instance.componentWillMount && _instance.componentWillMount(), "function" === typeof _instance.UNSAFE_componentWillMount && _instance.UNSAFE_componentWillMount()), "function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308), (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728)) : ("function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308), (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = oldContext), _instance.props = nextProps, _instance.state = oldContext, _instance.context = state, _instance = lane) : ("function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308), (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728), _instance = false);
8037 } else {
8038 _instance = workInProgress2.stateNode;
8039 cloneUpdateQueue(current2, workInProgress2);
8040 state = workInProgress2.memoizedProps;
8041 foundWillUpdateName = resolveClassComponentProps(Component, state);
8042 _instance.props = foundWillUpdateName;
8043 newApiName = workInProgress2.pendingProps;
8044 oldState = _instance.context;
8045 oldContext = Component.contextType;
8046 lane = emptyContextObject;
8047 "object" === typeof oldContext && null !== oldContext && (lane = readContext(oldContext));
8048 unresolvedOldProps = Component.getDerivedStateFromProps;
8049 (oldContext = "function" === typeof unresolvedOldProps || "function" === typeof _instance.getSnapshotBeforeUpdate) || "function" !== typeof _instance.UNSAFE_componentWillReceiveProps && "function" !== typeof _instance.componentWillReceiveProps || (state !== newApiName || oldState !== lane) && callComponentWillReceiveProps(
8050 workInProgress2,
8051 _instance,
8052 nextProps,
8053 lane
8054 );
8055 hasForceUpdate = false;
8056 oldState = workInProgress2.memoizedState;
8057 _instance.state = oldState;
8058 processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2);
8059 suspendIfUpdateReadFromEntangledAsyncAction();
8060 var newState = workInProgress2.memoizedState;
8061 state !== newApiName || oldState !== newState || hasForceUpdate || null !== current2 && null !== current2.dependencies && checkIfContextChanged(current2.dependencies) ? ("function" === typeof unresolvedOldProps && (applyDerivedStateFromProps(
8062 workInProgress2,
8063 Component,
8064 unresolvedOldProps,
8065 nextProps
8066 ), newState = workInProgress2.memoizedState), (foundWillUpdateName = hasForceUpdate || checkShouldComponentUpdate(
8067 workInProgress2,
8068 Component,
8069 foundWillUpdateName,
8070 nextProps,
8071 oldState,
8072 newState,
8073 lane
8074 ) || null !== current2 && null !== current2.dependencies && checkIfContextChanged(current2.dependencies)) ? (oldContext || "function" !== typeof _instance.UNSAFE_componentWillUpdate && "function" !== typeof _instance.componentWillUpdate || ("function" === typeof _instance.componentWillUpdate && _instance.componentWillUpdate(nextProps, newState, lane), "function" === typeof _instance.UNSAFE_componentWillUpdate && _instance.UNSAFE_componentWillUpdate(
8075 nextProps,
8076 newState,
8077 lane
8078 )), "function" === typeof _instance.componentDidUpdate && (workInProgress2.flags |= 4), "function" === typeof _instance.getSnapshotBeforeUpdate && (workInProgress2.flags |= 1024)) : ("function" !== typeof _instance.componentDidUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 4), "function" !== typeof _instance.getSnapshotBeforeUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 1024), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = newState), _instance.props = nextProps, _instance.state = newState, _instance.context = lane, _instance = foundWillUpdateName) : ("function" !== typeof _instance.componentDidUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 4), "function" !== typeof _instance.getSnapshotBeforeUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 1024), _instance = false);
8079 }
8080 lane = _instance;
8081 markRef(current2, workInProgress2);
8082 state = 0 !== (workInProgress2.flags & 128);
8083 if (lane || state) {
8084 lane = workInProgress2.stateNode;
8085 setCurrentFiber(workInProgress2);
8086 if (state && "function" !== typeof Component.getDerivedStateFromError)
8087 Component = null, profilerStartTime = -1;
8088 else if (Component = callRenderInDEV(lane), workInProgress2.mode & StrictLegacyMode) {
8089 setIsStrictModeForDevtools(true);
8090 try {
8091 callRenderInDEV(lane);
8092 } finally {
8093 setIsStrictModeForDevtools(false);
8094 }
8095 }
8096 workInProgress2.flags |= 1;
8097 null !== current2 && state ? (workInProgress2.child = reconcileChildFibers(
8098 workInProgress2,
8099 current2.child,
8100 null,
8101 renderLanes2
8102 ), workInProgress2.child = reconcileChildFibers(
8103 workInProgress2,
8104 null,
8105 Component,
8106 renderLanes2
8107 )) : reconcileChildren(current2, workInProgress2, Component, renderLanes2);
8108 workInProgress2.memoizedState = lane.state;
8109 current2 = workInProgress2.child;
8110 } else
8111 current2 = bailoutOnAlreadyFinishedWork(
8112 current2,
8113 workInProgress2,
8114 renderLanes2
8115 );
8116 renderLanes2 = workInProgress2.stateNode;
8117 _instance && renderLanes2.props !== nextProps && (didWarnAboutReassigningProps || console.error(
8118 "It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",
8119 getComponentNameFromFiber(workInProgress2) || "a component"
8120 ), didWarnAboutReassigningProps = true);
8121 return current2;
8122 }
8123 function mountHostRootWithoutHydrating(current2, workInProgress2, nextChildren, renderLanes2) {
8124 resetHydrationState();
8125 workInProgress2.flags |= 256;
8126 reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2);
8127 return workInProgress2.child;
8128 }
8129 function validateFunctionComponentInDev(workInProgress2, Component) {
8130 Component && Component.childContextTypes && console.error(
8131 "childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...",
8132 Component.displayName || Component.name || "Component"
8133 );
8134 "function" === typeof Component.getDerivedStateFromProps && (workInProgress2 = getComponentNameFromType(Component) || "Unknown", didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress2] || (console.error(
8135 "%s: Function components do not support getDerivedStateFromProps.",
8136 workInProgress2
8137 ), didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress2] = true));
8138 "object" === typeof Component.contextType && null !== Component.contextType && (Component = getComponentNameFromType(Component) || "Unknown", didWarnAboutContextTypeOnFunctionComponent[Component] || (console.error(
8139 "%s: Function components do not support contextType.",
8140 Component
8141 ), didWarnAboutContextTypeOnFunctionComponent[Component] = true));
8142 }
8143 function mountSuspenseOffscreenState(renderLanes2) {
8144 return { baseLanes: renderLanes2, cachePool: getSuspendedCache() };
8145 }
8146 function getRemainingWorkInPrimaryTree(current2, primaryTreeDidDefer, renderLanes2) {
8147 current2 = null !== current2 ? current2.childLanes & ~renderLanes2 : 0;
8148 primaryTreeDidDefer && (current2 |= workInProgressDeferredLane);
8149 return current2;
8150 }
8151 function updateSuspenseComponent(current2, workInProgress2, renderLanes2) {
8152 var JSCompiler_object_inline_digest_2724;
8153 var JSCompiler_object_inline_stack_2725 = workInProgress2.pendingProps;
8154 shouldSuspendImpl(workInProgress2) && (workInProgress2.flags |= 128);
8155 var JSCompiler_object_inline_message_2723 = false;
8156 var didSuspend = 0 !== (workInProgress2.flags & 128);
8157 (JSCompiler_object_inline_digest_2724 = didSuspend) || (JSCompiler_object_inline_digest_2724 = null !== current2 && null === current2.memoizedState ? false : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback));
8158 JSCompiler_object_inline_digest_2724 && (JSCompiler_object_inline_message_2723 = true, workInProgress2.flags &= -129);
8159 JSCompiler_object_inline_digest_2724 = 0 !== (workInProgress2.flags & 32);
8160 workInProgress2.flags &= -33;
8161 if (null === current2) {
8162 if (isHydrating) {
8163 JSCompiler_object_inline_message_2723 ? pushPrimaryTreeSuspenseHandler(workInProgress2) : reuseSuspenseHandlerOnStack(workInProgress2);
8164 (current2 = nextHydratableInstance) ? (renderLanes2 = canHydrateHydrationBoundary(
8165 current2,
8166 rootOrSingletonContext
8167 ), renderLanes2 = null !== renderLanes2 && renderLanes2.data !== ACTIVITY_START_DATA ? renderLanes2 : null, null !== renderLanes2 && (JSCompiler_object_inline_digest_2724 = {
8168 dehydrated: renderLanes2,
8169 treeContext: getSuspendedTreeContext(),
8170 retryLane: 536870912,
8171 hydrationErrors: null
8172 }, workInProgress2.memoizedState = JSCompiler_object_inline_digest_2724, JSCompiler_object_inline_digest_2724 = createFiberFromDehydratedFragment(renderLanes2), JSCompiler_object_inline_digest_2724.return = workInProgress2, workInProgress2.child = JSCompiler_object_inline_digest_2724, hydrationParentFiber = workInProgress2, nextHydratableInstance = null)) : renderLanes2 = null;
8173 if (null === renderLanes2)
8174 throw warnNonHydratedInstance(workInProgress2, current2), throwOnHydrationMismatch(workInProgress2);
8175 isSuspenseInstanceFallback(renderLanes2) ? workInProgress2.lanes = 32 : workInProgress2.lanes = 536870912;
8176 return null;
8177 }
8178 var nextPrimaryChildren = JSCompiler_object_inline_stack_2725.children;
8179 JSCompiler_object_inline_stack_2725 = JSCompiler_object_inline_stack_2725.fallback;
8180 if (JSCompiler_object_inline_message_2723) {
8181 reuseSuspenseHandlerOnStack(workInProgress2);
8182 var mode = workInProgress2.mode;
8183 nextPrimaryChildren = mountWorkInProgressOffscreenFiber(
8184 { mode: "hidden", children: nextPrimaryChildren },
8185 mode
8186 );
8187 JSCompiler_object_inline_stack_2725 = createFiberFromFragment(
8188 JSCompiler_object_inline_stack_2725,
8189 mode,
8190 renderLanes2,
8191 null
8192 );
8193 nextPrimaryChildren.return = workInProgress2;
8194 JSCompiler_object_inline_stack_2725.return = workInProgress2;
8195 nextPrimaryChildren.sibling = JSCompiler_object_inline_stack_2725;
8196 workInProgress2.child = nextPrimaryChildren;
8197 JSCompiler_object_inline_stack_2725 = workInProgress2.child;
8198 JSCompiler_object_inline_stack_2725.memoizedState = mountSuspenseOffscreenState(renderLanes2);
8199 JSCompiler_object_inline_stack_2725.childLanes = getRemainingWorkInPrimaryTree(
8200 current2,
8201 JSCompiler_object_inline_digest_2724,
8202 renderLanes2
8203 );
8204 workInProgress2.memoizedState = SUSPENDED_MARKER;
8205 return bailoutOffscreenComponent(
8206 null,
8207 JSCompiler_object_inline_stack_2725
8208 );
8209 }
8210 pushPrimaryTreeSuspenseHandler(workInProgress2);
8211 return mountSuspensePrimaryChildren(
8212 workInProgress2,
8213 nextPrimaryChildren
8214 );
8215 }
8216 var prevState = current2.memoizedState;
8217 if (null !== prevState) {
8218 var JSCompiler_object_inline_componentStack_2726 = prevState.dehydrated;
8219 if (null !== JSCompiler_object_inline_componentStack_2726) {
8220 if (didSuspend)
8221 workInProgress2.flags & 256 ? (pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags &= -257, workInProgress2 = retrySuspenseComponentWithoutHydrating(
8222 current2,
8223 workInProgress2,
8224 renderLanes2
8225 )) : null !== workInProgress2.memoizedState ? (reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.child = current2.child, workInProgress2.flags |= 128, workInProgress2 = null) : (reuseSuspenseHandlerOnStack(workInProgress2), nextPrimaryChildren = JSCompiler_object_inline_stack_2725.fallback, mode = workInProgress2.mode, JSCompiler_object_inline_stack_2725 = mountWorkInProgressOffscreenFiber(
8226 {
8227 mode: "visible",
8228 children: JSCompiler_object_inline_stack_2725.children
8229 },
8230 mode
8231 ), nextPrimaryChildren = createFiberFromFragment(
8232 nextPrimaryChildren,
8233 mode,
8234 renderLanes2,
8235 null
8236 ), nextPrimaryChildren.flags |= 2, JSCompiler_object_inline_stack_2725.return = workInProgress2, nextPrimaryChildren.return = workInProgress2, JSCompiler_object_inline_stack_2725.sibling = nextPrimaryChildren, workInProgress2.child = JSCompiler_object_inline_stack_2725, reconcileChildFibers(
8237 workInProgress2,
8238 current2.child,
8239 null,
8240 renderLanes2
8241 ), JSCompiler_object_inline_stack_2725 = workInProgress2.child, JSCompiler_object_inline_stack_2725.memoizedState = mountSuspenseOffscreenState(renderLanes2), JSCompiler_object_inline_stack_2725.childLanes = getRemainingWorkInPrimaryTree(
8242 current2,
8243 JSCompiler_object_inline_digest_2724,
8244 renderLanes2
8245 ), workInProgress2.memoizedState = SUSPENDED_MARKER, workInProgress2 = bailoutOffscreenComponent(
8246 null,
8247 JSCompiler_object_inline_stack_2725
8248 ));
8249 else if (pushPrimaryTreeSuspenseHandler(workInProgress2), warnIfHydrating(), 0 !== (renderLanes2 & 536870912) && markRenderDerivedCause(workInProgress2), isSuspenseInstanceFallback(
8250 JSCompiler_object_inline_componentStack_2726
8251 )) {
8252 JSCompiler_object_inline_digest_2724 = JSCompiler_object_inline_componentStack_2726.nextSibling && JSCompiler_object_inline_componentStack_2726.nextSibling.dataset;
8253 if (JSCompiler_object_inline_digest_2724) {
8254 nextPrimaryChildren = JSCompiler_object_inline_digest_2724.dgst;
8255 var message = JSCompiler_object_inline_digest_2724.msg;
8256 mode = JSCompiler_object_inline_digest_2724.stck;
8257 var componentStack = JSCompiler_object_inline_digest_2724.cstck;
8258 }
8259 JSCompiler_object_inline_message_2723 = message;
8260 JSCompiler_object_inline_digest_2724 = nextPrimaryChildren;
8261 JSCompiler_object_inline_stack_2725 = mode;
8262 JSCompiler_object_inline_componentStack_2726 = componentStack;
8263 nextPrimaryChildren = JSCompiler_object_inline_message_2723;
8264 mode = JSCompiler_object_inline_componentStack_2726;
8265 nextPrimaryChildren = nextPrimaryChildren ? Error(nextPrimaryChildren) : Error(
8266 "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
8267 );
8268 nextPrimaryChildren.stack = JSCompiler_object_inline_stack_2725 || "";
8269 nextPrimaryChildren.digest = JSCompiler_object_inline_digest_2724;
8270 JSCompiler_object_inline_digest_2724 = void 0 === mode ? null : mode;
8271 JSCompiler_object_inline_stack_2725 = {
8272 value: nextPrimaryChildren,
8273 source: null,
8274 stack: JSCompiler_object_inline_digest_2724
8275 };
8276 "string" === typeof JSCompiler_object_inline_digest_2724 && CapturedStacks.set(
8277 nextPrimaryChildren,
8278 JSCompiler_object_inline_stack_2725
8279 );
8280 queueHydrationError(JSCompiler_object_inline_stack_2725);
8281 workInProgress2 = retrySuspenseComponentWithoutHydrating(
8282 current2,
8283 workInProgress2,
8284 renderLanes2
8285 );
8286 } else if (didReceiveUpdate || propagateParentContextChanges(
8287 current2,
8288 workInProgress2,
8289 renderLanes2,
8290 false
8291 ), JSCompiler_object_inline_digest_2724 = 0 !== (renderLanes2 & current2.childLanes), didReceiveUpdate || JSCompiler_object_inline_digest_2724) {
8292 JSCompiler_object_inline_digest_2724 = workInProgressRoot;
8293 if (null !== JSCompiler_object_inline_digest_2724 && (JSCompiler_object_inline_stack_2725 = getBumpedLaneForHydration(
8294 JSCompiler_object_inline_digest_2724,
8295 renderLanes2
8296 ), 0 !== JSCompiler_object_inline_stack_2725 && JSCompiler_object_inline_stack_2725 !== prevState.retryLane))
8297 throw prevState.retryLane = JSCompiler_object_inline_stack_2725, enqueueConcurrentRenderForLane(
8298 current2,
8299 JSCompiler_object_inline_stack_2725
8300 ), scheduleUpdateOnFiber(
8301 JSCompiler_object_inline_digest_2724,
8302 current2,
8303 JSCompiler_object_inline_stack_2725
8304 ), SelectiveHydrationException;
8305 isSuspenseInstancePending(
8306 JSCompiler_object_inline_componentStack_2726
8307 ) || renderDidSuspendDelayIfPossible();
8308 workInProgress2 = retrySuspenseComponentWithoutHydrating(
8309 current2,
8310 workInProgress2,
8311 renderLanes2
8312 );
8313 } else
8314 isSuspenseInstancePending(
8315 JSCompiler_object_inline_componentStack_2726
8316 ) ? (workInProgress2.flags |= 192, workInProgress2.child = current2.child, workInProgress2 = null) : (current2 = prevState.treeContext, nextHydratableInstance = getNextHydratable(
8317 JSCompiler_object_inline_componentStack_2726.nextSibling
8318 ), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, didSuspendOrErrorDEV = false, hydrationDiffRootDEV = null, rootOrSingletonContext = false, null !== current2 && restoreSuspendedTreeContext(workInProgress2, current2), workInProgress2 = mountSuspensePrimaryChildren(
8319 workInProgress2,
8320 JSCompiler_object_inline_stack_2725.children
8321 ), workInProgress2.flags |= 4096);
8322 return workInProgress2;
8323 }
8324 }
8325 if (JSCompiler_object_inline_message_2723)
8326 return reuseSuspenseHandlerOnStack(workInProgress2), nextPrimaryChildren = JSCompiler_object_inline_stack_2725.fallback, mode = workInProgress2.mode, componentStack = current2.child, JSCompiler_object_inline_componentStack_2726 = componentStack.sibling, JSCompiler_object_inline_stack_2725 = createWorkInProgress(
8327 componentStack,
8328 {
8329 mode: "hidden",
8330 children: JSCompiler_object_inline_stack_2725.children
8331 }
8332 ), JSCompiler_object_inline_stack_2725.subtreeFlags = componentStack.subtreeFlags & 65011712, null !== JSCompiler_object_inline_componentStack_2726 ? nextPrimaryChildren = createWorkInProgress(
8333 JSCompiler_object_inline_componentStack_2726,
8334 nextPrimaryChildren
8335 ) : (nextPrimaryChildren = createFiberFromFragment(
8336 nextPrimaryChildren,
8337 mode,
8338 renderLanes2,
8339 null
8340 ), nextPrimaryChildren.flags |= 2), nextPrimaryChildren.return = workInProgress2, JSCompiler_object_inline_stack_2725.return = workInProgress2, JSCompiler_object_inline_stack_2725.sibling = nextPrimaryChildren, workInProgress2.child = JSCompiler_object_inline_stack_2725, bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_2725), JSCompiler_object_inline_stack_2725 = workInProgress2.child, nextPrimaryChildren = current2.child.memoizedState, null === nextPrimaryChildren ? nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes2) : (mode = nextPrimaryChildren.cachePool, null !== mode ? (componentStack = CacheContext._currentValue, mode = mode.parent !== componentStack ? { parent: componentStack, pool: componentStack } : mode) : mode = getSuspendedCache(), nextPrimaryChildren = {
8341 baseLanes: nextPrimaryChildren.baseLanes | renderLanes2,
8342 cachePool: mode
8343 }), JSCompiler_object_inline_stack_2725.memoizedState = nextPrimaryChildren, JSCompiler_object_inline_stack_2725.childLanes = getRemainingWorkInPrimaryTree(
8344 current2,
8345 JSCompiler_object_inline_digest_2724,
8346 renderLanes2
8347 ), workInProgress2.memoizedState = SUSPENDED_MARKER, bailoutOffscreenComponent(
8348 current2.child,
8349 JSCompiler_object_inline_stack_2725
8350 );
8351 null !== prevState && (renderLanes2 & 62914560) === renderLanes2 && 0 !== (renderLanes2 & current2.lanes) && markRenderDerivedCause(workInProgress2);
8352 pushPrimaryTreeSuspenseHandler(workInProgress2);
8353 renderLanes2 = current2.child;
8354 current2 = renderLanes2.sibling;
8355 renderLanes2 = createWorkInProgress(renderLanes2, {
8356 mode: "visible",
8357 children: JSCompiler_object_inline_stack_2725.children
8358 });
8359 renderLanes2.return = workInProgress2;
8360 renderLanes2.sibling = null;
8361 null !== current2 && (JSCompiler_object_inline_digest_2724 = workInProgress2.deletions, null === JSCompiler_object_inline_digest_2724 ? (workInProgress2.deletions = [current2], workInProgress2.flags |= 16) : JSCompiler_object_inline_digest_2724.push(current2));
8362 workInProgress2.child = renderLanes2;
8363 workInProgress2.memoizedState = null;
8364 return renderLanes2;
8365 }
8366 function mountSuspensePrimaryChildren(workInProgress2, primaryChildren) {
8367 primaryChildren = mountWorkInProgressOffscreenFiber(
8368 { mode: "visible", children: primaryChildren },
8369 workInProgress2.mode
8370 );
8371 primaryChildren.return = workInProgress2;
8372 return workInProgress2.child = primaryChildren;
8373 }
8374 function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
8375 offscreenProps = createFiber(22, offscreenProps, null, mode);
8376 offscreenProps.lanes = 0;
8377 return offscreenProps;
8378 }
8379 function retrySuspenseComponentWithoutHydrating(current2, workInProgress2, renderLanes2) {
8380 reconcileChildFibers(workInProgress2, current2.child, null, renderLanes2);
8381 current2 = mountSuspensePrimaryChildren(
8382 workInProgress2,
8383 workInProgress2.pendingProps.children
8384 );
8385 current2.flags |= 2;
8386 workInProgress2.memoizedState = null;
8387 return current2;
8388 }
8389 function scheduleSuspenseWorkOnFiber(fiber, renderLanes2, propagationRoot) {
8390 fiber.lanes |= renderLanes2;
8391 var alternate = fiber.alternate;
8392 null !== alternate && (alternate.lanes |= renderLanes2);
8393 scheduleContextWorkOnParentPath(
8394 fiber.return,
8395 renderLanes2,
8396 propagationRoot
8397 );
8398 }
8399 function initSuspenseListRenderState(workInProgress2, isBackwards, tail, lastContentRow, tailMode, treeForkCount2) {
8400 var renderState = workInProgress2.memoizedState;
8401 null === renderState ? workInProgress2.memoizedState = {
8402 isBackwards,
8403 rendering: null,
8404 renderingStartTime: 0,
8405 last: lastContentRow,
8406 tail,
8407 tailMode,
8408 treeForkCount: treeForkCount2
8409 } : (renderState.isBackwards = isBackwards, renderState.rendering = null, renderState.renderingStartTime = 0, renderState.last = lastContentRow, renderState.tail = tail, renderState.tailMode = tailMode, renderState.treeForkCount = treeForkCount2);
8410 }
8411 function updateSuspenseListComponent(current2, workInProgress2, renderLanes2) {
8412 var nextProps = workInProgress2.pendingProps, revealOrder = nextProps.revealOrder, tailMode = nextProps.tail, newChildren = nextProps.children, suspenseContext = suspenseStackCursor.current;
8413 (nextProps = 0 !== (suspenseContext & ForceSuspenseFallback)) ? (suspenseContext = suspenseContext & SubtreeSuspenseContextMask | ForceSuspenseFallback, workInProgress2.flags |= 128) : suspenseContext &= SubtreeSuspenseContextMask;
8414 push(suspenseStackCursor, suspenseContext, workInProgress2);
8415 suspenseContext = null == revealOrder ? "null" : revealOrder;
8416 if ("forwards" !== revealOrder && "unstable_legacy-backwards" !== revealOrder && "together" !== revealOrder && "independent" !== revealOrder && !didWarnAboutRevealOrder[suspenseContext])
8417 if (didWarnAboutRevealOrder[suspenseContext] = true, null == revealOrder)
8418 console.error(
8419 'The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".'
8420 );
8421 else if ("backwards" === revealOrder)
8422 console.error(
8423 'The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.'
8424 );
8425 else if ("string" === typeof revealOrder)
8426 switch (revealOrder.toLowerCase()) {
8427 case "together":
8428 case "forwards":
8429 case "backwards":
8430 case "independent":
8431 console.error(
8432 '"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',
8433 revealOrder,
8434 revealOrder.toLowerCase()
8435 );
8436 break;
8437 case "forward":
8438 case "backward":
8439 console.error(
8440 '"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',
8441 revealOrder,
8442 revealOrder.toLowerCase()
8443 );
8444 break;
8445 default:
8446 console.error(
8447 '"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',
8448 revealOrder
8449 );
8450 }
8451 else
8452 console.error(
8453 '%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',
8454 revealOrder
8455 );
8456 suspenseContext = null == tailMode ? "null" : tailMode;
8457 if (!didWarnAboutTailOptions[suspenseContext])
8458 if (null == tailMode) {
8459 if ("forwards" === revealOrder || "backwards" === revealOrder || "unstable_legacy-backwards" === revealOrder)
8460 didWarnAboutTailOptions[suspenseContext] = true, console.error(
8461 'The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".'
8462 );
8463 } else
8464 "visible" !== tailMode && "collapsed" !== tailMode && "hidden" !== tailMode ? (didWarnAboutTailOptions[suspenseContext] = true, console.error(
8465 '"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',
8466 tailMode
8467 )) : "forwards" !== revealOrder && "backwards" !== revealOrder && "unstable_legacy-backwards" !== revealOrder && (didWarnAboutTailOptions[suspenseContext] = true, console.error(
8468 '<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',
8469 tailMode
8470 ));
8471 a: if (("forwards" === revealOrder || "backwards" === revealOrder || "unstable_legacy-backwards" === revealOrder) && void 0 !== newChildren && null !== newChildren && false !== newChildren)
8472 if (isArrayImpl(newChildren))
8473 for (suspenseContext = 0; suspenseContext < newChildren.length; suspenseContext++) {
8474 if (!validateSuspenseListNestedChild(
8475 newChildren[suspenseContext],
8476 suspenseContext
8477 ))
8478 break a;
8479 }
8480 else if (suspenseContext = getIteratorFn(newChildren), "function" === typeof suspenseContext) {
8481 if (suspenseContext = suspenseContext.call(newChildren))
8482 for (var step = suspenseContext.next(), _i = 0; !step.done; step = suspenseContext.next()) {
8483 if (!validateSuspenseListNestedChild(step.value, _i)) break a;
8484 _i++;
8485 }
8486 } else
8487 console.error(
8488 'A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',
8489 revealOrder
8490 );
8491 reconcileChildren(current2, workInProgress2, newChildren, renderLanes2);
8492 isHydrating ? (warnIfNotHydrating(), newChildren = treeForkCount) : newChildren = 0;
8493 if (!nextProps && null !== current2 && 0 !== (current2.flags & 128))
8494 a: for (current2 = workInProgress2.child; null !== current2; ) {
8495 if (13 === current2.tag)
8496 null !== current2.memoizedState && scheduleSuspenseWorkOnFiber(current2, renderLanes2, workInProgress2);
8497 else if (19 === current2.tag)
8498 scheduleSuspenseWorkOnFiber(current2, renderLanes2, workInProgress2);
8499 else if (null !== current2.child) {
8500 current2.child.return = current2;
8501 current2 = current2.child;
8502 continue;
8503 }
8504 if (current2 === workInProgress2) break a;
8505 for (; null === current2.sibling; ) {
8506 if (null === current2.return || current2.return === workInProgress2)
8507 break a;
8508 current2 = current2.return;
8509 }
8510 current2.sibling.return = current2.return;
8511 current2 = current2.sibling;
8512 }
8513 switch (revealOrder) {
8514 case "forwards":
8515 renderLanes2 = workInProgress2.child;
8516 for (revealOrder = null; null !== renderLanes2; )
8517 current2 = renderLanes2.alternate, null !== current2 && null === findFirstSuspended(current2) && (revealOrder = renderLanes2), renderLanes2 = renderLanes2.sibling;
8518 renderLanes2 = revealOrder;
8519 null === renderLanes2 ? (revealOrder = workInProgress2.child, workInProgress2.child = null) : (revealOrder = renderLanes2.sibling, renderLanes2.sibling = null);
8520 initSuspenseListRenderState(
8521 workInProgress2,
8522 false,
8523 revealOrder,
8524 renderLanes2,
8525 tailMode,
8526 newChildren
8527 );
8528 break;
8529 case "backwards":
8530 case "unstable_legacy-backwards":
8531 renderLanes2 = null;
8532 revealOrder = workInProgress2.child;
8533 for (workInProgress2.child = null; null !== revealOrder; ) {
8534 current2 = revealOrder.alternate;
8535 if (null !== current2 && null === findFirstSuspended(current2)) {
8536 workInProgress2.child = revealOrder;
8537 break;
8538 }
8539 current2 = revealOrder.sibling;
8540 revealOrder.sibling = renderLanes2;
8541 renderLanes2 = revealOrder;
8542 revealOrder = current2;
8543 }
8544 initSuspenseListRenderState(
8545 workInProgress2,
8546 true,
8547 renderLanes2,
8548 null,
8549 tailMode,
8550 newChildren
8551 );
8552 break;
8553 case "together":
8554 initSuspenseListRenderState(
8555 workInProgress2,
8556 false,
8557 null,
8558 null,
8559 void 0,
8560 newChildren
8561 );
8562 break;
8563 default:
8564 workInProgress2.memoizedState = null;
8565 }
8566 return workInProgress2.child;
8567 }
8568 function bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2) {
8569 null !== current2 && (workInProgress2.dependencies = current2.dependencies);
8570 profilerStartTime = -1;
8571 workInProgressRootSkippedLanes |= workInProgress2.lanes;
8572 if (0 === (renderLanes2 & workInProgress2.childLanes))
8573 if (null !== current2) {
8574 if (propagateParentContextChanges(
8575 current2,
8576 workInProgress2,
8577 renderLanes2,
8578 false
8579 ), 0 === (renderLanes2 & workInProgress2.childLanes))
8580 return null;
8581 } else return null;
8582 if (null !== current2 && workInProgress2.child !== current2.child)
8583 throw Error("Resuming work not yet implemented.");
8584 if (null !== workInProgress2.child) {
8585 current2 = workInProgress2.child;
8586 renderLanes2 = createWorkInProgress(current2, current2.pendingProps);
8587 workInProgress2.child = renderLanes2;
8588 for (renderLanes2.return = workInProgress2; null !== current2.sibling; )
8589 current2 = current2.sibling, renderLanes2 = renderLanes2.sibling = createWorkInProgress(current2, current2.pendingProps), renderLanes2.return = workInProgress2;
8590 renderLanes2.sibling = null;
8591 }
8592 return workInProgress2.child;
8593 }
8594 function checkScheduledUpdateOrContext(current2, renderLanes2) {
8595 if (0 !== (current2.lanes & renderLanes2)) return true;
8596 current2 = current2.dependencies;
8597 return null !== current2 && checkIfContextChanged(current2) ? true : false;
8598 }
8599 function attemptEarlyBailoutIfNoScheduledUpdate(current2, workInProgress2, renderLanes2) {
8600 switch (workInProgress2.tag) {
8601 case 3:
8602 pushHostContainer(
8603 workInProgress2,
8604 workInProgress2.stateNode.containerInfo
8605 );
8606 pushProvider(
8607 workInProgress2,
8608 CacheContext,
8609 current2.memoizedState.cache
8610 );
8611 resetHydrationState();
8612 break;
8613 case 27:
8614 case 5:
8615 pushHostContext(workInProgress2);
8616 break;
8617 case 4:
8618 pushHostContainer(
8619 workInProgress2,
8620 workInProgress2.stateNode.containerInfo
8621 );
8622 break;
8623 case 10:
8624 pushProvider(
8625 workInProgress2,
8626 workInProgress2.type,
8627 workInProgress2.memoizedProps.value
8628 );
8629 break;
8630 case 12:
8631 0 !== (renderLanes2 & workInProgress2.childLanes) && (workInProgress2.flags |= 4);
8632 workInProgress2.flags |= 2048;
8633 var stateNode = workInProgress2.stateNode;
8634 stateNode.effectDuration = -0;
8635 stateNode.passiveEffectDuration = -0;
8636 break;
8637 case 31:
8638 if (null !== workInProgress2.memoizedState)
8639 return workInProgress2.flags |= 128, pushDehydratedActivitySuspenseHandler(workInProgress2), null;
8640 break;
8641 case 13:
8642 stateNode = workInProgress2.memoizedState;
8643 if (null !== stateNode) {
8644 if (null !== stateNode.dehydrated)
8645 return pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags |= 128, null;
8646 if (0 !== (renderLanes2 & workInProgress2.child.childLanes))
8647 return updateSuspenseComponent(
8648 current2,
8649 workInProgress2,
8650 renderLanes2
8651 );
8652 pushPrimaryTreeSuspenseHandler(workInProgress2);
8653 current2 = bailoutOnAlreadyFinishedWork(
8654 current2,
8655 workInProgress2,
8656 renderLanes2
8657 );
8658 return null !== current2 ? current2.sibling : null;
8659 }
8660 pushPrimaryTreeSuspenseHandler(workInProgress2);
8661 break;
8662 case 19:
8663 var didSuspendBefore = 0 !== (current2.flags & 128);
8664 stateNode = 0 !== (renderLanes2 & workInProgress2.childLanes);
8665 stateNode || (propagateParentContextChanges(
8666 current2,
8667 workInProgress2,
8668 renderLanes2,
8669 false
8670 ), stateNode = 0 !== (renderLanes2 & workInProgress2.childLanes));
8671 if (didSuspendBefore) {
8672 if (stateNode)
8673 return updateSuspenseListComponent(
8674 current2,
8675 workInProgress2,
8676 renderLanes2
8677 );
8678 workInProgress2.flags |= 128;
8679 }
8680 didSuspendBefore = workInProgress2.memoizedState;
8681 null !== didSuspendBefore && (didSuspendBefore.rendering = null, didSuspendBefore.tail = null, didSuspendBefore.lastEffect = null);
8682 push(
8683 suspenseStackCursor,
8684 suspenseStackCursor.current,
8685 workInProgress2
8686 );
8687 if (stateNode) break;
8688 else return null;
8689 case 22:
8690 return workInProgress2.lanes = 0, updateOffscreenComponent(
8691 current2,
8692 workInProgress2,
8693 renderLanes2,
8694 workInProgress2.pendingProps
8695 );
8696 case 24:
8697 pushProvider(
8698 workInProgress2,
8699 CacheContext,
8700 current2.memoizedState.cache
8701 );
8702 }
8703 return bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
8704 }
8705 function beginWork(current2, workInProgress2, renderLanes2) {
8706 if (workInProgress2._debugNeedsRemount && null !== current2) {
8707 renderLanes2 = createFiberFromTypeAndProps(
8708 workInProgress2.type,
8709 workInProgress2.key,
8710 workInProgress2.pendingProps,
8711 workInProgress2._debugOwner || null,
8712 workInProgress2.mode,
8713 workInProgress2.lanes
8714 );
8715 renderLanes2._debugStack = workInProgress2._debugStack;
8716 renderLanes2._debugTask = workInProgress2._debugTask;
8717 var returnFiber = workInProgress2.return;
8718 if (null === returnFiber) throw Error("Cannot swap the root fiber.");
8719 current2.alternate = null;
8720 workInProgress2.alternate = null;
8721 renderLanes2.index = workInProgress2.index;
8722 renderLanes2.sibling = workInProgress2.sibling;
8723 renderLanes2.return = workInProgress2.return;
8724 renderLanes2.ref = workInProgress2.ref;
8725 renderLanes2._debugInfo = workInProgress2._debugInfo;
8726 if (workInProgress2 === returnFiber.child)
8727 returnFiber.child = renderLanes2;
8728 else {
8729 var prevSibling = returnFiber.child;
8730 if (null === prevSibling)
8731 throw Error("Expected parent to have a child.");
8732 for (; prevSibling.sibling !== workInProgress2; )
8733 if (prevSibling = prevSibling.sibling, null === prevSibling)
8734 throw Error("Expected to find the previous sibling.");
8735 prevSibling.sibling = renderLanes2;
8736 }
8737 workInProgress2 = returnFiber.deletions;
8738 null === workInProgress2 ? (returnFiber.deletions = [current2], returnFiber.flags |= 16) : workInProgress2.push(current2);
8739 renderLanes2.flags |= 2;
8740 return renderLanes2;
8741 }
8742 if (null !== current2)
8743 if (current2.memoizedProps !== workInProgress2.pendingProps || workInProgress2.type !== current2.type)
8744 didReceiveUpdate = true;
8745 else {
8746 if (!checkScheduledUpdateOrContext(current2, renderLanes2) && 0 === (workInProgress2.flags & 128))
8747 return didReceiveUpdate = false, attemptEarlyBailoutIfNoScheduledUpdate(
8748 current2,
8749 workInProgress2,
8750 renderLanes2
8751 );
8752 didReceiveUpdate = 0 !== (current2.flags & 131072) ? true : false;
8753 }
8754 else {
8755 didReceiveUpdate = false;
8756 if (returnFiber = isHydrating)
8757 warnIfNotHydrating(), returnFiber = 0 !== (workInProgress2.flags & 1048576);
8758 returnFiber && (returnFiber = workInProgress2.index, warnIfNotHydrating(), pushTreeId(workInProgress2, treeForkCount, returnFiber));
8759 }
8760 workInProgress2.lanes = 0;
8761 switch (workInProgress2.tag) {
8762 case 16:
8763 a: if (returnFiber = workInProgress2.pendingProps, current2 = resolveLazy(workInProgress2.elementType), workInProgress2.type = current2, "function" === typeof current2)
8764 shouldConstruct(current2) ? (returnFiber = resolveClassComponentProps(
8765 current2,
8766 returnFiber
8767 ), workInProgress2.tag = 1, workInProgress2.type = current2 = resolveFunctionForHotReloading(current2), workInProgress2 = updateClassComponent(
8768 null,
8769 workInProgress2,
8770 current2,
8771 returnFiber,
8772 renderLanes2
8773 )) : (workInProgress2.tag = 0, validateFunctionComponentInDev(workInProgress2, current2), workInProgress2.type = current2 = resolveFunctionForHotReloading(current2), workInProgress2 = updateFunctionComponent(
8774 null,
8775 workInProgress2,
8776 current2,
8777 returnFiber,
8778 renderLanes2
8779 ));
8780 else {
8781 if (void 0 !== current2 && null !== current2) {
8782 if (prevSibling = current2.$$typeof, prevSibling === REACT_FORWARD_REF_TYPE) {
8783 workInProgress2.tag = 11;
8784 workInProgress2.type = current2 = resolveForwardRefForHotReloading(current2);
8785 workInProgress2 = updateForwardRef(
8786 null,
8787 workInProgress2,
8788 current2,
8789 returnFiber,
8790 renderLanes2
8791 );
8792 break a;
8793 } else if (prevSibling === REACT_MEMO_TYPE) {
8794 workInProgress2.tag = 14;
8795 workInProgress2 = updateMemoComponent(
8796 null,
8797 workInProgress2,
8798 current2,
8799 returnFiber,
8800 renderLanes2
8801 );
8802 break a;
8803 }
8804 }
8805 workInProgress2 = "";
8806 null !== current2 && "object" === typeof current2 && current2.$$typeof === REACT_LAZY_TYPE && (workInProgress2 = " Did you wrap a component in React.lazy() more than once?");
8807 renderLanes2 = getComponentNameFromType(current2) || current2;
8808 throw Error(
8809 "Element type is invalid. Received a promise that resolves to: " + renderLanes2 + ". Lazy element type must resolve to a class or function." + workInProgress2
8810 );
8811 }
8812 return workInProgress2;
8813 case 0:
8814 return updateFunctionComponent(
8815 current2,
8816 workInProgress2,
8817 workInProgress2.type,
8818 workInProgress2.pendingProps,
8819 renderLanes2
8820 );
8821 case 1:
8822 return returnFiber = workInProgress2.type, prevSibling = resolveClassComponentProps(
8823 returnFiber,
8824 workInProgress2.pendingProps
8825 ), updateClassComponent(
8826 current2,
8827 workInProgress2,
8828 returnFiber,
8829 prevSibling,
8830 renderLanes2
8831 );
8832 case 3:
8833 a: {
8834 pushHostContainer(
8835 workInProgress2,
8836 workInProgress2.stateNode.containerInfo
8837 );
8838 if (null === current2)
8839 throw Error(
8840 "Should have a current fiber. This is a bug in React."
8841 );
8842 returnFiber = workInProgress2.pendingProps;
8843 var prevState = workInProgress2.memoizedState;
8844 prevSibling = prevState.element;
8845 cloneUpdateQueue(current2, workInProgress2);
8846 processUpdateQueue(workInProgress2, returnFiber, null, renderLanes2);
8847 var nextState = workInProgress2.memoizedState;
8848 returnFiber = nextState.cache;
8849 pushProvider(workInProgress2, CacheContext, returnFiber);
8850 returnFiber !== prevState.cache && propagateContextChanges(
8851 workInProgress2,
8852 [CacheContext],
8853 renderLanes2,
8854 true
8855 );
8856 suspendIfUpdateReadFromEntangledAsyncAction();
8857 returnFiber = nextState.element;
8858 if (prevState.isDehydrated)
8859 if (prevState = {
8860 element: returnFiber,
8861 isDehydrated: false,
8862 cache: nextState.cache
8863 }, workInProgress2.updateQueue.baseState = prevState, workInProgress2.memoizedState = prevState, workInProgress2.flags & 256) {
8864 workInProgress2 = mountHostRootWithoutHydrating(
8865 current2,
8866 workInProgress2,
8867 returnFiber,
8868 renderLanes2
8869 );
8870 break a;
8871 } else if (returnFiber !== prevSibling) {
8872 prevSibling = createCapturedValueAtFiber(
8873 Error(
8874 "This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."
8875 ),
8876 workInProgress2
8877 );
8878 queueHydrationError(prevSibling);
8879 workInProgress2 = mountHostRootWithoutHydrating(
8880 current2,
8881 workInProgress2,
8882 returnFiber,
8883 renderLanes2
8884 );
8885 break a;
8886 } else {
8887 current2 = workInProgress2.stateNode.containerInfo;
8888 switch (current2.nodeType) {
8889 case 9:
8890 current2 = current2.body;
8891 break;
8892 default:
8893 current2 = "HTML" === current2.nodeName ? current2.ownerDocument.body : current2;
8894 }
8895 nextHydratableInstance = getNextHydratable(current2.firstChild);
8896 hydrationParentFiber = workInProgress2;
8897 isHydrating = true;
8898 hydrationErrors = null;
8899 didSuspendOrErrorDEV = false;
8900 hydrationDiffRootDEV = null;
8901 rootOrSingletonContext = true;
8902 renderLanes2 = mountChildFibers(
8903 workInProgress2,
8904 null,
8905 returnFiber,
8906 renderLanes2
8907 );
8908 for (workInProgress2.child = renderLanes2; renderLanes2; )
8909 renderLanes2.flags = renderLanes2.flags & -3 | 4096, renderLanes2 = renderLanes2.sibling;
8910 }
8911 else {
8912 resetHydrationState();
8913 if (returnFiber === prevSibling) {
8914 workInProgress2 = bailoutOnAlreadyFinishedWork(
8915 current2,
8916 workInProgress2,
8917 renderLanes2
8918 );
8919 break a;
8920 }
8921 reconcileChildren(
8922 current2,
8923 workInProgress2,
8924 returnFiber,
8925 renderLanes2
8926 );
8927 }
8928 workInProgress2 = workInProgress2.child;
8929 }
8930 return workInProgress2;
8931 case 26:
8932 return markRef(current2, workInProgress2), null === current2 ? (renderLanes2 = getResource(
8933 workInProgress2.type,
8934 null,
8935 workInProgress2.pendingProps,
8936 null
8937 )) ? workInProgress2.memoizedState = renderLanes2 : isHydrating || (renderLanes2 = workInProgress2.type, current2 = workInProgress2.pendingProps, returnFiber = requiredContext(
8938 rootInstanceStackCursor.current
8939 ), returnFiber = getOwnerDocumentFromRootContainer(
8940 returnFiber
8941 ).createElement(renderLanes2), returnFiber[internalInstanceKey] = workInProgress2, returnFiber[internalPropsKey] = current2, setInitialProperties(returnFiber, renderLanes2, current2), markNodeAsHoistable(returnFiber), workInProgress2.stateNode = returnFiber) : workInProgress2.memoizedState = getResource(
8942 workInProgress2.type,
8943 current2.memoizedProps,
8944 workInProgress2.pendingProps,
8945 current2.memoizedState
8946 ), null;
8947 case 27:
8948 return pushHostContext(workInProgress2), null === current2 && isHydrating && (returnFiber = requiredContext(rootInstanceStackCursor.current), prevSibling = getHostContext(), returnFiber = workInProgress2.stateNode = resolveSingletonInstance(
8949 workInProgress2.type,
8950 workInProgress2.pendingProps,
8951 returnFiber,
8952 prevSibling,
8953 false
8954 ), didSuspendOrErrorDEV || (prevSibling = diffHydratedProperties(
8955 returnFiber,
8956 workInProgress2.type,
8957 workInProgress2.pendingProps,
8958 prevSibling
8959 ), null !== prevSibling && (buildHydrationDiffNode(workInProgress2, 0).serverProps = prevSibling)), hydrationParentFiber = workInProgress2, rootOrSingletonContext = true, prevSibling = nextHydratableInstance, isSingletonScope(workInProgress2.type) ? (previousHydratableOnEnteringScopedSingleton = prevSibling, nextHydratableInstance = getNextHydratable(
8960 returnFiber.firstChild
8961 )) : nextHydratableInstance = prevSibling), reconcileChildren(
8962 current2,
8963 workInProgress2,
8964 workInProgress2.pendingProps.children,
8965 renderLanes2
8966 ), markRef(current2, workInProgress2), null === current2 && (workInProgress2.flags |= 4194304), workInProgress2.child;
8967 case 5:
8968 return null === current2 && isHydrating && (prevState = getHostContext(), returnFiber = validateDOMNesting(
8969 workInProgress2.type,
8970 prevState.ancestorInfo
8971 ), prevSibling = nextHydratableInstance, (nextState = !prevSibling) || (nextState = canHydrateInstance(
8972 prevSibling,
8973 workInProgress2.type,
8974 workInProgress2.pendingProps,
8975 rootOrSingletonContext
8976 ), null !== nextState ? (workInProgress2.stateNode = nextState, didSuspendOrErrorDEV || (prevState = diffHydratedProperties(
8977 nextState,
8978 workInProgress2.type,
8979 workInProgress2.pendingProps,
8980 prevState
8981 ), null !== prevState && (buildHydrationDiffNode(workInProgress2, 0).serverProps = prevState)), hydrationParentFiber = workInProgress2, nextHydratableInstance = getNextHydratable(
8982 nextState.firstChild
8983 ), rootOrSingletonContext = false, prevState = true) : prevState = false, nextState = !prevState), nextState && (returnFiber && warnNonHydratedInstance(workInProgress2, prevSibling), throwOnHydrationMismatch(workInProgress2))), pushHostContext(workInProgress2), prevSibling = workInProgress2.type, prevState = workInProgress2.pendingProps, nextState = null !== current2 ? current2.memoizedProps : null, returnFiber = prevState.children, shouldSetTextContent(prevSibling, prevState) ? returnFiber = null : null !== nextState && shouldSetTextContent(prevSibling, nextState) && (workInProgress2.flags |= 32), null !== workInProgress2.memoizedState && (prevSibling = renderWithHooks(
8984 current2,
8985 workInProgress2,
8986 TransitionAwareHostComponent,
8987 null,
8988 null,
8989 renderLanes2
8990 ), HostTransitionContext._currentValue = prevSibling), markRef(current2, workInProgress2), reconcileChildren(
8991 current2,
8992 workInProgress2,
8993 returnFiber,
8994 renderLanes2
8995 ), workInProgress2.child;
8996 case 6:
8997 return null === current2 && isHydrating && (renderLanes2 = workInProgress2.pendingProps, current2 = getHostContext(), returnFiber = current2.ancestorInfo.current, renderLanes2 = null != returnFiber ? validateTextNesting(
8998 renderLanes2,
8999 returnFiber.tag,
9000 current2.ancestorInfo.implicitRootScope
9001 ) : true, current2 = nextHydratableInstance, (returnFiber = !current2) || (returnFiber = canHydrateTextInstance(
9002 current2,
9003 workInProgress2.pendingProps,
9004 rootOrSingletonContext
9005 ), null !== returnFiber ? (workInProgress2.stateNode = returnFiber, hydrationParentFiber = workInProgress2, nextHydratableInstance = null, returnFiber = true) : returnFiber = false, returnFiber = !returnFiber), returnFiber && (renderLanes2 && warnNonHydratedInstance(workInProgress2, current2), throwOnHydrationMismatch(workInProgress2))), null;
9006 case 13:
9007 return updateSuspenseComponent(current2, workInProgress2, renderLanes2);
9008 case 4:
9009 return pushHostContainer(
9010 workInProgress2,
9011 workInProgress2.stateNode.containerInfo
9012 ), returnFiber = workInProgress2.pendingProps, null === current2 ? workInProgress2.child = reconcileChildFibers(
9013 workInProgress2,
9014 null,
9015 returnFiber,
9016 renderLanes2
9017 ) : reconcileChildren(
9018 current2,
9019 workInProgress2,
9020 returnFiber,
9021 renderLanes2
9022 ), workInProgress2.child;
9023 case 11:
9024 return updateForwardRef(
9025 current2,
9026 workInProgress2,
9027 workInProgress2.type,
9028 workInProgress2.pendingProps,
9029 renderLanes2
9030 );
9031 case 7:
9032 return reconcileChildren(
9033 current2,
9034 workInProgress2,
9035 workInProgress2.pendingProps,
9036 renderLanes2
9037 ), workInProgress2.child;
9038 case 8:
9039 return reconcileChildren(
9040 current2,
9041 workInProgress2,
9042 workInProgress2.pendingProps.children,
9043 renderLanes2
9044 ), workInProgress2.child;
9045 case 12:
9046 return workInProgress2.flags |= 4, workInProgress2.flags |= 2048, returnFiber = workInProgress2.stateNode, returnFiber.effectDuration = -0, returnFiber.passiveEffectDuration = -0, reconcileChildren(
9047 current2,
9048 workInProgress2,
9049 workInProgress2.pendingProps.children,
9050 renderLanes2
9051 ), workInProgress2.child;
9052 case 10:
9053 return returnFiber = workInProgress2.type, prevSibling = workInProgress2.pendingProps, prevState = prevSibling.value, "value" in prevSibling || hasWarnedAboutUsingNoValuePropOnContextProvider || (hasWarnedAboutUsingNoValuePropOnContextProvider = true, console.error(
9054 "The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"
9055 )), pushProvider(workInProgress2, returnFiber, prevState), reconcileChildren(
9056 current2,
9057 workInProgress2,
9058 prevSibling.children,
9059 renderLanes2
9060 ), workInProgress2.child;
9061 case 9:
9062 return prevSibling = workInProgress2.type._context, returnFiber = workInProgress2.pendingProps.children, "function" !== typeof returnFiber && console.error(
9063 "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."
9064 ), prepareToReadContext(workInProgress2), prevSibling = readContext(prevSibling), returnFiber = callComponentInDEV(
9065 returnFiber,
9066 prevSibling,
9067 void 0
9068 ), workInProgress2.flags |= 1, reconcileChildren(
9069 current2,
9070 workInProgress2,
9071 returnFiber,
9072 renderLanes2
9073 ), workInProgress2.child;
9074 case 14:
9075 return updateMemoComponent(
9076 current2,
9077 workInProgress2,
9078 workInProgress2.type,
9079 workInProgress2.pendingProps,
9080 renderLanes2
9081 );
9082 case 15:
9083 return updateSimpleMemoComponent(
9084 current2,
9085 workInProgress2,
9086 workInProgress2.type,
9087 workInProgress2.pendingProps,
9088 renderLanes2
9089 );
9090 case 19:
9091 return updateSuspenseListComponent(
9092 current2,
9093 workInProgress2,
9094 renderLanes2
9095 );
9096 case 31:
9097 return updateActivityComponent(current2, workInProgress2, renderLanes2);
9098 case 22:
9099 return updateOffscreenComponent(
9100 current2,
9101 workInProgress2,
9102 renderLanes2,
9103 workInProgress2.pendingProps
9104 );
9105 case 24:
9106 return prepareToReadContext(workInProgress2), returnFiber = readContext(CacheContext), null === current2 ? (prevSibling = peekCacheFromPool(), null === prevSibling && (prevSibling = workInProgressRoot, prevState = createCache(), prevSibling.pooledCache = prevState, retainCache(prevState), null !== prevState && (prevSibling.pooledCacheLanes |= renderLanes2), prevSibling = prevState), workInProgress2.memoizedState = {
9107 parent: returnFiber,
9108 cache: prevSibling
9109 }, initializeUpdateQueue(workInProgress2), pushProvider(workInProgress2, CacheContext, prevSibling)) : (0 !== (current2.lanes & renderLanes2) && (cloneUpdateQueue(current2, workInProgress2), processUpdateQueue(workInProgress2, null, null, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction()), prevSibling = current2.memoizedState, prevState = workInProgress2.memoizedState, prevSibling.parent !== returnFiber ? (prevSibling = {
9110 parent: returnFiber,
9111 cache: returnFiber
9112 }, workInProgress2.memoizedState = prevSibling, 0 === workInProgress2.lanes && (workInProgress2.memoizedState = workInProgress2.updateQueue.baseState = prevSibling), pushProvider(workInProgress2, CacheContext, returnFiber)) : (returnFiber = prevState.cache, pushProvider(workInProgress2, CacheContext, returnFiber), returnFiber !== prevSibling.cache && propagateContextChanges(
9113 workInProgress2,
9114 [CacheContext],
9115 renderLanes2,
9116 true
9117 ))), reconcileChildren(
9118 current2,
9119 workInProgress2,
9120 workInProgress2.pendingProps.children,
9121 renderLanes2
9122 ), workInProgress2.child;
9123 case 29:
9124 throw workInProgress2.pendingProps;
9125 }
9126 throw Error(
9127 "Unknown unit of work tag (" + workInProgress2.tag + "). This error is likely caused by a bug in React. Please file an issue."
9128 );
9129 }
9130 function markUpdate(workInProgress2) {
9131 workInProgress2.flags |= 4;
9132 }
9133 function preloadInstanceAndSuspendIfNeeded(workInProgress2, type, oldProps, newProps, renderLanes2) {
9134 if (type = (workInProgress2.mode & SuspenseyImagesMode) !== NoMode)
9135 type = false;
9136 if (type) {
9137 if (workInProgress2.flags |= 16777216, (renderLanes2 & 335544128) === renderLanes2)
9138 if (workInProgress2.stateNode.complete) workInProgress2.flags |= 8192;
9139 else if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
9140 else
9141 throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
9142 } else workInProgress2.flags &= -16777217;
9143 }
9144 function preloadResourceAndSuspendIfNeeded(workInProgress2, resource) {
9145 if ("stylesheet" !== resource.type || (resource.state.loading & Inserted) !== NotLoaded)
9146 workInProgress2.flags &= -16777217;
9147 else if (workInProgress2.flags |= 16777216, !preloadResource(resource))
9148 if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
9149 else
9150 throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
9151 }
9152 function scheduleRetryEffect(workInProgress2, retryQueue) {
9153 null !== retryQueue && (workInProgress2.flags |= 4);
9154 workInProgress2.flags & 16384 && (retryQueue = 22 !== workInProgress2.tag ? claimNextRetryLane() : 536870912, workInProgress2.lanes |= retryQueue, workInProgressSuspendedRetryLanes |= retryQueue);
9155 }
9156 function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
9157 if (!isHydrating)
9158 switch (renderState.tailMode) {
9159 case "hidden":
9160 hasRenderedATailFallback = renderState.tail;
9161 for (var lastTailNode = null; null !== hasRenderedATailFallback; )
9162 null !== hasRenderedATailFallback.alternate && (lastTailNode = hasRenderedATailFallback), hasRenderedATailFallback = hasRenderedATailFallback.sibling;
9163 null === lastTailNode ? renderState.tail = null : lastTailNode.sibling = null;
9164 break;
9165 case "collapsed":
9166 lastTailNode = renderState.tail;
9167 for (var _lastTailNode = null; null !== lastTailNode; )
9168 null !== lastTailNode.alternate && (_lastTailNode = lastTailNode), lastTailNode = lastTailNode.sibling;
9169 null === _lastTailNode ? hasRenderedATailFallback || null === renderState.tail ? renderState.tail = null : renderState.tail.sibling = null : _lastTailNode.sibling = null;
9170 }
9171 }
9172 function bubbleProperties(completedWork) {
9173 var didBailout = null !== completedWork.alternate && completedWork.alternate.child === completedWork.child, newChildLanes = 0, subtreeFlags = 0;
9174 if (didBailout)
9175 if ((completedWork.mode & ProfileMode) !== NoMode) {
9176 for (var _treeBaseDuration = completedWork.selfBaseDuration, _child2 = completedWork.child; null !== _child2; )
9177 newChildLanes |= _child2.lanes | _child2.childLanes, subtreeFlags |= _child2.subtreeFlags & 65011712, subtreeFlags |= _child2.flags & 65011712, _treeBaseDuration += _child2.treeBaseDuration, _child2 = _child2.sibling;
9178 completedWork.treeBaseDuration = _treeBaseDuration;
9179 } else
9180 for (_treeBaseDuration = completedWork.child; null !== _treeBaseDuration; )
9181 newChildLanes |= _treeBaseDuration.lanes | _treeBaseDuration.childLanes, subtreeFlags |= _treeBaseDuration.subtreeFlags & 65011712, subtreeFlags |= _treeBaseDuration.flags & 65011712, _treeBaseDuration.return = completedWork, _treeBaseDuration = _treeBaseDuration.sibling;
9182 else if ((completedWork.mode & ProfileMode) !== NoMode) {
9183 _treeBaseDuration = completedWork.actualDuration;
9184 _child2 = completedWork.selfBaseDuration;
9185 for (var child = completedWork.child; null !== child; )
9186 newChildLanes |= child.lanes | child.childLanes, subtreeFlags |= child.subtreeFlags, subtreeFlags |= child.flags, _treeBaseDuration += child.actualDuration, _child2 += child.treeBaseDuration, child = child.sibling;
9187 completedWork.actualDuration = _treeBaseDuration;
9188 completedWork.treeBaseDuration = _child2;
9189 } else
9190 for (_treeBaseDuration = completedWork.child; null !== _treeBaseDuration; )
9191 newChildLanes |= _treeBaseDuration.lanes | _treeBaseDuration.childLanes, subtreeFlags |= _treeBaseDuration.subtreeFlags, subtreeFlags |= _treeBaseDuration.flags, _treeBaseDuration.return = completedWork, _treeBaseDuration = _treeBaseDuration.sibling;
9192 completedWork.subtreeFlags |= subtreeFlags;
9193 completedWork.childLanes = newChildLanes;
9194 return didBailout;
9195 }
9196 function completeWork(current2, workInProgress2, renderLanes2) {
9197 var newProps = workInProgress2.pendingProps;
9198 popTreeContext(workInProgress2);
9199 switch (workInProgress2.tag) {
9200 case 16:
9201 case 15:
9202 case 0:
9203 case 11:
9204 case 7:
9205 case 8:
9206 case 12:
9207 case 9:
9208 case 14:
9209 return bubbleProperties(workInProgress2), null;
9210 case 1:
9211 return bubbleProperties(workInProgress2), null;
9212 case 3:
9213 renderLanes2 = workInProgress2.stateNode;
9214 newProps = null;
9215 null !== current2 && (newProps = current2.memoizedState.cache);
9216 workInProgress2.memoizedState.cache !== newProps && (workInProgress2.flags |= 2048);
9217 popProvider(CacheContext, workInProgress2);
9218 popHostContainer(workInProgress2);
9219 renderLanes2.pendingContext && (renderLanes2.context = renderLanes2.pendingContext, renderLanes2.pendingContext = null);
9220 if (null === current2 || null === current2.child)
9221 popHydrationState(workInProgress2) ? (emitPendingHydrationWarnings(), markUpdate(workInProgress2)) : null === current2 || current2.memoizedState.isDehydrated && 0 === (workInProgress2.flags & 256) || (workInProgress2.flags |= 1024, upgradeHydrationErrorsToRecoverable());
9222 bubbleProperties(workInProgress2);
9223 return null;
9224 case 26:
9225 var type = workInProgress2.type, nextResource = workInProgress2.memoizedState;
9226 null === current2 ? (markUpdate(workInProgress2), null !== nextResource ? (bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
9227 workInProgress2,
9228 nextResource
9229 )) : (bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
9230 workInProgress2,
9231 type,
9232 null,
9233 newProps,
9234 renderLanes2
9235 ))) : nextResource ? nextResource !== current2.memoizedState ? (markUpdate(workInProgress2), bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
9236 workInProgress2,
9237 nextResource
9238 )) : (bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217) : (current2 = current2.memoizedProps, current2 !== newProps && markUpdate(workInProgress2), bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
9239 workInProgress2,
9240 type,
9241 current2,
9242 newProps,
9243 renderLanes2
9244 ));
9245 return null;
9246 case 27:
9247 popHostContext(workInProgress2);
9248 renderLanes2 = requiredContext(rootInstanceStackCursor.current);
9249 type = workInProgress2.type;
9250 if (null !== current2 && null != workInProgress2.stateNode)
9251 current2.memoizedProps !== newProps && markUpdate(workInProgress2);
9252 else {
9253 if (!newProps) {
9254 if (null === workInProgress2.stateNode)
9255 throw Error(
9256 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
9257 );
9258 bubbleProperties(workInProgress2);
9259 return null;
9260 }
9261 current2 = getHostContext();
9262 popHydrationState(workInProgress2) ? prepareToHydrateHostInstance(workInProgress2, current2) : (current2 = resolveSingletonInstance(
9263 type,
9264 newProps,
9265 renderLanes2,
9266 current2,
9267 true
9268 ), workInProgress2.stateNode = current2, markUpdate(workInProgress2));
9269 }
9270 bubbleProperties(workInProgress2);
9271 return null;
9272 case 5:
9273 popHostContext(workInProgress2);
9274 type = workInProgress2.type;
9275 if (null !== current2 && null != workInProgress2.stateNode)
9276 current2.memoizedProps !== newProps && markUpdate(workInProgress2);
9277 else {
9278 if (!newProps) {
9279 if (null === workInProgress2.stateNode)
9280 throw Error(
9281 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
9282 );
9283 bubbleProperties(workInProgress2);
9284 return null;
9285 }
9286 var _currentHostContext = getHostContext();
9287 if (popHydrationState(workInProgress2))
9288 prepareToHydrateHostInstance(workInProgress2, _currentHostContext);
9289 else {
9290 nextResource = requiredContext(rootInstanceStackCursor.current);
9291 validateDOMNesting(type, _currentHostContext.ancestorInfo);
9292 _currentHostContext = _currentHostContext.context;
9293 nextResource = getOwnerDocumentFromRootContainer(nextResource);
9294 switch (_currentHostContext) {
9295 case HostContextNamespaceSvg:
9296 nextResource = nextResource.createElementNS(
9297 SVG_NAMESPACE,
9298 type
9299 );
9300 break;
9301 case HostContextNamespaceMath:
9302 nextResource = nextResource.createElementNS(
9303 MATH_NAMESPACE,
9304 type
9305 );
9306 break;
9307 default:
9308 switch (type) {
9309 case "svg":
9310 nextResource = nextResource.createElementNS(
9311 SVG_NAMESPACE,
9312 type
9313 );
9314 break;
9315 case "math":
9316 nextResource = nextResource.createElementNS(
9317 MATH_NAMESPACE,
9318 type
9319 );
9320 break;
9321 case "script":
9322 nextResource = nextResource.createElement("div");
9323 nextResource.innerHTML = "<script><\/script>";
9324 nextResource = nextResource.removeChild(
9325 nextResource.firstChild
9326 );
9327 break;
9328 case "select":
9329 nextResource = "string" === typeof newProps.is ? nextResource.createElement("select", {
9330 is: newProps.is
9331 }) : nextResource.createElement("select");
9332 newProps.multiple ? nextResource.multiple = true : newProps.size && (nextResource.size = newProps.size);
9333 break;
9334 default:
9335 nextResource = "string" === typeof newProps.is ? nextResource.createElement(type, {
9336 is: newProps.is
9337 }) : nextResource.createElement(type), -1 === type.indexOf("-") && (type !== type.toLowerCase() && console.error(
9338 "<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",
9339 type
9340 ), "[object HTMLUnknownElement]" !== Object.prototype.toString.call(nextResource) || hasOwnProperty.call(warnedUnknownTags, type) || (warnedUnknownTags[type] = true, console.error(
9341 "The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",
9342 type
9343 )));
9344 }
9345 }
9346 nextResource[internalInstanceKey] = workInProgress2;
9347 nextResource[internalPropsKey] = newProps;
9348 a: for (_currentHostContext = workInProgress2.child; null !== _currentHostContext; ) {
9349 if (5 === _currentHostContext.tag || 6 === _currentHostContext.tag)
9350 nextResource.appendChild(_currentHostContext.stateNode);
9351 else if (4 !== _currentHostContext.tag && 27 !== _currentHostContext.tag && null !== _currentHostContext.child) {
9352 _currentHostContext.child.return = _currentHostContext;
9353 _currentHostContext = _currentHostContext.child;
9354 continue;
9355 }
9356 if (_currentHostContext === workInProgress2) break a;
9357 for (; null === _currentHostContext.sibling; ) {
9358 if (null === _currentHostContext.return || _currentHostContext.return === workInProgress2)
9359 break a;
9360 _currentHostContext = _currentHostContext.return;
9361 }
9362 _currentHostContext.sibling.return = _currentHostContext.return;
9363 _currentHostContext = _currentHostContext.sibling;
9364 }
9365 workInProgress2.stateNode = nextResource;
9366 a: switch (setInitialProperties(nextResource, type, newProps), type) {
9367 case "button":
9368 case "input":
9369 case "select":
9370 case "textarea":
9371 newProps = !!newProps.autoFocus;
9372 break a;
9373 case "img":
9374 newProps = true;
9375 break a;
9376 default:
9377 newProps = false;
9378 }
9379 newProps && markUpdate(workInProgress2);
9380 }
9381 }
9382 bubbleProperties(workInProgress2);
9383 preloadInstanceAndSuspendIfNeeded(
9384 workInProgress2,
9385 workInProgress2.type,
9386 null === current2 ? null : current2.memoizedProps,
9387 workInProgress2.pendingProps,
9388 renderLanes2
9389 );
9390 return null;
9391 case 6:
9392 if (current2 && null != workInProgress2.stateNode)
9393 current2.memoizedProps !== newProps && markUpdate(workInProgress2);
9394 else {
9395 if ("string" !== typeof newProps && null === workInProgress2.stateNode)
9396 throw Error(
9397 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
9398 );
9399 current2 = requiredContext(rootInstanceStackCursor.current);
9400 renderLanes2 = getHostContext();
9401 if (popHydrationState(workInProgress2)) {
9402 current2 = workInProgress2.stateNode;
9403 renderLanes2 = workInProgress2.memoizedProps;
9404 type = !didSuspendOrErrorDEV;
9405 newProps = null;
9406 nextResource = hydrationParentFiber;
9407 if (null !== nextResource)
9408 switch (nextResource.tag) {
9409 case 3:
9410 type && (type = diffHydratedTextForDevWarnings(
9411 current2,
9412 renderLanes2,
9413 newProps
9414 ), null !== type && (buildHydrationDiffNode(workInProgress2, 0).serverProps = type));
9415 break;
9416 case 27:
9417 case 5:
9418 newProps = nextResource.memoizedProps, type && (type = diffHydratedTextForDevWarnings(
9419 current2,
9420 renderLanes2,
9421 newProps
9422 ), null !== type && (buildHydrationDiffNode(
9423 workInProgress2,
9424 0
9425 ).serverProps = type));
9426 }
9427 current2[internalInstanceKey] = workInProgress2;
9428 current2 = current2.nodeValue === renderLanes2 || null !== newProps && true === newProps.suppressHydrationWarning || checkForUnmatchedText(current2.nodeValue, renderLanes2) ? true : false;
9429 current2 || throwOnHydrationMismatch(workInProgress2, true);
9430 } else
9431 type = renderLanes2.ancestorInfo.current, null != type && validateTextNesting(
9432 newProps,
9433 type.tag,
9434 renderLanes2.ancestorInfo.implicitRootScope
9435 ), current2 = getOwnerDocumentFromRootContainer(current2).createTextNode(
9436 newProps
9437 ), current2[internalInstanceKey] = workInProgress2, workInProgress2.stateNode = current2;
9438 }
9439 bubbleProperties(workInProgress2);
9440 return null;
9441 case 31:
9442 renderLanes2 = workInProgress2.memoizedState;
9443 if (null === current2 || null !== current2.memoizedState) {
9444 newProps = popHydrationState(workInProgress2);
9445 if (null !== renderLanes2) {
9446 if (null === current2) {
9447 if (!newProps)
9448 throw Error(
9449 "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
9450 );
9451 current2 = workInProgress2.memoizedState;
9452 current2 = null !== current2 ? current2.dehydrated : null;
9453 if (!current2)
9454 throw Error(
9455 "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue."
9456 );
9457 current2[internalInstanceKey] = workInProgress2;
9458 bubbleProperties(workInProgress2);
9459 (workInProgress2.mode & ProfileMode) !== NoMode && null !== renderLanes2 && (current2 = workInProgress2.child, null !== current2 && (workInProgress2.treeBaseDuration -= current2.treeBaseDuration));
9460 } else
9461 emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress2.flags & 128) && (renderLanes2 = workInProgress2.memoizedState = null), workInProgress2.flags |= 4, bubbleProperties(workInProgress2), (workInProgress2.mode & ProfileMode) !== NoMode && null !== renderLanes2 && (current2 = workInProgress2.child, null !== current2 && (workInProgress2.treeBaseDuration -= current2.treeBaseDuration));
9462 current2 = false;
9463 } else
9464 renderLanes2 = upgradeHydrationErrorsToRecoverable(), null !== current2 && null !== current2.memoizedState && (current2.memoizedState.hydrationErrors = renderLanes2), current2 = true;
9465 if (!current2) {
9466 if (workInProgress2.flags & 256)
9467 return popSuspenseHandler(workInProgress2), workInProgress2;
9468 popSuspenseHandler(workInProgress2);
9469 return null;
9470 }
9471 if (0 !== (workInProgress2.flags & 128))
9472 throw Error(
9473 "Client rendering an Activity suspended it again. This is a bug in React."
9474 );
9475 }
9476 bubbleProperties(workInProgress2);
9477 return null;
9478 case 13:
9479 newProps = workInProgress2.memoizedState;
9480 if (null === current2 || null !== current2.memoizedState && null !== current2.memoizedState.dehydrated) {
9481 type = newProps;
9482 nextResource = popHydrationState(workInProgress2);
9483 if (null !== type && null !== type.dehydrated) {
9484 if (null === current2) {
9485 if (!nextResource)
9486 throw Error(
9487 "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
9488 );
9489 nextResource = workInProgress2.memoizedState;
9490 nextResource = null !== nextResource ? nextResource.dehydrated : null;
9491 if (!nextResource)
9492 throw Error(
9493 "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
9494 );
9495 nextResource[internalInstanceKey] = workInProgress2;
9496 bubbleProperties(workInProgress2);
9497 (workInProgress2.mode & ProfileMode) !== NoMode && null !== type && (type = workInProgress2.child, null !== type && (workInProgress2.treeBaseDuration -= type.treeBaseDuration));
9498 } else
9499 emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress2.flags & 128) && (type = workInProgress2.memoizedState = null), workInProgress2.flags |= 4, bubbleProperties(workInProgress2), (workInProgress2.mode & ProfileMode) !== NoMode && null !== type && (type = workInProgress2.child, null !== type && (workInProgress2.treeBaseDuration -= type.treeBaseDuration));
9500 type = false;
9501 } else
9502 type = upgradeHydrationErrorsToRecoverable(), null !== current2 && null !== current2.memoizedState && (current2.memoizedState.hydrationErrors = type), type = true;
9503 if (!type) {
9504 if (workInProgress2.flags & 256)
9505 return popSuspenseHandler(workInProgress2), workInProgress2;
9506 popSuspenseHandler(workInProgress2);
9507 return null;
9508 }
9509 }
9510 popSuspenseHandler(workInProgress2);
9511 if (0 !== (workInProgress2.flags & 128))
9512 return workInProgress2.lanes = renderLanes2, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2;
9513 renderLanes2 = null !== newProps;
9514 current2 = null !== current2 && null !== current2.memoizedState;
9515 renderLanes2 && (newProps = workInProgress2.child, type = null, null !== newProps.alternate && null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool), nextResource = null, null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && (nextResource = newProps.memoizedState.cachePool.pool), nextResource !== type && (newProps.flags |= 2048));
9516 renderLanes2 !== current2 && renderLanes2 && (workInProgress2.child.flags |= 8192);
9517 scheduleRetryEffect(workInProgress2, workInProgress2.updateQueue);
9518 bubbleProperties(workInProgress2);
9519 (workInProgress2.mode & ProfileMode) !== NoMode && renderLanes2 && (current2 = workInProgress2.child, null !== current2 && (workInProgress2.treeBaseDuration -= current2.treeBaseDuration));
9520 return null;
9521 case 4:
9522 return popHostContainer(workInProgress2), null === current2 && listenToAllSupportedEvents(
9523 workInProgress2.stateNode.containerInfo
9524 ), bubbleProperties(workInProgress2), null;
9525 case 10:
9526 return popProvider(workInProgress2.type, workInProgress2), bubbleProperties(workInProgress2), null;
9527 case 19:
9528 pop(suspenseStackCursor, workInProgress2);
9529 newProps = workInProgress2.memoizedState;
9530 if (null === newProps) return bubbleProperties(workInProgress2), null;
9531 type = 0 !== (workInProgress2.flags & 128);
9532 nextResource = newProps.rendering;
9533 if (null === nextResource)
9534 if (type) cutOffTailIfNeeded(newProps, false);
9535 else {
9536 if (workInProgressRootExitStatus !== RootInProgress || null !== current2 && 0 !== (current2.flags & 128))
9537 for (current2 = workInProgress2.child; null !== current2; ) {
9538 nextResource = findFirstSuspended(current2);
9539 if (null !== nextResource) {
9540 workInProgress2.flags |= 128;
9541 cutOffTailIfNeeded(newProps, false);
9542 current2 = nextResource.updateQueue;
9543 workInProgress2.updateQueue = current2;
9544 scheduleRetryEffect(workInProgress2, current2);
9545 workInProgress2.subtreeFlags = 0;
9546 current2 = renderLanes2;
9547 for (renderLanes2 = workInProgress2.child; null !== renderLanes2; )
9548 resetWorkInProgress(renderLanes2, current2), renderLanes2 = renderLanes2.sibling;
9549 push(
9550 suspenseStackCursor,
9551 suspenseStackCursor.current & SubtreeSuspenseContextMask | ForceSuspenseFallback,
9552 workInProgress2
9553 );
9554 isHydrating && pushTreeFork(workInProgress2, newProps.treeForkCount);
9555 return workInProgress2.child;
9556 }
9557 current2 = current2.sibling;
9558 }
9559 null !== newProps.tail && now$1() > workInProgressRootRenderTargetTime && (workInProgress2.flags |= 128, type = true, cutOffTailIfNeeded(newProps, false), workInProgress2.lanes = 4194304);
9560 }
9561 else {
9562 if (!type)
9563 if (current2 = findFirstSuspended(nextResource), null !== current2) {
9564 if (workInProgress2.flags |= 128, type = true, current2 = current2.updateQueue, workInProgress2.updateQueue = current2, scheduleRetryEffect(workInProgress2, current2), cutOffTailIfNeeded(newProps, true), null === newProps.tail && "hidden" === newProps.tailMode && !nextResource.alternate && !isHydrating)
9565 return bubbleProperties(workInProgress2), null;
9566 } else
9567 2 * now$1() - newProps.renderingStartTime > workInProgressRootRenderTargetTime && 536870912 !== renderLanes2 && (workInProgress2.flags |= 128, type = true, cutOffTailIfNeeded(newProps, false), workInProgress2.lanes = 4194304);
9568 newProps.isBackwards ? (nextResource.sibling = workInProgress2.child, workInProgress2.child = nextResource) : (current2 = newProps.last, null !== current2 ? current2.sibling = nextResource : workInProgress2.child = nextResource, newProps.last = nextResource);
9569 }
9570 if (null !== newProps.tail)
9571 return current2 = newProps.tail, newProps.rendering = current2, newProps.tail = current2.sibling, newProps.renderingStartTime = now$1(), current2.sibling = null, renderLanes2 = suspenseStackCursor.current, renderLanes2 = type ? renderLanes2 & SubtreeSuspenseContextMask | ForceSuspenseFallback : renderLanes2 & SubtreeSuspenseContextMask, push(suspenseStackCursor, renderLanes2, workInProgress2), isHydrating && pushTreeFork(workInProgress2, newProps.treeForkCount), current2;
9572 bubbleProperties(workInProgress2);
9573 return null;
9574 case 22:
9575 case 23:
9576 return popSuspenseHandler(workInProgress2), popHiddenContext(workInProgress2), newProps = null !== workInProgress2.memoizedState, null !== current2 ? null !== current2.memoizedState !== newProps && (workInProgress2.flags |= 8192) : newProps && (workInProgress2.flags |= 8192), newProps ? 0 !== (renderLanes2 & 536870912) && 0 === (workInProgress2.flags & 128) && (bubbleProperties(workInProgress2), workInProgress2.subtreeFlags & 6 && (workInProgress2.flags |= 8192)) : bubbleProperties(workInProgress2), renderLanes2 = workInProgress2.updateQueue, null !== renderLanes2 && scheduleRetryEffect(workInProgress2, renderLanes2.retryQueue), renderLanes2 = null, null !== current2 && null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (renderLanes2 = current2.memoizedState.cachePool.pool), newProps = null, null !== workInProgress2.memoizedState && null !== workInProgress2.memoizedState.cachePool && (newProps = workInProgress2.memoizedState.cachePool.pool), newProps !== renderLanes2 && (workInProgress2.flags |= 2048), null !== current2 && pop(resumedCache, workInProgress2), null;
9577 case 24:
9578 return renderLanes2 = null, null !== current2 && (renderLanes2 = current2.memoizedState.cache), workInProgress2.memoizedState.cache !== renderLanes2 && (workInProgress2.flags |= 2048), popProvider(CacheContext, workInProgress2), bubbleProperties(workInProgress2), null;
9579 case 25:
9580 return null;
9581 case 30:
9582 return null;
9583 }
9584 throw Error(
9585 "Unknown unit of work tag (" + workInProgress2.tag + "). This error is likely caused by a bug in React. Please file an issue."
9586 );
9587 }
9588 function unwindWork(current2, workInProgress2) {
9589 popTreeContext(workInProgress2);
9590 switch (workInProgress2.tag) {
9591 case 1:
9592 return current2 = workInProgress2.flags, current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
9593 case 3:
9594 return popProvider(CacheContext, workInProgress2), popHostContainer(workInProgress2), current2 = workInProgress2.flags, 0 !== (current2 & 65536) && 0 === (current2 & 128) ? (workInProgress2.flags = current2 & -65537 | 128, workInProgress2) : null;
9595 case 26:
9596 case 27:
9597 case 5:
9598 return popHostContext(workInProgress2), null;
9599 case 31:
9600 if (null !== workInProgress2.memoizedState) {
9601 popSuspenseHandler(workInProgress2);
9602 if (null === workInProgress2.alternate)
9603 throw Error(
9604 "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
9605 );
9606 resetHydrationState();
9607 }
9608 current2 = workInProgress2.flags;
9609 return current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
9610 case 13:
9611 popSuspenseHandler(workInProgress2);
9612 current2 = workInProgress2.memoizedState;
9613 if (null !== current2 && null !== current2.dehydrated) {
9614 if (null === workInProgress2.alternate)
9615 throw Error(
9616 "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
9617 );
9618 resetHydrationState();
9619 }
9620 current2 = workInProgress2.flags;
9621 return current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
9622 case 19:
9623 return pop(suspenseStackCursor, workInProgress2), null;
9624 case 4:
9625 return popHostContainer(workInProgress2), null;
9626 case 10:
9627 return popProvider(workInProgress2.type, workInProgress2), null;
9628 case 22:
9629 case 23:
9630 return popSuspenseHandler(workInProgress2), popHiddenContext(workInProgress2), null !== current2 && pop(resumedCache, workInProgress2), current2 = workInProgress2.flags, current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
9631 case 24:
9632 return popProvider(CacheContext, workInProgress2), null;
9633 case 25:
9634 return null;
9635 default:
9636 return null;
9637 }
9638 }
9639 function unwindInterruptedWork(current2, interruptedWork) {
9640 popTreeContext(interruptedWork);
9641 switch (interruptedWork.tag) {
9642 case 3:
9643 popProvider(CacheContext, interruptedWork);
9644 popHostContainer(interruptedWork);
9645 break;
9646 case 26:
9647 case 27:
9648 case 5:
9649 popHostContext(interruptedWork);
9650 break;
9651 case 4:
9652 popHostContainer(interruptedWork);
9653 break;
9654 case 31:
9655 null !== interruptedWork.memoizedState && popSuspenseHandler(interruptedWork);
9656 break;
9657 case 13:
9658 popSuspenseHandler(interruptedWork);
9659 break;
9660 case 19:
9661 pop(suspenseStackCursor, interruptedWork);
9662 break;
9663 case 10:
9664 popProvider(interruptedWork.type, interruptedWork);
9665 break;
9666 case 22:
9667 case 23:
9668 popSuspenseHandler(interruptedWork);
9669 popHiddenContext(interruptedWork);
9670 null !== current2 && pop(resumedCache, interruptedWork);
9671 break;
9672 case 24:
9673 popProvider(CacheContext, interruptedWork);
9674 }
9675 }
9676 function shouldProfile(current2) {
9677 return (current2.mode & ProfileMode) !== NoMode;
9678 }
9679 function commitHookLayoutEffects(finishedWork, hookFlags) {
9680 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork);
9681 }
9682 function commitHookLayoutUnmountEffects(finishedWork, nearestMountedAncestor, hookFlags) {
9683 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListUnmount(
9684 hookFlags,
9685 finishedWork,
9686 nearestMountedAncestor
9687 ), recordEffectDuration()) : commitHookEffectListUnmount(
9688 hookFlags,
9689 finishedWork,
9690 nearestMountedAncestor
9691 );
9692 }
9693 function commitHookEffectListMount(flags, finishedWork) {
9694 try {
9695 var updateQueue = finishedWork.updateQueue, lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
9696 if (null !== lastEffect) {
9697 var firstEffect = lastEffect.next;
9698 updateQueue = firstEffect;
9699 do {
9700 if ((updateQueue.tag & flags) === flags && (lastEffect = void 0, (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = true), lastEffect = runWithFiberInDEV(
9701 finishedWork,
9702 callCreateInDEV,
9703 updateQueue
9704 ), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = false), void 0 !== lastEffect && "function" !== typeof lastEffect)) {
9705 var hookName = void 0;
9706 hookName = 0 !== (updateQueue.tag & Layout) ? "useLayoutEffect" : 0 !== (updateQueue.tag & Insertion) ? "useInsertionEffect" : "useEffect";
9707 var addendum = void 0;
9708 addendum = null === lastEffect ? " You returned null. If your effect does not require clean up, return undefined (or nothing)." : "function" === typeof lastEffect.then ? "\n\nIt looks like you wrote " + hookName + "(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:\n\n" + hookName + "(() => {\n async function fetchData() {\n // You can await here\n const response = await MyAPI.getData(someId);\n // ...\n }\n fetchData();\n}, [someId]); // Or [] if effect doesn't need props or state\n\nLearn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching" : " You returned: " + lastEffect;
9709 runWithFiberInDEV(
9710 finishedWork,
9711 function(n, a) {
9712 console.error(
9713 "%s must not return anything besides a function, which is used for clean-up.%s",
9714 n,
9715 a
9716 );
9717 },
9718 hookName,
9719 addendum
9720 );
9721 }
9722 updateQueue = updateQueue.next;
9723 } while (updateQueue !== firstEffect);
9724 }
9725 } catch (error) {
9726 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9727 }
9728 }
9729 function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {
9730 try {
9731 var updateQueue = finishedWork.updateQueue, lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
9732 if (null !== lastEffect) {
9733 var firstEffect = lastEffect.next;
9734 updateQueue = firstEffect;
9735 do {
9736 if ((updateQueue.tag & flags) === flags) {
9737 var inst = updateQueue.inst, destroy = inst.destroy;
9738 void 0 !== destroy && (inst.destroy = void 0, (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = true), lastEffect = finishedWork, runWithFiberInDEV(
9739 lastEffect,
9740 callDestroyInDEV,
9741 lastEffect,
9742 nearestMountedAncestor,
9743 destroy
9744 ), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = false));
9745 }
9746 updateQueue = updateQueue.next;
9747 } while (updateQueue !== firstEffect);
9748 }
9749 } catch (error) {
9750 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9751 }
9752 }
9753 function commitHookPassiveMountEffects(finishedWork, hookFlags) {
9754 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork);
9755 }
9756 function commitHookPassiveUnmountEffects(finishedWork, nearestMountedAncestor, hookFlags) {
9757 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListUnmount(
9758 hookFlags,
9759 finishedWork,
9760 nearestMountedAncestor
9761 ), recordEffectDuration()) : commitHookEffectListUnmount(
9762 hookFlags,
9763 finishedWork,
9764 nearestMountedAncestor
9765 );
9766 }
9767 function commitClassCallbacks(finishedWork) {
9768 var updateQueue = finishedWork.updateQueue;
9769 if (null !== updateQueue) {
9770 var instance = finishedWork.stateNode;
9771 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (instance.props !== finishedWork.memoizedProps && console.error(
9772 "Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
9773 getComponentNameFromFiber(finishedWork) || "instance"
9774 ), instance.state !== finishedWork.memoizedState && console.error(
9775 "Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
9776 getComponentNameFromFiber(finishedWork) || "instance"
9777 ));
9778 try {
9779 runWithFiberInDEV(
9780 finishedWork,
9781 commitCallbacks,
9782 updateQueue,
9783 instance
9784 );
9785 } catch (error) {
9786 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9787 }
9788 }
9789 }
9790 function callGetSnapshotBeforeUpdates(instance, prevProps, prevState) {
9791 return instance.getSnapshotBeforeUpdate(prevProps, prevState);
9792 }
9793 function commitClassSnapshot(finishedWork, current2) {
9794 var prevProps = current2.memoizedProps, prevState = current2.memoizedState;
9795 current2 = finishedWork.stateNode;
9796 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (current2.props !== finishedWork.memoizedProps && console.error(
9797 "Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
9798 getComponentNameFromFiber(finishedWork) || "instance"
9799 ), current2.state !== finishedWork.memoizedState && console.error(
9800 "Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
9801 getComponentNameFromFiber(finishedWork) || "instance"
9802 ));
9803 try {
9804 var resolvedPrevProps = resolveClassComponentProps(
9805 finishedWork.type,
9806 prevProps
9807 );
9808 var snapshot = runWithFiberInDEV(
9809 finishedWork,
9810 callGetSnapshotBeforeUpdates,
9811 current2,
9812 resolvedPrevProps,
9813 prevState
9814 );
9815 prevProps = didWarnAboutUndefinedSnapshotBeforeUpdate;
9816 void 0 !== snapshot || prevProps.has(finishedWork.type) || (prevProps.add(finishedWork.type), runWithFiberInDEV(finishedWork, function() {
9817 console.error(
9818 "%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",
9819 getComponentNameFromFiber(finishedWork)
9820 );
9821 }));
9822 current2.__reactInternalSnapshotBeforeUpdate = snapshot;
9823 } catch (error) {
9824 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9825 }
9826 }
9827 function safelyCallComponentWillUnmount(current2, nearestMountedAncestor, instance) {
9828 instance.props = resolveClassComponentProps(
9829 current2.type,
9830 current2.memoizedProps
9831 );
9832 instance.state = current2.memoizedState;
9833 shouldProfile(current2) ? (startEffectTimer(), runWithFiberInDEV(
9834 current2,
9835 callComponentWillUnmountInDEV,
9836 current2,
9837 nearestMountedAncestor,
9838 instance
9839 ), recordEffectDuration()) : runWithFiberInDEV(
9840 current2,
9841 callComponentWillUnmountInDEV,
9842 current2,
9843 nearestMountedAncestor,
9844 instance
9845 );
9846 }
9847 function commitAttachRef(finishedWork) {
9848 var ref = finishedWork.ref;
9849 if (null !== ref) {
9850 switch (finishedWork.tag) {
9851 case 26:
9852 case 27:
9853 case 5:
9854 var instanceToUse = finishedWork.stateNode;
9855 break;
9856 case 30:
9857 instanceToUse = finishedWork.stateNode;
9858 break;
9859 default:
9860 instanceToUse = finishedWork.stateNode;
9861 }
9862 if ("function" === typeof ref)
9863 if (shouldProfile(finishedWork))
9864 try {
9865 startEffectTimer(), finishedWork.refCleanup = ref(instanceToUse);
9866 } finally {
9867 recordEffectDuration();
9868 }
9869 else finishedWork.refCleanup = ref(instanceToUse);
9870 else
9871 "string" === typeof ref ? console.error("String refs are no longer supported.") : ref.hasOwnProperty("current") || console.error(
9872 "Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",
9873 getComponentNameFromFiber(finishedWork)
9874 ), ref.current = instanceToUse;
9875 }
9876 }
9877 function safelyAttachRef(current2, nearestMountedAncestor) {
9878 try {
9879 runWithFiberInDEV(current2, commitAttachRef, current2);
9880 } catch (error) {
9881 captureCommitPhaseError(current2, nearestMountedAncestor, error);
9882 }
9883 }
9884 function safelyDetachRef(current2, nearestMountedAncestor) {
9885 var ref = current2.ref, refCleanup = current2.refCleanup;
9886 if (null !== ref)
9887 if ("function" === typeof refCleanup)
9888 try {
9889 if (shouldProfile(current2))
9890 try {
9891 startEffectTimer(), runWithFiberInDEV(current2, refCleanup);
9892 } finally {
9893 recordEffectDuration(current2);
9894 }
9895 else runWithFiberInDEV(current2, refCleanup);
9896 } catch (error) {
9897 captureCommitPhaseError(current2, nearestMountedAncestor, error);
9898 } finally {
9899 current2.refCleanup = null, current2 = current2.alternate, null != current2 && (current2.refCleanup = null);
9900 }
9901 else if ("function" === typeof ref)
9902 try {
9903 if (shouldProfile(current2))
9904 try {
9905 startEffectTimer(), runWithFiberInDEV(current2, ref, null);
9906 } finally {
9907 recordEffectDuration(current2);
9908 }
9909 else runWithFiberInDEV(current2, ref, null);
9910 } catch (error$7) {
9911 captureCommitPhaseError(current2, nearestMountedAncestor, error$7);
9912 }
9913 else ref.current = null;
9914 }
9915 function commitProfiler(finishedWork, current2, commitStartTime2, effectDuration) {
9916 var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onCommit = _finishedWork$memoize.onCommit;
9917 _finishedWork$memoize = _finishedWork$memoize.onRender;
9918 current2 = null === current2 ? "mount" : "update";
9919 currentUpdateIsNested && (current2 = "nested-update");
9920 "function" === typeof _finishedWork$memoize && _finishedWork$memoize(
9921 id,
9922 current2,
9923 finishedWork.actualDuration,
9924 finishedWork.treeBaseDuration,
9925 finishedWork.actualStartTime,
9926 commitStartTime2
9927 );
9928 "function" === typeof onCommit && onCommit(id, current2, effectDuration, commitStartTime2);
9929 }
9930 function commitProfilerPostCommitImpl(finishedWork, current2, commitStartTime2, passiveEffectDuration) {
9931 var _finishedWork$memoize2 = finishedWork.memoizedProps;
9932 finishedWork = _finishedWork$memoize2.id;
9933 _finishedWork$memoize2 = _finishedWork$memoize2.onPostCommit;
9934 current2 = null === current2 ? "mount" : "update";
9935 currentUpdateIsNested && (current2 = "nested-update");
9936 "function" === typeof _finishedWork$memoize2 && _finishedWork$memoize2(
9937 finishedWork,
9938 current2,
9939 passiveEffectDuration,
9940 commitStartTime2
9941 );
9942 }
9943 function commitHostMount(finishedWork) {
9944 var type = finishedWork.type, props = finishedWork.memoizedProps, instance = finishedWork.stateNode;
9945 try {
9946 runWithFiberInDEV(
9947 finishedWork,
9948 commitMount,
9949 instance,
9950 type,
9951 props,
9952 finishedWork
9953 );
9954 } catch (error) {
9955 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9956 }
9957 }
9958 function commitHostUpdate(finishedWork, newProps, oldProps) {
9959 try {
9960 runWithFiberInDEV(
9961 finishedWork,
9962 commitUpdate,
9963 finishedWork.stateNode,
9964 finishedWork.type,
9965 oldProps,
9966 newProps,
9967 finishedWork
9968 );
9969 } catch (error) {
9970 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9971 }
9972 }
9973 function isHostParent(fiber) {
9974 return 5 === fiber.tag || 3 === fiber.tag || 26 === fiber.tag || 27 === fiber.tag && isSingletonScope(fiber.type) || 4 === fiber.tag;
9975 }
9976 function getHostSibling(fiber) {
9977 a: for (; ; ) {
9978 for (; null === fiber.sibling; ) {
9979 if (null === fiber.return || isHostParent(fiber.return)) return null;
9980 fiber = fiber.return;
9981 }
9982 fiber.sibling.return = fiber.return;
9983 for (fiber = fiber.sibling; 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag; ) {
9984 if (27 === fiber.tag && isSingletonScope(fiber.type)) continue a;
9985 if (fiber.flags & 2) continue a;
9986 if (null === fiber.child || 4 === fiber.tag) continue a;
9987 else fiber.child.return = fiber, fiber = fiber.child;
9988 }
9989 if (!(fiber.flags & 2)) return fiber.stateNode;
9990 }
9991 }
9992 function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
9993 var tag = node.tag;
9994 if (5 === tag || 6 === tag)
9995 node = node.stateNode, before ? (warnForReactChildrenConflict(parent), (9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName ? parent.ownerDocument.body : parent).insertBefore(node, before)) : (warnForReactChildrenConflict(parent), before = 9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName ? parent.ownerDocument.body : parent, before.appendChild(node), parent = parent._reactRootContainer, null !== parent && void 0 !== parent || null !== before.onclick || (before.onclick = noop$1));
9996 else if (4 !== tag && (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode, before = null), node = node.child, null !== node))
9997 for (insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling; null !== node; )
9998 insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling;
9999 }
10000 function insertOrAppendPlacementNode(node, before, parent) {
10001 var tag = node.tag;
10002 if (5 === tag || 6 === tag)
10003 node = node.stateNode, before ? parent.insertBefore(node, before) : parent.appendChild(node);
10004 else if (4 !== tag && (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode), node = node.child, null !== node))
10005 for (insertOrAppendPlacementNode(node, before, parent), node = node.sibling; null !== node; )
10006 insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
10007 }
10008 function commitPlacement(finishedWork) {
10009 for (var hostParentFiber, parentFiber = finishedWork.return; null !== parentFiber; ) {
10010 if (isHostParent(parentFiber)) {
10011 hostParentFiber = parentFiber;
10012 break;
10013 }
10014 parentFiber = parentFiber.return;
10015 }
10016 if (null == hostParentFiber)
10017 throw Error(
10018 "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
10019 );
10020 switch (hostParentFiber.tag) {
10021 case 27:
10022 hostParentFiber = hostParentFiber.stateNode;
10023 parentFiber = getHostSibling(finishedWork);
10024 insertOrAppendPlacementNode(
10025 finishedWork,
10026 parentFiber,
10027 hostParentFiber
10028 );
10029 break;
10030 case 5:
10031 parentFiber = hostParentFiber.stateNode;
10032 hostParentFiber.flags & 32 && (resetTextContent(parentFiber), hostParentFiber.flags &= -33);
10033 hostParentFiber = getHostSibling(finishedWork);
10034 insertOrAppendPlacementNode(
10035 finishedWork,
10036 hostParentFiber,
10037 parentFiber
10038 );
10039 break;
10040 case 3:
10041 case 4:
10042 hostParentFiber = hostParentFiber.stateNode.containerInfo;
10043 parentFiber = getHostSibling(finishedWork);
10044 insertOrAppendPlacementNodeIntoContainer(
10045 finishedWork,
10046 parentFiber,
10047 hostParentFiber
10048 );
10049 break;
10050 default:
10051 throw Error(
10052 "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue."
10053 );
10054 }
10055 }
10056 function commitHostSingletonAcquisition(finishedWork) {
10057 var singleton = finishedWork.stateNode, props = finishedWork.memoizedProps;
10058 try {
10059 runWithFiberInDEV(
10060 finishedWork,
10061 acquireSingletonInstance,
10062 finishedWork.type,
10063 props,
10064 singleton,
10065 finishedWork
10066 );
10067 } catch (error) {
10068 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10069 }
10070 }
10071 function isHydratingParent(current2, finishedWork) {
10072 return 31 === finishedWork.tag ? (finishedWork = finishedWork.memoizedState, null !== current2.memoizedState && null === finishedWork) : 13 === finishedWork.tag ? (current2 = current2.memoizedState, finishedWork = finishedWork.memoizedState, null !== current2 && null !== current2.dehydrated && (null === finishedWork || null === finishedWork.dehydrated)) : 3 === finishedWork.tag ? current2.memoizedState.isDehydrated && 0 === (finishedWork.flags & 256) : false;
10073 }
10074 function commitBeforeMutationEffects(root2, firstChild) {
10075 root2 = root2.containerInfo;
10076 eventsEnabled = _enabled;
10077 root2 = getActiveElementDeep(root2);
10078 if (hasSelectionCapabilities(root2)) {
10079 if ("selectionStart" in root2)
10080 var JSCompiler_temp = {
10081 start: root2.selectionStart,
10082 end: root2.selectionEnd
10083 };
10084 else
10085 a: {
10086 JSCompiler_temp = (JSCompiler_temp = root2.ownerDocument) && JSCompiler_temp.defaultView || window;
10087 var selection = JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();
10088 if (selection && 0 !== selection.rangeCount) {
10089 JSCompiler_temp = selection.anchorNode;
10090 var anchorOffset = selection.anchorOffset, focusNode = selection.focusNode;
10091 selection = selection.focusOffset;
10092 try {
10093 JSCompiler_temp.nodeType, focusNode.nodeType;
10094 } catch (e$2) {
10095 JSCompiler_temp = null;
10096 break a;
10097 }
10098 var length = 0, start = -1, end = -1, indexWithinAnchor = 0, indexWithinFocus = 0, node = root2, parentNode = null;
10099 b: for (; ; ) {
10100 for (var next; ; ) {
10101 node !== JSCompiler_temp || 0 !== anchorOffset && 3 !== node.nodeType || (start = length + anchorOffset);
10102 node !== focusNode || 0 !== selection && 3 !== node.nodeType || (end = length + selection);
10103 3 === node.nodeType && (length += node.nodeValue.length);
10104 if (null === (next = node.firstChild)) break;
10105 parentNode = node;
10106 node = next;
10107 }
10108 for (; ; ) {
10109 if (node === root2) break b;
10110 parentNode === JSCompiler_temp && ++indexWithinAnchor === anchorOffset && (start = length);
10111 parentNode === focusNode && ++indexWithinFocus === selection && (end = length);
10112 if (null !== (next = node.nextSibling)) break;
10113 node = parentNode;
10114 parentNode = node.parentNode;
10115 }
10116 node = next;
10117 }
10118 JSCompiler_temp = -1 === start || -1 === end ? null : { start, end };
10119 } else JSCompiler_temp = null;
10120 }
10121 JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };
10122 } else JSCompiler_temp = null;
10123 selectionInformation = {
10124 focusedElem: root2,
10125 selectionRange: JSCompiler_temp
10126 };
10127 _enabled = false;
10128 for (nextEffect = firstChild; null !== nextEffect; )
10129 if (firstChild = nextEffect, root2 = firstChild.child, 0 !== (firstChild.subtreeFlags & 1028) && null !== root2)
10130 root2.return = firstChild, nextEffect = root2;
10131 else
10132 for (; null !== nextEffect; ) {
10133 root2 = firstChild = nextEffect;
10134 JSCompiler_temp = root2.alternate;
10135 anchorOffset = root2.flags;
10136 switch (root2.tag) {
10137 case 0:
10138 if (0 !== (anchorOffset & 4) && (root2 = root2.updateQueue, root2 = null !== root2 ? root2.events : null, null !== root2))
10139 for (JSCompiler_temp = 0; JSCompiler_temp < root2.length; JSCompiler_temp++)
10140 anchorOffset = root2[JSCompiler_temp], anchorOffset.ref.impl = anchorOffset.nextImpl;
10141 break;
10142 case 11:
10143 case 15:
10144 break;
10145 case 1:
10146 0 !== (anchorOffset & 1024) && null !== JSCompiler_temp && commitClassSnapshot(root2, JSCompiler_temp);
10147 break;
10148 case 3:
10149 if (0 !== (anchorOffset & 1024)) {
10150 if (root2 = root2.stateNode.containerInfo, JSCompiler_temp = root2.nodeType, 9 === JSCompiler_temp)
10151 clearContainerSparingly(root2);
10152 else if (1 === JSCompiler_temp)
10153 switch (root2.nodeName) {
10154 case "HEAD":
10155 case "HTML":
10156 case "BODY":
10157 clearContainerSparingly(root2);
10158 break;
10159 default:
10160 root2.textContent = "";
10161 }
10162 }
10163 break;
10164 case 5:
10165 case 26:
10166 case 27:
10167 case 6:
10168 case 4:
10169 case 17:
10170 break;
10171 default:
10172 if (0 !== (anchorOffset & 1024))
10173 throw Error(
10174 "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
10175 );
10176 }
10177 root2 = firstChild.sibling;
10178 if (null !== root2) {
10179 root2.return = firstChild.return;
10180 nextEffect = root2;
10181 break;
10182 }
10183 nextEffect = firstChild.return;
10184 }
10185 }
10186 function commitLayoutEffectOnFiber(finishedRoot, current2, finishedWork) {
10187 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), flags = finishedWork.flags;
10188 switch (finishedWork.tag) {
10189 case 0:
10190 case 11:
10191 case 15:
10192 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10193 flags & 4 && commitHookLayoutEffects(finishedWork, Layout | HasEffect);
10194 break;
10195 case 1:
10196 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10197 if (flags & 4)
10198 if (finishedRoot = finishedWork.stateNode, null === current2)
10199 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && console.error(
10200 "Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
10201 getComponentNameFromFiber(finishedWork) || "instance"
10202 ), finishedRoot.state !== finishedWork.memoizedState && console.error(
10203 "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
10204 getComponentNameFromFiber(finishedWork) || "instance"
10205 )), shouldProfile(finishedWork) ? (startEffectTimer(), runWithFiberInDEV(
10206 finishedWork,
10207 callComponentDidMountInDEV,
10208 finishedWork,
10209 finishedRoot
10210 ), recordEffectDuration()) : runWithFiberInDEV(
10211 finishedWork,
10212 callComponentDidMountInDEV,
10213 finishedWork,
10214 finishedRoot
10215 );
10216 else {
10217 var prevProps = resolveClassComponentProps(
10218 finishedWork.type,
10219 current2.memoizedProps
10220 );
10221 current2 = current2.memoizedState;
10222 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && console.error(
10223 "Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
10224 getComponentNameFromFiber(finishedWork) || "instance"
10225 ), finishedRoot.state !== finishedWork.memoizedState && console.error(
10226 "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
10227 getComponentNameFromFiber(finishedWork) || "instance"
10228 ));
10229 shouldProfile(finishedWork) ? (startEffectTimer(), runWithFiberInDEV(
10230 finishedWork,
10231 callComponentDidUpdateInDEV,
10232 finishedWork,
10233 finishedRoot,
10234 prevProps,
10235 current2,
10236 finishedRoot.__reactInternalSnapshotBeforeUpdate
10237 ), recordEffectDuration()) : runWithFiberInDEV(
10238 finishedWork,
10239 callComponentDidUpdateInDEV,
10240 finishedWork,
10241 finishedRoot,
10242 prevProps,
10243 current2,
10244 finishedRoot.__reactInternalSnapshotBeforeUpdate
10245 );
10246 }
10247 flags & 64 && commitClassCallbacks(finishedWork);
10248 flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
10249 break;
10250 case 3:
10251 current2 = pushNestedEffectDurations();
10252 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10253 if (flags & 64 && (flags = finishedWork.updateQueue, null !== flags)) {
10254 prevProps = null;
10255 if (null !== finishedWork.child)
10256 switch (finishedWork.child.tag) {
10257 case 27:
10258 case 5:
10259 prevProps = finishedWork.child.stateNode;
10260 break;
10261 case 1:
10262 prevProps = finishedWork.child.stateNode;
10263 }
10264 try {
10265 runWithFiberInDEV(
10266 finishedWork,
10267 commitCallbacks,
10268 flags,
10269 prevProps
10270 );
10271 } catch (error) {
10272 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10273 }
10274 }
10275 finishedRoot.effectDuration += popNestedEffectDurations(current2);
10276 break;
10277 case 27:
10278 null === current2 && flags & 4 && commitHostSingletonAcquisition(finishedWork);
10279 case 26:
10280 case 5:
10281 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10282 if (null === current2) {
10283 if (flags & 4) commitHostMount(finishedWork);
10284 else if (flags & 64) {
10285 finishedRoot = finishedWork.type;
10286 current2 = finishedWork.memoizedProps;
10287 prevProps = finishedWork.stateNode;
10288 try {
10289 runWithFiberInDEV(
10290 finishedWork,
10291 commitHydratedInstance,
10292 prevProps,
10293 finishedRoot,
10294 current2,
10295 finishedWork
10296 );
10297 } catch (error) {
10298 captureCommitPhaseError(
10299 finishedWork,
10300 finishedWork.return,
10301 error
10302 );
10303 }
10304 }
10305 }
10306 flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
10307 break;
10308 case 12:
10309 if (flags & 4) {
10310 flags = pushNestedEffectDurations();
10311 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10312 finishedRoot = finishedWork.stateNode;
10313 finishedRoot.effectDuration += bubbleNestedEffectDurations(flags);
10314 try {
10315 runWithFiberInDEV(
10316 finishedWork,
10317 commitProfiler,
10318 finishedWork,
10319 current2,
10320 commitStartTime,
10321 finishedRoot.effectDuration
10322 );
10323 } catch (error) {
10324 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10325 }
10326 } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10327 break;
10328 case 31:
10329 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10330 flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);
10331 break;
10332 case 13:
10333 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10334 flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
10335 flags & 64 && (finishedRoot = finishedWork.memoizedState, null !== finishedRoot && (finishedRoot = finishedRoot.dehydrated, null !== finishedRoot && (flags = retryDehydratedSuspenseBoundary.bind(
10336 null,
10337 finishedWork
10338 ), registerSuspenseInstanceRetry(finishedRoot, flags))));
10339 break;
10340 case 22:
10341 flags = null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;
10342 if (!flags) {
10343 current2 = null !== current2 && null !== current2.memoizedState || offscreenSubtreeWasHidden;
10344 prevProps = offscreenSubtreeIsHidden;
10345 var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
10346 offscreenSubtreeIsHidden = flags;
10347 (offscreenSubtreeWasHidden = current2) && !prevOffscreenSubtreeWasHidden ? (recursivelyTraverseReappearLayoutEffects(
10348 finishedRoot,
10349 finishedWork,
10350 0 !== (finishedWork.subtreeFlags & 8772)
10351 ), (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentReappeared(
10352 finishedWork,
10353 componentEffectStartTime,
10354 componentEffectEndTime
10355 )) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10356 offscreenSubtreeIsHidden = prevProps;
10357 offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
10358 }
10359 break;
10360 case 30:
10361 break;
10362 default:
10363 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10364 }
10365 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
10366 finishedWork,
10367 componentEffectStartTime,
10368 componentEffectEndTime,
10369 componentEffectDuration,
10370 componentEffectErrors
10371 ), null === finishedWork.alternate && null !== finishedWork.return && null !== finishedWork.return.alternate && 0.05 < componentEffectEndTime - componentEffectStartTime && (isHydratingParent(
10372 finishedWork.return.alternate,
10373 finishedWork.return
10374 ) || logComponentTrigger(
10375 finishedWork,
10376 componentEffectStartTime,
10377 componentEffectEndTime,
10378 "Mount"
10379 )));
10380 popComponentEffectStart(prevEffectStart);
10381 popComponentEffectDuration(prevEffectDuration);
10382 componentEffectErrors = prevEffectErrors;
10383 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
10384 }
10385 function detachFiberAfterEffects(fiber) {
10386 var alternate = fiber.alternate;
10387 null !== alternate && (fiber.alternate = null, detachFiberAfterEffects(alternate));
10388 fiber.child = null;
10389 fiber.deletions = null;
10390 fiber.sibling = null;
10391 5 === fiber.tag && (alternate = fiber.stateNode, null !== alternate && detachDeletedInstance(alternate));
10392 fiber.stateNode = null;
10393 fiber._debugOwner = null;
10394 fiber.return = null;
10395 fiber.dependencies = null;
10396 fiber.memoizedProps = null;
10397 fiber.memoizedState = null;
10398 fiber.pendingProps = null;
10399 fiber.stateNode = null;
10400 fiber.updateQueue = null;
10401 }
10402 function recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {
10403 for (parent = parent.child; null !== parent; )
10404 commitDeletionEffectsOnFiber(
10405 finishedRoot,
10406 nearestMountedAncestor,
10407 parent
10408 ), parent = parent.sibling;
10409 }
10410 function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {
10411 if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount)
10412 try {
10413 injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);
10414 } catch (err) {
10415 hasLoggedError || (hasLoggedError = true, console.error(
10416 "React instrumentation encountered an error: %o",
10417 err
10418 ));
10419 }
10420 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
10421 switch (deletedFiber.tag) {
10422 case 26:
10423 offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
10424 recursivelyTraverseDeletionEffects(
10425 finishedRoot,
10426 nearestMountedAncestor,
10427 deletedFiber
10428 );
10429 deletedFiber.memoizedState ? deletedFiber.memoizedState.count-- : deletedFiber.stateNode && (finishedRoot = deletedFiber.stateNode, finishedRoot.parentNode.removeChild(finishedRoot));
10430 break;
10431 case 27:
10432 offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
10433 var prevHostParent = hostParent, prevHostParentIsContainer = hostParentIsContainer;
10434 isSingletonScope(deletedFiber.type) && (hostParent = deletedFiber.stateNode, hostParentIsContainer = false);
10435 recursivelyTraverseDeletionEffects(
10436 finishedRoot,
10437 nearestMountedAncestor,
10438 deletedFiber
10439 );
10440 runWithFiberInDEV(
10441 deletedFiber,
10442 releaseSingletonInstance,
10443 deletedFiber.stateNode
10444 );
10445 hostParent = prevHostParent;
10446 hostParentIsContainer = prevHostParentIsContainer;
10447 break;
10448 case 5:
10449 offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
10450 case 6:
10451 prevHostParent = hostParent;
10452 prevHostParentIsContainer = hostParentIsContainer;
10453 hostParent = null;
10454 recursivelyTraverseDeletionEffects(
10455 finishedRoot,
10456 nearestMountedAncestor,
10457 deletedFiber
10458 );
10459 hostParent = prevHostParent;
10460 hostParentIsContainer = prevHostParentIsContainer;
10461 if (null !== hostParent)
10462 if (hostParentIsContainer)
10463 try {
10464 runWithFiberInDEV(
10465 deletedFiber,
10466 removeChildFromContainer,
10467 hostParent,
10468 deletedFiber.stateNode
10469 );
10470 } catch (error) {
10471 captureCommitPhaseError(
10472 deletedFiber,
10473 nearestMountedAncestor,
10474 error
10475 );
10476 }
10477 else
10478 try {
10479 runWithFiberInDEV(
10480 deletedFiber,
10481 removeChild,
10482 hostParent,
10483 deletedFiber.stateNode
10484 );
10485 } catch (error) {
10486 captureCommitPhaseError(
10487 deletedFiber,
10488 nearestMountedAncestor,
10489 error
10490 );
10491 }
10492 break;
10493 case 18:
10494 null !== hostParent && (hostParentIsContainer ? (finishedRoot = hostParent, clearHydrationBoundary(
10495 9 === finishedRoot.nodeType ? finishedRoot.body : "HTML" === finishedRoot.nodeName ? finishedRoot.ownerDocument.body : finishedRoot,
10496 deletedFiber.stateNode
10497 ), retryIfBlockedOn(finishedRoot)) : clearHydrationBoundary(hostParent, deletedFiber.stateNode));
10498 break;
10499 case 4:
10500 prevHostParent = hostParent;
10501 prevHostParentIsContainer = hostParentIsContainer;
10502 hostParent = deletedFiber.stateNode.containerInfo;
10503 hostParentIsContainer = true;
10504 recursivelyTraverseDeletionEffects(
10505 finishedRoot,
10506 nearestMountedAncestor,
10507 deletedFiber
10508 );
10509 hostParent = prevHostParent;
10510 hostParentIsContainer = prevHostParentIsContainer;
10511 break;
10512 case 0:
10513 case 11:
10514 case 14:
10515 case 15:
10516 commitHookEffectListUnmount(
10517 Insertion,
10518 deletedFiber,
10519 nearestMountedAncestor
10520 );
10521 offscreenSubtreeWasHidden || commitHookLayoutUnmountEffects(
10522 deletedFiber,
10523 nearestMountedAncestor,
10524 Layout
10525 );
10526 recursivelyTraverseDeletionEffects(
10527 finishedRoot,
10528 nearestMountedAncestor,
10529 deletedFiber
10530 );
10531 break;
10532 case 1:
10533 offscreenSubtreeWasHidden || (safelyDetachRef(deletedFiber, nearestMountedAncestor), prevHostParent = deletedFiber.stateNode, "function" === typeof prevHostParent.componentWillUnmount && safelyCallComponentWillUnmount(
10534 deletedFiber,
10535 nearestMountedAncestor,
10536 prevHostParent
10537 ));
10538 recursivelyTraverseDeletionEffects(
10539 finishedRoot,
10540 nearestMountedAncestor,
10541 deletedFiber
10542 );
10543 break;
10544 case 21:
10545 recursivelyTraverseDeletionEffects(
10546 finishedRoot,
10547 nearestMountedAncestor,
10548 deletedFiber
10549 );
10550 break;
10551 case 22:
10552 offscreenSubtreeWasHidden = (prevHostParent = offscreenSubtreeWasHidden) || null !== deletedFiber.memoizedState;
10553 recursivelyTraverseDeletionEffects(
10554 finishedRoot,
10555 nearestMountedAncestor,
10556 deletedFiber
10557 );
10558 offscreenSubtreeWasHidden = prevHostParent;
10559 break;
10560 default:
10561 recursivelyTraverseDeletionEffects(
10562 finishedRoot,
10563 nearestMountedAncestor,
10564 deletedFiber
10565 );
10566 }
10567 (deletedFiber.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
10568 deletedFiber,
10569 componentEffectStartTime,
10570 componentEffectEndTime,
10571 componentEffectDuration,
10572 componentEffectErrors
10573 );
10574 popComponentEffectStart(prevEffectStart);
10575 popComponentEffectDuration(prevEffectDuration);
10576 componentEffectErrors = prevEffectErrors;
10577 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
10578 }
10579 function commitActivityHydrationCallbacks(finishedRoot, finishedWork) {
10580 if (null === finishedWork.memoizedState && (finishedRoot = finishedWork.alternate, null !== finishedRoot && (finishedRoot = finishedRoot.memoizedState, null !== finishedRoot))) {
10581 finishedRoot = finishedRoot.dehydrated;
10582 try {
10583 runWithFiberInDEV(
10584 finishedWork,
10585 commitHydratedActivityInstance,
10586 finishedRoot
10587 );
10588 } catch (error) {
10589 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10590 }
10591 }
10592 }
10593 function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
10594 if (null === finishedWork.memoizedState && (finishedRoot = finishedWork.alternate, null !== finishedRoot && (finishedRoot = finishedRoot.memoizedState, null !== finishedRoot && (finishedRoot = finishedRoot.dehydrated, null !== finishedRoot))))
10595 try {
10596 runWithFiberInDEV(
10597 finishedWork,
10598 commitHydratedSuspenseInstance,
10599 finishedRoot
10600 );
10601 } catch (error) {
10602 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10603 }
10604 }
10605 function getRetryCache(finishedWork) {
10606 switch (finishedWork.tag) {
10607 case 31:
10608 case 13:
10609 case 19:
10610 var retryCache = finishedWork.stateNode;
10611 null === retryCache && (retryCache = finishedWork.stateNode = new PossiblyWeakSet());
10612 return retryCache;
10613 case 22:
10614 return finishedWork = finishedWork.stateNode, retryCache = finishedWork._retryCache, null === retryCache && (retryCache = finishedWork._retryCache = new PossiblyWeakSet()), retryCache;
10615 default:
10616 throw Error(
10617 "Unexpected Suspense handler tag (" + finishedWork.tag + "). This is a bug in React."
10618 );
10619 }
10620 }
10621 function attachSuspenseRetryListeners(finishedWork, wakeables) {
10622 var retryCache = getRetryCache(finishedWork);
10623 wakeables.forEach(function(wakeable) {
10624 if (!retryCache.has(wakeable)) {
10625 retryCache.add(wakeable);
10626 if (isDevToolsPresent)
10627 if (null !== inProgressLanes && null !== inProgressRoot)
10628 restorePendingUpdaters(inProgressRoot, inProgressLanes);
10629 else
10630 throw Error(
10631 "Expected finished root and lanes to be set. This is a bug in React."
10632 );
10633 var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
10634 wakeable.then(retry, retry);
10635 }
10636 });
10637 }
10638 function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
10639 var deletions = parentFiber.deletions;
10640 if (null !== deletions)
10641 for (var i = 0; i < deletions.length; i++) {
10642 var root2 = root$jscomp$0, returnFiber = parentFiber, deletedFiber = deletions[i], prevEffectStart = pushComponentEffectStart(), parent = returnFiber;
10643 a: for (; null !== parent; ) {
10644 switch (parent.tag) {
10645 case 27:
10646 if (isSingletonScope(parent.type)) {
10647 hostParent = parent.stateNode;
10648 hostParentIsContainer = false;
10649 break a;
10650 }
10651 break;
10652 case 5:
10653 hostParent = parent.stateNode;
10654 hostParentIsContainer = false;
10655 break a;
10656 case 3:
10657 case 4:
10658 hostParent = parent.stateNode.containerInfo;
10659 hostParentIsContainer = true;
10660 break a;
10661 }
10662 parent = parent.return;
10663 }
10664 if (null === hostParent)
10665 throw Error(
10666 "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
10667 );
10668 commitDeletionEffectsOnFiber(root2, returnFiber, deletedFiber);
10669 hostParent = null;
10670 hostParentIsContainer = false;
10671 (deletedFiber.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
10672 deletedFiber,
10673 componentEffectStartTime,
10674 componentEffectEndTime,
10675 "Unmount"
10676 );
10677 popComponentEffectStart(prevEffectStart);
10678 root2 = deletedFiber;
10679 returnFiber = root2.alternate;
10680 null !== returnFiber && (returnFiber.return = null);
10681 root2.return = null;
10682 }
10683 if (parentFiber.subtreeFlags & 13886)
10684 for (parentFiber = parentFiber.child; null !== parentFiber; )
10685 commitMutationEffectsOnFiber(parentFiber, root$jscomp$0), parentFiber = parentFiber.sibling;
10686 }
10687 function commitMutationEffectsOnFiber(finishedWork, root2) {
10688 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), current2 = finishedWork.alternate, flags = finishedWork.flags;
10689 switch (finishedWork.tag) {
10690 case 0:
10691 case 11:
10692 case 14:
10693 case 15:
10694 recursivelyTraverseMutationEffects(root2, finishedWork);
10695 commitReconciliationEffects(finishedWork);
10696 flags & 4 && (commitHookEffectListUnmount(
10697 Insertion | HasEffect,
10698 finishedWork,
10699 finishedWork.return
10700 ), commitHookEffectListMount(Insertion | HasEffect, finishedWork), commitHookLayoutUnmountEffects(
10701 finishedWork,
10702 finishedWork.return,
10703 Layout | HasEffect
10704 ));
10705 break;
10706 case 1:
10707 recursivelyTraverseMutationEffects(root2, finishedWork);
10708 commitReconciliationEffects(finishedWork);
10709 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
10710 if (flags & 64 && offscreenSubtreeIsHidden && (flags = finishedWork.updateQueue, null !== flags && (current2 = flags.callbacks, null !== current2))) {
10711 var existingHiddenCallbacks = flags.shared.hiddenCallbacks;
10712 flags.shared.hiddenCallbacks = null === existingHiddenCallbacks ? current2 : existingHiddenCallbacks.concat(current2);
10713 }
10714 break;
10715 case 26:
10716 existingHiddenCallbacks = currentHoistableRoot;
10717 recursivelyTraverseMutationEffects(root2, finishedWork);
10718 commitReconciliationEffects(finishedWork);
10719 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
10720 if (flags & 4) {
10721 var currentResource = null !== current2 ? current2.memoizedState : null;
10722 flags = finishedWork.memoizedState;
10723 if (null === current2)
10724 if (null === flags)
10725 if (null === finishedWork.stateNode) {
10726 a: {
10727 flags = finishedWork.type;
10728 current2 = finishedWork.memoizedProps;
10729 existingHiddenCallbacks = existingHiddenCallbacks.ownerDocument || existingHiddenCallbacks;
10730 b: switch (flags) {
10731 case "title":
10732 currentResource = existingHiddenCallbacks.getElementsByTagName(
10733 "title"
10734 )[0];
10735 if (!currentResource || currentResource[internalHoistableMarker] || currentResource[internalInstanceKey] || currentResource.namespaceURI === SVG_NAMESPACE || currentResource.hasAttribute("itemprop"))
10736 currentResource = existingHiddenCallbacks.createElement(flags), existingHiddenCallbacks.head.insertBefore(
10737 currentResource,
10738 existingHiddenCallbacks.querySelector(
10739 "head > title"
10740 )
10741 );
10742 setInitialProperties(currentResource, flags, current2);
10743 currentResource[internalInstanceKey] = finishedWork;
10744 markNodeAsHoistable(currentResource);
10745 flags = currentResource;
10746 break a;
10747 case "link":
10748 var maybeNodes = getHydratableHoistableCache(
10749 "link",
10750 "href",
10751 existingHiddenCallbacks
10752 ).get(flags + (current2.href || ""));
10753 if (maybeNodes) {
10754 for (var i = 0; i < maybeNodes.length; i++)
10755 if (currentResource = maybeNodes[i], currentResource.getAttribute("href") === (null == current2.href || "" === current2.href ? null : current2.href) && currentResource.getAttribute("rel") === (null == current2.rel ? null : current2.rel) && currentResource.getAttribute("title") === (null == current2.title ? null : current2.title) && currentResource.getAttribute("crossorigin") === (null == current2.crossOrigin ? null : current2.crossOrigin)) {
10756 maybeNodes.splice(i, 1);
10757 break b;
10758 }
10759 }
10760 currentResource = existingHiddenCallbacks.createElement(flags);
10761 setInitialProperties(currentResource, flags, current2);
10762 existingHiddenCallbacks.head.appendChild(
10763 currentResource
10764 );
10765 break;
10766 case "meta":
10767 if (maybeNodes = getHydratableHoistableCache(
10768 "meta",
10769 "content",
10770 existingHiddenCallbacks
10771 ).get(flags + (current2.content || ""))) {
10772 for (i = 0; i < maybeNodes.length; i++)
10773 if (currentResource = maybeNodes[i], checkAttributeStringCoercion(
10774 current2.content,
10775 "content"
10776 ), currentResource.getAttribute("content") === (null == current2.content ? null : "" + current2.content) && currentResource.getAttribute("name") === (null == current2.name ? null : current2.name) && currentResource.getAttribute("property") === (null == current2.property ? null : current2.property) && currentResource.getAttribute("http-equiv") === (null == current2.httpEquiv ? null : current2.httpEquiv) && currentResource.getAttribute("charset") === (null == current2.charSet ? null : current2.charSet)) {
10777 maybeNodes.splice(i, 1);
10778 break b;
10779 }
10780 }
10781 currentResource = existingHiddenCallbacks.createElement(flags);
10782 setInitialProperties(currentResource, flags, current2);
10783 existingHiddenCallbacks.head.appendChild(
10784 currentResource
10785 );
10786 break;
10787 default:
10788 throw Error(
10789 'getNodesForType encountered a type it did not expect: "' + flags + '". This is a bug in React.'
10790 );
10791 }
10792 currentResource[internalInstanceKey] = finishedWork;
10793 markNodeAsHoistable(currentResource);
10794 flags = currentResource;
10795 }
10796 finishedWork.stateNode = flags;
10797 } else
10798 mountHoistable(
10799 existingHiddenCallbacks,
10800 finishedWork.type,
10801 finishedWork.stateNode
10802 );
10803 else
10804 finishedWork.stateNode = acquireResource(
10805 existingHiddenCallbacks,
10806 flags,
10807 finishedWork.memoizedProps
10808 );
10809 else
10810 currentResource !== flags ? (null === currentResource ? null !== current2.stateNode && (current2 = current2.stateNode, current2.parentNode.removeChild(current2)) : currentResource.count--, null === flags ? mountHoistable(
10811 existingHiddenCallbacks,
10812 finishedWork.type,
10813 finishedWork.stateNode
10814 ) : acquireResource(
10815 existingHiddenCallbacks,
10816 flags,
10817 finishedWork.memoizedProps
10818 )) : null === flags && null !== finishedWork.stateNode && commitHostUpdate(
10819 finishedWork,
10820 finishedWork.memoizedProps,
10821 current2.memoizedProps
10822 );
10823 }
10824 break;
10825 case 27:
10826 recursivelyTraverseMutationEffects(root2, finishedWork);
10827 commitReconciliationEffects(finishedWork);
10828 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
10829 null !== current2 && flags & 4 && commitHostUpdate(
10830 finishedWork,
10831 finishedWork.memoizedProps,
10832 current2.memoizedProps
10833 );
10834 break;
10835 case 5:
10836 recursivelyTraverseMutationEffects(root2, finishedWork);
10837 commitReconciliationEffects(finishedWork);
10838 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
10839 if (finishedWork.flags & 32) {
10840 existingHiddenCallbacks = finishedWork.stateNode;
10841 try {
10842 runWithFiberInDEV(
10843 finishedWork,
10844 resetTextContent,
10845 existingHiddenCallbacks
10846 );
10847 } catch (error) {
10848 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10849 }
10850 }
10851 flags & 4 && null != finishedWork.stateNode && (existingHiddenCallbacks = finishedWork.memoizedProps, commitHostUpdate(
10852 finishedWork,
10853 existingHiddenCallbacks,
10854 null !== current2 ? current2.memoizedProps : existingHiddenCallbacks
10855 ));
10856 flags & 1024 && (needsFormReset = true, "form" !== finishedWork.type && console.error(
10857 "Unexpected host component type. Expected a form. This is a bug in React."
10858 ));
10859 break;
10860 case 6:
10861 recursivelyTraverseMutationEffects(root2, finishedWork);
10862 commitReconciliationEffects(finishedWork);
10863 if (flags & 4) {
10864 if (null === finishedWork.stateNode)
10865 throw Error(
10866 "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue."
10867 );
10868 flags = finishedWork.memoizedProps;
10869 current2 = null !== current2 ? current2.memoizedProps : flags;
10870 existingHiddenCallbacks = finishedWork.stateNode;
10871 try {
10872 runWithFiberInDEV(
10873 finishedWork,
10874 commitTextUpdate,
10875 existingHiddenCallbacks,
10876 current2,
10877 flags
10878 );
10879 } catch (error) {
10880 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10881 }
10882 }
10883 break;
10884 case 3:
10885 existingHiddenCallbacks = pushNestedEffectDurations();
10886 tagCaches = null;
10887 currentResource = currentHoistableRoot;
10888 currentHoistableRoot = getHoistableRoot(root2.containerInfo);
10889 recursivelyTraverseMutationEffects(root2, finishedWork);
10890 currentHoistableRoot = currentResource;
10891 commitReconciliationEffects(finishedWork);
10892 if (flags & 4 && null !== current2 && current2.memoizedState.isDehydrated)
10893 try {
10894 runWithFiberInDEV(
10895 finishedWork,
10896 commitHydratedContainer,
10897 root2.containerInfo
10898 );
10899 } catch (error) {
10900 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10901 }
10902 needsFormReset && (needsFormReset = false, recursivelyResetForms(finishedWork));
10903 root2.effectDuration += popNestedEffectDurations(
10904 existingHiddenCallbacks
10905 );
10906 break;
10907 case 4:
10908 flags = currentHoistableRoot;
10909 currentHoistableRoot = getHoistableRoot(
10910 finishedWork.stateNode.containerInfo
10911 );
10912 recursivelyTraverseMutationEffects(root2, finishedWork);
10913 commitReconciliationEffects(finishedWork);
10914 currentHoistableRoot = flags;
10915 break;
10916 case 12:
10917 flags = pushNestedEffectDurations();
10918 recursivelyTraverseMutationEffects(root2, finishedWork);
10919 commitReconciliationEffects(finishedWork);
10920 finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags);
10921 break;
10922 case 31:
10923 recursivelyTraverseMutationEffects(root2, finishedWork);
10924 commitReconciliationEffects(finishedWork);
10925 flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
10926 break;
10927 case 13:
10928 recursivelyTraverseMutationEffects(root2, finishedWork);
10929 commitReconciliationEffects(finishedWork);
10930 finishedWork.child.flags & 8192 && null !== finishedWork.memoizedState !== (null !== current2 && null !== current2.memoizedState) && (globalMostRecentFallbackTime = now$1());
10931 flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
10932 break;
10933 case 22:
10934 existingHiddenCallbacks = null !== finishedWork.memoizedState;
10935 var wasHidden = null !== current2 && null !== current2.memoizedState, prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
10936 offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || existingHiddenCallbacks;
10937 offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;
10938 recursivelyTraverseMutationEffects(root2, finishedWork);
10939 offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
10940 offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
10941 wasHidden && !existingHiddenCallbacks && !prevOffscreenSubtreeIsHidden && !prevOffscreenSubtreeWasHidden && (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentReappeared(
10942 finishedWork,
10943 componentEffectStartTime,
10944 componentEffectEndTime
10945 );
10946 commitReconciliationEffects(finishedWork);
10947 if (flags & 8192)
10948 a: for (root2 = finishedWork.stateNode, root2._visibility = existingHiddenCallbacks ? root2._visibility & ~OffscreenVisible : root2._visibility | OffscreenVisible, !existingHiddenCallbacks || null === current2 || wasHidden || offscreenSubtreeIsHidden || offscreenSubtreeWasHidden || (recursivelyTraverseDisappearLayoutEffects(finishedWork), (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
10949 finishedWork,
10950 componentEffectStartTime,
10951 componentEffectEndTime,
10952 "Disconnect"
10953 )), current2 = null, root2 = finishedWork; ; ) {
10954 if (5 === root2.tag || 26 === root2.tag) {
10955 if (null === current2) {
10956 wasHidden = current2 = root2;
10957 try {
10958 currentResource = wasHidden.stateNode, existingHiddenCallbacks ? runWithFiberInDEV(
10959 wasHidden,
10960 hideInstance,
10961 currentResource
10962 ) : runWithFiberInDEV(
10963 wasHidden,
10964 unhideInstance,
10965 wasHidden.stateNode,
10966 wasHidden.memoizedProps
10967 );
10968 } catch (error) {
10969 captureCommitPhaseError(wasHidden, wasHidden.return, error);
10970 }
10971 }
10972 } else if (6 === root2.tag) {
10973 if (null === current2) {
10974 wasHidden = root2;
10975 try {
10976 maybeNodes = wasHidden.stateNode, existingHiddenCallbacks ? runWithFiberInDEV(
10977 wasHidden,
10978 hideTextInstance,
10979 maybeNodes
10980 ) : runWithFiberInDEV(
10981 wasHidden,
10982 unhideTextInstance,
10983 maybeNodes,
10984 wasHidden.memoizedProps
10985 );
10986 } catch (error) {
10987 captureCommitPhaseError(wasHidden, wasHidden.return, error);
10988 }
10989 }
10990 } else if (18 === root2.tag) {
10991 if (null === current2) {
10992 wasHidden = root2;
10993 try {
10994 i = wasHidden.stateNode, existingHiddenCallbacks ? runWithFiberInDEV(
10995 wasHidden,
10996 hideDehydratedBoundary,
10997 i
10998 ) : runWithFiberInDEV(
10999 wasHidden,
11000 unhideDehydratedBoundary,
11001 wasHidden.stateNode
11002 );
11003 } catch (error) {
11004 captureCommitPhaseError(wasHidden, wasHidden.return, error);
11005 }
11006 }
11007 } else if ((22 !== root2.tag && 23 !== root2.tag || null === root2.memoizedState || root2 === finishedWork) && null !== root2.child) {
11008 root2.child.return = root2;
11009 root2 = root2.child;
11010 continue;
11011 }
11012 if (root2 === finishedWork) break a;
11013 for (; null === root2.sibling; ) {
11014 if (null === root2.return || root2.return === finishedWork)
11015 break a;
11016 current2 === root2 && (current2 = null);
11017 root2 = root2.return;
11018 }
11019 current2 === root2 && (current2 = null);
11020 root2.sibling.return = root2.return;
11021 root2 = root2.sibling;
11022 }
11023 flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (current2 = flags.retryQueue, null !== current2 && (flags.retryQueue = null, attachSuspenseRetryListeners(finishedWork, current2))));
11024 break;
11025 case 19:
11026 recursivelyTraverseMutationEffects(root2, finishedWork);
11027 commitReconciliationEffects(finishedWork);
11028 flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
11029 break;
11030 case 30:
11031 break;
11032 case 21:
11033 break;
11034 default:
11035 recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork);
11036 }
11037 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11038 finishedWork,
11039 componentEffectStartTime,
11040 componentEffectEndTime,
11041 componentEffectDuration,
11042 componentEffectErrors
11043 ), null === finishedWork.alternate && null !== finishedWork.return && null !== finishedWork.return.alternate && 0.05 < componentEffectEndTime - componentEffectStartTime && (isHydratingParent(
11044 finishedWork.return.alternate,
11045 finishedWork.return
11046 ) || logComponentTrigger(
11047 finishedWork,
11048 componentEffectStartTime,
11049 componentEffectEndTime,
11050 "Mount"
11051 )));
11052 popComponentEffectStart(prevEffectStart);
11053 popComponentEffectDuration(prevEffectDuration);
11054 componentEffectErrors = prevEffectErrors;
11055 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11056 }
11057 function commitReconciliationEffects(finishedWork) {
11058 var flags = finishedWork.flags;
11059 if (flags & 2) {
11060 try {
11061 runWithFiberInDEV(finishedWork, commitPlacement, finishedWork);
11062 } catch (error) {
11063 captureCommitPhaseError(finishedWork, finishedWork.return, error);
11064 }
11065 finishedWork.flags &= -3;
11066 }
11067 flags & 4096 && (finishedWork.flags &= -4097);
11068 }
11069 function recursivelyResetForms(parentFiber) {
11070 if (parentFiber.subtreeFlags & 1024)
11071 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
11072 var fiber = parentFiber;
11073 recursivelyResetForms(fiber);
11074 5 === fiber.tag && fiber.flags & 1024 && fiber.stateNode.reset();
11075 parentFiber = parentFiber.sibling;
11076 }
11077 }
11078 function recursivelyTraverseLayoutEffects(root2, parentFiber) {
11079 if (parentFiber.subtreeFlags & 8772)
11080 for (parentFiber = parentFiber.child; null !== parentFiber; )
11081 commitLayoutEffectOnFiber(root2, parentFiber.alternate, parentFiber), parentFiber = parentFiber.sibling;
11082 }
11083 function disappearLayoutEffects(finishedWork) {
11084 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
11085 switch (finishedWork.tag) {
11086 case 0:
11087 case 11:
11088 case 14:
11089 case 15:
11090 commitHookLayoutUnmountEffects(
11091 finishedWork,
11092 finishedWork.return,
11093 Layout
11094 );
11095 recursivelyTraverseDisappearLayoutEffects(finishedWork);
11096 break;
11097 case 1:
11098 safelyDetachRef(finishedWork, finishedWork.return);
11099 var instance = finishedWork.stateNode;
11100 "function" === typeof instance.componentWillUnmount && safelyCallComponentWillUnmount(
11101 finishedWork,
11102 finishedWork.return,
11103 instance
11104 );
11105 recursivelyTraverseDisappearLayoutEffects(finishedWork);
11106 break;
11107 case 27:
11108 runWithFiberInDEV(
11109 finishedWork,
11110 releaseSingletonInstance,
11111 finishedWork.stateNode
11112 );
11113 case 26:
11114 case 5:
11115 safelyDetachRef(finishedWork, finishedWork.return);
11116 recursivelyTraverseDisappearLayoutEffects(finishedWork);
11117 break;
11118 case 22:
11119 null === finishedWork.memoizedState && recursivelyTraverseDisappearLayoutEffects(finishedWork);
11120 break;
11121 case 30:
11122 recursivelyTraverseDisappearLayoutEffects(finishedWork);
11123 break;
11124 default:
11125 recursivelyTraverseDisappearLayoutEffects(finishedWork);
11126 }
11127 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11128 finishedWork,
11129 componentEffectStartTime,
11130 componentEffectEndTime,
11131 componentEffectDuration,
11132 componentEffectErrors
11133 );
11134 popComponentEffectStart(prevEffectStart);
11135 popComponentEffectDuration(prevEffectDuration);
11136 componentEffectErrors = prevEffectErrors;
11137 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11138 }
11139 function recursivelyTraverseDisappearLayoutEffects(parentFiber) {
11140 for (parentFiber = parentFiber.child; null !== parentFiber; )
11141 disappearLayoutEffects(parentFiber), parentFiber = parentFiber.sibling;
11142 }
11143 function reappearLayoutEffects(finishedRoot, current2, finishedWork, includeWorkInProgressEffects) {
11144 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), flags = finishedWork.flags;
11145 switch (finishedWork.tag) {
11146 case 0:
11147 case 11:
11148 case 15:
11149 recursivelyTraverseReappearLayoutEffects(
11150 finishedRoot,
11151 finishedWork,
11152 includeWorkInProgressEffects
11153 );
11154 commitHookLayoutEffects(finishedWork, Layout);
11155 break;
11156 case 1:
11157 recursivelyTraverseReappearLayoutEffects(
11158 finishedRoot,
11159 finishedWork,
11160 includeWorkInProgressEffects
11161 );
11162 current2 = finishedWork.stateNode;
11163 "function" === typeof current2.componentDidMount && runWithFiberInDEV(
11164 finishedWork,
11165 callComponentDidMountInDEV,
11166 finishedWork,
11167 current2
11168 );
11169 current2 = finishedWork.updateQueue;
11170 if (null !== current2) {
11171 finishedRoot = finishedWork.stateNode;
11172 try {
11173 runWithFiberInDEV(
11174 finishedWork,
11175 commitHiddenCallbacks,
11176 current2,
11177 finishedRoot
11178 );
11179 } catch (error) {
11180 captureCommitPhaseError(finishedWork, finishedWork.return, error);
11181 }
11182 }
11183 includeWorkInProgressEffects && flags & 64 && commitClassCallbacks(finishedWork);
11184 safelyAttachRef(finishedWork, finishedWork.return);
11185 break;
11186 case 27:
11187 commitHostSingletonAcquisition(finishedWork);
11188 case 26:
11189 case 5:
11190 recursivelyTraverseReappearLayoutEffects(
11191 finishedRoot,
11192 finishedWork,
11193 includeWorkInProgressEffects
11194 );
11195 includeWorkInProgressEffects && null === current2 && flags & 4 && commitHostMount(finishedWork);
11196 safelyAttachRef(finishedWork, finishedWork.return);
11197 break;
11198 case 12:
11199 if (includeWorkInProgressEffects && flags & 4) {
11200 flags = pushNestedEffectDurations();
11201 recursivelyTraverseReappearLayoutEffects(
11202 finishedRoot,
11203 finishedWork,
11204 includeWorkInProgressEffects
11205 );
11206 includeWorkInProgressEffects = finishedWork.stateNode;
11207 includeWorkInProgressEffects.effectDuration += bubbleNestedEffectDurations(flags);
11208 try {
11209 runWithFiberInDEV(
11210 finishedWork,
11211 commitProfiler,
11212 finishedWork,
11213 current2,
11214 commitStartTime,
11215 includeWorkInProgressEffects.effectDuration
11216 );
11217 } catch (error) {
11218 captureCommitPhaseError(finishedWork, finishedWork.return, error);
11219 }
11220 } else
11221 recursivelyTraverseReappearLayoutEffects(
11222 finishedRoot,
11223 finishedWork,
11224 includeWorkInProgressEffects
11225 );
11226 break;
11227 case 31:
11228 recursivelyTraverseReappearLayoutEffects(
11229 finishedRoot,
11230 finishedWork,
11231 includeWorkInProgressEffects
11232 );
11233 includeWorkInProgressEffects && flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);
11234 break;
11235 case 13:
11236 recursivelyTraverseReappearLayoutEffects(
11237 finishedRoot,
11238 finishedWork,
11239 includeWorkInProgressEffects
11240 );
11241 includeWorkInProgressEffects && flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
11242 break;
11243 case 22:
11244 null === finishedWork.memoizedState && recursivelyTraverseReappearLayoutEffects(
11245 finishedRoot,
11246 finishedWork,
11247 includeWorkInProgressEffects
11248 );
11249 safelyAttachRef(finishedWork, finishedWork.return);
11250 break;
11251 case 30:
11252 break;
11253 default:
11254 recursivelyTraverseReappearLayoutEffects(
11255 finishedRoot,
11256 finishedWork,
11257 includeWorkInProgressEffects
11258 );
11259 }
11260 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11261 finishedWork,
11262 componentEffectStartTime,
11263 componentEffectEndTime,
11264 componentEffectDuration,
11265 componentEffectErrors
11266 );
11267 popComponentEffectStart(prevEffectStart);
11268 popComponentEffectDuration(prevEffectDuration);
11269 componentEffectErrors = prevEffectErrors;
11270 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11271 }
11272 function recursivelyTraverseReappearLayoutEffects(finishedRoot, parentFiber, includeWorkInProgressEffects) {
11273 includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);
11274 for (parentFiber = parentFiber.child; null !== parentFiber; )
11275 reappearLayoutEffects(
11276 finishedRoot,
11277 parentFiber.alternate,
11278 parentFiber,
11279 includeWorkInProgressEffects
11280 ), parentFiber = parentFiber.sibling;
11281 }
11282 function commitOffscreenPassiveMountEffects(current2, finishedWork) {
11283 var previousCache = null;
11284 null !== current2 && null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (previousCache = current2.memoizedState.cachePool.pool);
11285 current2 = null;
11286 null !== finishedWork.memoizedState && null !== finishedWork.memoizedState.cachePool && (current2 = finishedWork.memoizedState.cachePool.pool);
11287 current2 !== previousCache && (null != current2 && retainCache(current2), null != previousCache && releaseCache(previousCache));
11288 }
11289 function commitCachePassiveMountEffect(current2, finishedWork) {
11290 current2 = null;
11291 null !== finishedWork.alternate && (current2 = finishedWork.alternate.memoizedState.cache);
11292 finishedWork = finishedWork.memoizedState.cache;
11293 finishedWork !== current2 && (retainCache(finishedWork), null != current2 && releaseCache(current2));
11294 }
11295 function recursivelyTraversePassiveMountEffects(root2, parentFiber, committedLanes, committedTransitions, endTime) {
11296 if (parentFiber.subtreeFlags & 10256 || 0 !== parentFiber.actualDuration && (null === parentFiber.alternate || parentFiber.alternate.child !== parentFiber.child))
11297 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
11298 var nextSibling = parentFiber.sibling;
11299 commitPassiveMountOnFiber(
11300 root2,
11301 parentFiber,
11302 committedLanes,
11303 committedTransitions,
11304 null !== nextSibling ? nextSibling.actualStartTime : endTime
11305 );
11306 parentFiber = nextSibling;
11307 }
11308 }
11309 function commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions, endTime) {
11310 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), prevDeepEquality = alreadyWarnedForDeepEquality, flags = finishedWork.flags;
11311 switch (finishedWork.tag) {
11312 case 0:
11313 case 11:
11314 case 15:
11315 (finishedWork.mode & ProfileMode) !== NoMode && 0 < finishedWork.actualStartTime && 0 !== (finishedWork.flags & 1) && logComponentRender(
11316 finishedWork,
11317 finishedWork.actualStartTime,
11318 endTime,
11319 inHydratedSubtree,
11320 committedLanes
11321 );
11322 recursivelyTraversePassiveMountEffects(
11323 finishedRoot,
11324 finishedWork,
11325 committedLanes,
11326 committedTransitions,
11327 endTime
11328 );
11329 flags & 2048 && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect);
11330 break;
11331 case 1:
11332 (finishedWork.mode & ProfileMode) !== NoMode && 0 < finishedWork.actualStartTime && (0 !== (finishedWork.flags & 128) ? logComponentErrored(
11333 finishedWork,
11334 finishedWork.actualStartTime,
11335 endTime,
11336 []
11337 ) : 0 !== (finishedWork.flags & 1) && logComponentRender(
11338 finishedWork,
11339 finishedWork.actualStartTime,
11340 endTime,
11341 inHydratedSubtree,
11342 committedLanes
11343 ));
11344 recursivelyTraversePassiveMountEffects(
11345 finishedRoot,
11346 finishedWork,
11347 committedLanes,
11348 committedTransitions,
11349 endTime
11350 );
11351 break;
11352 case 3:
11353 var prevProfilerEffectDuration = pushNestedEffectDurations(), wasInHydratedSubtree = inHydratedSubtree;
11354 inHydratedSubtree = null !== finishedWork.alternate && finishedWork.alternate.memoizedState.isDehydrated && 0 === (finishedWork.flags & 256);
11355 recursivelyTraversePassiveMountEffects(
11356 finishedRoot,
11357 finishedWork,
11358 committedLanes,
11359 committedTransitions,
11360 endTime
11361 );
11362 inHydratedSubtree = wasInHydratedSubtree;
11363 flags & 2048 && (committedLanes = null, null !== finishedWork.alternate && (committedLanes = finishedWork.alternate.memoizedState.cache), committedTransitions = finishedWork.memoizedState.cache, committedTransitions !== committedLanes && (retainCache(committedTransitions), null != committedLanes && releaseCache(committedLanes)));
11364 finishedRoot.passiveEffectDuration += popNestedEffectDurations(
11365 prevProfilerEffectDuration
11366 );
11367 break;
11368 case 12:
11369 if (flags & 2048) {
11370 flags = pushNestedEffectDurations();
11371 recursivelyTraversePassiveMountEffects(
11372 finishedRoot,
11373 finishedWork,
11374 committedLanes,
11375 committedTransitions,
11376 endTime
11377 );
11378 finishedRoot = finishedWork.stateNode;
11379 finishedRoot.passiveEffectDuration += bubbleNestedEffectDurations(flags);
11380 try {
11381 runWithFiberInDEV(
11382 finishedWork,
11383 commitProfilerPostCommitImpl,
11384 finishedWork,
11385 finishedWork.alternate,
11386 commitStartTime,
11387 finishedRoot.passiveEffectDuration
11388 );
11389 } catch (error) {
11390 captureCommitPhaseError(finishedWork, finishedWork.return, error);
11391 }
11392 } else
11393 recursivelyTraversePassiveMountEffects(
11394 finishedRoot,
11395 finishedWork,
11396 committedLanes,
11397 committedTransitions,
11398 endTime
11399 );
11400 break;
11401 case 31:
11402 flags = inHydratedSubtree;
11403 prevProfilerEffectDuration = null !== finishedWork.alternate ? finishedWork.alternate.memoizedState : null;
11404 wasInHydratedSubtree = finishedWork.memoizedState;
11405 null !== prevProfilerEffectDuration && null === wasInHydratedSubtree ? (wasInHydratedSubtree = finishedWork.deletions, null !== wasInHydratedSubtree && 0 < wasInHydratedSubtree.length && 18 === wasInHydratedSubtree[0].tag ? (inHydratedSubtree = false, prevProfilerEffectDuration = prevProfilerEffectDuration.hydrationErrors, null !== prevProfilerEffectDuration && logComponentErrored(
11406 finishedWork,
11407 finishedWork.actualStartTime,
11408 endTime,
11409 prevProfilerEffectDuration
11410 )) : inHydratedSubtree = true) : inHydratedSubtree = false;
11411 recursivelyTraversePassiveMountEffects(
11412 finishedRoot,
11413 finishedWork,
11414 committedLanes,
11415 committedTransitions,
11416 endTime
11417 );
11418 inHydratedSubtree = flags;
11419 break;
11420 case 13:
11421 flags = inHydratedSubtree;
11422 prevProfilerEffectDuration = null !== finishedWork.alternate ? finishedWork.alternate.memoizedState : null;
11423 wasInHydratedSubtree = finishedWork.memoizedState;
11424 null === prevProfilerEffectDuration || null === prevProfilerEffectDuration.dehydrated || null !== wasInHydratedSubtree && null !== wasInHydratedSubtree.dehydrated ? inHydratedSubtree = false : (wasInHydratedSubtree = finishedWork.deletions, null !== wasInHydratedSubtree && 0 < wasInHydratedSubtree.length && 18 === wasInHydratedSubtree[0].tag ? (inHydratedSubtree = false, prevProfilerEffectDuration = prevProfilerEffectDuration.hydrationErrors, null !== prevProfilerEffectDuration && logComponentErrored(
11425 finishedWork,
11426 finishedWork.actualStartTime,
11427 endTime,
11428 prevProfilerEffectDuration
11429 )) : inHydratedSubtree = true);
11430 recursivelyTraversePassiveMountEffects(
11431 finishedRoot,
11432 finishedWork,
11433 committedLanes,
11434 committedTransitions,
11435 endTime
11436 );
11437 inHydratedSubtree = flags;
11438 break;
11439 case 23:
11440 break;
11441 case 22:
11442 wasInHydratedSubtree = finishedWork.stateNode;
11443 prevProfilerEffectDuration = finishedWork.alternate;
11444 null !== finishedWork.memoizedState ? wasInHydratedSubtree._visibility & OffscreenPassiveEffectsConnected ? recursivelyTraversePassiveMountEffects(
11445 finishedRoot,
11446 finishedWork,
11447 committedLanes,
11448 committedTransitions,
11449 endTime
11450 ) : recursivelyTraverseAtomicPassiveEffects(
11451 finishedRoot,
11452 finishedWork,
11453 committedLanes,
11454 committedTransitions,
11455 endTime
11456 ) : wasInHydratedSubtree._visibility & OffscreenPassiveEffectsConnected ? recursivelyTraversePassiveMountEffects(
11457 finishedRoot,
11458 finishedWork,
11459 committedLanes,
11460 committedTransitions,
11461 endTime
11462 ) : (wasInHydratedSubtree._visibility |= OffscreenPassiveEffectsConnected, recursivelyTraverseReconnectPassiveEffects(
11463 finishedRoot,
11464 finishedWork,
11465 committedLanes,
11466 committedTransitions,
11467 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== finishedWork.actualDuration && (null === finishedWork.alternate || finishedWork.alternate.child !== finishedWork.child),
11468 endTime
11469 ), (finishedWork.mode & ProfileMode) === NoMode || inHydratedSubtree || (finishedRoot = finishedWork.actualStartTime, 0 <= finishedRoot && 0.05 < endTime - finishedRoot && logComponentReappeared(finishedWork, finishedRoot, endTime), 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentReappeared(
11470 finishedWork,
11471 componentEffectStartTime,
11472 componentEffectEndTime
11473 )));
11474 flags & 2048 && commitOffscreenPassiveMountEffects(
11475 prevProfilerEffectDuration,
11476 finishedWork
11477 );
11478 break;
11479 case 24:
11480 recursivelyTraversePassiveMountEffects(
11481 finishedRoot,
11482 finishedWork,
11483 committedLanes,
11484 committedTransitions,
11485 endTime
11486 );
11487 flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
11488 break;
11489 default:
11490 recursivelyTraversePassiveMountEffects(
11491 finishedRoot,
11492 finishedWork,
11493 committedLanes,
11494 committedTransitions,
11495 endTime
11496 );
11497 }
11498 if ((finishedWork.mode & ProfileMode) !== NoMode) {
11499 if (finishedRoot = !inHydratedSubtree && null === finishedWork.alternate && null !== finishedWork.return && null !== finishedWork.return.alternate)
11500 committedLanes = finishedWork.actualStartTime, 0 <= committedLanes && 0.05 < endTime - committedLanes && logComponentTrigger(
11501 finishedWork,
11502 committedLanes,
11503 endTime,
11504 "Mount"
11505 );
11506 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11507 finishedWork,
11508 componentEffectStartTime,
11509 componentEffectEndTime,
11510 componentEffectDuration,
11511 componentEffectErrors
11512 ), finishedRoot && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
11513 finishedWork,
11514 componentEffectStartTime,
11515 componentEffectEndTime,
11516 "Mount"
11517 ));
11518 }
11519 popComponentEffectStart(prevEffectStart);
11520 popComponentEffectDuration(prevEffectDuration);
11521 componentEffectErrors = prevEffectErrors;
11522 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11523 alreadyWarnedForDeepEquality = prevDeepEquality;
11524 }
11525 function recursivelyTraverseReconnectPassiveEffects(finishedRoot, parentFiber, committedLanes, committedTransitions, includeWorkInProgressEffects, endTime) {
11526 includeWorkInProgressEffects = includeWorkInProgressEffects && (0 !== (parentFiber.subtreeFlags & 10256) || 0 !== parentFiber.actualDuration && (null === parentFiber.alternate || parentFiber.alternate.child !== parentFiber.child));
11527 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
11528 var nextSibling = parentFiber.sibling;
11529 reconnectPassiveEffects(
11530 finishedRoot,
11531 parentFiber,
11532 committedLanes,
11533 committedTransitions,
11534 includeWorkInProgressEffects,
11535 null !== nextSibling ? nextSibling.actualStartTime : endTime
11536 );
11537 parentFiber = nextSibling;
11538 }
11539 }
11540 function reconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects, endTime) {
11541 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), prevDeepEquality = alreadyWarnedForDeepEquality;
11542 includeWorkInProgressEffects && (finishedWork.mode & ProfileMode) !== NoMode && 0 < finishedWork.actualStartTime && 0 !== (finishedWork.flags & 1) && logComponentRender(
11543 finishedWork,
11544 finishedWork.actualStartTime,
11545 endTime,
11546 inHydratedSubtree,
11547 committedLanes
11548 );
11549 var flags = finishedWork.flags;
11550 switch (finishedWork.tag) {
11551 case 0:
11552 case 11:
11553 case 15:
11554 recursivelyTraverseReconnectPassiveEffects(
11555 finishedRoot,
11556 finishedWork,
11557 committedLanes,
11558 committedTransitions,
11559 includeWorkInProgressEffects,
11560 endTime
11561 );
11562 commitHookPassiveMountEffects(finishedWork, Passive);
11563 break;
11564 case 23:
11565 break;
11566 case 22:
11567 var _instance2 = finishedWork.stateNode;
11568 null !== finishedWork.memoizedState ? _instance2._visibility & OffscreenPassiveEffectsConnected ? recursivelyTraverseReconnectPassiveEffects(
11569 finishedRoot,
11570 finishedWork,
11571 committedLanes,
11572 committedTransitions,
11573 includeWorkInProgressEffects,
11574 endTime
11575 ) : recursivelyTraverseAtomicPassiveEffects(
11576 finishedRoot,
11577 finishedWork,
11578 committedLanes,
11579 committedTransitions,
11580 endTime
11581 ) : (_instance2._visibility |= OffscreenPassiveEffectsConnected, recursivelyTraverseReconnectPassiveEffects(
11582 finishedRoot,
11583 finishedWork,
11584 committedLanes,
11585 committedTransitions,
11586 includeWorkInProgressEffects,
11587 endTime
11588 ));
11589 includeWorkInProgressEffects && flags & 2048 && commitOffscreenPassiveMountEffects(
11590 finishedWork.alternate,
11591 finishedWork
11592 );
11593 break;
11594 case 24:
11595 recursivelyTraverseReconnectPassiveEffects(
11596 finishedRoot,
11597 finishedWork,
11598 committedLanes,
11599 committedTransitions,
11600 includeWorkInProgressEffects,
11601 endTime
11602 );
11603 includeWorkInProgressEffects && flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
11604 break;
11605 default:
11606 recursivelyTraverseReconnectPassiveEffects(
11607 finishedRoot,
11608 finishedWork,
11609 committedLanes,
11610 committedTransitions,
11611 includeWorkInProgressEffects,
11612 endTime
11613 );
11614 }
11615 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11616 finishedWork,
11617 componentEffectStartTime,
11618 componentEffectEndTime,
11619 componentEffectDuration,
11620 componentEffectErrors
11621 );
11622 popComponentEffectStart(prevEffectStart);
11623 popComponentEffectDuration(prevEffectDuration);
11624 componentEffectErrors = prevEffectErrors;
11625 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11626 alreadyWarnedForDeepEquality = prevDeepEquality;
11627 }
11628 function recursivelyTraverseAtomicPassiveEffects(finishedRoot$jscomp$0, parentFiber, committedLanes$jscomp$0, committedTransitions$jscomp$0, endTime$jscomp$0) {
11629 if (parentFiber.subtreeFlags & 10256 || 0 !== parentFiber.actualDuration && (null === parentFiber.alternate || parentFiber.alternate.child !== parentFiber.child))
11630 for (var child = parentFiber.child; null !== child; ) {
11631 parentFiber = child.sibling;
11632 var finishedRoot = finishedRoot$jscomp$0, committedLanes = committedLanes$jscomp$0, committedTransitions = committedTransitions$jscomp$0, endTime = null !== parentFiber ? parentFiber.actualStartTime : endTime$jscomp$0, prevDeepEquality = alreadyWarnedForDeepEquality;
11633 (child.mode & ProfileMode) !== NoMode && 0 < child.actualStartTime && 0 !== (child.flags & 1) && logComponentRender(
11634 child,
11635 child.actualStartTime,
11636 endTime,
11637 inHydratedSubtree,
11638 committedLanes
11639 );
11640 var flags = child.flags;
11641 switch (child.tag) {
11642 case 22:
11643 recursivelyTraverseAtomicPassiveEffects(
11644 finishedRoot,
11645 child,
11646 committedLanes,
11647 committedTransitions,
11648 endTime
11649 );
11650 flags & 2048 && commitOffscreenPassiveMountEffects(child.alternate, child);
11651 break;
11652 case 24:
11653 recursivelyTraverseAtomicPassiveEffects(
11654 finishedRoot,
11655 child,
11656 committedLanes,
11657 committedTransitions,
11658 endTime
11659 );
11660 flags & 2048 && commitCachePassiveMountEffect(child.alternate, child);
11661 break;
11662 default:
11663 recursivelyTraverseAtomicPassiveEffects(
11664 finishedRoot,
11665 child,
11666 committedLanes,
11667 committedTransitions,
11668 endTime
11669 );
11670 }
11671 alreadyWarnedForDeepEquality = prevDeepEquality;
11672 child = parentFiber;
11673 }
11674 }
11675 function recursivelyAccumulateSuspenseyCommit(parentFiber, committedLanes, suspendedState) {
11676 if (parentFiber.subtreeFlags & suspenseyCommitFlag)
11677 for (parentFiber = parentFiber.child; null !== parentFiber; )
11678 accumulateSuspenseyCommitOnFiber(
11679 parentFiber,
11680 committedLanes,
11681 suspendedState
11682 ), parentFiber = parentFiber.sibling;
11683 }
11684 function accumulateSuspenseyCommitOnFiber(fiber, committedLanes, suspendedState) {
11685 switch (fiber.tag) {
11686 case 26:
11687 recursivelyAccumulateSuspenseyCommit(
11688 fiber,
11689 committedLanes,
11690 suspendedState
11691 );
11692 fiber.flags & suspenseyCommitFlag && null !== fiber.memoizedState && suspendResource(
11693 suspendedState,
11694 currentHoistableRoot,
11695 fiber.memoizedState,
11696 fiber.memoizedProps
11697 );
11698 break;
11699 case 5:
11700 recursivelyAccumulateSuspenseyCommit(
11701 fiber,
11702 committedLanes,
11703 suspendedState
11704 );
11705 break;
11706 case 3:
11707 case 4:
11708 var previousHoistableRoot = currentHoistableRoot;
11709 currentHoistableRoot = getHoistableRoot(
11710 fiber.stateNode.containerInfo
11711 );
11712 recursivelyAccumulateSuspenseyCommit(
11713 fiber,
11714 committedLanes,
11715 suspendedState
11716 );
11717 currentHoistableRoot = previousHoistableRoot;
11718 break;
11719 case 22:
11720 null === fiber.memoizedState && (previousHoistableRoot = fiber.alternate, null !== previousHoistableRoot && null !== previousHoistableRoot.memoizedState ? (previousHoistableRoot = suspenseyCommitFlag, suspenseyCommitFlag = 16777216, recursivelyAccumulateSuspenseyCommit(
11721 fiber,
11722 committedLanes,
11723 suspendedState
11724 ), suspenseyCommitFlag = previousHoistableRoot) : recursivelyAccumulateSuspenseyCommit(
11725 fiber,
11726 committedLanes,
11727 suspendedState
11728 ));
11729 break;
11730 default:
11731 recursivelyAccumulateSuspenseyCommit(
11732 fiber,
11733 committedLanes,
11734 suspendedState
11735 );
11736 }
11737 }
11738 function detachAlternateSiblings(parentFiber) {
11739 var previousFiber = parentFiber.alternate;
11740 if (null !== previousFiber && (parentFiber = previousFiber.child, null !== parentFiber)) {
11741 previousFiber.child = null;
11742 do
11743 previousFiber = parentFiber.sibling, parentFiber.sibling = null, parentFiber = previousFiber;
11744 while (null !== parentFiber);
11745 }
11746 }
11747 function recursivelyTraversePassiveUnmountEffects(parentFiber) {
11748 var deletions = parentFiber.deletions;
11749 if (0 !== (parentFiber.flags & 16)) {
11750 if (null !== deletions)
11751 for (var i = 0; i < deletions.length; i++) {
11752 var childToDelete = deletions[i], prevEffectStart = pushComponentEffectStart();
11753 nextEffect = childToDelete;
11754 commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
11755 childToDelete,
11756 parentFiber
11757 );
11758 (childToDelete.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
11759 childToDelete,
11760 componentEffectStartTime,
11761 componentEffectEndTime,
11762 "Unmount"
11763 );
11764 popComponentEffectStart(prevEffectStart);
11765 }
11766 detachAlternateSiblings(parentFiber);
11767 }
11768 if (parentFiber.subtreeFlags & 10256)
11769 for (parentFiber = parentFiber.child; null !== parentFiber; )
11770 commitPassiveUnmountOnFiber(parentFiber), parentFiber = parentFiber.sibling;
11771 }
11772 function commitPassiveUnmountOnFiber(finishedWork) {
11773 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
11774 switch (finishedWork.tag) {
11775 case 0:
11776 case 11:
11777 case 15:
11778 recursivelyTraversePassiveUnmountEffects(finishedWork);
11779 finishedWork.flags & 2048 && commitHookPassiveUnmountEffects(
11780 finishedWork,
11781 finishedWork.return,
11782 Passive | HasEffect
11783 );
11784 break;
11785 case 3:
11786 var prevProfilerEffectDuration = pushNestedEffectDurations();
11787 recursivelyTraversePassiveUnmountEffects(finishedWork);
11788 finishedWork.stateNode.passiveEffectDuration += popNestedEffectDurations(prevProfilerEffectDuration);
11789 break;
11790 case 12:
11791 prevProfilerEffectDuration = pushNestedEffectDurations();
11792 recursivelyTraversePassiveUnmountEffects(finishedWork);
11793 finishedWork.stateNode.passiveEffectDuration += bubbleNestedEffectDurations(prevProfilerEffectDuration);
11794 break;
11795 case 22:
11796 prevProfilerEffectDuration = finishedWork.stateNode;
11797 null !== finishedWork.memoizedState && prevProfilerEffectDuration._visibility & OffscreenPassiveEffectsConnected && (null === finishedWork.return || 13 !== finishedWork.return.tag) ? (prevProfilerEffectDuration._visibility &= ~OffscreenPassiveEffectsConnected, recursivelyTraverseDisconnectPassiveEffects(finishedWork), (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
11798 finishedWork,
11799 componentEffectStartTime,
11800 componentEffectEndTime,
11801 "Disconnect"
11802 )) : recursivelyTraversePassiveUnmountEffects(finishedWork);
11803 break;
11804 default:
11805 recursivelyTraversePassiveUnmountEffects(finishedWork);
11806 }
11807 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11808 finishedWork,
11809 componentEffectStartTime,
11810 componentEffectEndTime,
11811 componentEffectDuration,
11812 componentEffectErrors
11813 );
11814 popComponentEffectStart(prevEffectStart);
11815 popComponentEffectDuration(prevEffectDuration);
11816 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11817 componentEffectErrors = prevEffectErrors;
11818 }
11819 function recursivelyTraverseDisconnectPassiveEffects(parentFiber) {
11820 var deletions = parentFiber.deletions;
11821 if (0 !== (parentFiber.flags & 16)) {
11822 if (null !== deletions)
11823 for (var i = 0; i < deletions.length; i++) {
11824 var childToDelete = deletions[i], prevEffectStart = pushComponentEffectStart();
11825 nextEffect = childToDelete;
11826 commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
11827 childToDelete,
11828 parentFiber
11829 );
11830 (childToDelete.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
11831 childToDelete,
11832 componentEffectStartTime,
11833 componentEffectEndTime,
11834 "Unmount"
11835 );
11836 popComponentEffectStart(prevEffectStart);
11837 }
11838 detachAlternateSiblings(parentFiber);
11839 }
11840 for (parentFiber = parentFiber.child; null !== parentFiber; )
11841 disconnectPassiveEffect(parentFiber), parentFiber = parentFiber.sibling;
11842 }
11843 function disconnectPassiveEffect(finishedWork) {
11844 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
11845 switch (finishedWork.tag) {
11846 case 0:
11847 case 11:
11848 case 15:
11849 commitHookPassiveUnmountEffects(
11850 finishedWork,
11851 finishedWork.return,
11852 Passive
11853 );
11854 recursivelyTraverseDisconnectPassiveEffects(finishedWork);
11855 break;
11856 case 22:
11857 var instance = finishedWork.stateNode;
11858 instance._visibility & OffscreenPassiveEffectsConnected && (instance._visibility &= ~OffscreenPassiveEffectsConnected, recursivelyTraverseDisconnectPassiveEffects(finishedWork));
11859 break;
11860 default:
11861 recursivelyTraverseDisconnectPassiveEffects(finishedWork);
11862 }
11863 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11864 finishedWork,
11865 componentEffectStartTime,
11866 componentEffectEndTime,
11867 componentEffectDuration,
11868 componentEffectErrors
11869 );
11870 popComponentEffectStart(prevEffectStart);
11871 popComponentEffectDuration(prevEffectDuration);
11872 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11873 componentEffectErrors = prevEffectErrors;
11874 }
11875 function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor$jscomp$0) {
11876 for (; null !== nextEffect; ) {
11877 var fiber = nextEffect, current2 = fiber, nearestMountedAncestor = nearestMountedAncestor$jscomp$0, prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
11878 switch (current2.tag) {
11879 case 0:
11880 case 11:
11881 case 15:
11882 commitHookPassiveUnmountEffects(
11883 current2,
11884 nearestMountedAncestor,
11885 Passive
11886 );
11887 break;
11888 case 23:
11889 case 22:
11890 null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (nearestMountedAncestor = current2.memoizedState.cachePool.pool, null != nearestMountedAncestor && retainCache(nearestMountedAncestor));
11891 break;
11892 case 24:
11893 releaseCache(current2.memoizedState.cache);
11894 }
11895 (current2.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11896 current2,
11897 componentEffectStartTime,
11898 componentEffectEndTime,
11899 componentEffectDuration,
11900 componentEffectErrors
11901 );
11902 popComponentEffectStart(prevEffectStart);
11903 popComponentEffectDuration(prevEffectDuration);
11904 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11905 componentEffectErrors = prevEffectErrors;
11906 current2 = fiber.child;
11907 if (null !== current2) current2.return = fiber, nextEffect = current2;
11908 else
11909 a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {
11910 current2 = nextEffect;
11911 prevEffectStart = current2.sibling;
11912 prevEffectDuration = current2.return;
11913 detachFiberAfterEffects(current2);
11914 if (current2 === fiber) {
11915 nextEffect = null;
11916 break a;
11917 }
11918 if (null !== prevEffectStart) {
11919 prevEffectStart.return = prevEffectDuration;
11920 nextEffect = prevEffectStart;
11921 break a;
11922 }
11923 nextEffect = prevEffectDuration;
11924 }
11925 }
11926 }
11927 function onCommitRoot() {
11928 commitHooks.forEach(function(commitHook) {
11929 return commitHook();
11930 });
11931 }
11932 function isConcurrentActEnvironment() {
11933 var isReactActEnvironmentGlobal = "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT ? IS_REACT_ACT_ENVIRONMENT : void 0;
11934 isReactActEnvironmentGlobal || null === ReactSharedInternals.actQueue || console.error(
11935 "The current testing environment is not configured to support act(...)"
11936 );
11937 return isReactActEnvironmentGlobal;
11938 }
11939 function requestUpdateLane(fiber) {
11940 if ((executionContext & RenderContext) !== NoContext && 0 !== workInProgressRootRenderLanes)
11941 return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;
11942 var transition = ReactSharedInternals.T;
11943 return null !== transition ? (transition._updatedFibers || (transition._updatedFibers = /* @__PURE__ */ new Set()), transition._updatedFibers.add(fiber), requestTransitionLane()) : resolveUpdatePriority();
11944 }
11945 function requestDeferredLane() {
11946 if (0 === workInProgressDeferredLane)
11947 if (0 === (workInProgressRootRenderLanes & 536870912) || isHydrating) {
11948 var lane = nextTransitionDeferredLane;
11949 nextTransitionDeferredLane <<= 1;
11950 0 === (nextTransitionDeferredLane & 3932160) && (nextTransitionDeferredLane = 262144);
11951 workInProgressDeferredLane = lane;
11952 } else workInProgressDeferredLane = 536870912;
11953 lane = suspenseHandlerStackCursor.current;
11954 null !== lane && (lane.flags |= 32);
11955 return workInProgressDeferredLane;
11956 }
11957 function scheduleUpdateOnFiber(root2, fiber, lane) {
11958 isRunningInsertionEffect && console.error("useInsertionEffect must not schedule updates.");
11959 isFlushingPassiveEffects && (didScheduleUpdateDuringPassiveEffects = true);
11960 if (root2 === workInProgressRoot && (workInProgressSuspendedReason === SuspendedOnData || workInProgressSuspendedReason === SuspendedOnAction) || null !== root2.cancelPendingCommit)
11961 prepareFreshStack(root2, 0), markRootSuspended(
11962 root2,
11963 workInProgressRootRenderLanes,
11964 workInProgressDeferredLane,
11965 false
11966 );
11967 markRootUpdated$1(root2, lane);
11968 if ((executionContext & RenderContext) !== NoContext && root2 === workInProgressRoot) {
11969 if (isRendering)
11970 switch (fiber.tag) {
11971 case 0:
11972 case 11:
11973 case 15:
11974 root2 = workInProgress && getComponentNameFromFiber(workInProgress) || "Unknown";
11975 didWarnAboutUpdateInRenderForAnotherComponent.has(root2) || (didWarnAboutUpdateInRenderForAnotherComponent.add(root2), fiber = getComponentNameFromFiber(fiber) || "Unknown", console.error(
11976 "Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",
11977 fiber,
11978 root2,
11979 root2
11980 ));
11981 break;
11982 case 1:
11983 didWarnAboutUpdateInRender || (console.error(
11984 "Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."
11985 ), didWarnAboutUpdateInRender = true);
11986 }
11987 } else
11988 isDevToolsPresent && addFiberToLanesMap(root2, fiber, lane), warnIfUpdatesNotWrappedWithActDEV(fiber), root2 === workInProgressRoot && ((executionContext & RenderContext) === NoContext && (workInProgressRootInterleavedUpdatedLanes |= lane), workInProgressRootExitStatus === RootSuspendedWithDelay && markRootSuspended(
11989 root2,
11990 workInProgressRootRenderLanes,
11991 workInProgressDeferredLane,
11992 false
11993 )), ensureRootIsScheduled(root2);
11994 }
11995 function performWorkOnRoot(root2, lanes, forceSync) {
11996 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
11997 throw Error("Should not already be working.");
11998 if (0 !== workInProgressRootRenderLanes && null !== workInProgress) {
11999 var yieldedFiber = workInProgress, yieldEndTime = now$1();
12000 switch (yieldReason) {
12001 case SuspendedOnImmediate:
12002 case SuspendedOnData:
12003 var startTime = yieldStartTime;
12004 supportsUserTiming && ((yieldedFiber = yieldedFiber._debugTask) ? yieldedFiber.run(
12005 console.timeStamp.bind(
12006 console,
12007 "Suspended",
12008 startTime,
12009 yieldEndTime,
12010 COMPONENTS_TRACK,
12011 void 0,
12012 "primary-light"
12013 )
12014 ) : console.timeStamp(
12015 "Suspended",
12016 startTime,
12017 yieldEndTime,
12018 COMPONENTS_TRACK,
12019 void 0,
12020 "primary-light"
12021 ));
12022 break;
12023 case SuspendedOnAction:
12024 startTime = yieldStartTime;
12025 supportsUserTiming && ((yieldedFiber = yieldedFiber._debugTask) ? yieldedFiber.run(
12026 console.timeStamp.bind(
12027 console,
12028 "Action",
12029 startTime,
12030 yieldEndTime,
12031 COMPONENTS_TRACK,
12032 void 0,
12033 "primary-light"
12034 )
12035 ) : console.timeStamp(
12036 "Action",
12037 startTime,
12038 yieldEndTime,
12039 COMPONENTS_TRACK,
12040 void 0,
12041 "primary-light"
12042 ));
12043 break;
12044 default:
12045 supportsUserTiming && (yieldedFiber = yieldEndTime - yieldStartTime, 3 > yieldedFiber || console.timeStamp(
12046 "Blocked",
12047 yieldStartTime,
12048 yieldEndTime,
12049 COMPONENTS_TRACK,
12050 void 0,
12051 5 > yieldedFiber ? "primary-light" : 10 > yieldedFiber ? "primary" : 100 > yieldedFiber ? "primary-dark" : "error"
12052 ));
12053 }
12054 }
12055 startTime = (forceSync = !forceSync && 0 === (lanes & 127) && 0 === (lanes & root2.expiredLanes) || checkIfRootIsPrerendering(root2, lanes)) ? renderRootConcurrent(root2, lanes) : renderRootSync(root2, lanes, true);
12056 var renderWasConcurrent = forceSync;
12057 do {
12058 if (startTime === RootInProgress) {
12059 workInProgressRootIsPrerendering && !forceSync && markRootSuspended(root2, lanes, 0, false);
12060 lanes = workInProgressSuspendedReason;
12061 yieldStartTime = now();
12062 yieldReason = lanes;
12063 break;
12064 } else {
12065 yieldedFiber = now$1();
12066 yieldEndTime = root2.current.alternate;
12067 if (renderWasConcurrent && !isRenderConsistentWithExternalStores(yieldEndTime)) {
12068 setCurrentTrackFromLanes(lanes);
12069 yieldEndTime = renderStartTime;
12070 startTime = yieldedFiber;
12071 !supportsUserTiming || startTime <= yieldEndTime || (workInProgressUpdateTask ? workInProgressUpdateTask.run(
12072 console.timeStamp.bind(
12073 console,
12074 "Teared Render",
12075 yieldEndTime,
12076 startTime,
12077 currentTrack,
12078 LANES_TRACK_GROUP,
12079 "error"
12080 )
12081 ) : console.timeStamp(
12082 "Teared Render",
12083 yieldEndTime,
12084 startTime,
12085 currentTrack,
12086 LANES_TRACK_GROUP,
12087 "error"
12088 ));
12089 finalizeRender(lanes, yieldedFiber);
12090 startTime = renderRootSync(root2, lanes, false);
12091 renderWasConcurrent = false;
12092 continue;
12093 }
12094 if (startTime === RootErrored) {
12095 renderWasConcurrent = lanes;
12096 if (root2.errorRecoveryDisabledLanes & renderWasConcurrent)
12097 var errorRetryLanes = 0;
12098 else
12099 errorRetryLanes = root2.pendingLanes & -536870913, errorRetryLanes = 0 !== errorRetryLanes ? errorRetryLanes : errorRetryLanes & 536870912 ? 536870912 : 0;
12100 if (0 !== errorRetryLanes) {
12101 setCurrentTrackFromLanes(lanes);
12102 logErroredRenderPhase(
12103 renderStartTime,
12104 yieldedFiber,
12105 lanes,
12106 workInProgressUpdateTask
12107 );
12108 finalizeRender(lanes, yieldedFiber);
12109 lanes = errorRetryLanes;
12110 a: {
12111 yieldedFiber = root2;
12112 startTime = renderWasConcurrent;
12113 renderWasConcurrent = workInProgressRootConcurrentErrors;
12114 var wasRootDehydrated = yieldedFiber.current.memoizedState.isDehydrated;
12115 wasRootDehydrated && (prepareFreshStack(yieldedFiber, errorRetryLanes).flags |= 256);
12116 errorRetryLanes = renderRootSync(
12117 yieldedFiber,
12118 errorRetryLanes,
12119 false
12120 );
12121 if (errorRetryLanes !== RootErrored) {
12122 if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) {
12123 yieldedFiber.errorRecoveryDisabledLanes |= startTime;
12124 workInProgressRootInterleavedUpdatedLanes |= startTime;
12125 startTime = RootSuspendedWithDelay;
12126 break a;
12127 }
12128 yieldedFiber = workInProgressRootRecoverableErrors;
12129 workInProgressRootRecoverableErrors = renderWasConcurrent;
12130 null !== yieldedFiber && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = yieldedFiber : workInProgressRootRecoverableErrors.push.apply(
12131 workInProgressRootRecoverableErrors,
12132 yieldedFiber
12133 ));
12134 }
12135 startTime = errorRetryLanes;
12136 }
12137 renderWasConcurrent = false;
12138 if (startTime !== RootErrored) continue;
12139 else yieldedFiber = now$1();
12140 }
12141 }
12142 if (startTime === RootFatalErrored) {
12143 setCurrentTrackFromLanes(lanes);
12144 logErroredRenderPhase(
12145 renderStartTime,
12146 yieldedFiber,
12147 lanes,
12148 workInProgressUpdateTask
12149 );
12150 finalizeRender(lanes, yieldedFiber);
12151 prepareFreshStack(root2, 0);
12152 markRootSuspended(root2, lanes, 0, true);
12153 break;
12154 }
12155 a: {
12156 forceSync = root2;
12157 switch (startTime) {
12158 case RootInProgress:
12159 case RootFatalErrored:
12160 throw Error("Root did not complete. This is a bug in React.");
12161 case RootSuspendedWithDelay:
12162 if ((lanes & 4194048) !== lanes) break;
12163 case RootSuspendedAtTheShell:
12164 setCurrentTrackFromLanes(lanes);
12165 logSuspendedRenderPhase(
12166 renderStartTime,
12167 yieldedFiber,
12168 lanes,
12169 workInProgressUpdateTask
12170 );
12171 finalizeRender(lanes, yieldedFiber);
12172 yieldEndTime = lanes;
12173 0 !== (yieldEndTime & 127) ? blockingSuspendedTime = yieldedFiber : 0 !== (yieldEndTime & 4194048) && (transitionSuspendedTime = yieldedFiber);
12174 markRootSuspended(
12175 forceSync,
12176 lanes,
12177 workInProgressDeferredLane,
12178 !workInProgressRootDidSkipSuspendedSiblings
12179 );
12180 break a;
12181 case RootErrored:
12182 workInProgressRootRecoverableErrors = null;
12183 break;
12184 case RootSuspended:
12185 case RootCompleted:
12186 break;
12187 default:
12188 throw Error("Unknown root exit status.");
12189 }
12190 if (null !== ReactSharedInternals.actQueue)
12191 commitRoot(
12192 forceSync,
12193 yieldEndTime,
12194 lanes,
12195 workInProgressRootRecoverableErrors,
12196 workInProgressTransitions,
12197 workInProgressRootDidIncludeRecursiveRenderUpdate,
12198 workInProgressDeferredLane,
12199 workInProgressRootInterleavedUpdatedLanes,
12200 workInProgressSuspendedRetryLanes,
12201 startTime,
12202 null,
12203 null,
12204 renderStartTime,
12205 yieldedFiber
12206 );
12207 else {
12208 if ((lanes & 62914560) === lanes && (renderWasConcurrent = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now$1(), 10 < renderWasConcurrent)) {
12209 markRootSuspended(
12210 forceSync,
12211 lanes,
12212 workInProgressDeferredLane,
12213 !workInProgressRootDidSkipSuspendedSiblings
12214 );
12215 if (0 !== getNextLanes(forceSync, 0, true)) break a;
12216 pendingEffectsLanes = lanes;
12217 forceSync.timeoutHandle = scheduleTimeout(
12218 commitRootWhenReady.bind(
12219 null,
12220 forceSync,
12221 yieldEndTime,
12222 workInProgressRootRecoverableErrors,
12223 workInProgressTransitions,
12224 workInProgressRootDidIncludeRecursiveRenderUpdate,
12225 lanes,
12226 workInProgressDeferredLane,
12227 workInProgressRootInterleavedUpdatedLanes,
12228 workInProgressSuspendedRetryLanes,
12229 workInProgressRootDidSkipSuspendedSiblings,
12230 startTime,
12231 "Throttled",
12232 renderStartTime,
12233 yieldedFiber
12234 ),
12235 renderWasConcurrent
12236 );
12237 break a;
12238 }
12239 commitRootWhenReady(
12240 forceSync,
12241 yieldEndTime,
12242 workInProgressRootRecoverableErrors,
12243 workInProgressTransitions,
12244 workInProgressRootDidIncludeRecursiveRenderUpdate,
12245 lanes,
12246 workInProgressDeferredLane,
12247 workInProgressRootInterleavedUpdatedLanes,
12248 workInProgressSuspendedRetryLanes,
12249 workInProgressRootDidSkipSuspendedSiblings,
12250 startTime,
12251 null,
12252 renderStartTime,
12253 yieldedFiber
12254 );
12255 }
12256 }
12257 }
12258 break;
12259 } while (1);
12260 ensureRootIsScheduled(root2);
12261 }
12262 function commitRootWhenReady(root2, finishedWork, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, lanes, spawnedLane, updatedLanes, suspendedRetryLanes, didSkipSuspendedSiblings, exitStatus, suspendedCommitReason, completedRenderStartTime, completedRenderEndTime) {
12263 root2.timeoutHandle = noTimeout;
12264 var subtreeFlags = finishedWork.subtreeFlags, suspendedState = null;
12265 if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) {
12266 if (suspendedState = {
12267 stylesheets: null,
12268 count: 0,
12269 imgCount: 0,
12270 imgBytes: 0,
12271 suspenseyImages: [],
12272 waitingForImages: true,
12273 waitingForViewTransition: false,
12274 unsuspend: noop$1
12275 }, accumulateSuspenseyCommitOnFiber(finishedWork, lanes, suspendedState), subtreeFlags = (lanes & 62914560) === lanes ? globalMostRecentFallbackTime - now$1() : (lanes & 4194048) === lanes ? globalMostRecentTransitionTime - now$1() : 0, subtreeFlags = waitForCommitToBeReady(suspendedState, subtreeFlags), null !== subtreeFlags) {
12276 pendingEffectsLanes = lanes;
12277 root2.cancelPendingCommit = subtreeFlags(
12278 commitRoot.bind(
12279 null,
12280 root2,
12281 finishedWork,
12282 lanes,
12283 recoverableErrors,
12284 transitions,
12285 didIncludeRenderPhaseUpdate,
12286 spawnedLane,
12287 updatedLanes,
12288 suspendedRetryLanes,
12289 exitStatus,
12290 suspendedState,
12291 suspendedState.waitingForViewTransition ? "Waiting for the previous Animation" : 0 < suspendedState.count ? 0 < suspendedState.imgCount ? "Suspended on CSS and Images" : "Suspended on CSS" : 1 === suspendedState.imgCount ? "Suspended on an Image" : 0 < suspendedState.imgCount ? "Suspended on Images" : null,
12292 completedRenderStartTime,
12293 completedRenderEndTime
12294 )
12295 );
12296 markRootSuspended(
12297 root2,
12298 lanes,
12299 spawnedLane,
12300 !didSkipSuspendedSiblings
12301 );
12302 return;
12303 }
12304 }
12305 commitRoot(
12306 root2,
12307 finishedWork,
12308 lanes,
12309 recoverableErrors,
12310 transitions,
12311 didIncludeRenderPhaseUpdate,
12312 spawnedLane,
12313 updatedLanes,
12314 suspendedRetryLanes,
12315 exitStatus,
12316 suspendedState,
12317 suspendedCommitReason,
12318 completedRenderStartTime,
12319 completedRenderEndTime
12320 );
12321 }
12322 function isRenderConsistentWithExternalStores(finishedWork) {
12323 for (var node = finishedWork; ; ) {
12324 var tag = node.tag;
12325 if ((0 === tag || 11 === tag || 15 === tag) && node.flags & 16384 && (tag = node.updateQueue, null !== tag && (tag = tag.stores, null !== tag)))
12326 for (var i = 0; i < tag.length; i++) {
12327 var check = tag[i], getSnapshot = check.getSnapshot;
12328 check = check.value;
12329 try {
12330 if (!objectIs(getSnapshot(), check)) return false;
12331 } catch (error) {
12332 return false;
12333 }
12334 }
12335 tag = node.child;
12336 if (node.subtreeFlags & 16384 && null !== tag)
12337 tag.return = node, node = tag;
12338 else {
12339 if (node === finishedWork) break;
12340 for (; null === node.sibling; ) {
12341 if (null === node.return || node.return === finishedWork) return true;
12342 node = node.return;
12343 }
12344 node.sibling.return = node.return;
12345 node = node.sibling;
12346 }
12347 }
12348 return true;
12349 }
12350 function markRootSuspended(root2, suspendedLanes, spawnedLane, didAttemptEntireTree) {
12351 suspendedLanes &= ~workInProgressRootPingedLanes;
12352 suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;
12353 root2.suspendedLanes |= suspendedLanes;
12354 root2.pingedLanes &= ~suspendedLanes;
12355 didAttemptEntireTree && (root2.warmLanes |= suspendedLanes);
12356 didAttemptEntireTree = root2.expirationTimes;
12357 for (var lanes = suspendedLanes; 0 < lanes; ) {
12358 var index = 31 - clz32(lanes), lane = 1 << index;
12359 didAttemptEntireTree[index] = -1;
12360 lanes &= ~lane;
12361 }
12362 0 !== spawnedLane && markSpawnedDeferredLane(root2, spawnedLane, suspendedLanes);
12363 }
12364 function flushSyncWork$1() {
12365 return (executionContext & (RenderContext | CommitContext)) === NoContext ? (flushSyncWorkAcrossRoots_impl(0, false), false) : true;
12366 }
12367 function resetWorkInProgressStack() {
12368 if (null !== workInProgress) {
12369 if (workInProgressSuspendedReason === NotSuspended)
12370 var interruptedWork = workInProgress.return;
12371 else
12372 interruptedWork = workInProgress, resetContextDependencies(), resetHooksOnUnwind(interruptedWork), thenableState$1 = null, thenableIndexCounter$1 = 0, interruptedWork = workInProgress;
12373 for (; null !== interruptedWork; )
12374 unwindInterruptedWork(interruptedWork.alternate, interruptedWork), interruptedWork = interruptedWork.return;
12375 workInProgress = null;
12376 }
12377 }
12378 function finalizeRender(lanes, finalizationTime) {
12379 0 !== (lanes & 127) && (blockingClampTime = finalizationTime);
12380 0 !== (lanes & 4194048) && (transitionClampTime = finalizationTime);
12381 0 !== (lanes & 62914560) && (retryClampTime = finalizationTime);
12382 0 !== (lanes & 2080374784) && (idleClampTime = finalizationTime);
12383 }
12384 function prepareFreshStack(root2, lanes) {
12385 supportsUserTiming && (console.timeStamp(
12386 "Blocking Track",
12387 3e-3,
12388 3e-3,
12389 "Blocking",
12390 LANES_TRACK_GROUP,
12391 "primary-light"
12392 ), console.timeStamp(
12393 "Transition Track",
12394 3e-3,
12395 3e-3,
12396 "Transition",
12397 LANES_TRACK_GROUP,
12398 "primary-light"
12399 ), console.timeStamp(
12400 "Suspense Track",
12401 3e-3,
12402 3e-3,
12403 "Suspense",
12404 LANES_TRACK_GROUP,
12405 "primary-light"
12406 ), console.timeStamp(
12407 "Idle Track",
12408 3e-3,
12409 3e-3,
12410 "Idle",
12411 LANES_TRACK_GROUP,
12412 "primary-light"
12413 ));
12414 var previousRenderStartTime = renderStartTime;
12415 renderStartTime = now();
12416 if (0 !== workInProgressRootRenderLanes && 0 < previousRenderStartTime) {
12417 setCurrentTrackFromLanes(workInProgressRootRenderLanes);
12418 if (workInProgressRootExitStatus === RootSuspended || workInProgressRootExitStatus === RootSuspendedWithDelay)
12419 logSuspendedRenderPhase(
12420 previousRenderStartTime,
12421 renderStartTime,
12422 lanes,
12423 workInProgressUpdateTask
12424 );
12425 else {
12426 var endTime = renderStartTime, debugTask = workInProgressUpdateTask;
12427 if (supportsUserTiming && !(endTime <= previousRenderStartTime)) {
12428 var color = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark", label = (lanes & 536870912) === lanes ? "Prewarm" : (lanes & 201326741) === lanes ? "Interrupted Hydration" : "Interrupted Render";
12429 debugTask ? debugTask.run(
12430 console.timeStamp.bind(
12431 console,
12432 label,
12433 previousRenderStartTime,
12434 endTime,
12435 currentTrack,
12436 LANES_TRACK_GROUP,
12437 color
12438 )
12439 ) : console.timeStamp(
12440 label,
12441 previousRenderStartTime,
12442 endTime,
12443 currentTrack,
12444 LANES_TRACK_GROUP,
12445 color
12446 );
12447 }
12448 }
12449 finalizeRender(workInProgressRootRenderLanes, renderStartTime);
12450 }
12451 previousRenderStartTime = workInProgressUpdateTask;
12452 workInProgressUpdateTask = null;
12453 if (0 !== (lanes & 127)) {
12454 workInProgressUpdateTask = blockingUpdateTask;
12455 debugTask = 0 <= blockingUpdateTime && blockingUpdateTime < blockingClampTime ? blockingClampTime : blockingUpdateTime;
12456 endTime = 0 <= blockingEventTime && blockingEventTime < blockingClampTime ? blockingClampTime : blockingEventTime;
12457 color = 0 <= endTime ? endTime : 0 <= debugTask ? debugTask : renderStartTime;
12458 0 <= blockingSuspendedTime ? (setCurrentTrackFromLanes(2), logSuspendedWithDelayPhase(
12459 blockingSuspendedTime,
12460 color,
12461 lanes,
12462 previousRenderStartTime
12463 )) : 0 !== (animatingLanes & 127) && (setCurrentTrackFromLanes(2), logAnimatingPhase(blockingClampTime, color, animatingTask));
12464 previousRenderStartTime = debugTask;
12465 var eventTime = endTime, eventType = blockingEventType, eventIsRepeat = 0 < blockingEventRepeatTime, isSpawnedUpdate = blockingUpdateType === SPAWNED_UPDATE, isPingedUpdate = blockingUpdateType === PINGED_UPDATE;
12466 debugTask = renderStartTime;
12467 endTime = blockingUpdateTask;
12468 color = blockingUpdateMethodName;
12469 label = blockingUpdateComponentName;
12470 if (supportsUserTiming) {
12471 currentTrack = "Blocking";
12472 0 < previousRenderStartTime ? previousRenderStartTime > debugTask && (previousRenderStartTime = debugTask) : previousRenderStartTime = debugTask;
12473 0 < eventTime ? eventTime > previousRenderStartTime && (eventTime = previousRenderStartTime) : eventTime = previousRenderStartTime;
12474 if (null !== eventType && previousRenderStartTime > eventTime) {
12475 var color$jscomp$0 = eventIsRepeat ? "secondary-light" : "warning";
12476 endTime ? endTime.run(
12477 console.timeStamp.bind(
12478 console,
12479 eventIsRepeat ? "Consecutive" : "Event: " + eventType,
12480 eventTime,
12481 previousRenderStartTime,
12482 currentTrack,
12483 LANES_TRACK_GROUP,
12484 color$jscomp$0
12485 )
12486 ) : console.timeStamp(
12487 eventIsRepeat ? "Consecutive" : "Event: " + eventType,
12488 eventTime,
12489 previousRenderStartTime,
12490 currentTrack,
12491 LANES_TRACK_GROUP,
12492 color$jscomp$0
12493 );
12494 }
12495 debugTask > previousRenderStartTime && (eventTime = isSpawnedUpdate ? "error" : (lanes & 738197653) === lanes ? "tertiary-light" : "primary-light", isSpawnedUpdate = isPingedUpdate ? "Promise Resolved" : isSpawnedUpdate ? "Cascading Update" : 5 < debugTask - previousRenderStartTime ? "Update Blocked" : "Update", isPingedUpdate = [], null != label && isPingedUpdate.push(["Component name", label]), null != color && isPingedUpdate.push(["Method name", color]), previousRenderStartTime = {
12496 start: previousRenderStartTime,
12497 end: debugTask,
12498 detail: {
12499 devtools: {
12500 properties: isPingedUpdate,
12501 track: currentTrack,
12502 trackGroup: LANES_TRACK_GROUP,
12503 color: eventTime
12504 }
12505 }
12506 }, endTime ? endTime.run(
12507 performance.measure.bind(
12508 performance,
12509 isSpawnedUpdate,
12510 previousRenderStartTime
12511 )
12512 ) : performance.measure(isSpawnedUpdate, previousRenderStartTime));
12513 }
12514 blockingUpdateTime = -1.1;
12515 blockingUpdateType = 0;
12516 blockingUpdateComponentName = blockingUpdateMethodName = null;
12517 blockingSuspendedTime = -1.1;
12518 blockingEventRepeatTime = blockingEventTime;
12519 blockingEventTime = -1.1;
12520 blockingClampTime = now();
12521 }
12522 0 !== (lanes & 4194048) && (workInProgressUpdateTask = transitionUpdateTask, debugTask = 0 <= transitionStartTime && transitionStartTime < transitionClampTime ? transitionClampTime : transitionStartTime, previousRenderStartTime = 0 <= transitionUpdateTime && transitionUpdateTime < transitionClampTime ? transitionClampTime : transitionUpdateTime, endTime = 0 <= transitionEventTime && transitionEventTime < transitionClampTime ? transitionClampTime : transitionEventTime, color = 0 <= endTime ? endTime : 0 <= previousRenderStartTime ? previousRenderStartTime : renderStartTime, 0 <= transitionSuspendedTime ? (setCurrentTrackFromLanes(256), logSuspendedWithDelayPhase(
12523 transitionSuspendedTime,
12524 color,
12525 lanes,
12526 workInProgressUpdateTask
12527 )) : 0 !== (animatingLanes & 4194048) && (setCurrentTrackFromLanes(256), logAnimatingPhase(transitionClampTime, color, animatingTask)), isPingedUpdate = endTime, eventTime = transitionEventType, eventType = 0 < transitionEventRepeatTime, eventIsRepeat = transitionUpdateType === PINGED_UPDATE, color = renderStartTime, endTime = transitionUpdateTask, label = transitionUpdateMethodName, isSpawnedUpdate = transitionUpdateComponentName, supportsUserTiming && (currentTrack = "Transition", 0 < previousRenderStartTime ? previousRenderStartTime > color && (previousRenderStartTime = color) : previousRenderStartTime = color, 0 < debugTask ? debugTask > previousRenderStartTime && (debugTask = previousRenderStartTime) : debugTask = previousRenderStartTime, 0 < isPingedUpdate ? isPingedUpdate > debugTask && (isPingedUpdate = debugTask) : isPingedUpdate = debugTask, debugTask > isPingedUpdate && null !== eventTime && (color$jscomp$0 = eventType ? "secondary-light" : "warning", endTime ? endTime.run(
12528 console.timeStamp.bind(
12529 console,
12530 eventType ? "Consecutive" : "Event: " + eventTime,
12531 isPingedUpdate,
12532 debugTask,
12533 currentTrack,
12534 LANES_TRACK_GROUP,
12535 color$jscomp$0
12536 )
12537 ) : console.timeStamp(
12538 eventType ? "Consecutive" : "Event: " + eventTime,
12539 isPingedUpdate,
12540 debugTask,
12541 currentTrack,
12542 LANES_TRACK_GROUP,
12543 color$jscomp$0
12544 )), previousRenderStartTime > debugTask && (endTime ? endTime.run(
12545 console.timeStamp.bind(
12546 console,
12547 "Action",
12548 debugTask,
12549 previousRenderStartTime,
12550 currentTrack,
12551 LANES_TRACK_GROUP,
12552 "primary-dark"
12553 )
12554 ) : console.timeStamp(
12555 "Action",
12556 debugTask,
12557 previousRenderStartTime,
12558 currentTrack,
12559 LANES_TRACK_GROUP,
12560 "primary-dark"
12561 )), color > previousRenderStartTime && (debugTask = eventIsRepeat ? "Promise Resolved" : 5 < color - previousRenderStartTime ? "Update Blocked" : "Update", isPingedUpdate = [], null != isSpawnedUpdate && isPingedUpdate.push(["Component name", isSpawnedUpdate]), null != label && isPingedUpdate.push(["Method name", label]), previousRenderStartTime = {
12562 start: previousRenderStartTime,
12563 end: color,
12564 detail: {
12565 devtools: {
12566 properties: isPingedUpdate,
12567 track: currentTrack,
12568 trackGroup: LANES_TRACK_GROUP,
12569 color: "primary-light"
12570 }
12571 }
12572 }, endTime ? endTime.run(
12573 performance.measure.bind(
12574 performance,
12575 debugTask,
12576 previousRenderStartTime
12577 )
12578 ) : performance.measure(debugTask, previousRenderStartTime))), transitionUpdateTime = transitionStartTime = -1.1, transitionUpdateType = 0, transitionSuspendedTime = -1.1, transitionEventRepeatTime = transitionEventTime, transitionEventTime = -1.1, transitionClampTime = now());
12579 0 !== (lanes & 62914560) && 0 !== (animatingLanes & 62914560) && (setCurrentTrackFromLanes(4194304), logAnimatingPhase(retryClampTime, renderStartTime, animatingTask));
12580 0 !== (lanes & 2080374784) && 0 !== (animatingLanes & 2080374784) && (setCurrentTrackFromLanes(268435456), logAnimatingPhase(idleClampTime, renderStartTime, animatingTask));
12581 previousRenderStartTime = root2.timeoutHandle;
12582 previousRenderStartTime !== noTimeout && (root2.timeoutHandle = noTimeout, cancelTimeout(previousRenderStartTime));
12583 previousRenderStartTime = root2.cancelPendingCommit;
12584 null !== previousRenderStartTime && (root2.cancelPendingCommit = null, previousRenderStartTime());
12585 pendingEffectsLanes = 0;
12586 resetWorkInProgressStack();
12587 workInProgressRoot = root2;
12588 workInProgress = previousRenderStartTime = createWorkInProgress(
12589 root2.current,
12590 null
12591 );
12592 workInProgressRootRenderLanes = lanes;
12593 workInProgressSuspendedReason = NotSuspended;
12594 workInProgressThrownValue = null;
12595 workInProgressRootDidSkipSuspendedSiblings = false;
12596 workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root2, lanes);
12597 workInProgressRootDidAttachPingListener = false;
12598 workInProgressRootExitStatus = RootInProgress;
12599 workInProgressSuspendedRetryLanes = workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = 0;
12600 workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors = null;
12601 workInProgressRootDidIncludeRecursiveRenderUpdate = false;
12602 0 !== (lanes & 8) && (lanes |= lanes & 32);
12603 endTime = root2.entangledLanes;
12604 if (0 !== endTime)
12605 for (root2 = root2.entanglements, endTime &= lanes; 0 < endTime; )
12606 debugTask = 31 - clz32(endTime), color = 1 << debugTask, lanes |= root2[debugTask], endTime &= ~color;
12607 entangledRenderLanes = lanes;
12608 finishQueueingConcurrentUpdates();
12609 root2 = getCurrentTime();
12610 1e3 < root2 - lastResetTime && (ReactSharedInternals.recentlyCreatedOwnerStacks = 0, lastResetTime = root2);
12611 ReactStrictModeWarnings.discardPendingWarnings();
12612 return previousRenderStartTime;
12613 }
12614 function handleThrow(root2, thrownValue) {
12615 currentlyRenderingFiber = null;
12616 ReactSharedInternals.H = ContextOnlyDispatcher;
12617 ReactSharedInternals.getCurrentStack = null;
12618 isRendering = false;
12619 current = null;
12620 thrownValue === SuspenseException || thrownValue === SuspenseActionException ? (thrownValue = getSuspendedThenable(), workInProgressSuspendedReason = SuspendedOnImmediate) : thrownValue === SuspenseyCommitException ? (thrownValue = getSuspendedThenable(), workInProgressSuspendedReason = SuspendedOnInstance) : workInProgressSuspendedReason = thrownValue === SelectiveHydrationException ? SuspendedOnHydration : null !== thrownValue && "object" === typeof thrownValue && "function" === typeof thrownValue.then ? SuspendedOnDeprecatedThrowPromise : SuspendedOnError;
12621 workInProgressThrownValue = thrownValue;
12622 var erroredWork = workInProgress;
12623 null === erroredWork ? (workInProgressRootExitStatus = RootFatalErrored, logUncaughtError(
12624 root2,
12625 createCapturedValueAtFiber(thrownValue, root2.current)
12626 )) : erroredWork.mode & ProfileMode && stopProfilerTimerIfRunningAndRecordDuration(erroredWork);
12627 }
12628 function shouldRemainOnPreviousScreen() {
12629 var handler = suspenseHandlerStackCursor.current;
12630 return null === handler ? true : (workInProgressRootRenderLanes & 4194048) === workInProgressRootRenderLanes ? null === shellBoundary ? true : false : (workInProgressRootRenderLanes & 62914560) === workInProgressRootRenderLanes || 0 !== (workInProgressRootRenderLanes & 536870912) ? handler === shellBoundary : false;
12631 }
12632 function pushDispatcher() {
12633 var prevDispatcher = ReactSharedInternals.H;
12634 ReactSharedInternals.H = ContextOnlyDispatcher;
12635 return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
12636 }
12637 function pushAsyncDispatcher() {
12638 var prevAsyncDispatcher = ReactSharedInternals.A;
12639 ReactSharedInternals.A = DefaultAsyncDispatcher;
12640 return prevAsyncDispatcher;
12641 }
12642 function markRenderDerivedCause(fiber) {
12643 null === workInProgressUpdateTask && (workInProgressUpdateTask = null == fiber._debugTask ? null : fiber._debugTask);
12644 }
12645 function renderDidSuspendDelayIfPossible() {
12646 workInProgressRootExitStatus = RootSuspendedWithDelay;
12647 workInProgressRootDidSkipSuspendedSiblings || (workInProgressRootRenderLanes & 4194048) !== workInProgressRootRenderLanes && null !== suspenseHandlerStackCursor.current || (workInProgressRootIsPrerendering = true);
12648 0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727) || null === workInProgressRoot || markRootSuspended(
12649 workInProgressRoot,
12650 workInProgressRootRenderLanes,
12651 workInProgressDeferredLane,
12652 false
12653 );
12654 }
12655 function renderRootSync(root2, lanes, shouldYieldForPrerendering) {
12656 var prevExecutionContext = executionContext;
12657 executionContext |= RenderContext;
12658 var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher();
12659 if (workInProgressRoot !== root2 || workInProgressRootRenderLanes !== lanes) {
12660 if (isDevToolsPresent) {
12661 var memoizedUpdaters = root2.memoizedUpdaters;
12662 0 < memoizedUpdaters.size && (restorePendingUpdaters(root2, workInProgressRootRenderLanes), memoizedUpdaters.clear());
12663 movePendingFibersToMemoized(root2, lanes);
12664 }
12665 workInProgressTransitions = null;
12666 prepareFreshStack(root2, lanes);
12667 }
12668 lanes = false;
12669 memoizedUpdaters = workInProgressRootExitStatus;
12670 a: do
12671 try {
12672 if (workInProgressSuspendedReason !== NotSuspended && null !== workInProgress) {
12673 var unitOfWork = workInProgress, thrownValue = workInProgressThrownValue;
12674 switch (workInProgressSuspendedReason) {
12675 case SuspendedOnHydration:
12676 resetWorkInProgressStack();
12677 memoizedUpdaters = RootSuspendedAtTheShell;
12678 break a;
12679 case SuspendedOnImmediate:
12680 case SuspendedOnData:
12681 case SuspendedOnAction:
12682 case SuspendedOnDeprecatedThrowPromise:
12683 null === suspenseHandlerStackCursor.current && (lanes = true);
12684 var reason = workInProgressSuspendedReason;
12685 workInProgressSuspendedReason = NotSuspended;
12686 workInProgressThrownValue = null;
12687 throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, reason);
12688 if (shouldYieldForPrerendering && workInProgressRootIsPrerendering) {
12689 memoizedUpdaters = RootInProgress;
12690 break a;
12691 }
12692 break;
12693 default:
12694 reason = workInProgressSuspendedReason, workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, reason);
12695 }
12696 }
12697 workLoopSync();
12698 memoizedUpdaters = workInProgressRootExitStatus;
12699 break;
12700 } catch (thrownValue$8) {
12701 handleThrow(root2, thrownValue$8);
12702 }
12703 while (1);
12704 lanes && root2.shellSuspendCounter++;
12705 resetContextDependencies();
12706 executionContext = prevExecutionContext;
12707 ReactSharedInternals.H = prevDispatcher;
12708 ReactSharedInternals.A = prevAsyncDispatcher;
12709 null === workInProgress && (workInProgressRoot = null, workInProgressRootRenderLanes = 0, finishQueueingConcurrentUpdates());
12710 return memoizedUpdaters;
12711 }
12712 function workLoopSync() {
12713 for (; null !== workInProgress; ) performUnitOfWork(workInProgress);
12714 }
12715 function renderRootConcurrent(root2, lanes) {
12716 var prevExecutionContext = executionContext;
12717 executionContext |= RenderContext;
12718 var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher();
12719 if (workInProgressRoot !== root2 || workInProgressRootRenderLanes !== lanes) {
12720 if (isDevToolsPresent) {
12721 var memoizedUpdaters = root2.memoizedUpdaters;
12722 0 < memoizedUpdaters.size && (restorePendingUpdaters(root2, workInProgressRootRenderLanes), memoizedUpdaters.clear());
12723 movePendingFibersToMemoized(root2, lanes);
12724 }
12725 workInProgressTransitions = null;
12726 workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS;
12727 prepareFreshStack(root2, lanes);
12728 } else
12729 workInProgressRootIsPrerendering = checkIfRootIsPrerendering(
12730 root2,
12731 lanes
12732 );
12733 a: do
12734 try {
12735 if (workInProgressSuspendedReason !== NotSuspended && null !== workInProgress)
12736 b: switch (lanes = workInProgress, memoizedUpdaters = workInProgressThrownValue, workInProgressSuspendedReason) {
12737 case SuspendedOnError:
12738 workInProgressSuspendedReason = NotSuspended;
12739 workInProgressThrownValue = null;
12740 throwAndUnwindWorkLoop(
12741 root2,
12742 lanes,
12743 memoizedUpdaters,
12744 SuspendedOnError
12745 );
12746 break;
12747 case SuspendedOnData:
12748 case SuspendedOnAction:
12749 if (isThenableResolved(memoizedUpdaters)) {
12750 workInProgressSuspendedReason = NotSuspended;
12751 workInProgressThrownValue = null;
12752 replaySuspendedUnitOfWork(lanes);
12753 break;
12754 }
12755 lanes = function() {
12756 workInProgressSuspendedReason !== SuspendedOnData && workInProgressSuspendedReason !== SuspendedOnAction || workInProgressRoot !== root2 || (workInProgressSuspendedReason = SuspendedAndReadyToContinue);
12757 ensureRootIsScheduled(root2);
12758 };
12759 memoizedUpdaters.then(lanes, lanes);
12760 break a;
12761 case SuspendedOnImmediate:
12762 workInProgressSuspendedReason = SuspendedAndReadyToContinue;
12763 break a;
12764 case SuspendedOnInstance:
12765 workInProgressSuspendedReason = SuspendedOnInstanceAndReadyToContinue;
12766 break a;
12767 case SuspendedAndReadyToContinue:
12768 isThenableResolved(memoizedUpdaters) ? (workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, replaySuspendedUnitOfWork(lanes)) : (workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, throwAndUnwindWorkLoop(
12769 root2,
12770 lanes,
12771 memoizedUpdaters,
12772 SuspendedAndReadyToContinue
12773 ));
12774 break;
12775 case SuspendedOnInstanceAndReadyToContinue:
12776 var resource = null;
12777 switch (workInProgress.tag) {
12778 case 26:
12779 resource = workInProgress.memoizedState;
12780 case 5:
12781 case 27:
12782 var hostFiber = workInProgress;
12783 if (resource ? preloadResource(resource) : hostFiber.stateNode.complete) {
12784 workInProgressSuspendedReason = NotSuspended;
12785 workInProgressThrownValue = null;
12786 var sibling = hostFiber.sibling;
12787 if (null !== sibling) workInProgress = sibling;
12788 else {
12789 var returnFiber = hostFiber.return;
12790 null !== returnFiber ? (workInProgress = returnFiber, completeUnitOfWork(returnFiber)) : workInProgress = null;
12791 }
12792 break b;
12793 }
12794 break;
12795 default:
12796 console.error(
12797 "Unexpected type of fiber triggered a suspensey commit. This is a bug in React."
12798 );
12799 }
12800 workInProgressSuspendedReason = NotSuspended;
12801 workInProgressThrownValue = null;
12802 throwAndUnwindWorkLoop(
12803 root2,
12804 lanes,
12805 memoizedUpdaters,
12806 SuspendedOnInstanceAndReadyToContinue
12807 );
12808 break;
12809 case SuspendedOnDeprecatedThrowPromise:
12810 workInProgressSuspendedReason = NotSuspended;
12811 workInProgressThrownValue = null;
12812 throwAndUnwindWorkLoop(
12813 root2,
12814 lanes,
12815 memoizedUpdaters,
12816 SuspendedOnDeprecatedThrowPromise
12817 );
12818 break;
12819 case SuspendedOnHydration:
12820 resetWorkInProgressStack();
12821 workInProgressRootExitStatus = RootSuspendedAtTheShell;
12822 break a;
12823 default:
12824 throw Error(
12825 "Unexpected SuspendedReason. This is a bug in React."
12826 );
12827 }
12828 null !== ReactSharedInternals.actQueue ? workLoopSync() : workLoopConcurrentByScheduler();
12829 break;
12830 } catch (thrownValue$9) {
12831 handleThrow(root2, thrownValue$9);
12832 }
12833 while (1);
12834 resetContextDependencies();
12835 ReactSharedInternals.H = prevDispatcher;
12836 ReactSharedInternals.A = prevAsyncDispatcher;
12837 executionContext = prevExecutionContext;
12838 if (null !== workInProgress) return RootInProgress;
12839 workInProgressRoot = null;
12840 workInProgressRootRenderLanes = 0;
12841 finishQueueingConcurrentUpdates();
12842 return workInProgressRootExitStatus;
12843 }
12844 function workLoopConcurrentByScheduler() {
12845 for (; null !== workInProgress && !shouldYield(); )
12846 performUnitOfWork(workInProgress);
12847 }
12848 function performUnitOfWork(unitOfWork) {
12849 var current2 = unitOfWork.alternate;
12850 (unitOfWork.mode & ProfileMode) !== NoMode ? (startProfilerTimer(unitOfWork), current2 = runWithFiberInDEV(
12851 unitOfWork,
12852 beginWork,
12853 current2,
12854 unitOfWork,
12855 entangledRenderLanes
12856 ), stopProfilerTimerIfRunningAndRecordDuration(unitOfWork)) : current2 = runWithFiberInDEV(
12857 unitOfWork,
12858 beginWork,
12859 current2,
12860 unitOfWork,
12861 entangledRenderLanes
12862 );
12863 unitOfWork.memoizedProps = unitOfWork.pendingProps;
12864 null === current2 ? completeUnitOfWork(unitOfWork) : workInProgress = current2;
12865 }
12866 function replaySuspendedUnitOfWork(unitOfWork) {
12867 var next = runWithFiberInDEV(unitOfWork, replayBeginWork, unitOfWork);
12868 unitOfWork.memoizedProps = unitOfWork.pendingProps;
12869 null === next ? completeUnitOfWork(unitOfWork) : workInProgress = next;
12870 }
12871 function replayBeginWork(unitOfWork) {
12872 var current2 = unitOfWork.alternate, isProfilingMode = (unitOfWork.mode & ProfileMode) !== NoMode;
12873 isProfilingMode && startProfilerTimer(unitOfWork);
12874 switch (unitOfWork.tag) {
12875 case 15:
12876 case 0:
12877 current2 = replayFunctionComponent(
12878 current2,
12879 unitOfWork,
12880 unitOfWork.pendingProps,
12881 unitOfWork.type,
12882 void 0,
12883 workInProgressRootRenderLanes
12884 );
12885 break;
12886 case 11:
12887 current2 = replayFunctionComponent(
12888 current2,
12889 unitOfWork,
12890 unitOfWork.pendingProps,
12891 unitOfWork.type.render,
12892 unitOfWork.ref,
12893 workInProgressRootRenderLanes
12894 );
12895 break;
12896 case 5:
12897 resetHooksOnUnwind(unitOfWork);
12898 default:
12899 unwindInterruptedWork(current2, unitOfWork), unitOfWork = workInProgress = resetWorkInProgress(unitOfWork, entangledRenderLanes), current2 = beginWork(current2, unitOfWork, entangledRenderLanes);
12900 }
12901 isProfilingMode && stopProfilerTimerIfRunningAndRecordDuration(unitOfWork);
12902 return current2;
12903 }
12904 function throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, suspendedReason) {
12905 resetContextDependencies();
12906 resetHooksOnUnwind(unitOfWork);
12907 thenableState$1 = null;
12908 thenableIndexCounter$1 = 0;
12909 var returnFiber = unitOfWork.return;
12910 try {
12911 if (throwException(
12912 root2,
12913 returnFiber,
12914 unitOfWork,
12915 thrownValue,
12916 workInProgressRootRenderLanes
12917 )) {
12918 workInProgressRootExitStatus = RootFatalErrored;
12919 logUncaughtError(
12920 root2,
12921 createCapturedValueAtFiber(thrownValue, root2.current)
12922 );
12923 workInProgress = null;
12924 return;
12925 }
12926 } catch (error) {
12927 if (null !== returnFiber) throw workInProgress = returnFiber, error;
12928 workInProgressRootExitStatus = RootFatalErrored;
12929 logUncaughtError(
12930 root2,
12931 createCapturedValueAtFiber(thrownValue, root2.current)
12932 );
12933 workInProgress = null;
12934 return;
12935 }
12936 if (unitOfWork.flags & 32768) {
12937 if (isHydrating || suspendedReason === SuspendedOnError) root2 = true;
12938 else if (workInProgressRootIsPrerendering || 0 !== (workInProgressRootRenderLanes & 536870912))
12939 root2 = false;
12940 else if (workInProgressRootDidSkipSuspendedSiblings = root2 = true, suspendedReason === SuspendedOnData || suspendedReason === SuspendedOnAction || suspendedReason === SuspendedOnImmediate || suspendedReason === SuspendedOnDeprecatedThrowPromise)
12941 suspendedReason = suspenseHandlerStackCursor.current, null !== suspendedReason && 13 === suspendedReason.tag && (suspendedReason.flags |= 16384);
12942 unwindUnitOfWork(unitOfWork, root2);
12943 } else completeUnitOfWork(unitOfWork);
12944 }
12945 function completeUnitOfWork(unitOfWork) {
12946 var completedWork = unitOfWork;
12947 do {
12948 if (0 !== (completedWork.flags & 32768)) {
12949 unwindUnitOfWork(
12950 completedWork,
12951 workInProgressRootDidSkipSuspendedSiblings
12952 );
12953 return;
12954 }
12955 var current2 = completedWork.alternate;
12956 unitOfWork = completedWork.return;
12957 startProfilerTimer(completedWork);
12958 current2 = runWithFiberInDEV(
12959 completedWork,
12960 completeWork,
12961 current2,
12962 completedWork,
12963 entangledRenderLanes
12964 );
12965 (completedWork.mode & ProfileMode) !== NoMode && stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork);
12966 if (null !== current2) {
12967 workInProgress = current2;
12968 return;
12969 }
12970 completedWork = completedWork.sibling;
12971 if (null !== completedWork) {
12972 workInProgress = completedWork;
12973 return;
12974 }
12975 workInProgress = completedWork = unitOfWork;
12976 } while (null !== completedWork);
12977 workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootCompleted);
12978 }
12979 function unwindUnitOfWork(unitOfWork, skipSiblings) {
12980 do {
12981 var next = unwindWork(unitOfWork.alternate, unitOfWork);
12982 if (null !== next) {
12983 next.flags &= 32767;
12984 workInProgress = next;
12985 return;
12986 }
12987 if ((unitOfWork.mode & ProfileMode) !== NoMode) {
12988 stopProfilerTimerIfRunningAndRecordIncompleteDuration(unitOfWork);
12989 next = unitOfWork.actualDuration;
12990 for (var child = unitOfWork.child; null !== child; )
12991 next += child.actualDuration, child = child.sibling;
12992 unitOfWork.actualDuration = next;
12993 }
12994 next = unitOfWork.return;
12995 null !== next && (next.flags |= 32768, next.subtreeFlags = 0, next.deletions = null);
12996 if (!skipSiblings && (unitOfWork = unitOfWork.sibling, null !== unitOfWork)) {
12997 workInProgress = unitOfWork;
12998 return;
12999 }
13000 workInProgress = unitOfWork = next;
13001 } while (null !== unitOfWork);
13002 workInProgressRootExitStatus = RootSuspendedAtTheShell;
13003 workInProgress = null;
13004 }
13005 function commitRoot(root2, finishedWork, lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, suspendedRetryLanes, exitStatus, suspendedState, suspendedCommitReason, completedRenderStartTime, completedRenderEndTime) {
13006 root2.cancelPendingCommit = null;
13007 do
13008 flushPendingEffects();
13009 while (pendingEffectsStatus !== NO_PENDING_EFFECTS);
13010 ReactStrictModeWarnings.flushLegacyContextWarning();
13011 ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
13012 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
13013 throw Error("Should not already be working.");
13014 setCurrentTrackFromLanes(lanes);
13015 exitStatus === RootErrored ? logErroredRenderPhase(
13016 completedRenderStartTime,
13017 completedRenderEndTime,
13018 lanes,
13019 workInProgressUpdateTask
13020 ) : null !== recoverableErrors ? logRecoveredRenderPhase(
13021 completedRenderStartTime,
13022 completedRenderEndTime,
13023 lanes,
13024 recoverableErrors,
13025 null !== finishedWork && null !== finishedWork.alternate && finishedWork.alternate.memoizedState.isDehydrated && 0 !== (finishedWork.flags & 256),
13026 workInProgressUpdateTask
13027 ) : logRenderPhase(
13028 completedRenderStartTime,
13029 completedRenderEndTime,
13030 lanes,
13031 workInProgressUpdateTask
13032 );
13033 if (null !== finishedWork) {
13034 0 === lanes && console.error(
13035 "finishedLanes should not be empty during a commit. This is a bug in React."
13036 );
13037 if (finishedWork === root2.current)
13038 throw Error(
13039 "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
13040 );
13041 didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
13042 didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
13043 markRootFinished(
13044 root2,
13045 lanes,
13046 didIncludeRenderPhaseUpdate,
13047 spawnedLane,
13048 updatedLanes,
13049 suspendedRetryLanes
13050 );
13051 root2 === workInProgressRoot && (workInProgress = workInProgressRoot = null, workInProgressRootRenderLanes = 0);
13052 pendingFinishedWork = finishedWork;
13053 pendingEffectsRoot = root2;
13054 pendingEffectsLanes = lanes;
13055 pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
13056 pendingPassiveTransitions = transitions;
13057 pendingRecoverableErrors = recoverableErrors;
13058 pendingEffectsRenderEndTime = completedRenderEndTime;
13059 pendingSuspendedCommitReason = suspendedCommitReason;
13060 pendingDelayedCommitReason = IMMEDIATE_COMMIT;
13061 pendingSuspendedViewTransitionReason = null;
13062 0 !== finishedWork.actualDuration || 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256) ? (root2.callbackNode = null, root2.callbackPriority = 0, scheduleCallback$1(NormalPriority$1, function() {
13063 schedulerEvent = window.event;
13064 pendingDelayedCommitReason === IMMEDIATE_COMMIT && (pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT);
13065 flushPassiveEffects();
13066 return null;
13067 })) : (root2.callbackNode = null, root2.callbackPriority = 0);
13068 commitErrors = null;
13069 commitStartTime = now();
13070 null !== suspendedCommitReason && logSuspendedCommitPhase(
13071 completedRenderEndTime,
13072 commitStartTime,
13073 suspendedCommitReason,
13074 workInProgressUpdateTask
13075 );
13076 recoverableErrors = 0 !== (finishedWork.flags & 13878);
13077 if (0 !== (finishedWork.subtreeFlags & 13878) || recoverableErrors) {
13078 recoverableErrors = ReactSharedInternals.T;
13079 ReactSharedInternals.T = null;
13080 transitions = ReactDOMSharedInternals.p;
13081 ReactDOMSharedInternals.p = DiscreteEventPriority;
13082 spawnedLane = executionContext;
13083 executionContext |= CommitContext;
13084 try {
13085 commitBeforeMutationEffects(root2, finishedWork, lanes);
13086 } finally {
13087 executionContext = spawnedLane, ReactDOMSharedInternals.p = transitions, ReactSharedInternals.T = recoverableErrors;
13088 }
13089 }
13090 pendingEffectsStatus = PENDING_MUTATION_PHASE;
13091 flushMutationEffects();
13092 flushLayoutEffects();
13093 flushSpawnedWork();
13094 }
13095 }
13096 function flushMutationEffects() {
13097 if (pendingEffectsStatus === PENDING_MUTATION_PHASE) {
13098 pendingEffectsStatus = NO_PENDING_EFFECTS;
13099 var root2 = pendingEffectsRoot, finishedWork = pendingFinishedWork, lanes = pendingEffectsLanes, rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
13100 if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
13101 rootMutationHasEffect = ReactSharedInternals.T;
13102 ReactSharedInternals.T = null;
13103 var previousPriority = ReactDOMSharedInternals.p;
13104 ReactDOMSharedInternals.p = DiscreteEventPriority;
13105 var prevExecutionContext = executionContext;
13106 executionContext |= CommitContext;
13107 try {
13108 inProgressLanes = lanes;
13109 inProgressRoot = root2;
13110 resetComponentEffectTimers();
13111 commitMutationEffectsOnFiber(finishedWork, root2);
13112 inProgressRoot = inProgressLanes = null;
13113 lanes = selectionInformation;
13114 var curFocusedElem = getActiveElementDeep(root2.containerInfo), priorFocusedElem = lanes.focusedElem, priorSelectionRange = lanes.selectionRange;
13115 if (curFocusedElem !== priorFocusedElem && priorFocusedElem && priorFocusedElem.ownerDocument && containsNode(
13116 priorFocusedElem.ownerDocument.documentElement,
13117 priorFocusedElem
13118 )) {
13119 if (null !== priorSelectionRange && hasSelectionCapabilities(priorFocusedElem)) {
13120 var start = priorSelectionRange.start, end = priorSelectionRange.end;
13121 void 0 === end && (end = start);
13122 if ("selectionStart" in priorFocusedElem)
13123 priorFocusedElem.selectionStart = start, priorFocusedElem.selectionEnd = Math.min(
13124 end,
13125 priorFocusedElem.value.length
13126 );
13127 else {
13128 var doc = priorFocusedElem.ownerDocument || document, win = doc && doc.defaultView || window;
13129 if (win.getSelection) {
13130 var selection = win.getSelection(), length = priorFocusedElem.textContent.length, start$jscomp$0 = Math.min(
13131 priorSelectionRange.start,
13132 length
13133 ), end$jscomp$0 = void 0 === priorSelectionRange.end ? start$jscomp$0 : Math.min(priorSelectionRange.end, length);
13134 !selection.extend && start$jscomp$0 > end$jscomp$0 && (curFocusedElem = end$jscomp$0, end$jscomp$0 = start$jscomp$0, start$jscomp$0 = curFocusedElem);
13135 var startMarker = getNodeForCharacterOffset(
13136 priorFocusedElem,
13137 start$jscomp$0
13138 ), endMarker = getNodeForCharacterOffset(
13139 priorFocusedElem,
13140 end$jscomp$0
13141 );
13142 if (startMarker && endMarker && (1 !== selection.rangeCount || selection.anchorNode !== startMarker.node || selection.anchorOffset !== startMarker.offset || selection.focusNode !== endMarker.node || selection.focusOffset !== endMarker.offset)) {
13143 var range = doc.createRange();
13144 range.setStart(startMarker.node, startMarker.offset);
13145 selection.removeAllRanges();
13146 start$jscomp$0 > end$jscomp$0 ? (selection.addRange(range), selection.extend(endMarker.node, endMarker.offset)) : (range.setEnd(endMarker.node, endMarker.offset), selection.addRange(range));
13147 }
13148 }
13149 }
13150 }
13151 doc = [];
13152 for (selection = priorFocusedElem; selection = selection.parentNode; )
13153 1 === selection.nodeType && doc.push({
13154 element: selection,
13155 left: selection.scrollLeft,
13156 top: selection.scrollTop
13157 });
13158 "function" === typeof priorFocusedElem.focus && priorFocusedElem.focus();
13159 for (priorFocusedElem = 0; priorFocusedElem < doc.length; priorFocusedElem++) {
13160 var info = doc[priorFocusedElem];
13161 info.element.scrollLeft = info.left;
13162 info.element.scrollTop = info.top;
13163 }
13164 }
13165 _enabled = !!eventsEnabled;
13166 selectionInformation = eventsEnabled = null;
13167 } finally {
13168 executionContext = prevExecutionContext, ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = rootMutationHasEffect;
13169 }
13170 }
13171 root2.current = finishedWork;
13172 pendingEffectsStatus = PENDING_LAYOUT_PHASE;
13173 }
13174 }
13175 function flushLayoutEffects() {
13176 if (pendingEffectsStatus === PENDING_LAYOUT_PHASE) {
13177 pendingEffectsStatus = NO_PENDING_EFFECTS;
13178 var suspendedViewTransitionReason = pendingSuspendedViewTransitionReason;
13179 if (null !== suspendedViewTransitionReason) {
13180 commitStartTime = now();
13181 var startTime = commitEndTime, endTime = commitStartTime;
13182 !supportsUserTiming || endTime <= startTime || (animatingTask ? animatingTask.run(
13183 console.timeStamp.bind(
13184 console,
13185 suspendedViewTransitionReason,
13186 startTime,
13187 endTime,
13188 currentTrack,
13189 LANES_TRACK_GROUP,
13190 "secondary-light"
13191 )
13192 ) : console.timeStamp(
13193 suspendedViewTransitionReason,
13194 startTime,
13195 endTime,
13196 currentTrack,
13197 LANES_TRACK_GROUP,
13198 "secondary-light"
13199 ));
13200 }
13201 suspendedViewTransitionReason = pendingEffectsRoot;
13202 startTime = pendingFinishedWork;
13203 endTime = pendingEffectsLanes;
13204 var rootHasLayoutEffect = 0 !== (startTime.flags & 8772);
13205 if (0 !== (startTime.subtreeFlags & 8772) || rootHasLayoutEffect) {
13206 rootHasLayoutEffect = ReactSharedInternals.T;
13207 ReactSharedInternals.T = null;
13208 var _previousPriority = ReactDOMSharedInternals.p;
13209 ReactDOMSharedInternals.p = DiscreteEventPriority;
13210 var _prevExecutionContext = executionContext;
13211 executionContext |= CommitContext;
13212 try {
13213 inProgressLanes = endTime, inProgressRoot = suspendedViewTransitionReason, resetComponentEffectTimers(), commitLayoutEffectOnFiber(
13214 suspendedViewTransitionReason,
13215 startTime.alternate,
13216 startTime
13217 ), inProgressRoot = inProgressLanes = null;
13218 } finally {
13219 executionContext = _prevExecutionContext, ReactDOMSharedInternals.p = _previousPriority, ReactSharedInternals.T = rootHasLayoutEffect;
13220 }
13221 }
13222 suspendedViewTransitionReason = pendingEffectsRenderEndTime;
13223 startTime = pendingSuspendedCommitReason;
13224 commitEndTime = now();
13225 suspendedViewTransitionReason = null === startTime ? suspendedViewTransitionReason : commitStartTime;
13226 startTime = commitEndTime;
13227 endTime = pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT;
13228 rootHasLayoutEffect = workInProgressUpdateTask;
13229 null !== commitErrors ? logCommitErrored(
13230 suspendedViewTransitionReason,
13231 startTime,
13232 commitErrors,
13233 false,
13234 rootHasLayoutEffect
13235 ) : !supportsUserTiming || startTime <= suspendedViewTransitionReason || (rootHasLayoutEffect ? rootHasLayoutEffect.run(
13236 console.timeStamp.bind(
13237 console,
13238 endTime ? "Commit Interrupted View Transition" : "Commit",
13239 suspendedViewTransitionReason,
13240 startTime,
13241 currentTrack,
13242 LANES_TRACK_GROUP,
13243 endTime ? "error" : "secondary-dark"
13244 )
13245 ) : console.timeStamp(
13246 endTime ? "Commit Interrupted View Transition" : "Commit",
13247 suspendedViewTransitionReason,
13248 startTime,
13249 currentTrack,
13250 LANES_TRACK_GROUP,
13251 endTime ? "error" : "secondary-dark"
13252 ));
13253 pendingEffectsStatus = PENDING_AFTER_MUTATION_PHASE;
13254 }
13255 }
13256 function flushSpawnedWork() {
13257 if (pendingEffectsStatus === PENDING_SPAWNED_WORK || pendingEffectsStatus === PENDING_AFTER_MUTATION_PHASE) {
13258 if (pendingEffectsStatus === PENDING_SPAWNED_WORK) {
13259 var startViewTransitionStartTime = commitEndTime;
13260 commitEndTime = now();
13261 var endTime = commitEndTime, abortedViewTransition = pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT;
13262 !supportsUserTiming || endTime <= startViewTransitionStartTime || (animatingTask ? animatingTask.run(
13263 console.timeStamp.bind(
13264 console,
13265 abortedViewTransition ? "Interrupted View Transition" : "Starting Animation",
13266 startViewTransitionStartTime,
13267 endTime,
13268 currentTrack,
13269 LANES_TRACK_GROUP,
13270 abortedViewTransition ? "error" : "secondary-light"
13271 )
13272 ) : console.timeStamp(
13273 abortedViewTransition ? "Interrupted View Transition" : "Starting Animation",
13274 startViewTransitionStartTime,
13275 endTime,
13276 currentTrack,
13277 LANES_TRACK_GROUP,
13278 abortedViewTransition ? " error" : "secondary-light"
13279 ));
13280 pendingDelayedCommitReason !== ABORTED_VIEW_TRANSITION_COMMIT && (pendingDelayedCommitReason = ANIMATION_STARTED_COMMIT);
13281 }
13282 pendingEffectsStatus = NO_PENDING_EFFECTS;
13283 requestPaint();
13284 startViewTransitionStartTime = pendingEffectsRoot;
13285 var finishedWork = pendingFinishedWork;
13286 endTime = pendingEffectsLanes;
13287 abortedViewTransition = pendingRecoverableErrors;
13288 var rootDidHavePassiveEffects = 0 !== finishedWork.actualDuration || 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256);
13289 rootDidHavePassiveEffects ? pendingEffectsStatus = PENDING_PASSIVE_PHASE : (pendingEffectsStatus = NO_PENDING_EFFECTS, pendingFinishedWork = pendingEffectsRoot = null, releaseRootPooledCache(
13290 startViewTransitionStartTime,
13291 startViewTransitionStartTime.pendingLanes
13292 ), nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null);
13293 var remainingLanes = startViewTransitionStartTime.pendingLanes;
13294 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
13295 rootDidHavePassiveEffects || commitDoubleInvokeEffectsInDEV(startViewTransitionStartTime);
13296 remainingLanes = lanesToEventPriority(endTime);
13297 finishedWork = finishedWork.stateNode;
13298 if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
13299 try {
13300 var didError = 128 === (finishedWork.current.flags & 128);
13301 switch (remainingLanes) {
13302 case DiscreteEventPriority:
13303 var schedulerPriority = ImmediatePriority;
13304 break;
13305 case ContinuousEventPriority:
13306 schedulerPriority = UserBlockingPriority;
13307 break;
13308 case DefaultEventPriority:
13309 schedulerPriority = NormalPriority$1;
13310 break;
13311 case IdleEventPriority:
13312 schedulerPriority = IdlePriority;
13313 break;
13314 default:
13315 schedulerPriority = NormalPriority$1;
13316 }
13317 injectedHook.onCommitFiberRoot(
13318 rendererID,
13319 finishedWork,
13320 schedulerPriority,
13321 didError
13322 );
13323 } catch (err) {
13324 hasLoggedError || (hasLoggedError = true, console.error(
13325 "React instrumentation encountered an error: %o",
13326 err
13327 ));
13328 }
13329 isDevToolsPresent && startViewTransitionStartTime.memoizedUpdaters.clear();
13330 onCommitRoot();
13331 if (null !== abortedViewTransition) {
13332 didError = ReactSharedInternals.T;
13333 schedulerPriority = ReactDOMSharedInternals.p;
13334 ReactDOMSharedInternals.p = DiscreteEventPriority;
13335 ReactSharedInternals.T = null;
13336 try {
13337 var onRecoverableError = startViewTransitionStartTime.onRecoverableError;
13338 for (finishedWork = 0; finishedWork < abortedViewTransition.length; finishedWork++) {
13339 var recoverableError = abortedViewTransition[finishedWork], errorInfo = makeErrorInfo(recoverableError.stack);
13340 runWithFiberInDEV(
13341 recoverableError.source,
13342 onRecoverableError,
13343 recoverableError.value,
13344 errorInfo
13345 );
13346 }
13347 } finally {
13348 ReactSharedInternals.T = didError, ReactDOMSharedInternals.p = schedulerPriority;
13349 }
13350 }
13351 0 !== (pendingEffectsLanes & 3) && flushPendingEffects();
13352 ensureRootIsScheduled(startViewTransitionStartTime);
13353 remainingLanes = startViewTransitionStartTime.pendingLanes;
13354 0 !== (endTime & 261930) && 0 !== (remainingLanes & 42) ? (nestedUpdateScheduled = true, startViewTransitionStartTime === rootWithNestedUpdates ? nestedUpdateCount++ : (nestedUpdateCount = 0, rootWithNestedUpdates = startViewTransitionStartTime)) : nestedUpdateCount = 0;
13355 rootDidHavePassiveEffects || finalizeRender(endTime, commitEndTime);
13356 flushSyncWorkAcrossRoots_impl(0, false);
13357 }
13358 }
13359 function makeErrorInfo(componentStack) {
13360 componentStack = { componentStack };
13361 Object.defineProperty(componentStack, "digest", {
13362 get: function() {
13363 console.error(
13364 'You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.'
13365 );
13366 }
13367 });
13368 return componentStack;
13369 }
13370 function releaseRootPooledCache(root2, remainingLanes) {
13371 0 === (root2.pooledCacheLanes &= remainingLanes) && (remainingLanes = root2.pooledCache, null != remainingLanes && (root2.pooledCache = null, releaseCache(remainingLanes)));
13372 }
13373 function flushPendingEffects() {
13374 flushMutationEffects();
13375 flushLayoutEffects();
13376 flushSpawnedWork();
13377 return flushPassiveEffects();
13378 }
13379 function flushPassiveEffects() {
13380 if (pendingEffectsStatus !== PENDING_PASSIVE_PHASE) return false;
13381 var root2 = pendingEffectsRoot, remainingLanes = pendingEffectsRemainingLanes;
13382 pendingEffectsRemainingLanes = 0;
13383 var renderPriority = lanesToEventPriority(pendingEffectsLanes), priority = 0 === DefaultEventPriority || DefaultEventPriority > renderPriority ? DefaultEventPriority : renderPriority;
13384 renderPriority = ReactSharedInternals.T;
13385 var previousPriority = ReactDOMSharedInternals.p;
13386 try {
13387 ReactDOMSharedInternals.p = priority;
13388 ReactSharedInternals.T = null;
13389 var transitions = pendingPassiveTransitions;
13390 pendingPassiveTransitions = null;
13391 priority = pendingEffectsRoot;
13392 var lanes = pendingEffectsLanes;
13393 pendingEffectsStatus = NO_PENDING_EFFECTS;
13394 pendingFinishedWork = pendingEffectsRoot = null;
13395 pendingEffectsLanes = 0;
13396 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
13397 throw Error("Cannot flush passive effects while already rendering.");
13398 setCurrentTrackFromLanes(lanes);
13399 isFlushingPassiveEffects = true;
13400 didScheduleUpdateDuringPassiveEffects = false;
13401 var passiveEffectStartTime = 0;
13402 commitErrors = null;
13403 passiveEffectStartTime = now$1();
13404 if (pendingDelayedCommitReason === ANIMATION_STARTED_COMMIT)
13405 logAnimatingPhase(
13406 commitEndTime,
13407 passiveEffectStartTime,
13408 animatingTask
13409 );
13410 else {
13411 var startTime = commitEndTime, endTime = passiveEffectStartTime, delayedUntilPaint = pendingDelayedCommitReason === DELAYED_PASSIVE_COMMIT;
13412 !supportsUserTiming || endTime <= startTime || (workInProgressUpdateTask ? workInProgressUpdateTask.run(
13413 console.timeStamp.bind(
13414 console,
13415 delayedUntilPaint ? "Waiting for Paint" : "Waiting",
13416 startTime,
13417 endTime,
13418 currentTrack,
13419 LANES_TRACK_GROUP,
13420 "secondary-light"
13421 )
13422 ) : console.timeStamp(
13423 delayedUntilPaint ? "Waiting for Paint" : "Waiting",
13424 startTime,
13425 endTime,
13426 currentTrack,
13427 LANES_TRACK_GROUP,
13428 "secondary-light"
13429 ));
13430 }
13431 startTime = executionContext;
13432 executionContext |= CommitContext;
13433 var finishedWork = priority.current;
13434 resetComponentEffectTimers();
13435 commitPassiveUnmountOnFiber(finishedWork);
13436 var finishedWork$jscomp$0 = priority.current;
13437 finishedWork = pendingEffectsRenderEndTime;
13438 resetComponentEffectTimers();
13439 commitPassiveMountOnFiber(
13440 priority,
13441 finishedWork$jscomp$0,
13442 lanes,
13443 transitions,
13444 finishedWork
13445 );
13446 commitDoubleInvokeEffectsInDEV(priority);
13447 executionContext = startTime;
13448 var passiveEffectsEndTime = now$1();
13449 finishedWork$jscomp$0 = passiveEffectStartTime;
13450 finishedWork = workInProgressUpdateTask;
13451 null !== commitErrors ? logCommitErrored(
13452 finishedWork$jscomp$0,
13453 passiveEffectsEndTime,
13454 commitErrors,
13455 true,
13456 finishedWork
13457 ) : !supportsUserTiming || passiveEffectsEndTime <= finishedWork$jscomp$0 || (finishedWork ? finishedWork.run(
13458 console.timeStamp.bind(
13459 console,
13460 "Remaining Effects",
13461 finishedWork$jscomp$0,
13462 passiveEffectsEndTime,
13463 currentTrack,
13464 LANES_TRACK_GROUP,
13465 "secondary-dark"
13466 )
13467 ) : console.timeStamp(
13468 "Remaining Effects",
13469 finishedWork$jscomp$0,
13470 passiveEffectsEndTime,
13471 currentTrack,
13472 LANES_TRACK_GROUP,
13473 "secondary-dark"
13474 ));
13475 finalizeRender(lanes, passiveEffectsEndTime);
13476 flushSyncWorkAcrossRoots_impl(0, false);
13477 didScheduleUpdateDuringPassiveEffects ? priority === rootWithPassiveNestedUpdates ? nestedPassiveUpdateCount++ : (nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = priority) : nestedPassiveUpdateCount = 0;
13478 didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = false;
13479 if (injectedHook && "function" === typeof injectedHook.onPostCommitFiberRoot)
13480 try {
13481 injectedHook.onPostCommitFiberRoot(rendererID, priority);
13482 } catch (err) {
13483 hasLoggedError || (hasLoggedError = true, console.error(
13484 "React instrumentation encountered an error: %o",
13485 err
13486 ));
13487 }
13488 var stateNode = priority.current.stateNode;
13489 stateNode.effectDuration = 0;
13490 stateNode.passiveEffectDuration = 0;
13491 return true;
13492 } finally {
13493 ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = renderPriority, releaseRootPooledCache(root2, remainingLanes);
13494 }
13495 }
13496 function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
13497 sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
13498 recordEffectError(sourceFiber);
13499 sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);
13500 rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);
13501 null !== rootFiber && (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));
13502 }
13503 function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {
13504 isRunningInsertionEffect = false;
13505 if (3 === sourceFiber.tag)
13506 captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
13507 else {
13508 for (; null !== nearestMountedAncestor; ) {
13509 if (3 === nearestMountedAncestor.tag) {
13510 captureCommitPhaseErrorOnRoot(
13511 nearestMountedAncestor,
13512 sourceFiber,
13513 error
13514 );
13515 return;
13516 }
13517 if (1 === nearestMountedAncestor.tag) {
13518 var instance = nearestMountedAncestor.stateNode;
13519 if ("function" === typeof nearestMountedAncestor.type.getDerivedStateFromError || "function" === typeof instance.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(instance))) {
13520 sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
13521 recordEffectError(sourceFiber);
13522 error = createClassErrorUpdate(2);
13523 instance = enqueueUpdate(nearestMountedAncestor, error, 2);
13524 null !== instance && (initializeClassErrorUpdate(
13525 error,
13526 instance,
13527 nearestMountedAncestor,
13528 sourceFiber
13529 ), markRootUpdated$1(instance, 2), ensureRootIsScheduled(instance));
13530 return;
13531 }
13532 }
13533 nearestMountedAncestor = nearestMountedAncestor.return;
13534 }
13535 console.error(
13536 "Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.\n\nError message:\n\n%s",
13537 error
13538 );
13539 }
13540 }
13541 function attachPingListener(root2, wakeable, lanes) {
13542 var pingCache = root2.pingCache;
13543 if (null === pingCache) {
13544 pingCache = root2.pingCache = new PossiblyWeakMap();
13545 var threadIDs = /* @__PURE__ */ new Set();
13546 pingCache.set(wakeable, threadIDs);
13547 } else
13548 threadIDs = pingCache.get(wakeable), void 0 === threadIDs && (threadIDs = /* @__PURE__ */ new Set(), pingCache.set(wakeable, threadIDs));
13549 threadIDs.has(lanes) || (workInProgressRootDidAttachPingListener = true, threadIDs.add(lanes), pingCache = pingSuspendedRoot.bind(null, root2, wakeable, lanes), isDevToolsPresent && restorePendingUpdaters(root2, lanes), wakeable.then(pingCache, pingCache));
13550 }
13551 function pingSuspendedRoot(root2, wakeable, pingedLanes) {
13552 var pingCache = root2.pingCache;
13553 null !== pingCache && pingCache.delete(wakeable);
13554 root2.pingedLanes |= root2.suspendedLanes & pingedLanes;
13555 root2.warmLanes &= ~pingedLanes;
13556 0 !== (pingedLanes & 127) ? 0 > blockingUpdateTime && (blockingClampTime = blockingUpdateTime = now(), blockingUpdateTask = createTask("Promise Resolved"), blockingUpdateType = PINGED_UPDATE) : 0 !== (pingedLanes & 4194048) && 0 > transitionUpdateTime && (transitionClampTime = transitionUpdateTime = now(), transitionUpdateTask = createTask("Promise Resolved"), transitionUpdateType = PINGED_UPDATE);
13557 isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && console.error(
13558 "A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act"
13559 );
13560 workInProgressRoot === root2 && (workInProgressRootRenderLanes & pingedLanes) === pingedLanes && (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && (workInProgressRootRenderLanes & 62914560) === workInProgressRootRenderLanes && now$1() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS ? (executionContext & RenderContext) === NoContext && prepareFreshStack(root2, 0) : workInProgressRootPingedLanes |= pingedLanes, workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes && (workInProgressSuspendedRetryLanes = 0));
13561 ensureRootIsScheduled(root2);
13562 }
13563 function retryTimedOutBoundary(boundaryFiber, retryLane) {
13564 0 === retryLane && (retryLane = claimNextRetryLane());
13565 boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
13566 null !== boundaryFiber && (markRootUpdated$1(boundaryFiber, retryLane), ensureRootIsScheduled(boundaryFiber));
13567 }
13568 function retryDehydratedSuspenseBoundary(boundaryFiber) {
13569 var suspenseState = boundaryFiber.memoizedState, retryLane = 0;
13570 null !== suspenseState && (retryLane = suspenseState.retryLane);
13571 retryTimedOutBoundary(boundaryFiber, retryLane);
13572 }
13573 function resolveRetryWakeable(boundaryFiber, wakeable) {
13574 var retryLane = 0;
13575 switch (boundaryFiber.tag) {
13576 case 31:
13577 case 13:
13578 var retryCache = boundaryFiber.stateNode;
13579 var suspenseState = boundaryFiber.memoizedState;
13580 null !== suspenseState && (retryLane = suspenseState.retryLane);
13581 break;
13582 case 19:
13583 retryCache = boundaryFiber.stateNode;
13584 break;
13585 case 22:
13586 retryCache = boundaryFiber.stateNode._retryCache;
13587 break;
13588 default:
13589 throw Error(
13590 "Pinged unknown suspense boundary type. This is probably a bug in React."
13591 );
13592 }
13593 null !== retryCache && retryCache.delete(wakeable);
13594 retryTimedOutBoundary(boundaryFiber, retryLane);
13595 }
13596 function recursivelyTraverseAndDoubleInvokeEffectsInDEV(root$jscomp$0, parentFiber, isInStrictMode) {
13597 if (0 !== (parentFiber.subtreeFlags & 67117056))
13598 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
13599 var root2 = root$jscomp$0, fiber = parentFiber, isStrictModeFiber = fiber.type === REACT_STRICT_MODE_TYPE;
13600 isStrictModeFiber = isInStrictMode || isStrictModeFiber;
13601 22 !== fiber.tag ? fiber.flags & 67108864 ? isStrictModeFiber && runWithFiberInDEV(
13602 fiber,
13603 doubleInvokeEffectsOnFiber,
13604 root2,
13605 fiber
13606 ) : recursivelyTraverseAndDoubleInvokeEffectsInDEV(
13607 root2,
13608 fiber,
13609 isStrictModeFiber
13610 ) : null === fiber.memoizedState && (isStrictModeFiber && fiber.flags & 8192 ? runWithFiberInDEV(
13611 fiber,
13612 doubleInvokeEffectsOnFiber,
13613 root2,
13614 fiber
13615 ) : fiber.subtreeFlags & 67108864 && runWithFiberInDEV(
13616 fiber,
13617 recursivelyTraverseAndDoubleInvokeEffectsInDEV,
13618 root2,
13619 fiber,
13620 isStrictModeFiber
13621 ));
13622 parentFiber = parentFiber.sibling;
13623 }
13624 }
13625 function doubleInvokeEffectsOnFiber(root2, fiber) {
13626 setIsStrictModeForDevtools(true);
13627 try {
13628 disappearLayoutEffects(fiber), disconnectPassiveEffect(fiber), reappearLayoutEffects(root2, fiber.alternate, fiber, false), reconnectPassiveEffects(root2, fiber, 0, null, false, 0);
13629 } finally {
13630 setIsStrictModeForDevtools(false);
13631 }
13632 }
13633 function commitDoubleInvokeEffectsInDEV(root2) {
13634 var doubleInvokeEffects = true;
13635 root2.current.mode & (StrictLegacyMode | StrictEffectsMode) || (doubleInvokeEffects = false);
13636 recursivelyTraverseAndDoubleInvokeEffectsInDEV(
13637 root2,
13638 root2.current,
13639 doubleInvokeEffects
13640 );
13641 }
13642 function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
13643 if ((executionContext & RenderContext) === NoContext) {
13644 var tag = fiber.tag;
13645 if (3 === tag || 1 === tag || 0 === tag || 11 === tag || 14 === tag || 15 === tag) {
13646 tag = getComponentNameFromFiber(fiber) || "ReactComponent";
13647 if (null !== didWarnStateUpdateForNotYetMountedComponent) {
13648 if (didWarnStateUpdateForNotYetMountedComponent.has(tag)) return;
13649 didWarnStateUpdateForNotYetMountedComponent.add(tag);
13650 } else didWarnStateUpdateForNotYetMountedComponent = /* @__PURE__ */ new Set([tag]);
13651 runWithFiberInDEV(fiber, function() {
13652 console.error(
13653 "Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead."
13654 );
13655 });
13656 }
13657 }
13658 }
13659 function restorePendingUpdaters(root2, lanes) {
13660 isDevToolsPresent && root2.memoizedUpdaters.forEach(function(schedulingFiber) {
13661 addFiberToLanesMap(root2, schedulingFiber, lanes);
13662 });
13663 }
13664 function scheduleCallback$1(priorityLevel, callback) {
13665 var actQueue = ReactSharedInternals.actQueue;
13666 return null !== actQueue ? (actQueue.push(callback), fakeActCallbackNode$1) : scheduleCallback$3(priorityLevel, callback);
13667 }
13668 function warnIfUpdatesNotWrappedWithActDEV(fiber) {
13669 isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && runWithFiberInDEV(fiber, function() {
13670 console.error(
13671 "An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act",
13672 getComponentNameFromFiber(fiber)
13673 );
13674 });
13675 }
13676 function ensureRootIsScheduled(root2) {
13677 root2 !== lastScheduledRoot && null === root2.next && (null === lastScheduledRoot ? firstScheduledRoot = lastScheduledRoot = root2 : lastScheduledRoot = lastScheduledRoot.next = root2);
13678 mightHavePendingSyncWork = true;
13679 null !== ReactSharedInternals.actQueue ? didScheduleMicrotask_act || (didScheduleMicrotask_act = true, scheduleImmediateRootScheduleTask()) : didScheduleMicrotask || (didScheduleMicrotask = true, scheduleImmediateRootScheduleTask());
13680 }
13681 function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
13682 if (!isFlushingWork && mightHavePendingSyncWork) {
13683 isFlushingWork = true;
13684 do {
13685 var didPerformSomeWork = false;
13686 for (var root2 = firstScheduledRoot; null !== root2; ) {
13687 if (!onlyLegacy)
13688 if (0 !== syncTransitionLanes) {
13689 var pendingLanes = root2.pendingLanes;
13690 if (0 === pendingLanes) var nextLanes = 0;
13691 else {
13692 var suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes;
13693 nextLanes = (1 << 31 - clz32(42 | syncTransitionLanes) + 1) - 1;
13694 nextLanes &= pendingLanes & ~(suspendedLanes & ~pingedLanes);
13695 nextLanes = nextLanes & 201326741 ? nextLanes & 201326741 | 1 : nextLanes ? nextLanes | 2 : 0;
13696 }
13697 0 !== nextLanes && (didPerformSomeWork = true, performSyncWorkOnRoot(root2, nextLanes));
13698 } else
13699 nextLanes = workInProgressRootRenderLanes, nextLanes = getNextLanes(
13700 root2,
13701 root2 === workInProgressRoot ? nextLanes : 0,
13702 null !== root2.cancelPendingCommit || root2.timeoutHandle !== noTimeout
13703 ), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root2, nextLanes) || (didPerformSomeWork = true, performSyncWorkOnRoot(root2, nextLanes));
13704 root2 = root2.next;
13705 }
13706 } while (didPerformSomeWork);
13707 isFlushingWork = false;
13708 }
13709 }
13710 function processRootScheduleInImmediateTask() {
13711 schedulerEvent = window.event;
13712 processRootScheduleInMicrotask();
13713 }
13714 function processRootScheduleInMicrotask() {
13715 mightHavePendingSyncWork = didScheduleMicrotask_act = didScheduleMicrotask = false;
13716 var syncTransitionLanes = 0;
13717 0 !== currentEventTransitionLane && shouldAttemptEagerTransition() && (syncTransitionLanes = currentEventTransitionLane);
13718 for (var currentTime = now$1(), prev = null, root2 = firstScheduledRoot; null !== root2; ) {
13719 var next = root2.next, nextLanes = scheduleTaskForRootDuringMicrotask(root2, currentTime);
13720 if (0 === nextLanes)
13721 root2.next = null, null === prev ? firstScheduledRoot = next : prev.next = next, null === next && (lastScheduledRoot = prev);
13722 else if (prev = root2, 0 !== syncTransitionLanes || 0 !== (nextLanes & 3))
13723 mightHavePendingSyncWork = true;
13724 root2 = next;
13725 }
13726 pendingEffectsStatus !== NO_PENDING_EFFECTS && pendingEffectsStatus !== PENDING_PASSIVE_PHASE || flushSyncWorkAcrossRoots_impl(syncTransitionLanes, false);
13727 0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);
13728 }
13729 function scheduleTaskForRootDuringMicrotask(root2, currentTime) {
13730 for (var suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes, expirationTimes = root2.expirationTimes, lanes = root2.pendingLanes & -62914561; 0 < lanes; ) {
13731 var index = 31 - clz32(lanes), lane = 1 << index, expirationTime = expirationTimes[index];
13732 if (-1 === expirationTime) {
13733 if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))
13734 expirationTimes[index] = computeExpirationTime(lane, currentTime);
13735 } else expirationTime <= currentTime && (root2.expiredLanes |= lane);
13736 lanes &= ~lane;
13737 }
13738 currentTime = workInProgressRoot;
13739 suspendedLanes = workInProgressRootRenderLanes;
13740 suspendedLanes = getNextLanes(
13741 root2,
13742 root2 === currentTime ? suspendedLanes : 0,
13743 null !== root2.cancelPendingCommit || root2.timeoutHandle !== noTimeout
13744 );
13745 pingedLanes = root2.callbackNode;
13746 if (0 === suspendedLanes || root2 === currentTime && (workInProgressSuspendedReason === SuspendedOnData || workInProgressSuspendedReason === SuspendedOnAction) || null !== root2.cancelPendingCommit)
13747 return null !== pingedLanes && cancelCallback(pingedLanes), root2.callbackNode = null, root2.callbackPriority = 0;
13748 if (0 === (suspendedLanes & 3) || checkIfRootIsPrerendering(root2, suspendedLanes)) {
13749 currentTime = suspendedLanes & -suspendedLanes;
13750 if (currentTime !== root2.callbackPriority || null !== ReactSharedInternals.actQueue && pingedLanes !== fakeActCallbackNode)
13751 cancelCallback(pingedLanes);
13752 else return currentTime;
13753 switch (lanesToEventPriority(suspendedLanes)) {
13754 case DiscreteEventPriority:
13755 case ContinuousEventPriority:
13756 suspendedLanes = UserBlockingPriority;
13757 break;
13758 case DefaultEventPriority:
13759 suspendedLanes = NormalPriority$1;
13760 break;
13761 case IdleEventPriority:
13762 suspendedLanes = IdlePriority;
13763 break;
13764 default:
13765 suspendedLanes = NormalPriority$1;
13766 }
13767 pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root2);
13768 null !== ReactSharedInternals.actQueue ? (ReactSharedInternals.actQueue.push(pingedLanes), suspendedLanes = fakeActCallbackNode) : suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);
13769 root2.callbackPriority = currentTime;
13770 root2.callbackNode = suspendedLanes;
13771 return currentTime;
13772 }
13773 null !== pingedLanes && cancelCallback(pingedLanes);
13774 root2.callbackPriority = 2;
13775 root2.callbackNode = null;
13776 return 2;
13777 }
13778 function performWorkOnRootViaSchedulerTask(root2, didTimeout) {
13779 nestedUpdateScheduled = currentUpdateIsNested = false;
13780 schedulerEvent = window.event;
13781 if (pendingEffectsStatus !== NO_PENDING_EFFECTS && pendingEffectsStatus !== PENDING_PASSIVE_PHASE)
13782 return root2.callbackNode = null, root2.callbackPriority = 0, null;
13783 var originalCallbackNode = root2.callbackNode;
13784 pendingDelayedCommitReason === IMMEDIATE_COMMIT && (pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT);
13785 if (flushPendingEffects() && root2.callbackNode !== originalCallbackNode)
13786 return null;
13787 var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
13788 workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
13789 root2,
13790 root2 === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
13791 null !== root2.cancelPendingCommit || root2.timeoutHandle !== noTimeout
13792 );
13793 if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
13794 performWorkOnRoot(
13795 root2,
13796 workInProgressRootRenderLanes$jscomp$0,
13797 didTimeout
13798 );
13799 scheduleTaskForRootDuringMicrotask(root2, now$1());
13800 return null != root2.callbackNode && root2.callbackNode === originalCallbackNode ? performWorkOnRootViaSchedulerTask.bind(null, root2) : null;
13801 }
13802 function performSyncWorkOnRoot(root2, lanes) {
13803 if (flushPendingEffects()) return null;
13804 currentUpdateIsNested = nestedUpdateScheduled;
13805 nestedUpdateScheduled = false;
13806 performWorkOnRoot(root2, lanes, true);
13807 }
13808 function cancelCallback(callbackNode) {
13809 callbackNode !== fakeActCallbackNode && null !== callbackNode && cancelCallback$1(callbackNode);
13810 }
13811 function scheduleImmediateRootScheduleTask() {
13812 null !== ReactSharedInternals.actQueue && ReactSharedInternals.actQueue.push(function() {
13813 processRootScheduleInMicrotask();
13814 return null;
13815 });
13816 scheduleMicrotask(function() {
13817 (executionContext & (RenderContext | CommitContext)) !== NoContext ? scheduleCallback$3(
13818 ImmediatePriority,
13819 processRootScheduleInImmediateTask
13820 ) : processRootScheduleInMicrotask();
13821 });
13822 }
13823 function requestTransitionLane() {
13824 if (0 === currentEventTransitionLane) {
13825 var actionScopeLane = currentEntangledLane;
13826 0 === actionScopeLane && (actionScopeLane = nextTransitionUpdateLane, nextTransitionUpdateLane <<= 1, 0 === (nextTransitionUpdateLane & 261888) && (nextTransitionUpdateLane = 256));
13827 currentEventTransitionLane = actionScopeLane;
13828 }
13829 return currentEventTransitionLane;
13830 }
13831 function coerceFormActionProp(actionProp) {
13832 if (null == actionProp || "symbol" === typeof actionProp || "boolean" === typeof actionProp)
13833 return null;
13834 if ("function" === typeof actionProp) return actionProp;
13835 checkAttributeStringCoercion(actionProp, "action");
13836 return sanitizeURL("" + actionProp);
13837 }
13838 function createFormDataWithSubmitter(form, submitter) {
13839 var temp = submitter.ownerDocument.createElement("input");
13840 temp.name = submitter.name;
13841 temp.value = submitter.value;
13842 form.id && temp.setAttribute("form", form.id);
13843 submitter.parentNode.insertBefore(temp, submitter);
13844 form = new FormData(form);
13845 temp.parentNode.removeChild(temp);
13846 return form;
13847 }
13848 function extractEvents$1(dispatchQueue, domEventName, maybeTargetInst, nativeEvent, nativeEventTarget) {
13849 if ("submit" === domEventName && maybeTargetInst && maybeTargetInst.stateNode === nativeEventTarget) {
13850 var action = coerceFormActionProp(
13851 (nativeEventTarget[internalPropsKey] || null).action
13852 ), submitter = nativeEvent.submitter;
13853 submitter && (domEventName = (domEventName = submitter[internalPropsKey] || null) ? coerceFormActionProp(domEventName.formAction) : submitter.getAttribute("formAction"), null !== domEventName && (action = domEventName, submitter = null));
13854 var event = new SyntheticEvent(
13855 "action",
13856 "action",
13857 null,
13858 nativeEvent,
13859 nativeEventTarget
13860 );
13861 dispatchQueue.push({
13862 event,
13863 listeners: [
13864 {
13865 instance: null,
13866 listener: function() {
13867 if (nativeEvent.defaultPrevented) {
13868 if (0 !== currentEventTransitionLane) {
13869 var formData = submitter ? createFormDataWithSubmitter(
13870 nativeEventTarget,
13871 submitter
13872 ) : new FormData(nativeEventTarget), pendingState = {
13873 pending: true,
13874 data: formData,
13875 method: nativeEventTarget.method,
13876 action
13877 };
13878 Object.freeze(pendingState);
13879 startHostTransition(
13880 maybeTargetInst,
13881 pendingState,
13882 null,
13883 formData
13884 );
13885 }
13886 } else
13887 "function" === typeof action && (event.preventDefault(), formData = submitter ? createFormDataWithSubmitter(
13888 nativeEventTarget,
13889 submitter
13890 ) : new FormData(nativeEventTarget), pendingState = {
13891 pending: true,
13892 data: formData,
13893 method: nativeEventTarget.method,
13894 action
13895 }, Object.freeze(pendingState), startHostTransition(
13896 maybeTargetInst,
13897 pendingState,
13898 action,
13899 formData
13900 ));
13901 },
13902 currentTarget: nativeEventTarget
13903 }
13904 ]
13905 });
13906 }
13907 }
13908 function executeDispatch(event, listener, currentTarget) {
13909 event.currentTarget = currentTarget;
13910 try {
13911 listener(event);
13912 } catch (error) {
13913 reportGlobalError(error);
13914 }
13915 event.currentTarget = null;
13916 }
13917 function processDispatchQueue(dispatchQueue, eventSystemFlags) {
13918 eventSystemFlags = 0 !== (eventSystemFlags & 4);
13919 for (var i = 0; i < dispatchQueue.length; i++) {
13920 var _dispatchQueue$i = dispatchQueue[i];
13921 a: {
13922 var previousInstance = void 0, event = _dispatchQueue$i.event;
13923 _dispatchQueue$i = _dispatchQueue$i.listeners;
13924 if (eventSystemFlags)
13925 for (var i$jscomp$0 = _dispatchQueue$i.length - 1; 0 <= i$jscomp$0; i$jscomp$0--) {
13926 var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0], instance = _dispatchListeners$i.instance, currentTarget = _dispatchListeners$i.currentTarget;
13927 _dispatchListeners$i = _dispatchListeners$i.listener;
13928 if (instance !== previousInstance && event.isPropagationStopped())
13929 break a;
13930 null !== instance ? runWithFiberInDEV(
13931 instance,
13932 executeDispatch,
13933 event,
13934 _dispatchListeners$i,
13935 currentTarget
13936 ) : executeDispatch(event, _dispatchListeners$i, currentTarget);
13937 previousInstance = instance;
13938 }
13939 else
13940 for (i$jscomp$0 = 0; i$jscomp$0 < _dispatchQueue$i.length; i$jscomp$0++) {
13941 _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0];
13942 instance = _dispatchListeners$i.instance;
13943 currentTarget = _dispatchListeners$i.currentTarget;
13944 _dispatchListeners$i = _dispatchListeners$i.listener;
13945 if (instance !== previousInstance && event.isPropagationStopped())
13946 break a;
13947 null !== instance ? runWithFiberInDEV(
13948 instance,
13949 executeDispatch,
13950 event,
13951 _dispatchListeners$i,
13952 currentTarget
13953 ) : executeDispatch(event, _dispatchListeners$i, currentTarget);
13954 previousInstance = instance;
13955 }
13956 }
13957 }
13958 }
13959 function listenToNonDelegatedEvent(domEventName, targetElement) {
13960 nonDelegatedEvents.has(domEventName) || console.error(
13961 'Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',
13962 domEventName
13963 );
13964 var listenerSet = targetElement[internalEventHandlersKey];
13965 void 0 === listenerSet && (listenerSet = targetElement[internalEventHandlersKey] = /* @__PURE__ */ new Set());
13966 var listenerSetKey = domEventName + "__bubble";
13967 listenerSet.has(listenerSetKey) || (addTrappedEventListener(targetElement, domEventName, 2, false), listenerSet.add(listenerSetKey));
13968 }
13969 function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {
13970 nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener && console.error(
13971 'Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',
13972 domEventName
13973 );
13974 var eventSystemFlags = 0;
13975 isCapturePhaseListener && (eventSystemFlags |= 4);
13976 addTrappedEventListener(
13977 target,
13978 domEventName,
13979 eventSystemFlags,
13980 isCapturePhaseListener
13981 );
13982 }
13983 function listenToAllSupportedEvents(rootContainerElement) {
13984 if (!rootContainerElement[listeningMarker]) {
13985 rootContainerElement[listeningMarker] = true;
13986 allNativeEvents.forEach(function(domEventName) {
13987 "selectionchange" !== domEventName && (nonDelegatedEvents.has(domEventName) || listenToNativeEvent(domEventName, false, rootContainerElement), listenToNativeEvent(domEventName, true, rootContainerElement));
13988 });
13989 var ownerDocument = 9 === rootContainerElement.nodeType ? rootContainerElement : rootContainerElement.ownerDocument;
13990 null === ownerDocument || ownerDocument[listeningMarker] || (ownerDocument[listeningMarker] = true, listenToNativeEvent("selectionchange", false, ownerDocument));
13991 }
13992 }
13993 function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener) {
13994 switch (getEventPriority(domEventName)) {
13995 case DiscreteEventPriority:
13996 var listenerWrapper = dispatchDiscreteEvent;
13997 break;
13998 case ContinuousEventPriority:
13999 listenerWrapper = dispatchContinuousEvent;
14000 break;
14001 default:
14002 listenerWrapper = dispatchEvent;
14003 }
14004 eventSystemFlags = listenerWrapper.bind(
14005 null,
14006 domEventName,
14007 eventSystemFlags,
14008 targetContainer
14009 );
14010 listenerWrapper = void 0;
14011 !passiveBrowserEventsSupported || "touchstart" !== domEventName && "touchmove" !== domEventName && "wheel" !== domEventName || (listenerWrapper = true);
14012 isCapturePhaseListener ? void 0 !== listenerWrapper ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
14013 capture: true,
14014 passive: listenerWrapper
14015 }) : targetContainer.addEventListener(domEventName, eventSystemFlags, true) : void 0 !== listenerWrapper ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
14016 passive: listenerWrapper
14017 }) : targetContainer.addEventListener(
14018 domEventName,
14019 eventSystemFlags,
14020 false
14021 );
14022 }
14023 function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst$jscomp$0, targetContainer) {
14024 var ancestorInst = targetInst$jscomp$0;
14025 if (0 === (eventSystemFlags & 1) && 0 === (eventSystemFlags & 2) && null !== targetInst$jscomp$0)
14026 a: for (; ; ) {
14027 if (null === targetInst$jscomp$0) return;
14028 var nodeTag = targetInst$jscomp$0.tag;
14029 if (3 === nodeTag || 4 === nodeTag) {
14030 var container = targetInst$jscomp$0.stateNode.containerInfo;
14031 if (container === targetContainer) break;
14032 if (4 === nodeTag)
14033 for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {
14034 var grandTag = nodeTag.tag;
14035 if ((3 === grandTag || 4 === grandTag) && nodeTag.stateNode.containerInfo === targetContainer)
14036 return;
14037 nodeTag = nodeTag.return;
14038 }
14039 for (; null !== container; ) {
14040 nodeTag = getClosestInstanceFromNode(container);
14041 if (null === nodeTag) return;
14042 grandTag = nodeTag.tag;
14043 if (5 === grandTag || 6 === grandTag || 26 === grandTag || 27 === grandTag) {
14044 targetInst$jscomp$0 = ancestorInst = nodeTag;
14045 continue a;
14046 }
14047 container = container.parentNode;
14048 }
14049 }
14050 targetInst$jscomp$0 = targetInst$jscomp$0.return;
14051 }
14052 batchedUpdates$1(function() {
14053 var targetInst = ancestorInst, nativeEventTarget = getEventTarget(nativeEvent), dispatchQueue = [];
14054 a: {
14055 var reactName = topLevelEventsToReactNames.get(domEventName);
14056 if (void 0 !== reactName) {
14057 var SyntheticEventCtor = SyntheticEvent, reactEventType = domEventName;
14058 switch (domEventName) {
14059 case "keypress":
14060 if (0 === getEventCharCode(nativeEvent)) break a;
14061 case "keydown":
14062 case "keyup":
14063 SyntheticEventCtor = SyntheticKeyboardEvent;
14064 break;
14065 case "focusin":
14066 reactEventType = "focus";
14067 SyntheticEventCtor = SyntheticFocusEvent;
14068 break;
14069 case "focusout":
14070 reactEventType = "blur";
14071 SyntheticEventCtor = SyntheticFocusEvent;
14072 break;
14073 case "beforeblur":
14074 case "afterblur":
14075 SyntheticEventCtor = SyntheticFocusEvent;
14076 break;
14077 case "click":
14078 if (2 === nativeEvent.button) break a;
14079 case "auxclick":
14080 case "dblclick":
14081 case "mousedown":
14082 case "mousemove":
14083 case "mouseup":
14084 case "mouseout":
14085 case "mouseover":
14086 case "contextmenu":
14087 SyntheticEventCtor = SyntheticMouseEvent;
14088 break;
14089 case "drag":
14090 case "dragend":
14091 case "dragenter":
14092 case "dragexit":
14093 case "dragleave":
14094 case "dragover":
14095 case "dragstart":
14096 case "drop":
14097 SyntheticEventCtor = SyntheticDragEvent;
14098 break;
14099 case "touchcancel":
14100 case "touchend":
14101 case "touchmove":
14102 case "touchstart":
14103 SyntheticEventCtor = SyntheticTouchEvent;
14104 break;
14105 case ANIMATION_END:
14106 case ANIMATION_ITERATION:
14107 case ANIMATION_START:
14108 SyntheticEventCtor = SyntheticAnimationEvent;
14109 break;
14110 case TRANSITION_END:
14111 SyntheticEventCtor = SyntheticTransitionEvent;
14112 break;
14113 case "scroll":
14114 case "scrollend":
14115 SyntheticEventCtor = SyntheticUIEvent;
14116 break;
14117 case "wheel":
14118 SyntheticEventCtor = SyntheticWheelEvent;
14119 break;
14120 case "copy":
14121 case "cut":
14122 case "paste":
14123 SyntheticEventCtor = SyntheticClipboardEvent;
14124 break;
14125 case "gotpointercapture":
14126 case "lostpointercapture":
14127 case "pointercancel":
14128 case "pointerdown":
14129 case "pointermove":
14130 case "pointerout":
14131 case "pointerover":
14132 case "pointerup":
14133 SyntheticEventCtor = SyntheticPointerEvent;
14134 break;
14135 case "toggle":
14136 case "beforetoggle":
14137 SyntheticEventCtor = SyntheticToggleEvent;
14138 }
14139 var inCapturePhase = 0 !== (eventSystemFlags & 4), accumulateTargetOnly = !inCapturePhase && ("scroll" === domEventName || "scrollend" === domEventName), reactEventName = inCapturePhase ? null !== reactName ? reactName + "Capture" : null : reactName;
14140 inCapturePhase = [];
14141 for (var instance = targetInst, lastHostComponent; null !== instance; ) {
14142 var _instance2 = instance;
14143 lastHostComponent = _instance2.stateNode;
14144 _instance2 = _instance2.tag;
14145 5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2 || null === lastHostComponent || null === reactEventName || (_instance2 = getListener(instance, reactEventName), null != _instance2 && inCapturePhase.push(
14146 createDispatchListener(
14147 instance,
14148 _instance2,
14149 lastHostComponent
14150 )
14151 ));
14152 if (accumulateTargetOnly) break;
14153 instance = instance.return;
14154 }
14155 0 < inCapturePhase.length && (reactName = new SyntheticEventCtor(
14156 reactName,
14157 reactEventType,
14158 null,
14159 nativeEvent,
14160 nativeEventTarget
14161 ), dispatchQueue.push({
14162 event: reactName,
14163 listeners: inCapturePhase
14164 }));
14165 }
14166 }
14167 if (0 === (eventSystemFlags & 7)) {
14168 a: {
14169 reactName = "mouseover" === domEventName || "pointerover" === domEventName;
14170 SyntheticEventCtor = "mouseout" === domEventName || "pointerout" === domEventName;
14171 if (reactName && nativeEvent !== currentReplayingEvent && (reactEventType = nativeEvent.relatedTarget || nativeEvent.fromElement) && (getClosestInstanceFromNode(reactEventType) || reactEventType[internalContainerInstanceKey]))
14172 break a;
14173 if (SyntheticEventCtor || reactName) {
14174 reactName = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget : (reactName = nativeEventTarget.ownerDocument) ? reactName.defaultView || reactName.parentWindow : window;
14175 if (SyntheticEventCtor) {
14176 if (reactEventType = nativeEvent.relatedTarget || nativeEvent.toElement, SyntheticEventCtor = targetInst, reactEventType = reactEventType ? getClosestInstanceFromNode(reactEventType) : null, null !== reactEventType && (accumulateTargetOnly = getNearestMountedFiber(reactEventType), inCapturePhase = reactEventType.tag, reactEventType !== accumulateTargetOnly || 5 !== inCapturePhase && 27 !== inCapturePhase && 6 !== inCapturePhase))
14177 reactEventType = null;
14178 } else SyntheticEventCtor = null, reactEventType = targetInst;
14179 if (SyntheticEventCtor !== reactEventType) {
14180 inCapturePhase = SyntheticMouseEvent;
14181 _instance2 = "onMouseLeave";
14182 reactEventName = "onMouseEnter";
14183 instance = "mouse";
14184 if ("pointerout" === domEventName || "pointerover" === domEventName)
14185 inCapturePhase = SyntheticPointerEvent, _instance2 = "onPointerLeave", reactEventName = "onPointerEnter", instance = "pointer";
14186 accumulateTargetOnly = null == SyntheticEventCtor ? reactName : getNodeFromInstance(SyntheticEventCtor);
14187 lastHostComponent = null == reactEventType ? reactName : getNodeFromInstance(reactEventType);
14188 reactName = new inCapturePhase(
14189 _instance2,
14190 instance + "leave",
14191 SyntheticEventCtor,
14192 nativeEvent,
14193 nativeEventTarget
14194 );
14195 reactName.target = accumulateTargetOnly;
14196 reactName.relatedTarget = lastHostComponent;
14197 _instance2 = null;
14198 getClosestInstanceFromNode(nativeEventTarget) === targetInst && (inCapturePhase = new inCapturePhase(
14199 reactEventName,
14200 instance + "enter",
14201 reactEventType,
14202 nativeEvent,
14203 nativeEventTarget
14204 ), inCapturePhase.target = lastHostComponent, inCapturePhase.relatedTarget = accumulateTargetOnly, _instance2 = inCapturePhase);
14205 accumulateTargetOnly = _instance2;
14206 if (SyntheticEventCtor && reactEventType)
14207 b: {
14208 inCapturePhase = getParent;
14209 reactEventName = SyntheticEventCtor;
14210 instance = reactEventType;
14211 lastHostComponent = 0;
14212 for (_instance2 = reactEventName; _instance2; _instance2 = inCapturePhase(_instance2))
14213 lastHostComponent++;
14214 _instance2 = 0;
14215 for (var tempB = instance; tempB; tempB = inCapturePhase(tempB))
14216 _instance2++;
14217 for (; 0 < lastHostComponent - _instance2; )
14218 reactEventName = inCapturePhase(reactEventName), lastHostComponent--;
14219 for (; 0 < _instance2 - lastHostComponent; )
14220 instance = inCapturePhase(instance), _instance2--;
14221 for (; lastHostComponent--; ) {
14222 if (reactEventName === instance || null !== instance && reactEventName === instance.alternate) {
14223 inCapturePhase = reactEventName;
14224 break b;
14225 }
14226 reactEventName = inCapturePhase(reactEventName);
14227 instance = inCapturePhase(instance);
14228 }
14229 inCapturePhase = null;
14230 }
14231 else inCapturePhase = null;
14232 null !== SyntheticEventCtor && accumulateEnterLeaveListenersForEvent(
14233 dispatchQueue,
14234 reactName,
14235 SyntheticEventCtor,
14236 inCapturePhase,
14237 false
14238 );
14239 null !== reactEventType && null !== accumulateTargetOnly && accumulateEnterLeaveListenersForEvent(
14240 dispatchQueue,
14241 accumulateTargetOnly,
14242 reactEventType,
14243 inCapturePhase,
14244 true
14245 );
14246 }
14247 }
14248 }
14249 a: {
14250 reactName = targetInst ? getNodeFromInstance(targetInst) : window;
14251 SyntheticEventCtor = reactName.nodeName && reactName.nodeName.toLowerCase();
14252 if ("select" === SyntheticEventCtor || "input" === SyntheticEventCtor && "file" === reactName.type)
14253 var getTargetInstFunc = getTargetInstForChangeEvent;
14254 else if (isTextInputElement(reactName))
14255 if (isInputEventSupported)
14256 getTargetInstFunc = getTargetInstForInputOrChangeEvent;
14257 else {
14258 getTargetInstFunc = getTargetInstForInputEventPolyfill;
14259 var handleEventFunc = handleEventsForInputEventPolyfill;
14260 }
14261 else
14262 SyntheticEventCtor = reactName.nodeName, !SyntheticEventCtor || "input" !== SyntheticEventCtor.toLowerCase() || "checkbox" !== reactName.type && "radio" !== reactName.type ? targetInst && isCustomElement(targetInst.elementType) && (getTargetInstFunc = getTargetInstForChangeEvent) : getTargetInstFunc = getTargetInstForClickEvent;
14263 if (getTargetInstFunc && (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))) {
14264 createAndAccumulateChangeEvent(
14265 dispatchQueue,
14266 getTargetInstFunc,
14267 nativeEvent,
14268 nativeEventTarget
14269 );
14270 break a;
14271 }
14272 handleEventFunc && handleEventFunc(domEventName, reactName, targetInst);
14273 "focusout" === domEventName && targetInst && "number" === reactName.type && null != targetInst.memoizedProps.value && setDefaultValue(reactName, "number", reactName.value);
14274 }
14275 handleEventFunc = targetInst ? getNodeFromInstance(targetInst) : window;
14276 switch (domEventName) {
14277 case "focusin":
14278 if (isTextInputElement(handleEventFunc) || "true" === handleEventFunc.contentEditable)
14279 activeElement = handleEventFunc, activeElementInst = targetInst, lastSelection = null;
14280 break;
14281 case "focusout":
14282 lastSelection = activeElementInst = activeElement = null;
14283 break;
14284 case "mousedown":
14285 mouseDown = true;
14286 break;
14287 case "contextmenu":
14288 case "mouseup":
14289 case "dragend":
14290 mouseDown = false;
14291 constructSelectEvent(
14292 dispatchQueue,
14293 nativeEvent,
14294 nativeEventTarget
14295 );
14296 break;
14297 case "selectionchange":
14298 if (skipSelectionChangeEvent) break;
14299 case "keydown":
14300 case "keyup":
14301 constructSelectEvent(
14302 dispatchQueue,
14303 nativeEvent,
14304 nativeEventTarget
14305 );
14306 }
14307 var fallbackData;
14308 if (canUseCompositionEvent)
14309 b: {
14310 switch (domEventName) {
14311 case "compositionstart":
14312 var eventType = "onCompositionStart";
14313 break b;
14314 case "compositionend":
14315 eventType = "onCompositionEnd";
14316 break b;
14317 case "compositionupdate":
14318 eventType = "onCompositionUpdate";
14319 break b;
14320 }
14321 eventType = void 0;
14322 }
14323 else
14324 isComposing ? isFallbackCompositionEnd(domEventName, nativeEvent) && (eventType = "onCompositionEnd") : "keydown" === domEventName && nativeEvent.keyCode === START_KEYCODE && (eventType = "onCompositionStart");
14325 eventType && (useFallbackCompositionData && "ko" !== nativeEvent.locale && (isComposing || "onCompositionStart" !== eventType ? "onCompositionEnd" === eventType && isComposing && (fallbackData = getData()) : (root = nativeEventTarget, startText = "value" in root ? root.value : root.textContent, isComposing = true)), handleEventFunc = accumulateTwoPhaseListeners(
14326 targetInst,
14327 eventType
14328 ), 0 < handleEventFunc.length && (eventType = new SyntheticCompositionEvent(
14329 eventType,
14330 domEventName,
14331 null,
14332 nativeEvent,
14333 nativeEventTarget
14334 ), dispatchQueue.push({
14335 event: eventType,
14336 listeners: handleEventFunc
14337 }), fallbackData ? eventType.data = fallbackData : (fallbackData = getDataFromCustomEvent(nativeEvent), null !== fallbackData && (eventType.data = fallbackData))));
14338 if (fallbackData = canUseTextInputEvent ? getNativeBeforeInputChars(domEventName, nativeEvent) : getFallbackBeforeInputChars(domEventName, nativeEvent))
14339 eventType = accumulateTwoPhaseListeners(
14340 targetInst,
14341 "onBeforeInput"
14342 ), 0 < eventType.length && (handleEventFunc = new SyntheticInputEvent(
14343 "onBeforeInput",
14344 "beforeinput",
14345 null,
14346 nativeEvent,
14347 nativeEventTarget
14348 ), dispatchQueue.push({
14349 event: handleEventFunc,
14350 listeners: eventType
14351 }), handleEventFunc.data = fallbackData);
14352 extractEvents$1(
14353 dispatchQueue,
14354 domEventName,
14355 targetInst,
14356 nativeEvent,
14357 nativeEventTarget
14358 );
14359 }
14360 processDispatchQueue(dispatchQueue, eventSystemFlags);
14361 });
14362 }
14363 function createDispatchListener(instance, listener, currentTarget) {
14364 return {
14365 instance,
14366 listener,
14367 currentTarget
14368 };
14369 }
14370 function accumulateTwoPhaseListeners(targetFiber, reactName) {
14371 for (var captureName = reactName + "Capture", listeners = []; null !== targetFiber; ) {
14372 var _instance3 = targetFiber, stateNode = _instance3.stateNode;
14373 _instance3 = _instance3.tag;
14374 5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3 || null === stateNode || (_instance3 = getListener(targetFiber, captureName), null != _instance3 && listeners.unshift(
14375 createDispatchListener(targetFiber, _instance3, stateNode)
14376 ), _instance3 = getListener(targetFiber, reactName), null != _instance3 && listeners.push(
14377 createDispatchListener(targetFiber, _instance3, stateNode)
14378 ));
14379 if (3 === targetFiber.tag) return listeners;
14380 targetFiber = targetFiber.return;
14381 }
14382 return [];
14383 }
14384 function getParent(inst) {
14385 if (null === inst) return null;
14386 do
14387 inst = inst.return;
14388 while (inst && 5 !== inst.tag && 27 !== inst.tag);
14389 return inst ? inst : null;
14390 }
14391 function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
14392 for (var registrationName = event._reactName, listeners = []; null !== target && target !== common; ) {
14393 var _instance4 = target, alternate = _instance4.alternate, stateNode = _instance4.stateNode;
14394 _instance4 = _instance4.tag;
14395 if (null !== alternate && alternate === common) break;
14396 5 !== _instance4 && 26 !== _instance4 && 27 !== _instance4 || null === stateNode || (alternate = stateNode, inCapturePhase ? (stateNode = getListener(target, registrationName), null != stateNode && listeners.unshift(
14397 createDispatchListener(target, stateNode, alternate)
14398 )) : inCapturePhase || (stateNode = getListener(target, registrationName), null != stateNode && listeners.push(
14399 createDispatchListener(target, stateNode, alternate)
14400 )));
14401 target = target.return;
14402 }
14403 0 !== listeners.length && dispatchQueue.push({ event, listeners });
14404 }
14405 function validatePropertiesInDevelopment(type, props) {
14406 validateProperties$2(type, props);
14407 "input" !== type && "textarea" !== type && "select" !== type || null == props || null !== props.value || didWarnValueNull || (didWarnValueNull = true, "select" === type && props.multiple ? console.error(
14408 "`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.",
14409 type
14410 ) : console.error(
14411 "`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",
14412 type
14413 ));
14414 var eventRegistry = {
14415 registrationNameDependencies,
14416 possibleRegistrationNames
14417 };
14418 isCustomElement(type) || "string" === typeof props.is || warnUnknownProperties(type, props, eventRegistry);
14419 props.contentEditable && !props.suppressContentEditableWarning && null != props.children && console.error(
14420 "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."
14421 );
14422 }
14423 function warnForPropDifference(propName, serverValue, clientValue, serverDifferences) {
14424 serverValue !== clientValue && (clientValue = normalizeMarkupForTextOrAttribute(clientValue), normalizeMarkupForTextOrAttribute(serverValue) !== clientValue && (serverDifferences[propName] = serverValue));
14425 }
14426 function warnForExtraAttributes(domElement, attributeNames, serverDifferences) {
14427 attributeNames.forEach(function(attributeName) {
14428 serverDifferences[getPropNameFromAttributeName(attributeName)] = "style" === attributeName ? getStylesObjectFromElement(domElement) : domElement.getAttribute(attributeName);
14429 });
14430 }
14431 function warnForInvalidEventListener(registrationName, listener) {
14432 false === listener ? console.error(
14433 "Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",
14434 registrationName,
14435 registrationName,
14436 registrationName
14437 ) : console.error(
14438 "Expected `%s` listener to be a function, instead got a value of `%s` type.",
14439 registrationName,
14440 typeof listener
14441 );
14442 }
14443 function normalizeHTML(parent, html) {
14444 parent = parent.namespaceURI === MATH_NAMESPACE || parent.namespaceURI === SVG_NAMESPACE ? parent.ownerDocument.createElementNS(
14445 parent.namespaceURI,
14446 parent.tagName
14447 ) : parent.ownerDocument.createElement(parent.tagName);
14448 parent.innerHTML = html;
14449 return parent.innerHTML;
14450 }
14451 function normalizeMarkupForTextOrAttribute(markup) {
14452 willCoercionThrow(markup) && (console.error(
14453 "The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",
14454 typeName(markup)
14455 ), testStringCoercion(markup));
14456 return ("string" === typeof markup ? markup : "" + markup).replace(NORMALIZE_NEWLINES_REGEX, "\n").replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, "");
14457 }
14458 function checkForUnmatchedText(serverText, clientText) {
14459 clientText = normalizeMarkupForTextOrAttribute(clientText);
14460 return normalizeMarkupForTextOrAttribute(serverText) === clientText ? true : false;
14461 }
14462 function setProp(domElement, tag, key, value, props, prevValue) {
14463 switch (key) {
14464 case "children":
14465 if ("string" === typeof value)
14466 validateTextNesting(value, tag, false), "body" === tag || "textarea" === tag && "" === value || setTextContent(domElement, value);
14467 else if ("number" === typeof value || "bigint" === typeof value)
14468 validateTextNesting("" + value, tag, false), "body" !== tag && setTextContent(domElement, "" + value);
14469 break;
14470 case "className":
14471 setValueForKnownAttribute(domElement, "class", value);
14472 break;
14473 case "tabIndex":
14474 setValueForKnownAttribute(domElement, "tabindex", value);
14475 break;
14476 case "dir":
14477 case "role":
14478 case "viewBox":
14479 case "width":
14480 case "height":
14481 setValueForKnownAttribute(domElement, key, value);
14482 break;
14483 case "style":
14484 setValueForStyles(domElement, value, prevValue);
14485 break;
14486 case "data":
14487 if ("object" !== tag) {
14488 setValueForKnownAttribute(domElement, "data", value);
14489 break;
14490 }
14491 case "src":
14492 case "href":
14493 if ("" === value && ("a" !== tag || "href" !== key)) {
14494 "src" === key ? console.error(
14495 'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
14496 key,
14497 key
14498 ) : console.error(
14499 'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
14500 key,
14501 key
14502 );
14503 domElement.removeAttribute(key);
14504 break;
14505 }
14506 if (null == value || "function" === typeof value || "symbol" === typeof value || "boolean" === typeof value) {
14507 domElement.removeAttribute(key);
14508 break;
14509 }
14510 checkAttributeStringCoercion(value, key);
14511 value = sanitizeURL("" + value);
14512 domElement.setAttribute(key, value);
14513 break;
14514 case "action":
14515 case "formAction":
14516 null != value && ("form" === tag ? "formAction" === key ? console.error(
14517 "You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."
14518 ) : "function" === typeof value && (null == props.encType && null == props.method || didWarnFormActionMethod || (didWarnFormActionMethod = true, console.error(
14519 "Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden."
14520 )), null == props.target || didWarnFormActionTarget || (didWarnFormActionTarget = true, console.error(
14521 "Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."
14522 ))) : "input" === tag || "button" === tag ? "action" === key ? console.error(
14523 "You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."
14524 ) : "input" !== tag || "submit" === props.type || "image" === props.type || didWarnFormActionType ? "button" !== tag || null == props.type || "submit" === props.type || didWarnFormActionType ? "function" === typeof value && (null == props.name || didWarnFormActionName || (didWarnFormActionName = true, console.error(
14525 'Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.'
14526 )), null == props.formEncType && null == props.formMethod || didWarnFormActionMethod || (didWarnFormActionMethod = true, console.error(
14527 "Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden."
14528 )), null == props.formTarget || didWarnFormActionTarget || (didWarnFormActionTarget = true, console.error(
14529 "Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."
14530 ))) : (didWarnFormActionType = true, console.error(
14531 'A button can only specify a formAction along with type="submit" or no type.'
14532 )) : (didWarnFormActionType = true, console.error(
14533 'An input can only specify a formAction along with type="submit" or type="image".'
14534 )) : "action" === key ? console.error(
14535 "You can only pass the action prop to <form>."
14536 ) : console.error(
14537 "You can only pass the formAction prop to <input> or <button>."
14538 ));
14539 if ("function" === typeof value) {
14540 domElement.setAttribute(
14541 key,
14542 "javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')"
14543 );
14544 break;
14545 } else
14546 "function" === typeof prevValue && ("formAction" === key ? ("input" !== tag && setProp(domElement, tag, "name", props.name, props, null), setProp(
14547 domElement,
14548 tag,
14549 "formEncType",
14550 props.formEncType,
14551 props,
14552 null
14553 ), setProp(
14554 domElement,
14555 tag,
14556 "formMethod",
14557 props.formMethod,
14558 props,
14559 null
14560 ), setProp(
14561 domElement,
14562 tag,
14563 "formTarget",
14564 props.formTarget,
14565 props,
14566 null
14567 )) : (setProp(
14568 domElement,
14569 tag,
14570 "encType",
14571 props.encType,
14572 props,
14573 null
14574 ), setProp(domElement, tag, "method", props.method, props, null), setProp(
14575 domElement,
14576 tag,
14577 "target",
14578 props.target,
14579 props,
14580 null
14581 )));
14582 if (null == value || "symbol" === typeof value || "boolean" === typeof value) {
14583 domElement.removeAttribute(key);
14584 break;
14585 }
14586 checkAttributeStringCoercion(value, key);
14587 value = sanitizeURL("" + value);
14588 domElement.setAttribute(key, value);
14589 break;
14590 case "onClick":
14591 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), domElement.onclick = noop$1);
14592 break;
14593 case "onScroll":
14594 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scroll", domElement));
14595 break;
14596 case "onScrollEnd":
14597 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scrollend", domElement));
14598 break;
14599 case "dangerouslySetInnerHTML":
14600 if (null != value) {
14601 if ("object" !== typeof value || !("__html" in value))
14602 throw Error(
14603 "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
14604 );
14605 key = value.__html;
14606 if (null != key) {
14607 if (null != props.children)
14608 throw Error(
14609 "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
14610 );
14611 domElement.innerHTML = key;
14612 }
14613 }
14614 break;
14615 case "multiple":
14616 domElement.multiple = value && "function" !== typeof value && "symbol" !== typeof value;
14617 break;
14618 case "muted":
14619 domElement.muted = value && "function" !== typeof value && "symbol" !== typeof value;
14620 break;
14621 case "suppressContentEditableWarning":
14622 case "suppressHydrationWarning":
14623 case "defaultValue":
14624 case "defaultChecked":
14625 case "innerHTML":
14626 case "ref":
14627 break;
14628 case "autoFocus":
14629 break;
14630 case "xlinkHref":
14631 if (null == value || "function" === typeof value || "boolean" === typeof value || "symbol" === typeof value) {
14632 domElement.removeAttribute("xlink:href");
14633 break;
14634 }
14635 checkAttributeStringCoercion(value, key);
14636 key = sanitizeURL("" + value);
14637 domElement.setAttributeNS(xlinkNamespace, "xlink:href", key);
14638 break;
14639 case "contentEditable":
14640 case "spellCheck":
14641 case "draggable":
14642 case "value":
14643 case "autoReverse":
14644 case "externalResourcesRequired":
14645 case "focusable":
14646 case "preserveAlpha":
14647 null != value && "function" !== typeof value && "symbol" !== typeof value ? (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, "" + value)) : domElement.removeAttribute(key);
14648 break;
14649 case "inert":
14650 "" !== value || didWarnForNewBooleanPropsWithEmptyValue[key] || (didWarnForNewBooleanPropsWithEmptyValue[key] = true, console.error(
14651 "Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
14652 key
14653 ));
14654 case "allowFullScreen":
14655 case "async":
14656 case "autoPlay":
14657 case "controls":
14658 case "default":
14659 case "defer":
14660 case "disabled":
14661 case "disablePictureInPicture":
14662 case "disableRemotePlayback":
14663 case "formNoValidate":
14664 case "hidden":
14665 case "loop":
14666 case "noModule":
14667 case "noValidate":
14668 case "open":
14669 case "playsInline":
14670 case "readOnly":
14671 case "required":
14672 case "reversed":
14673 case "scoped":
14674 case "seamless":
14675 case "itemScope":
14676 value && "function" !== typeof value && "symbol" !== typeof value ? domElement.setAttribute(key, "") : domElement.removeAttribute(key);
14677 break;
14678 case "capture":
14679 case "download":
14680 true === value ? domElement.setAttribute(key, "") : false !== value && null != value && "function" !== typeof value && "symbol" !== typeof value ? (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, value)) : domElement.removeAttribute(key);
14681 break;
14682 case "cols":
14683 case "rows":
14684 case "size":
14685 case "span":
14686 null != value && "function" !== typeof value && "symbol" !== typeof value && !isNaN(value) && 1 <= value ? (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, value)) : domElement.removeAttribute(key);
14687 break;
14688 case "rowSpan":
14689 case "start":
14690 null == value || "function" === typeof value || "symbol" === typeof value || isNaN(value) ? domElement.removeAttribute(key) : (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, value));
14691 break;
14692 case "popover":
14693 listenToNonDelegatedEvent("beforetoggle", domElement);
14694 listenToNonDelegatedEvent("toggle", domElement);
14695 setValueForAttribute(domElement, "popover", value);
14696 break;
14697 case "xlinkActuate":
14698 setValueForNamespacedAttribute(
14699 domElement,
14700 xlinkNamespace,
14701 "xlink:actuate",
14702 value
14703 );
14704 break;
14705 case "xlinkArcrole":
14706 setValueForNamespacedAttribute(
14707 domElement,
14708 xlinkNamespace,
14709 "xlink:arcrole",
14710 value
14711 );
14712 break;
14713 case "xlinkRole":
14714 setValueForNamespacedAttribute(
14715 domElement,
14716 xlinkNamespace,
14717 "xlink:role",
14718 value
14719 );
14720 break;
14721 case "xlinkShow":
14722 setValueForNamespacedAttribute(
14723 domElement,
14724 xlinkNamespace,
14725 "xlink:show",
14726 value
14727 );
14728 break;
14729 case "xlinkTitle":
14730 setValueForNamespacedAttribute(
14731 domElement,
14732 xlinkNamespace,
14733 "xlink:title",
14734 value
14735 );
14736 break;
14737 case "xlinkType":
14738 setValueForNamespacedAttribute(
14739 domElement,
14740 xlinkNamespace,
14741 "xlink:type",
14742 value
14743 );
14744 break;
14745 case "xmlBase":
14746 setValueForNamespacedAttribute(
14747 domElement,
14748 xmlNamespace,
14749 "xml:base",
14750 value
14751 );
14752 break;
14753 case "xmlLang":
14754 setValueForNamespacedAttribute(
14755 domElement,
14756 xmlNamespace,
14757 "xml:lang",
14758 value
14759 );
14760 break;
14761 case "xmlSpace":
14762 setValueForNamespacedAttribute(
14763 domElement,
14764 xmlNamespace,
14765 "xml:space",
14766 value
14767 );
14768 break;
14769 case "is":
14770 null != prevValue && console.error(
14771 'Cannot update the "is" prop after it has been initialized.'
14772 );
14773 setValueForAttribute(domElement, "is", value);
14774 break;
14775 case "innerText":
14776 case "textContent":
14777 break;
14778 case "popoverTarget":
14779 didWarnPopoverTargetObject || null == value || "object" !== typeof value || (didWarnPopoverTargetObject = true, console.error(
14780 "The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",
14781 value
14782 ));
14783 default:
14784 !(2 < key.length) || "o" !== key[0] && "O" !== key[0] || "n" !== key[1] && "N" !== key[1] ? (key = getAttributeAlias(key), setValueForAttribute(domElement, key, value)) : registrationNameDependencies.hasOwnProperty(key) && null != value && "function" !== typeof value && warnForInvalidEventListener(key, value);
14785 }
14786 }
14787 function setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {
14788 switch (key) {
14789 case "style":
14790 setValueForStyles(domElement, value, prevValue);
14791 break;
14792 case "dangerouslySetInnerHTML":
14793 if (null != value) {
14794 if ("object" !== typeof value || !("__html" in value))
14795 throw Error(
14796 "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
14797 );
14798 key = value.__html;
14799 if (null != key) {
14800 if (null != props.children)
14801 throw Error(
14802 "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
14803 );
14804 domElement.innerHTML = key;
14805 }
14806 }
14807 break;
14808 case "children":
14809 "string" === typeof value ? setTextContent(domElement, value) : ("number" === typeof value || "bigint" === typeof value) && setTextContent(domElement, "" + value);
14810 break;
14811 case "onScroll":
14812 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scroll", domElement));
14813 break;
14814 case "onScrollEnd":
14815 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scrollend", domElement));
14816 break;
14817 case "onClick":
14818 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), domElement.onclick = noop$1);
14819 break;
14820 case "suppressContentEditableWarning":
14821 case "suppressHydrationWarning":
14822 case "innerHTML":
14823 case "ref":
14824 break;
14825 case "innerText":
14826 case "textContent":
14827 break;
14828 default:
14829 if (registrationNameDependencies.hasOwnProperty(key))
14830 null != value && "function" !== typeof value && warnForInvalidEventListener(key, value);
14831 else
14832 a: {
14833 if ("o" === key[0] && "n" === key[1] && (props = key.endsWith("Capture"), tag = key.slice(2, props ? key.length - 7 : void 0), prevValue = domElement[internalPropsKey] || null, prevValue = null != prevValue ? prevValue[key] : null, "function" === typeof prevValue && domElement.removeEventListener(tag, prevValue, props), "function" === typeof value)) {
14834 "function" !== typeof prevValue && null !== prevValue && (key in domElement ? domElement[key] = null : domElement.hasAttribute(key) && domElement.removeAttribute(key));
14835 domElement.addEventListener(tag, value, props);
14836 break a;
14837 }
14838 key in domElement ? domElement[key] = value : true === value ? domElement.setAttribute(key, "") : setValueForAttribute(domElement, key, value);
14839 }
14840 }
14841 }
14842 function setInitialProperties(domElement, tag, props) {
14843 validatePropertiesInDevelopment(tag, props);
14844 switch (tag) {
14845 case "div":
14846 case "span":
14847 case "svg":
14848 case "path":
14849 case "a":
14850 case "g":
14851 case "p":
14852 case "li":
14853 break;
14854 case "img":
14855 listenToNonDelegatedEvent("error", domElement);
14856 listenToNonDelegatedEvent("load", domElement);
14857 var hasSrc = false, hasSrcSet = false, propKey;
14858 for (propKey in props)
14859 if (props.hasOwnProperty(propKey)) {
14860 var propValue = props[propKey];
14861 if (null != propValue)
14862 switch (propKey) {
14863 case "src":
14864 hasSrc = true;
14865 break;
14866 case "srcSet":
14867 hasSrcSet = true;
14868 break;
14869 case "children":
14870 case "dangerouslySetInnerHTML":
14871 throw Error(
14872 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
14873 );
14874 default:
14875 setProp(domElement, tag, propKey, propValue, props, null);
14876 }
14877 }
14878 hasSrcSet && setProp(domElement, tag, "srcSet", props.srcSet, props, null);
14879 hasSrc && setProp(domElement, tag, "src", props.src, props, null);
14880 return;
14881 case "input":
14882 checkControlledValueProps("input", props);
14883 listenToNonDelegatedEvent("invalid", domElement);
14884 var defaultValue = propKey = propValue = hasSrcSet = null, checked = null, defaultChecked = null;
14885 for (hasSrc in props)
14886 if (props.hasOwnProperty(hasSrc)) {
14887 var _propValue = props[hasSrc];
14888 if (null != _propValue)
14889 switch (hasSrc) {
14890 case "name":
14891 hasSrcSet = _propValue;
14892 break;
14893 case "type":
14894 propValue = _propValue;
14895 break;
14896 case "checked":
14897 checked = _propValue;
14898 break;
14899 case "defaultChecked":
14900 defaultChecked = _propValue;
14901 break;
14902 case "value":
14903 propKey = _propValue;
14904 break;
14905 case "defaultValue":
14906 defaultValue = _propValue;
14907 break;
14908 case "children":
14909 case "dangerouslySetInnerHTML":
14910 if (null != _propValue)
14911 throw Error(
14912 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
14913 );
14914 break;
14915 default:
14916 setProp(domElement, tag, hasSrc, _propValue, props, null);
14917 }
14918 }
14919 validateInputProps(domElement, props);
14920 initInput(
14921 domElement,
14922 propKey,
14923 defaultValue,
14924 checked,
14925 defaultChecked,
14926 propValue,
14927 hasSrcSet,
14928 false
14929 );
14930 return;
14931 case "select":
14932 checkControlledValueProps("select", props);
14933 listenToNonDelegatedEvent("invalid", domElement);
14934 hasSrc = propValue = propKey = null;
14935 for (hasSrcSet in props)
14936 if (props.hasOwnProperty(hasSrcSet) && (defaultValue = props[hasSrcSet], null != defaultValue))
14937 switch (hasSrcSet) {
14938 case "value":
14939 propKey = defaultValue;
14940 break;
14941 case "defaultValue":
14942 propValue = defaultValue;
14943 break;
14944 case "multiple":
14945 hasSrc = defaultValue;
14946 default:
14947 setProp(
14948 domElement,
14949 tag,
14950 hasSrcSet,
14951 defaultValue,
14952 props,
14953 null
14954 );
14955 }
14956 validateSelectProps(domElement, props);
14957 tag = propKey;
14958 props = propValue;
14959 domElement.multiple = !!hasSrc;
14960 null != tag ? updateOptions(domElement, !!hasSrc, tag, false) : null != props && updateOptions(domElement, !!hasSrc, props, true);
14961 return;
14962 case "textarea":
14963 checkControlledValueProps("textarea", props);
14964 listenToNonDelegatedEvent("invalid", domElement);
14965 propKey = hasSrcSet = hasSrc = null;
14966 for (propValue in props)
14967 if (props.hasOwnProperty(propValue) && (defaultValue = props[propValue], null != defaultValue))
14968 switch (propValue) {
14969 case "value":
14970 hasSrc = defaultValue;
14971 break;
14972 case "defaultValue":
14973 hasSrcSet = defaultValue;
14974 break;
14975 case "children":
14976 propKey = defaultValue;
14977 break;
14978 case "dangerouslySetInnerHTML":
14979 if (null != defaultValue)
14980 throw Error(
14981 "`dangerouslySetInnerHTML` does not make sense on <textarea>."
14982 );
14983 break;
14984 default:
14985 setProp(
14986 domElement,
14987 tag,
14988 propValue,
14989 defaultValue,
14990 props,
14991 null
14992 );
14993 }
14994 validateTextareaProps(domElement, props);
14995 initTextarea(domElement, hasSrc, hasSrcSet, propKey);
14996 return;
14997 case "option":
14998 validateOptionProps(domElement, props);
14999 for (checked in props)
15000 if (props.hasOwnProperty(checked) && (hasSrc = props[checked], null != hasSrc))
15001 switch (checked) {
15002 case "selected":
15003 domElement.selected = hasSrc && "function" !== typeof hasSrc && "symbol" !== typeof hasSrc;
15004 break;
15005 default:
15006 setProp(domElement, tag, checked, hasSrc, props, null);
15007 }
15008 return;
15009 case "dialog":
15010 listenToNonDelegatedEvent("beforetoggle", domElement);
15011 listenToNonDelegatedEvent("toggle", domElement);
15012 listenToNonDelegatedEvent("cancel", domElement);
15013 listenToNonDelegatedEvent("close", domElement);
15014 break;
15015 case "iframe":
15016 case "object":
15017 listenToNonDelegatedEvent("load", domElement);
15018 break;
15019 case "video":
15020 case "audio":
15021 for (hasSrc = 0; hasSrc < mediaEventTypes.length; hasSrc++)
15022 listenToNonDelegatedEvent(mediaEventTypes[hasSrc], domElement);
15023 break;
15024 case "image":
15025 listenToNonDelegatedEvent("error", domElement);
15026 listenToNonDelegatedEvent("load", domElement);
15027 break;
15028 case "details":
15029 listenToNonDelegatedEvent("toggle", domElement);
15030 break;
15031 case "embed":
15032 case "source":
15033 case "link":
15034 listenToNonDelegatedEvent("error", domElement), listenToNonDelegatedEvent("load", domElement);
15035 case "area":
15036 case "base":
15037 case "br":
15038 case "col":
15039 case "hr":
15040 case "keygen":
15041 case "meta":
15042 case "param":
15043 case "track":
15044 case "wbr":
15045 case "menuitem":
15046 for (defaultChecked in props)
15047 if (props.hasOwnProperty(defaultChecked) && (hasSrc = props[defaultChecked], null != hasSrc))
15048 switch (defaultChecked) {
15049 case "children":
15050 case "dangerouslySetInnerHTML":
15051 throw Error(
15052 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
15053 );
15054 default:
15055 setProp(domElement, tag, defaultChecked, hasSrc, props, null);
15056 }
15057 return;
15058 default:
15059 if (isCustomElement(tag)) {
15060 for (_propValue in props)
15061 props.hasOwnProperty(_propValue) && (hasSrc = props[_propValue], void 0 !== hasSrc && setPropOnCustomElement(
15062 domElement,
15063 tag,
15064 _propValue,
15065 hasSrc,
15066 props,
15067 void 0
15068 ));
15069 return;
15070 }
15071 }
15072 for (defaultValue in props)
15073 props.hasOwnProperty(defaultValue) && (hasSrc = props[defaultValue], null != hasSrc && setProp(domElement, tag, defaultValue, hasSrc, props, null));
15074 }
15075 function updateProperties(domElement, tag, lastProps, nextProps) {
15076 validatePropertiesInDevelopment(tag, nextProps);
15077 switch (tag) {
15078 case "div":
15079 case "span":
15080 case "svg":
15081 case "path":
15082 case "a":
15083 case "g":
15084 case "p":
15085 case "li":
15086 break;
15087 case "input":
15088 var name = null, type = null, value = null, defaultValue = null, lastDefaultValue = null, checked = null, defaultChecked = null;
15089 for (propKey in lastProps) {
15090 var lastProp = lastProps[propKey];
15091 if (lastProps.hasOwnProperty(propKey) && null != lastProp)
15092 switch (propKey) {
15093 case "checked":
15094 break;
15095 case "value":
15096 break;
15097 case "defaultValue":
15098 lastDefaultValue = lastProp;
15099 default:
15100 nextProps.hasOwnProperty(propKey) || setProp(
15101 domElement,
15102 tag,
15103 propKey,
15104 null,
15105 nextProps,
15106 lastProp
15107 );
15108 }
15109 }
15110 for (var _propKey8 in nextProps) {
15111 var propKey = nextProps[_propKey8];
15112 lastProp = lastProps[_propKey8];
15113 if (nextProps.hasOwnProperty(_propKey8) && (null != propKey || null != lastProp))
15114 switch (_propKey8) {
15115 case "type":
15116 type = propKey;
15117 break;
15118 case "name":
15119 name = propKey;
15120 break;
15121 case "checked":
15122 checked = propKey;
15123 break;
15124 case "defaultChecked":
15125 defaultChecked = propKey;
15126 break;
15127 case "value":
15128 value = propKey;
15129 break;
15130 case "defaultValue":
15131 defaultValue = propKey;
15132 break;
15133 case "children":
15134 case "dangerouslySetInnerHTML":
15135 if (null != propKey)
15136 throw Error(
15137 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
15138 );
15139 break;
15140 default:
15141 propKey !== lastProp && setProp(
15142 domElement,
15143 tag,
15144 _propKey8,
15145 propKey,
15146 nextProps,
15147 lastProp
15148 );
15149 }
15150 }
15151 tag = "checkbox" === lastProps.type || "radio" === lastProps.type ? null != lastProps.checked : null != lastProps.value;
15152 nextProps = "checkbox" === nextProps.type || "radio" === nextProps.type ? null != nextProps.checked : null != nextProps.value;
15153 tag || !nextProps || didWarnUncontrolledToControlled || (console.error(
15154 "A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"
15155 ), didWarnUncontrolledToControlled = true);
15156 !tag || nextProps || didWarnControlledToUncontrolled || (console.error(
15157 "A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"
15158 ), didWarnControlledToUncontrolled = true);
15159 updateInput(
15160 domElement,
15161 value,
15162 defaultValue,
15163 lastDefaultValue,
15164 checked,
15165 defaultChecked,
15166 type,
15167 name
15168 );
15169 return;
15170 case "select":
15171 propKey = value = defaultValue = _propKey8 = null;
15172 for (type in lastProps)
15173 if (lastDefaultValue = lastProps[type], lastProps.hasOwnProperty(type) && null != lastDefaultValue)
15174 switch (type) {
15175 case "value":
15176 break;
15177 case "multiple":
15178 propKey = lastDefaultValue;
15179 default:
15180 nextProps.hasOwnProperty(type) || setProp(
15181 domElement,
15182 tag,
15183 type,
15184 null,
15185 nextProps,
15186 lastDefaultValue
15187 );
15188 }
15189 for (name in nextProps)
15190 if (type = nextProps[name], lastDefaultValue = lastProps[name], nextProps.hasOwnProperty(name) && (null != type || null != lastDefaultValue))
15191 switch (name) {
15192 case "value":
15193 _propKey8 = type;
15194 break;
15195 case "defaultValue":
15196 defaultValue = type;
15197 break;
15198 case "multiple":
15199 value = type;
15200 default:
15201 type !== lastDefaultValue && setProp(
15202 domElement,
15203 tag,
15204 name,
15205 type,
15206 nextProps,
15207 lastDefaultValue
15208 );
15209 }
15210 nextProps = defaultValue;
15211 tag = value;
15212 lastProps = propKey;
15213 null != _propKey8 ? updateOptions(domElement, !!tag, _propKey8, false) : !!lastProps !== !!tag && (null != nextProps ? updateOptions(domElement, !!tag, nextProps, true) : updateOptions(domElement, !!tag, tag ? [] : "", false));
15214 return;
15215 case "textarea":
15216 propKey = _propKey8 = null;
15217 for (defaultValue in lastProps)
15218 if (name = lastProps[defaultValue], lastProps.hasOwnProperty(defaultValue) && null != name && !nextProps.hasOwnProperty(defaultValue))
15219 switch (defaultValue) {
15220 case "value":
15221 break;
15222 case "children":
15223 break;
15224 default:
15225 setProp(domElement, tag, defaultValue, null, nextProps, name);
15226 }
15227 for (value in nextProps)
15228 if (name = nextProps[value], type = lastProps[value], nextProps.hasOwnProperty(value) && (null != name || null != type))
15229 switch (value) {
15230 case "value":
15231 _propKey8 = name;
15232 break;
15233 case "defaultValue":
15234 propKey = name;
15235 break;
15236 case "children":
15237 break;
15238 case "dangerouslySetInnerHTML":
15239 if (null != name)
15240 throw Error(
15241 "`dangerouslySetInnerHTML` does not make sense on <textarea>."
15242 );
15243 break;
15244 default:
15245 name !== type && setProp(domElement, tag, value, name, nextProps, type);
15246 }
15247 updateTextarea(domElement, _propKey8, propKey);
15248 return;
15249 case "option":
15250 for (var _propKey13 in lastProps)
15251 if (_propKey8 = lastProps[_propKey13], lastProps.hasOwnProperty(_propKey13) && null != _propKey8 && !nextProps.hasOwnProperty(_propKey13))
15252 switch (_propKey13) {
15253 case "selected":
15254 domElement.selected = false;
15255 break;
15256 default:
15257 setProp(
15258 domElement,
15259 tag,
15260 _propKey13,
15261 null,
15262 nextProps,
15263 _propKey8
15264 );
15265 }
15266 for (lastDefaultValue in nextProps)
15267 if (_propKey8 = nextProps[lastDefaultValue], propKey = lastProps[lastDefaultValue], nextProps.hasOwnProperty(lastDefaultValue) && _propKey8 !== propKey && (null != _propKey8 || null != propKey))
15268 switch (lastDefaultValue) {
15269 case "selected":
15270 domElement.selected = _propKey8 && "function" !== typeof _propKey8 && "symbol" !== typeof _propKey8;
15271 break;
15272 default:
15273 setProp(
15274 domElement,
15275 tag,
15276 lastDefaultValue,
15277 _propKey8,
15278 nextProps,
15279 propKey
15280 );
15281 }
15282 return;
15283 case "img":
15284 case "link":
15285 case "area":
15286 case "base":
15287 case "br":
15288 case "col":
15289 case "embed":
15290 case "hr":
15291 case "keygen":
15292 case "meta":
15293 case "param":
15294 case "source":
15295 case "track":
15296 case "wbr":
15297 case "menuitem":
15298 for (var _propKey15 in lastProps)
15299 _propKey8 = lastProps[_propKey15], lastProps.hasOwnProperty(_propKey15) && null != _propKey8 && !nextProps.hasOwnProperty(_propKey15) && setProp(
15300 domElement,
15301 tag,
15302 _propKey15,
15303 null,
15304 nextProps,
15305 _propKey8
15306 );
15307 for (checked in nextProps)
15308 if (_propKey8 = nextProps[checked], propKey = lastProps[checked], nextProps.hasOwnProperty(checked) && _propKey8 !== propKey && (null != _propKey8 || null != propKey))
15309 switch (checked) {
15310 case "children":
15311 case "dangerouslySetInnerHTML":
15312 if (null != _propKey8)
15313 throw Error(
15314 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
15315 );
15316 break;
15317 default:
15318 setProp(
15319 domElement,
15320 tag,
15321 checked,
15322 _propKey8,
15323 nextProps,
15324 propKey
15325 );
15326 }
15327 return;
15328 default:
15329 if (isCustomElement(tag)) {
15330 for (var _propKey17 in lastProps)
15331 _propKey8 = lastProps[_propKey17], lastProps.hasOwnProperty(_propKey17) && void 0 !== _propKey8 && !nextProps.hasOwnProperty(_propKey17) && setPropOnCustomElement(
15332 domElement,
15333 tag,
15334 _propKey17,
15335 void 0,
15336 nextProps,
15337 _propKey8
15338 );
15339 for (defaultChecked in nextProps)
15340 _propKey8 = nextProps[defaultChecked], propKey = lastProps[defaultChecked], !nextProps.hasOwnProperty(defaultChecked) || _propKey8 === propKey || void 0 === _propKey8 && void 0 === propKey || setPropOnCustomElement(
15341 domElement,
15342 tag,
15343 defaultChecked,
15344 _propKey8,
15345 nextProps,
15346 propKey
15347 );
15348 return;
15349 }
15350 }
15351 for (var _propKey19 in lastProps)
15352 _propKey8 = lastProps[_propKey19], lastProps.hasOwnProperty(_propKey19) && null != _propKey8 && !nextProps.hasOwnProperty(_propKey19) && setProp(domElement, tag, _propKey19, null, nextProps, _propKey8);
15353 for (lastProp in nextProps)
15354 _propKey8 = nextProps[lastProp], propKey = lastProps[lastProp], !nextProps.hasOwnProperty(lastProp) || _propKey8 === propKey || null == _propKey8 && null == propKey || setProp(domElement, tag, lastProp, _propKey8, nextProps, propKey);
15355 }
15356 function getPropNameFromAttributeName(attrName) {
15357 switch (attrName) {
15358 case "class":
15359 return "className";
15360 case "for":
15361 return "htmlFor";
15362 default:
15363 return attrName;
15364 }
15365 }
15366 function getStylesObjectFromElement(domElement) {
15367 var serverValueInObjectForm = {};
15368 domElement = domElement.style;
15369 for (var i = 0; i < domElement.length; i++) {
15370 var styleName = domElement[i];
15371 serverValueInObjectForm[styleName] = domElement.getPropertyValue(styleName);
15372 }
15373 return serverValueInObjectForm;
15374 }
15375 function diffHydratedStyles(domElement, value$jscomp$0, serverDifferences) {
15376 if (null != value$jscomp$0 && "object" !== typeof value$jscomp$0)
15377 console.error(
15378 "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
15379 );
15380 else {
15381 var clientValue;
15382 var delimiter = clientValue = "", styleName;
15383 for (styleName in value$jscomp$0)
15384 if (value$jscomp$0.hasOwnProperty(styleName)) {
15385 var value = value$jscomp$0[styleName];
15386 null != value && "boolean" !== typeof value && "" !== value && (0 === styleName.indexOf("--") ? (checkCSSPropertyStringCoercion(value, styleName), clientValue += delimiter + styleName + ":" + ("" + value).trim()) : "number" !== typeof value || 0 === value || unitlessNumbers.has(styleName) ? (checkCSSPropertyStringCoercion(value, styleName), clientValue += delimiter + styleName.replace(uppercasePattern, "-$1").toLowerCase().replace(msPattern$1, "-ms-") + ":" + ("" + value).trim()) : clientValue += delimiter + styleName.replace(uppercasePattern, "-$1").toLowerCase().replace(msPattern$1, "-ms-") + ":" + value + "px", delimiter = ";");
15387 }
15388 clientValue = clientValue || null;
15389 value$jscomp$0 = domElement.getAttribute("style");
15390 value$jscomp$0 !== clientValue && (clientValue = normalizeMarkupForTextOrAttribute(clientValue), normalizeMarkupForTextOrAttribute(value$jscomp$0) !== clientValue && (serverDifferences.style = getStylesObjectFromElement(domElement)));
15391 }
15392 }
15393 function hydrateAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
15394 extraAttributes.delete(attributeName);
15395 domElement = domElement.getAttribute(attributeName);
15396 if (null === domElement)
15397 switch (typeof value) {
15398 case "undefined":
15399 case "function":
15400 case "symbol":
15401 case "boolean":
15402 return;
15403 }
15404 else if (null != value)
15405 switch (typeof value) {
15406 case "function":
15407 case "symbol":
15408 case "boolean":
15409 break;
15410 default:
15411 if (checkAttributeStringCoercion(value, propKey), domElement === "" + value)
15412 return;
15413 }
15414 warnForPropDifference(propKey, domElement, value, serverDifferences);
15415 }
15416 function hydrateBooleanAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
15417 extraAttributes.delete(attributeName);
15418 domElement = domElement.getAttribute(attributeName);
15419 if (null === domElement) {
15420 switch (typeof value) {
15421 case "function":
15422 case "symbol":
15423 return;
15424 }
15425 if (!value) return;
15426 } else
15427 switch (typeof value) {
15428 case "function":
15429 case "symbol":
15430 break;
15431 default:
15432 if (value) return;
15433 }
15434 warnForPropDifference(propKey, domElement, value, serverDifferences);
15435 }
15436 function hydrateBooleanishAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
15437 extraAttributes.delete(attributeName);
15438 domElement = domElement.getAttribute(attributeName);
15439 if (null === domElement)
15440 switch (typeof value) {
15441 case "undefined":
15442 case "function":
15443 case "symbol":
15444 return;
15445 }
15446 else if (null != value)
15447 switch (typeof value) {
15448 case "function":
15449 case "symbol":
15450 break;
15451 default:
15452 if (checkAttributeStringCoercion(value, attributeName), domElement === "" + value)
15453 return;
15454 }
15455 warnForPropDifference(propKey, domElement, value, serverDifferences);
15456 }
15457 function hydrateNumericAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
15458 extraAttributes.delete(attributeName);
15459 domElement = domElement.getAttribute(attributeName);
15460 if (null === domElement)
15461 switch (typeof value) {
15462 case "undefined":
15463 case "function":
15464 case "symbol":
15465 case "boolean":
15466 return;
15467 default:
15468 if (isNaN(value)) return;
15469 }
15470 else if (null != value)
15471 switch (typeof value) {
15472 case "function":
15473 case "symbol":
15474 case "boolean":
15475 break;
15476 default:
15477 if (!isNaN(value) && (checkAttributeStringCoercion(value, propKey), domElement === "" + value))
15478 return;
15479 }
15480 warnForPropDifference(propKey, domElement, value, serverDifferences);
15481 }
15482 function hydrateSanitizedAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
15483 extraAttributes.delete(attributeName);
15484 domElement = domElement.getAttribute(attributeName);
15485 if (null === domElement)
15486 switch (typeof value) {
15487 case "undefined":
15488 case "function":
15489 case "symbol":
15490 case "boolean":
15491 return;
15492 }
15493 else if (null != value)
15494 switch (typeof value) {
15495 case "function":
15496 case "symbol":
15497 case "boolean":
15498 break;
15499 default:
15500 if (checkAttributeStringCoercion(value, propKey), attributeName = sanitizeURL("" + value), domElement === attributeName)
15501 return;
15502 }
15503 warnForPropDifference(propKey, domElement, value, serverDifferences);
15504 }
15505 function diffHydratedProperties(domElement, tag, props, hostContext) {
15506 for (var serverDifferences = {}, extraAttributes = /* @__PURE__ */ new Set(), attributes = domElement.attributes, i = 0; i < attributes.length; i++)
15507 switch (attributes[i].name.toLowerCase()) {
15508 case "value":
15509 break;
15510 case "checked":
15511 break;
15512 case "selected":
15513 break;
15514 default:
15515 extraAttributes.add(attributes[i].name);
15516 }
15517 if (isCustomElement(tag))
15518 for (var propKey in props) {
15519 if (props.hasOwnProperty(propKey)) {
15520 var value = props[propKey];
15521 if (null != value) {
15522 if (registrationNameDependencies.hasOwnProperty(propKey))
15523 "function" !== typeof value && warnForInvalidEventListener(propKey, value);
15524 else if (true !== props.suppressHydrationWarning)
15525 switch (propKey) {
15526 case "children":
15527 "string" !== typeof value && "number" !== typeof value || warnForPropDifference(
15528 "children",
15529 domElement.textContent,
15530 value,
15531 serverDifferences
15532 );
15533 continue;
15534 case "suppressContentEditableWarning":
15535 case "suppressHydrationWarning":
15536 case "defaultValue":
15537 case "defaultChecked":
15538 case "innerHTML":
15539 case "ref":
15540 continue;
15541 case "dangerouslySetInnerHTML":
15542 attributes = domElement.innerHTML;
15543 value = value ? value.__html : void 0;
15544 null != value && (value = normalizeHTML(domElement, value), warnForPropDifference(
15545 propKey,
15546 attributes,
15547 value,
15548 serverDifferences
15549 ));
15550 continue;
15551 case "style":
15552 extraAttributes.delete(propKey);
15553 diffHydratedStyles(domElement, value, serverDifferences);
15554 continue;
15555 case "offsetParent":
15556 case "offsetTop":
15557 case "offsetLeft":
15558 case "offsetWidth":
15559 case "offsetHeight":
15560 case "isContentEditable":
15561 case "outerText":
15562 case "outerHTML":
15563 extraAttributes.delete(propKey.toLowerCase());
15564 console.error(
15565 "Assignment to read-only property will result in a no-op: `%s`",
15566 propKey
15567 );
15568 continue;
15569 case "className":
15570 extraAttributes.delete("class");
15571 attributes = getValueForAttributeOnCustomComponent(
15572 domElement,
15573 "class",
15574 value
15575 );
15576 warnForPropDifference(
15577 "className",
15578 attributes,
15579 value,
15580 serverDifferences
15581 );
15582 continue;
15583 default:
15584 hostContext.context === HostContextNamespaceNone && "svg" !== tag && "math" !== tag ? extraAttributes.delete(propKey.toLowerCase()) : extraAttributes.delete(propKey), attributes = getValueForAttributeOnCustomComponent(
15585 domElement,
15586 propKey,
15587 value
15588 ), warnForPropDifference(
15589 propKey,
15590 attributes,
15591 value,
15592 serverDifferences
15593 );
15594 }
15595 }
15596 }
15597 }
15598 else
15599 for (value in props)
15600 if (props.hasOwnProperty(value) && (propKey = props[value], null != propKey)) {
15601 if (registrationNameDependencies.hasOwnProperty(value))
15602 "function" !== typeof propKey && warnForInvalidEventListener(value, propKey);
15603 else if (true !== props.suppressHydrationWarning)
15604 switch (value) {
15605 case "children":
15606 "string" !== typeof propKey && "number" !== typeof propKey || warnForPropDifference(
15607 "children",
15608 domElement.textContent,
15609 propKey,
15610 serverDifferences
15611 );
15612 continue;
15613 case "suppressContentEditableWarning":
15614 case "suppressHydrationWarning":
15615 case "value":
15616 case "checked":
15617 case "selected":
15618 case "defaultValue":
15619 case "defaultChecked":
15620 case "innerHTML":
15621 case "ref":
15622 continue;
15623 case "dangerouslySetInnerHTML":
15624 attributes = domElement.innerHTML;
15625 propKey = propKey ? propKey.__html : void 0;
15626 null != propKey && (propKey = normalizeHTML(domElement, propKey), attributes !== propKey && (serverDifferences[value] = { __html: attributes }));
15627 continue;
15628 case "className":
15629 hydrateAttribute(
15630 domElement,
15631 value,
15632 "class",
15633 propKey,
15634 extraAttributes,
15635 serverDifferences
15636 );
15637 continue;
15638 case "tabIndex":
15639 hydrateAttribute(
15640 domElement,
15641 value,
15642 "tabindex",
15643 propKey,
15644 extraAttributes,
15645 serverDifferences
15646 );
15647 continue;
15648 case "style":
15649 extraAttributes.delete(value);
15650 diffHydratedStyles(domElement, propKey, serverDifferences);
15651 continue;
15652 case "multiple":
15653 extraAttributes.delete(value);
15654 warnForPropDifference(
15655 value,
15656 domElement.multiple,
15657 propKey,
15658 serverDifferences
15659 );
15660 continue;
15661 case "muted":
15662 extraAttributes.delete(value);
15663 warnForPropDifference(
15664 value,
15665 domElement.muted,
15666 propKey,
15667 serverDifferences
15668 );
15669 continue;
15670 case "autoFocus":
15671 extraAttributes.delete("autofocus");
15672 warnForPropDifference(
15673 value,
15674 domElement.autofocus,
15675 propKey,
15676 serverDifferences
15677 );
15678 continue;
15679 case "data":
15680 if ("object" !== tag) {
15681 extraAttributes.delete(value);
15682 attributes = domElement.getAttribute("data");
15683 warnForPropDifference(
15684 value,
15685 attributes,
15686 propKey,
15687 serverDifferences
15688 );
15689 continue;
15690 }
15691 case "src":
15692 case "href":
15693 if (!("" !== propKey || "a" === tag && "href" === value || "object" === tag && "data" === value)) {
15694 "src" === value ? console.error(
15695 'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
15696 value,
15697 value
15698 ) : console.error(
15699 'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
15700 value,
15701 value
15702 );
15703 continue;
15704 }
15705 hydrateSanitizedAttribute(
15706 domElement,
15707 value,
15708 value,
15709 propKey,
15710 extraAttributes,
15711 serverDifferences
15712 );
15713 continue;
15714 case "action":
15715 case "formAction":
15716 attributes = domElement.getAttribute(value);
15717 if ("function" === typeof propKey) {
15718 extraAttributes.delete(value.toLowerCase());
15719 "formAction" === value ? (extraAttributes.delete("name"), extraAttributes.delete("formenctype"), extraAttributes.delete("formmethod"), extraAttributes.delete("formtarget")) : (extraAttributes.delete("enctype"), extraAttributes.delete("method"), extraAttributes.delete("target"));
15720 continue;
15721 } else if (attributes === EXPECTED_FORM_ACTION_URL) {
15722 extraAttributes.delete(value.toLowerCase());
15723 warnForPropDifference(
15724 value,
15725 "function",
15726 propKey,
15727 serverDifferences
15728 );
15729 continue;
15730 }
15731 hydrateSanitizedAttribute(
15732 domElement,
15733 value,
15734 value.toLowerCase(),
15735 propKey,
15736 extraAttributes,
15737 serverDifferences
15738 );
15739 continue;
15740 case "xlinkHref":
15741 hydrateSanitizedAttribute(
15742 domElement,
15743 value,
15744 "xlink:href",
15745 propKey,
15746 extraAttributes,
15747 serverDifferences
15748 );
15749 continue;
15750 case "contentEditable":
15751 hydrateBooleanishAttribute(
15752 domElement,
15753 value,
15754 "contenteditable",
15755 propKey,
15756 extraAttributes,
15757 serverDifferences
15758 );
15759 continue;
15760 case "spellCheck":
15761 hydrateBooleanishAttribute(
15762 domElement,
15763 value,
15764 "spellcheck",
15765 propKey,
15766 extraAttributes,
15767 serverDifferences
15768 );
15769 continue;
15770 case "draggable":
15771 case "autoReverse":
15772 case "externalResourcesRequired":
15773 case "focusable":
15774 case "preserveAlpha":
15775 hydrateBooleanishAttribute(
15776 domElement,
15777 value,
15778 value,
15779 propKey,
15780 extraAttributes,
15781 serverDifferences
15782 );
15783 continue;
15784 case "allowFullScreen":
15785 case "async":
15786 case "autoPlay":
15787 case "controls":
15788 case "default":
15789 case "defer":
15790 case "disabled":
15791 case "disablePictureInPicture":
15792 case "disableRemotePlayback":
15793 case "formNoValidate":
15794 case "hidden":
15795 case "loop":
15796 case "noModule":
15797 case "noValidate":
15798 case "open":
15799 case "playsInline":
15800 case "readOnly":
15801 case "required":
15802 case "reversed":
15803 case "scoped":
15804 case "seamless":
15805 case "itemScope":
15806 hydrateBooleanAttribute(
15807 domElement,
15808 value,
15809 value.toLowerCase(),
15810 propKey,
15811 extraAttributes,
15812 serverDifferences
15813 );
15814 continue;
15815 case "capture":
15816 case "download":
15817 a: {
15818 i = domElement;
15819 var attributeName = attributes = value, serverDifferences$jscomp$0 = serverDifferences;
15820 extraAttributes.delete(attributeName);
15821 i = i.getAttribute(attributeName);
15822 if (null === i)
15823 switch (typeof propKey) {
15824 case "undefined":
15825 case "function":
15826 case "symbol":
15827 break a;
15828 default:
15829 if (false === propKey) break a;
15830 }
15831 else if (null != propKey)
15832 switch (typeof propKey) {
15833 case "function":
15834 case "symbol":
15835 break;
15836 case "boolean":
15837 if (true === propKey && "" === i) break a;
15838 break;
15839 default:
15840 if (checkAttributeStringCoercion(propKey, attributes), i === "" + propKey)
15841 break a;
15842 }
15843 warnForPropDifference(
15844 attributes,
15845 i,
15846 propKey,
15847 serverDifferences$jscomp$0
15848 );
15849 }
15850 continue;
15851 case "cols":
15852 case "rows":
15853 case "size":
15854 case "span":
15855 a: {
15856 i = domElement;
15857 attributeName = attributes = value;
15858 serverDifferences$jscomp$0 = serverDifferences;
15859 extraAttributes.delete(attributeName);
15860 i = i.getAttribute(attributeName);
15861 if (null === i)
15862 switch (typeof propKey) {
15863 case "undefined":
15864 case "function":
15865 case "symbol":
15866 case "boolean":
15867 break a;
15868 default:
15869 if (isNaN(propKey) || 1 > propKey) break a;
15870 }
15871 else if (null != propKey)
15872 switch (typeof propKey) {
15873 case "function":
15874 case "symbol":
15875 case "boolean":
15876 break;
15877 default:
15878 if (!(isNaN(propKey) || 1 > propKey) && (checkAttributeStringCoercion(propKey, attributes), i === "" + propKey))
15879 break a;
15880 }
15881 warnForPropDifference(
15882 attributes,
15883 i,
15884 propKey,
15885 serverDifferences$jscomp$0
15886 );
15887 }
15888 continue;
15889 case "rowSpan":
15890 hydrateNumericAttribute(
15891 domElement,
15892 value,
15893 "rowspan",
15894 propKey,
15895 extraAttributes,
15896 serverDifferences
15897 );
15898 continue;
15899 case "start":
15900 hydrateNumericAttribute(
15901 domElement,
15902 value,
15903 value,
15904 propKey,
15905 extraAttributes,
15906 serverDifferences
15907 );
15908 continue;
15909 case "xHeight":
15910 hydrateAttribute(
15911 domElement,
15912 value,
15913 "x-height",
15914 propKey,
15915 extraAttributes,
15916 serverDifferences
15917 );
15918 continue;
15919 case "xlinkActuate":
15920 hydrateAttribute(
15921 domElement,
15922 value,
15923 "xlink:actuate",
15924 propKey,
15925 extraAttributes,
15926 serverDifferences
15927 );
15928 continue;
15929 case "xlinkArcrole":
15930 hydrateAttribute(
15931 domElement,
15932 value,
15933 "xlink:arcrole",
15934 propKey,
15935 extraAttributes,
15936 serverDifferences
15937 );
15938 continue;
15939 case "xlinkRole":
15940 hydrateAttribute(
15941 domElement,
15942 value,
15943 "xlink:role",
15944 propKey,
15945 extraAttributes,
15946 serverDifferences
15947 );
15948 continue;
15949 case "xlinkShow":
15950 hydrateAttribute(
15951 domElement,
15952 value,
15953 "xlink:show",
15954 propKey,
15955 extraAttributes,
15956 serverDifferences
15957 );
15958 continue;
15959 case "xlinkTitle":
15960 hydrateAttribute(
15961 domElement,
15962 value,
15963 "xlink:title",
15964 propKey,
15965 extraAttributes,
15966 serverDifferences
15967 );
15968 continue;
15969 case "xlinkType":
15970 hydrateAttribute(
15971 domElement,
15972 value,
15973 "xlink:type",
15974 propKey,
15975 extraAttributes,
15976 serverDifferences
15977 );
15978 continue;
15979 case "xmlBase":
15980 hydrateAttribute(
15981 domElement,
15982 value,
15983 "xml:base",
15984 propKey,
15985 extraAttributes,
15986 serverDifferences
15987 );
15988 continue;
15989 case "xmlLang":
15990 hydrateAttribute(
15991 domElement,
15992 value,
15993 "xml:lang",
15994 propKey,
15995 extraAttributes,
15996 serverDifferences
15997 );
15998 continue;
15999 case "xmlSpace":
16000 hydrateAttribute(
16001 domElement,
16002 value,
16003 "xml:space",
16004 propKey,
16005 extraAttributes,
16006 serverDifferences
16007 );
16008 continue;
16009 case "inert":
16010 "" !== propKey || didWarnForNewBooleanPropsWithEmptyValue[value] || (didWarnForNewBooleanPropsWithEmptyValue[value] = true, console.error(
16011 "Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
16012 value
16013 ));
16014 hydrateBooleanAttribute(
16015 domElement,
16016 value,
16017 value,
16018 propKey,
16019 extraAttributes,
16020 serverDifferences
16021 );
16022 continue;
16023 default:
16024 if (!(2 < value.length) || "o" !== value[0] && "O" !== value[0] || "n" !== value[1] && "N" !== value[1]) {
16025 i = getAttributeAlias(value);
16026 attributes = false;
16027 hostContext.context === HostContextNamespaceNone && "svg" !== tag && "math" !== tag ? extraAttributes.delete(i.toLowerCase()) : (attributeName = value.toLowerCase(), attributeName = possibleStandardNames.hasOwnProperty(
16028 attributeName
16029 ) ? possibleStandardNames[attributeName] || null : null, null !== attributeName && attributeName !== value && (attributes = true, extraAttributes.delete(attributeName)), extraAttributes.delete(i));
16030 a: if (attributeName = domElement, serverDifferences$jscomp$0 = i, i = propKey, isAttributeNameSafe(serverDifferences$jscomp$0))
16031 if (attributeName.hasAttribute(serverDifferences$jscomp$0))
16032 attributeName = attributeName.getAttribute(
16033 serverDifferences$jscomp$0
16034 ), checkAttributeStringCoercion(
16035 i,
16036 serverDifferences$jscomp$0
16037 ), i = attributeName === "" + i ? i : attributeName;
16038 else {
16039 switch (typeof i) {
16040 case "function":
16041 case "symbol":
16042 break a;
16043 case "boolean":
16044 if (attributeName = serverDifferences$jscomp$0.toLowerCase().slice(0, 5), "data-" !== attributeName && "aria-" !== attributeName)
16045 break a;
16046 }
16047 i = void 0 === i ? void 0 : null;
16048 }
16049 else i = void 0;
16050 attributes || warnForPropDifference(
16051 value,
16052 i,
16053 propKey,
16054 serverDifferences
16055 );
16056 }
16057 }
16058 }
16059 0 < extraAttributes.size && true !== props.suppressHydrationWarning && warnForExtraAttributes(domElement, extraAttributes, serverDifferences);
16060 return 0 === Object.keys(serverDifferences).length ? null : serverDifferences;
16061 }
16062 function propNamesListJoin(list, combinator) {
16063 switch (list.length) {
16064 case 0:
16065 return "";
16066 case 1:
16067 return list[0];
16068 case 2:
16069 return list[0] + " " + combinator + " " + list[1];
16070 default:
16071 return list.slice(0, -1).join(", ") + ", " + combinator + " " + list[list.length - 1];
16072 }
16073 }
16074 function isLikelyStaticResource(initiatorType) {
16075 switch (initiatorType) {
16076 case "css":
16077 case "script":
16078 case "font":
16079 case "img":
16080 case "image":
16081 case "input":
16082 case "link":
16083 return true;
16084 default:
16085 return false;
16086 }
16087 }
16088 function estimateBandwidth() {
16089 if ("function" === typeof performance.getEntriesByType) {
16090 for (var count = 0, bits = 0, resourceEntries = performance.getEntriesByType("resource"), i = 0; i < resourceEntries.length; i++) {
16091 var entry = resourceEntries[i], transferSize = entry.transferSize, initiatorType = entry.initiatorType, duration = entry.duration;
16092 if (transferSize && duration && isLikelyStaticResource(initiatorType)) {
16093 initiatorType = 0;
16094 duration = entry.responseEnd;
16095 for (i += 1; i < resourceEntries.length; i++) {
16096 var overlapEntry = resourceEntries[i], overlapStartTime = overlapEntry.startTime;
16097 if (overlapStartTime > duration) break;
16098 var overlapTransferSize = overlapEntry.transferSize, overlapInitiatorType = overlapEntry.initiatorType;
16099 overlapTransferSize && isLikelyStaticResource(overlapInitiatorType) && (overlapEntry = overlapEntry.responseEnd, initiatorType += overlapTransferSize * (overlapEntry < duration ? 1 : (duration - overlapStartTime) / (overlapEntry - overlapStartTime)));
16100 }
16101 --i;
16102 bits += 8 * (transferSize + initiatorType) / (entry.duration / 1e3);
16103 count++;
16104 if (10 < count) break;
16105 }
16106 }
16107 if (0 < count) return bits / count / 1e6;
16108 }
16109 return navigator.connection && (count = navigator.connection.downlink, "number" === typeof count) ? count : 5;
16110 }
16111 function getOwnerDocumentFromRootContainer(rootContainerElement) {
16112 return 9 === rootContainerElement.nodeType ? rootContainerElement : rootContainerElement.ownerDocument;
16113 }
16114 function getOwnHostContext(namespaceURI) {
16115 switch (namespaceURI) {
16116 case SVG_NAMESPACE:
16117 return HostContextNamespaceSvg;
16118 case MATH_NAMESPACE:
16119 return HostContextNamespaceMath;
16120 default:
16121 return HostContextNamespaceNone;
16122 }
16123 }
16124 function getChildHostContextProd(parentNamespace, type) {
16125 if (parentNamespace === HostContextNamespaceNone)
16126 switch (type) {
16127 case "svg":
16128 return HostContextNamespaceSvg;
16129 case "math":
16130 return HostContextNamespaceMath;
16131 default:
16132 return HostContextNamespaceNone;
16133 }
16134 return parentNamespace === HostContextNamespaceSvg && "foreignObject" === type ? HostContextNamespaceNone : parentNamespace;
16135 }
16136 function shouldSetTextContent(type, props) {
16137 return "textarea" === type || "noscript" === type || "string" === typeof props.children || "number" === typeof props.children || "bigint" === typeof props.children || "object" === typeof props.dangerouslySetInnerHTML && null !== props.dangerouslySetInnerHTML && null != props.dangerouslySetInnerHTML.__html;
16138 }
16139 function shouldAttemptEagerTransition() {
16140 var event = window.event;
16141 if (event && "popstate" === event.type) {
16142 if (event === currentPopstateTransitionEvent) return false;
16143 currentPopstateTransitionEvent = event;
16144 return true;
16145 }
16146 currentPopstateTransitionEvent = null;
16147 return false;
16148 }
16149 function resolveEventType() {
16150 var event = window.event;
16151 return event && event !== schedulerEvent ? event.type : null;
16152 }
16153 function resolveEventTimeStamp() {
16154 var event = window.event;
16155 return event && event !== schedulerEvent ? event.timeStamp : -1.1;
16156 }
16157 function handleErrorInNextTick(error) {
16158 setTimeout(function() {
16159 throw error;
16160 });
16161 }
16162 function commitMount(domElement, type, newProps) {
16163 switch (type) {
16164 case "button":
16165 case "input":
16166 case "select":
16167 case "textarea":
16168 newProps.autoFocus && domElement.focus();
16169 break;
16170 case "img":
16171 newProps.src ? domElement.src = newProps.src : newProps.srcSet && (domElement.srcset = newProps.srcSet);
16172 }
16173 }
16174 function commitHydratedInstance() {
16175 }
16176 function commitUpdate(domElement, type, oldProps, newProps) {
16177 updateProperties(domElement, type, oldProps, newProps);
16178 domElement[internalPropsKey] = newProps;
16179 }
16180 function resetTextContent(domElement) {
16181 setTextContent(domElement, "");
16182 }
16183 function commitTextUpdate(textInstance, oldText, newText) {
16184 textInstance.nodeValue = newText;
16185 }
16186 function warnForReactChildrenConflict(container) {
16187 if (!container.__reactWarnedAboutChildrenConflict) {
16188 var props = container[internalPropsKey] || null;
16189 if (null !== props) {
16190 var fiber = getInstanceFromNode(container);
16191 null !== fiber && ("string" === typeof props.children || "number" === typeof props.children ? (container.__reactWarnedAboutChildrenConflict = true, runWithFiberInDEV(fiber, function() {
16192 console.error(
16193 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.'
16194 );
16195 })) : null != props.dangerouslySetInnerHTML && (container.__reactWarnedAboutChildrenConflict = true, runWithFiberInDEV(fiber, function() {
16196 console.error(
16197 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.'
16198 );
16199 })));
16200 }
16201 }
16202 }
16203 function isSingletonScope(type) {
16204 return "head" === type;
16205 }
16206 function removeChild(parentInstance, child) {
16207 parentInstance.removeChild(child);
16208 }
16209 function removeChildFromContainer(container, child) {
16210 (9 === container.nodeType ? container.body : "HTML" === container.nodeName ? container.ownerDocument.body : container).removeChild(child);
16211 }
16212 function clearHydrationBoundary(parentInstance, hydrationInstance) {
16213 var node = hydrationInstance, depth = 0;
16214 do {
16215 var nextNode = node.nextSibling;
16216 parentInstance.removeChild(node);
16217 if (nextNode && 8 === nextNode.nodeType)
16218 if (node = nextNode.data, node === SUSPENSE_END_DATA || node === ACTIVITY_END_DATA) {
16219 if (0 === depth) {
16220 parentInstance.removeChild(nextNode);
16221 retryIfBlockedOn(hydrationInstance);
16222 return;
16223 }
16224 depth--;
16225 } else if (node === SUSPENSE_START_DATA || node === SUSPENSE_PENDING_START_DATA || node === SUSPENSE_QUEUED_START_DATA || node === SUSPENSE_FALLBACK_START_DATA || node === ACTIVITY_START_DATA)
16226 depth++;
16227 else if (node === PREAMBLE_CONTRIBUTION_HTML)
16228 releaseSingletonInstance(
16229 parentInstance.ownerDocument.documentElement
16230 );
16231 else if (node === PREAMBLE_CONTRIBUTION_HEAD) {
16232 node = parentInstance.ownerDocument.head;
16233 releaseSingletonInstance(node);
16234 for (var node$jscomp$0 = node.firstChild; node$jscomp$0; ) {
16235 var nextNode$jscomp$0 = node$jscomp$0.nextSibling, nodeName = node$jscomp$0.nodeName;
16236 node$jscomp$0[internalHoistableMarker] || "SCRIPT" === nodeName || "STYLE" === nodeName || "LINK" === nodeName && "stylesheet" === node$jscomp$0.rel.toLowerCase() || node.removeChild(node$jscomp$0);
16237 node$jscomp$0 = nextNode$jscomp$0;
16238 }
16239 } else
16240 node === PREAMBLE_CONTRIBUTION_BODY && releaseSingletonInstance(parentInstance.ownerDocument.body);
16241 node = nextNode;
16242 } while (node);
16243 retryIfBlockedOn(hydrationInstance);
16244 }
16245 function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) {
16246 var node = suspenseInstance;
16247 suspenseInstance = 0;
16248 do {
16249 var nextNode = node.nextSibling;
16250 1 === node.nodeType ? isHidden ? (node._stashedDisplay = node.style.display, node.style.display = "none") : (node.style.display = node._stashedDisplay || "", "" === node.getAttribute("style") && node.removeAttribute("style")) : 3 === node.nodeType && (isHidden ? (node._stashedText = node.nodeValue, node.nodeValue = "") : node.nodeValue = node._stashedText || "");
16251 if (nextNode && 8 === nextNode.nodeType)
16252 if (node = nextNode.data, node === SUSPENSE_END_DATA)
16253 if (0 === suspenseInstance) break;
16254 else suspenseInstance--;
16255 else
16256 node !== SUSPENSE_START_DATA && node !== SUSPENSE_PENDING_START_DATA && node !== SUSPENSE_QUEUED_START_DATA && node !== SUSPENSE_FALLBACK_START_DATA || suspenseInstance++;
16257 node = nextNode;
16258 } while (node);
16259 }
16260 function hideDehydratedBoundary(suspenseInstance) {
16261 hideOrUnhideDehydratedBoundary(suspenseInstance, true);
16262 }
16263 function hideInstance(instance) {
16264 instance = instance.style;
16265 "function" === typeof instance.setProperty ? instance.setProperty("display", "none", "important") : instance.display = "none";
16266 }
16267 function hideTextInstance(textInstance) {
16268 textInstance.nodeValue = "";
16269 }
16270 function unhideDehydratedBoundary(dehydratedInstance) {
16271 hideOrUnhideDehydratedBoundary(dehydratedInstance, false);
16272 }
16273 function unhideInstance(instance, props) {
16274 props = props[STYLE];
16275 props = void 0 !== props && null !== props && props.hasOwnProperty("display") ? props.display : null;
16276 instance.style.display = null == props || "boolean" === typeof props ? "" : ("" + props).trim();
16277 }
16278 function unhideTextInstance(textInstance, text) {
16279 textInstance.nodeValue = text;
16280 }
16281 function clearContainerSparingly(container) {
16282 var nextNode = container.firstChild;
16283 nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);
16284 for (; nextNode; ) {
16285 var node = nextNode;
16286 nextNode = nextNode.nextSibling;
16287 switch (node.nodeName) {
16288 case "HTML":
16289 case "HEAD":
16290 case "BODY":
16291 clearContainerSparingly(node);
16292 detachDeletedInstance(node);
16293 continue;
16294 case "SCRIPT":
16295 case "STYLE":
16296 continue;
16297 case "LINK":
16298 if ("stylesheet" === node.rel.toLowerCase()) continue;
16299 }
16300 container.removeChild(node);
16301 }
16302 }
16303 function canHydrateInstance(instance, type, props, inRootOrSingleton) {
16304 for (; 1 === instance.nodeType; ) {
16305 var anyProps = props;
16306 if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {
16307 if (!inRootOrSingleton && ("INPUT" !== instance.nodeName || "hidden" !== instance.type))
16308 break;
16309 } else if (!inRootOrSingleton)
16310 if ("input" === type && "hidden" === instance.type) {
16311 checkAttributeStringCoercion(anyProps.name, "name");
16312 var name = null == anyProps.name ? null : "" + anyProps.name;
16313 if ("hidden" === anyProps.type && instance.getAttribute("name") === name)
16314 return instance;
16315 } else return instance;
16316 else if (!instance[internalHoistableMarker])
16317 switch (type) {
16318 case "meta":
16319 if (!instance.hasAttribute("itemprop")) break;
16320 return instance;
16321 case "link":
16322 name = instance.getAttribute("rel");
16323 if ("stylesheet" === name && instance.hasAttribute("data-precedence"))
16324 break;
16325 else if (name !== anyProps.rel || instance.getAttribute("href") !== (null == anyProps.href || "" === anyProps.href ? null : anyProps.href) || instance.getAttribute("crossorigin") !== (null == anyProps.crossOrigin ? null : anyProps.crossOrigin) || instance.getAttribute("title") !== (null == anyProps.title ? null : anyProps.title))
16326 break;
16327 return instance;
16328 case "style":
16329 if (instance.hasAttribute("data-precedence")) break;
16330 return instance;
16331 case "script":
16332 name = instance.getAttribute("src");
16333 if ((name !== (null == anyProps.src ? null : anyProps.src) || instance.getAttribute("type") !== (null == anyProps.type ? null : anyProps.type) || instance.getAttribute("crossorigin") !== (null == anyProps.crossOrigin ? null : anyProps.crossOrigin)) && name && instance.hasAttribute("async") && !instance.hasAttribute("itemprop"))
16334 break;
16335 return instance;
16336 default:
16337 return instance;
16338 }
16339 instance = getNextHydratable(instance.nextSibling);
16340 if (null === instance) break;
16341 }
16342 return null;
16343 }
16344 function canHydrateTextInstance(instance, text, inRootOrSingleton) {
16345 if ("" === text) return null;
16346 for (; 3 !== instance.nodeType; ) {
16347 if ((1 !== instance.nodeType || "INPUT" !== instance.nodeName || "hidden" !== instance.type) && !inRootOrSingleton)
16348 return null;
16349 instance = getNextHydratable(instance.nextSibling);
16350 if (null === instance) return null;
16351 }
16352 return instance;
16353 }
16354 function canHydrateHydrationBoundary(instance, inRootOrSingleton) {
16355 for (; 8 !== instance.nodeType; ) {
16356 if ((1 !== instance.nodeType || "INPUT" !== instance.nodeName || "hidden" !== instance.type) && !inRootOrSingleton)
16357 return null;
16358 instance = getNextHydratable(instance.nextSibling);
16359 if (null === instance) return null;
16360 }
16361 return instance;
16362 }
16363 function isSuspenseInstancePending(instance) {
16364 return instance.data === SUSPENSE_PENDING_START_DATA || instance.data === SUSPENSE_QUEUED_START_DATA;
16365 }
16366 function isSuspenseInstanceFallback(instance) {
16367 return instance.data === SUSPENSE_FALLBACK_START_DATA || instance.data === SUSPENSE_PENDING_START_DATA && instance.ownerDocument.readyState !== DOCUMENT_READY_STATE_LOADING;
16368 }
16369 function registerSuspenseInstanceRetry(instance, callback) {
16370 var ownerDocument = instance.ownerDocument;
16371 if (instance.data === SUSPENSE_QUEUED_START_DATA)
16372 instance._reactRetry = callback;
16373 else if (instance.data !== SUSPENSE_PENDING_START_DATA || ownerDocument.readyState !== DOCUMENT_READY_STATE_LOADING)
16374 callback();
16375 else {
16376 var listener = function() {
16377 callback();
16378 ownerDocument.removeEventListener("DOMContentLoaded", listener);
16379 };
16380 ownerDocument.addEventListener("DOMContentLoaded", listener);
16381 instance._reactRetry = listener;
16382 }
16383 }
16384 function getNextHydratable(node) {
16385 for (; null != node; node = node.nextSibling) {
16386 var nodeType = node.nodeType;
16387 if (1 === nodeType || 3 === nodeType) break;
16388 if (8 === nodeType) {
16389 nodeType = node.data;
16390 if (nodeType === SUSPENSE_START_DATA || nodeType === SUSPENSE_FALLBACK_START_DATA || nodeType === SUSPENSE_PENDING_START_DATA || nodeType === SUSPENSE_QUEUED_START_DATA || nodeType === ACTIVITY_START_DATA || nodeType === FORM_STATE_IS_MATCHING || nodeType === FORM_STATE_IS_NOT_MATCHING)
16391 break;
16392 if (nodeType === SUSPENSE_END_DATA || nodeType === ACTIVITY_END_DATA)
16393 return null;
16394 }
16395 }
16396 return node;
16397 }
16398 function describeHydratableInstanceForDevWarnings(instance) {
16399 if (1 === instance.nodeType) {
16400 for (var JSCompiler_temp_const = instance.nodeName.toLowerCase(), serverDifferences = {}, attributes = instance.attributes, i = 0; i < attributes.length; i++) {
16401 var attr = attributes[i];
16402 serverDifferences[getPropNameFromAttributeName(attr.name)] = "style" === attr.name.toLowerCase() ? getStylesObjectFromElement(instance) : attr.value;
16403 }
16404 return { type: JSCompiler_temp_const, props: serverDifferences };
16405 }
16406 return 8 === instance.nodeType ? instance.data === ACTIVITY_START_DATA ? { type: "Activity", props: {} } : { type: "Suspense", props: {} } : instance.nodeValue;
16407 }
16408 function diffHydratedTextForDevWarnings(textInstance, text, parentProps) {
16409 return null === parentProps || true !== parentProps[SUPPRESS_HYDRATION_WARNING] ? (textInstance.nodeValue === text ? textInstance = null : (text = normalizeMarkupForTextOrAttribute(text), textInstance = normalizeMarkupForTextOrAttribute(textInstance.nodeValue) === text ? null : textInstance.nodeValue), textInstance) : null;
16410 }
16411 function getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) {
16412 hydrationInstance = hydrationInstance.nextSibling;
16413 for (var depth = 0; hydrationInstance; ) {
16414 if (8 === hydrationInstance.nodeType) {
16415 var data = hydrationInstance.data;
16416 if (data === SUSPENSE_END_DATA || data === ACTIVITY_END_DATA) {
16417 if (0 === depth)
16418 return getNextHydratable(hydrationInstance.nextSibling);
16419 depth--;
16420 } else
16421 data !== SUSPENSE_START_DATA && data !== SUSPENSE_FALLBACK_START_DATA && data !== SUSPENSE_PENDING_START_DATA && data !== SUSPENSE_QUEUED_START_DATA && data !== ACTIVITY_START_DATA || depth++;
16422 }
16423 hydrationInstance = hydrationInstance.nextSibling;
16424 }
16425 return null;
16426 }
16427 function getParentHydrationBoundary(targetInstance) {
16428 targetInstance = targetInstance.previousSibling;
16429 for (var depth = 0; targetInstance; ) {
16430 if (8 === targetInstance.nodeType) {
16431 var data = targetInstance.data;
16432 if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_QUEUED_START_DATA || data === ACTIVITY_START_DATA) {
16433 if (0 === depth) return targetInstance;
16434 depth--;
16435 } else
16436 data !== SUSPENSE_END_DATA && data !== ACTIVITY_END_DATA || depth++;
16437 }
16438 targetInstance = targetInstance.previousSibling;
16439 }
16440 return null;
16441 }
16442 function commitHydratedContainer(container) {
16443 retryIfBlockedOn(container);
16444 }
16445 function commitHydratedActivityInstance(activityInstance) {
16446 retryIfBlockedOn(activityInstance);
16447 }
16448 function commitHydratedSuspenseInstance(suspenseInstance) {
16449 retryIfBlockedOn(suspenseInstance);
16450 }
16451 function resolveSingletonInstance(type, props, rootContainerInstance, hostContext, validateDOMNestingDev) {
16452 validateDOMNestingDev && validateDOMNesting(type, hostContext.ancestorInfo);
16453 props = getOwnerDocumentFromRootContainer(rootContainerInstance);
16454 switch (type) {
16455 case "html":
16456 type = props.documentElement;
16457 if (!type)
16458 throw Error(
16459 "React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page."
16460 );
16461 return type;
16462 case "head":
16463 type = props.head;
16464 if (!type)
16465 throw Error(
16466 "React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page."
16467 );
16468 return type;
16469 case "body":
16470 type = props.body;
16471 if (!type)
16472 throw Error(
16473 "React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page."
16474 );
16475 return type;
16476 default:
16477 throw Error(
16478 "resolveSingletonInstance was called with an element type that is not supported. This is a bug in React."
16479 );
16480 }
16481 }
16482 function acquireSingletonInstance(type, props, instance, internalInstanceHandle) {
16483 if (!instance[internalContainerInstanceKey] && getInstanceFromNode(instance)) {
16484 var tagName = instance.tagName.toLowerCase();
16485 console.error(
16486 "You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",
16487 tagName,
16488 tagName,
16489 tagName
16490 );
16491 }
16492 switch (type) {
16493 case "html":
16494 case "head":
16495 case "body":
16496 break;
16497 default:
16498 console.error(
16499 "acquireSingletonInstance was called with an element type that is not supported. This is a bug in React."
16500 );
16501 }
16502 for (tagName = instance.attributes; tagName.length; )
16503 instance.removeAttributeNode(tagName[0]);
16504 setInitialProperties(instance, type, props);
16505 instance[internalInstanceKey] = internalInstanceHandle;
16506 instance[internalPropsKey] = props;
16507 }
16508 function releaseSingletonInstance(instance) {
16509 for (var attributes = instance.attributes; attributes.length; )
16510 instance.removeAttributeNode(attributes[0]);
16511 detachDeletedInstance(instance);
16512 }
16513 function getHoistableRoot(container) {
16514 return "function" === typeof container.getRootNode ? container.getRootNode() : 9 === container.nodeType ? container : container.ownerDocument;
16515 }
16516 function preconnectAs(rel, href, crossOrigin) {
16517 var ownerDocument = globalDocument;
16518 if (ownerDocument && "string" === typeof href && href) {
16519 var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href);
16520 limitedEscapedHref = 'link[rel="' + rel + '"][href="' + limitedEscapedHref + '"]';
16521 "string" === typeof crossOrigin && (limitedEscapedHref += '[crossorigin="' + crossOrigin + '"]');
16522 preconnectsSet.has(limitedEscapedHref) || (preconnectsSet.add(limitedEscapedHref), rel = { rel, crossOrigin, href }, null === ownerDocument.querySelector(limitedEscapedHref) && (href = ownerDocument.createElement("link"), setInitialProperties(href, "link", rel), markNodeAsHoistable(href), ownerDocument.head.appendChild(href)));
16523 }
16524 }
16525 function getResource(type, currentProps, pendingProps, currentResource) {
16526 var resourceRoot = (resourceRoot = rootInstanceStackCursor.current) ? getHoistableRoot(resourceRoot) : null;
16527 if (!resourceRoot)
16528 throw Error(
16529 '"resourceRoot" was expected to exist. This is a bug in React.'
16530 );
16531 switch (type) {
16532 case "meta":
16533 case "title":
16534 return null;
16535 case "style":
16536 return "string" === typeof pendingProps.precedence && "string" === typeof pendingProps.href ? (pendingProps = getStyleKey(pendingProps.href), currentProps = getResourcesFromRoot(resourceRoot).hoistableStyles, currentResource = currentProps.get(pendingProps), currentResource || (currentResource = {
16537 type: "style",
16538 instance: null,
16539 count: 0,
16540 state: null
16541 }, currentProps.set(pendingProps, currentResource)), currentResource) : { type: "void", instance: null, count: 0, state: null };
16542 case "link":
16543 if ("stylesheet" === pendingProps.rel && "string" === typeof pendingProps.href && "string" === typeof pendingProps.precedence) {
16544 type = getStyleKey(pendingProps.href);
16545 var _styles = getResourcesFromRoot(resourceRoot).hoistableStyles, _resource = _styles.get(type);
16546 if (!_resource && (resourceRoot = resourceRoot.ownerDocument || resourceRoot, _resource = {
16547 type: "stylesheet",
16548 instance: null,
16549 count: 0,
16550 state: { loading: NotLoaded, preload: null }
16551 }, _styles.set(type, _resource), (_styles = resourceRoot.querySelector(
16552 getStylesheetSelectorFromKey(type)
16553 )) && !_styles._p && (_resource.instance = _styles, _resource.state.loading = Loaded | Inserted), !preloadPropsMap.has(type))) {
16554 var preloadProps = {
16555 rel: "preload",
16556 as: "style",
16557 href: pendingProps.href,
16558 crossOrigin: pendingProps.crossOrigin,
16559 integrity: pendingProps.integrity,
16560 media: pendingProps.media,
16561 hrefLang: pendingProps.hrefLang,
16562 referrerPolicy: pendingProps.referrerPolicy
16563 };
16564 preloadPropsMap.set(type, preloadProps);
16565 _styles || preloadStylesheet(
16566 resourceRoot,
16567 type,
16568 preloadProps,
16569 _resource.state
16570 );
16571 }
16572 if (currentProps && null === currentResource)
16573 throw pendingProps = "\n\n - " + describeLinkForResourceErrorDEV(currentProps) + "\n + " + describeLinkForResourceErrorDEV(pendingProps), Error(
16574 "Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key." + pendingProps
16575 );
16576 return _resource;
16577 }
16578 if (currentProps && null !== currentResource)
16579 throw pendingProps = "\n\n - " + describeLinkForResourceErrorDEV(currentProps) + "\n + " + describeLinkForResourceErrorDEV(pendingProps), Error(
16580 "Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key." + pendingProps
16581 );
16582 return null;
16583 case "script":
16584 return currentProps = pendingProps.async, pendingProps = pendingProps.src, "string" === typeof pendingProps && currentProps && "function" !== typeof currentProps && "symbol" !== typeof currentProps ? (pendingProps = getScriptKey(pendingProps), currentProps = getResourcesFromRoot(resourceRoot).hoistableScripts, currentResource = currentProps.get(pendingProps), currentResource || (currentResource = {
16585 type: "script",
16586 instance: null,
16587 count: 0,
16588 state: null
16589 }, currentProps.set(pendingProps, currentResource)), currentResource) : { type: "void", instance: null, count: 0, state: null };
16590 default:
16591 throw Error(
16592 'getResource encountered a type it did not expect: "' + type + '". this is a bug in React.'
16593 );
16594 }
16595 }
16596 function describeLinkForResourceErrorDEV(props) {
16597 var describedProps = 0, description = "<link";
16598 "string" === typeof props.rel ? (describedProps++, description += ' rel="' + props.rel + '"') : hasOwnProperty.call(props, "rel") && (describedProps++, description += ' rel="' + (null === props.rel ? "null" : "invalid type " + typeof props.rel) + '"');
16599 "string" === typeof props.href ? (describedProps++, description += ' href="' + props.href + '"') : hasOwnProperty.call(props, "href") && (describedProps++, description += ' href="' + (null === props.href ? "null" : "invalid type " + typeof props.href) + '"');
16600 "string" === typeof props.precedence ? (describedProps++, description += ' precedence="' + props.precedence + '"') : hasOwnProperty.call(props, "precedence") && (describedProps++, description += " precedence={" + (null === props.precedence ? "null" : "invalid type " + typeof props.precedence) + "}");
16601 Object.getOwnPropertyNames(props).length > describedProps && (description += " ...");
16602 return description + " />";
16603 }
16604 function getStyleKey(href) {
16605 return 'href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"';
16606 }
16607 function getStylesheetSelectorFromKey(key) {
16608 return 'link[rel="stylesheet"][' + key + "]";
16609 }
16610 function stylesheetPropsFromRawProps(rawProps) {
16611 return assign({}, rawProps, {
16612 "data-precedence": rawProps.precedence,
16613 precedence: null
16614 });
16615 }
16616 function preloadStylesheet(ownerDocument, key, preloadProps, state) {
16617 ownerDocument.querySelector(
16618 'link[rel="preload"][as="style"][' + key + "]"
16619 ) ? state.loading = Loaded : (key = ownerDocument.createElement("link"), state.preload = key, key.addEventListener("load", function() {
16620 return state.loading |= Loaded;
16621 }), key.addEventListener("error", function() {
16622 return state.loading |= Errored;
16623 }), setInitialProperties(key, "link", preloadProps), markNodeAsHoistable(key), ownerDocument.head.appendChild(key));
16624 }
16625 function getScriptKey(src) {
16626 return '[src="' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '"]';
16627 }
16628 function getScriptSelectorFromKey(key) {
16629 return "script[async]" + key;
16630 }
16631 function acquireResource(hoistableRoot, resource, props) {
16632 resource.count++;
16633 if (null === resource.instance)
16634 switch (resource.type) {
16635 case "style":
16636 var instance = hoistableRoot.querySelector(
16637 'style[data-href~="' + escapeSelectorAttributeValueInsideDoubleQuotes(props.href) + '"]'
16638 );
16639 if (instance)
16640 return resource.instance = instance, markNodeAsHoistable(instance), instance;
16641 var styleProps = assign({}, props, {
16642 "data-href": props.href,
16643 "data-precedence": props.precedence,
16644 href: null,
16645 precedence: null
16646 });
16647 instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement("style");
16648 markNodeAsHoistable(instance);
16649 setInitialProperties(instance, "style", styleProps);
16650 insertStylesheet(instance, props.precedence, hoistableRoot);
16651 return resource.instance = instance;
16652 case "stylesheet":
16653 styleProps = getStyleKey(props.href);
16654 var _instance = hoistableRoot.querySelector(
16655 getStylesheetSelectorFromKey(styleProps)
16656 );
16657 if (_instance)
16658 return resource.state.loading |= Inserted, resource.instance = _instance, markNodeAsHoistable(_instance), _instance;
16659 instance = stylesheetPropsFromRawProps(props);
16660 (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps);
16661 _instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement("link");
16662 markNodeAsHoistable(_instance);
16663 var linkInstance = _instance;
16664 linkInstance._p = new Promise(function(resolve, reject) {
16665 linkInstance.onload = resolve;
16666 linkInstance.onerror = reject;
16667 });
16668 setInitialProperties(_instance, "link", instance);
16669 resource.state.loading |= Inserted;
16670 insertStylesheet(_instance, props.precedence, hoistableRoot);
16671 return resource.instance = _instance;
16672 case "script":
16673 _instance = getScriptKey(props.src);
16674 if (styleProps = hoistableRoot.querySelector(
16675 getScriptSelectorFromKey(_instance)
16676 ))
16677 return resource.instance = styleProps, markNodeAsHoistable(styleProps), styleProps;
16678 instance = props;
16679 if (styleProps = preloadPropsMap.get(_instance))
16680 instance = assign({}, props), adoptPreloadPropsForScript(instance, styleProps);
16681 hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
16682 styleProps = hoistableRoot.createElement("script");
16683 markNodeAsHoistable(styleProps);
16684 setInitialProperties(styleProps, "link", instance);
16685 hoistableRoot.head.appendChild(styleProps);
16686 return resource.instance = styleProps;
16687 case "void":
16688 return null;
16689 default:
16690 throw Error(
16691 'acquireResource encountered a resource type it did not expect: "' + resource.type + '". this is a bug in React.'
16692 );
16693 }
16694 else
16695 "stylesheet" === resource.type && (resource.state.loading & Inserted) === NotLoaded && (instance = resource.instance, resource.state.loading |= Inserted, insertStylesheet(instance, props.precedence, hoistableRoot));
16696 return resource.instance;
16697 }
16698 function insertStylesheet(instance, precedence, root2) {
16699 for (var nodes = root2.querySelectorAll(
16700 'link[rel="stylesheet"][data-precedence],style[data-precedence]'
16701 ), last = nodes.length ? nodes[nodes.length - 1] : null, prior = last, i = 0; i < nodes.length; i++) {
16702 var node = nodes[i];
16703 if (node.dataset.precedence === precedence) prior = node;
16704 else if (prior !== last) break;
16705 }
16706 prior ? prior.parentNode.insertBefore(instance, prior.nextSibling) : (precedence = 9 === root2.nodeType ? root2.head : root2, precedence.insertBefore(instance, precedence.firstChild));
16707 }
16708 function adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {
16709 null == stylesheetProps.crossOrigin && (stylesheetProps.crossOrigin = preloadProps.crossOrigin);
16710 null == stylesheetProps.referrerPolicy && (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy);
16711 null == stylesheetProps.title && (stylesheetProps.title = preloadProps.title);
16712 }
16713 function adoptPreloadPropsForScript(scriptProps, preloadProps) {
16714 null == scriptProps.crossOrigin && (scriptProps.crossOrigin = preloadProps.crossOrigin);
16715 null == scriptProps.referrerPolicy && (scriptProps.referrerPolicy = preloadProps.referrerPolicy);
16716 null == scriptProps.integrity && (scriptProps.integrity = preloadProps.integrity);
16717 }
16718 function getHydratableHoistableCache(type, keyAttribute, ownerDocument) {
16719 if (null === tagCaches) {
16720 var cache = /* @__PURE__ */ new Map();
16721 var caches = tagCaches = /* @__PURE__ */ new Map();
16722 caches.set(ownerDocument, cache);
16723 } else
16724 caches = tagCaches, cache = caches.get(ownerDocument), cache || (cache = /* @__PURE__ */ new Map(), caches.set(ownerDocument, cache));
16725 if (cache.has(type)) return cache;
16726 cache.set(type, null);
16727 ownerDocument = ownerDocument.getElementsByTagName(type);
16728 for (caches = 0; caches < ownerDocument.length; caches++) {
16729 var node = ownerDocument[caches];
16730 if (!(node[internalHoistableMarker] || node[internalInstanceKey] || "link" === type && "stylesheet" === node.getAttribute("rel")) && node.namespaceURI !== SVG_NAMESPACE) {
16731 var nodeKey = node.getAttribute(keyAttribute) || "";
16732 nodeKey = type + nodeKey;
16733 var existing = cache.get(nodeKey);
16734 existing ? existing.push(node) : cache.set(nodeKey, [node]);
16735 }
16736 }
16737 return cache;
16738 }
16739 function mountHoistable(hoistableRoot, type, instance) {
16740 hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
16741 hoistableRoot.head.insertBefore(
16742 instance,
16743 "title" === type ? hoistableRoot.querySelector("head > title") : null
16744 );
16745 }
16746 function isHostHoistableType(type, props, hostContext) {
16747 var outsideHostContainerContext = !hostContext.ancestorInfo.containerTagInScope;
16748 if (hostContext.context === HostContextNamespaceSvg || null != props.itemProp)
16749 return !outsideHostContainerContext || null == props.itemProp || "meta" !== type && "title" !== type && "style" !== type && "link" !== type && "script" !== type || console.error(
16750 "Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",
16751 type,
16752 type
16753 ), false;
16754 switch (type) {
16755 case "meta":
16756 case "title":
16757 return true;
16758 case "style":
16759 if ("string" !== typeof props.precedence || "string" !== typeof props.href || "" === props.href) {
16760 outsideHostContainerContext && console.error(
16761 'Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.'
16762 );
16763 break;
16764 }
16765 return true;
16766 case "link":
16767 if ("string" !== typeof props.rel || "string" !== typeof props.href || "" === props.href || props.onLoad || props.onError) {
16768 if ("stylesheet" === props.rel && "string" === typeof props.precedence) {
16769 type = props.href;
16770 var onError = props.onError, disabled = props.disabled;
16771 hostContext = [];
16772 props.onLoad && hostContext.push("`onLoad`");
16773 onError && hostContext.push("`onError`");
16774 null != disabled && hostContext.push("`disabled`");
16775 onError = propNamesListJoin(hostContext, "and");
16776 onError += 1 === hostContext.length ? " prop" : " props";
16777 disabled = 1 === hostContext.length ? "an " + onError : "the " + onError;
16778 hostContext.length && console.error(
16779 'React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',
16780 type,
16781 disabled,
16782 onError
16783 );
16784 }
16785 outsideHostContainerContext && ("string" !== typeof props.rel || "string" !== typeof props.href || "" === props.href ? console.error(
16786 "Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"
16787 ) : (props.onError || props.onLoad) && console.error(
16788 "Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."
16789 ));
16790 break;
16791 }
16792 switch (props.rel) {
16793 case "stylesheet":
16794 return type = props.precedence, props = props.disabled, "string" !== typeof type && outsideHostContainerContext && console.error(
16795 'Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'
16796 ), "string" === typeof type && null == props;
16797 default:
16798 return true;
16799 }
16800 case "script":
16801 type = props.async && "function" !== typeof props.async && "symbol" !== typeof props.async;
16802 if (!type || props.onLoad || props.onError || !props.src || "string" !== typeof props.src) {
16803 outsideHostContainerContext && (type ? props.onLoad || props.onError ? console.error(
16804 "Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."
16805 ) : console.error(
16806 "Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."
16807 ) : console.error(
16808 'Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'
16809 ));
16810 break;
16811 }
16812 return true;
16813 case "noscript":
16814 case "template":
16815 outsideHostContainerContext && console.error(
16816 "Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",
16817 type
16818 );
16819 }
16820 return false;
16821 }
16822 function preloadResource(resource) {
16823 return "stylesheet" === resource.type && (resource.state.loading & Settled) === NotLoaded ? false : true;
16824 }
16825 function suspendResource(state, hoistableRoot, resource, props) {
16826 if ("stylesheet" === resource.type && ("string" !== typeof props.media || false !== matchMedia(props.media).matches) && (resource.state.loading & Inserted) === NotLoaded) {
16827 if (null === resource.instance) {
16828 var key = getStyleKey(props.href), instance = hoistableRoot.querySelector(
16829 getStylesheetSelectorFromKey(key)
16830 );
16831 if (instance) {
16832 hoistableRoot = instance._p;
16833 null !== hoistableRoot && "object" === typeof hoistableRoot && "function" === typeof hoistableRoot.then && (state.count++, state = onUnsuspend.bind(state), hoistableRoot.then(state, state));
16834 resource.state.loading |= Inserted;
16835 resource.instance = instance;
16836 markNodeAsHoistable(instance);
16837 return;
16838 }
16839 instance = hoistableRoot.ownerDocument || hoistableRoot;
16840 props = stylesheetPropsFromRawProps(props);
16841 (key = preloadPropsMap.get(key)) && adoptPreloadPropsForStylesheet(props, key);
16842 instance = instance.createElement("link");
16843 markNodeAsHoistable(instance);
16844 var linkInstance = instance;
16845 linkInstance._p = new Promise(function(resolve, reject) {
16846 linkInstance.onload = resolve;
16847 linkInstance.onerror = reject;
16848 });
16849 setInitialProperties(instance, "link", props);
16850 resource.instance = instance;
16851 }
16852 null === state.stylesheets && (state.stylesheets = /* @__PURE__ */ new Map());
16853 state.stylesheets.set(resource, hoistableRoot);
16854 (hoistableRoot = resource.state.preload) && (resource.state.loading & Settled) === NotLoaded && (state.count++, resource = onUnsuspend.bind(state), hoistableRoot.addEventListener("load", resource), hoistableRoot.addEventListener("error", resource));
16855 }
16856 }
16857 function waitForCommitToBeReady(state, timeoutOffset) {
16858 state.stylesheets && 0 === state.count && insertSuspendedStylesheets(state, state.stylesheets);
16859 return 0 < state.count || 0 < state.imgCount ? function(commit) {
16860 var stylesheetTimer = setTimeout(function() {
16861 state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets);
16862 if (state.unsuspend) {
16863 var unsuspend = state.unsuspend;
16864 state.unsuspend = null;
16865 unsuspend();
16866 }
16867 }, SUSPENSEY_STYLESHEET_TIMEOUT + timeoutOffset);
16868 0 < state.imgBytes && 0 === estimatedBytesWithinLimit && (estimatedBytesWithinLimit = 125 * estimateBandwidth() * SUSPENSEY_IMAGE_TIME_ESTIMATE);
16869 var imgTimer = setTimeout(
16870 function() {
16871 state.waitingForImages = false;
16872 if (0 === state.count && (state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets), state.unsuspend)) {
16873 var unsuspend = state.unsuspend;
16874 state.unsuspend = null;
16875 unsuspend();
16876 }
16877 },
16878 (state.imgBytes > estimatedBytesWithinLimit ? 50 : SUSPENSEY_IMAGE_TIMEOUT) + timeoutOffset
16879 );
16880 state.unsuspend = commit;
16881 return function() {
16882 state.unsuspend = null;
16883 clearTimeout(stylesheetTimer);
16884 clearTimeout(imgTimer);
16885 };
16886 } : null;
16887 }
16888 function onUnsuspend() {
16889 this.count--;
16890 if (0 === this.count && (0 === this.imgCount || !this.waitingForImages)) {
16891 if (this.stylesheets)
16892 insertSuspendedStylesheets(this, this.stylesheets);
16893 else if (this.unsuspend) {
16894 var unsuspend = this.unsuspend;
16895 this.unsuspend = null;
16896 unsuspend();
16897 }
16898 }
16899 }
16900 function insertSuspendedStylesheets(state, resources) {
16901 state.stylesheets = null;
16902 null !== state.unsuspend && (state.count++, precedencesByRoot = /* @__PURE__ */ new Map(), resources.forEach(insertStylesheetIntoRoot, state), precedencesByRoot = null, onUnsuspend.call(state));
16903 }
16904 function insertStylesheetIntoRoot(root2, resource) {
16905 if (!(resource.state.loading & Inserted)) {
16906 var precedences = precedencesByRoot.get(root2);
16907 if (precedences) var last = precedences.get(LAST_PRECEDENCE);
16908 else {
16909 precedences = /* @__PURE__ */ new Map();
16910 precedencesByRoot.set(root2, precedences);
16911 for (var nodes = root2.querySelectorAll(
16912 "link[data-precedence],style[data-precedence]"
16913 ), i = 0; i < nodes.length; i++) {
16914 var node = nodes[i];
16915 if ("LINK" === node.nodeName || "not all" !== node.getAttribute("media"))
16916 precedences.set(node.dataset.precedence, node), last = node;
16917 }
16918 last && precedences.set(LAST_PRECEDENCE, last);
16919 }
16920 nodes = resource.instance;
16921 node = nodes.getAttribute("data-precedence");
16922 i = precedences.get(node) || last;
16923 i === last && precedences.set(LAST_PRECEDENCE, nodes);
16924 precedences.set(node, nodes);
16925 this.count++;
16926 last = onUnsuspend.bind(this);
16927 nodes.addEventListener("load", last);
16928 nodes.addEventListener("error", last);
16929 i ? i.parentNode.insertBefore(nodes, i.nextSibling) : (root2 = 9 === root2.nodeType ? root2.head : root2, root2.insertBefore(nodes, root2.firstChild));
16930 resource.state.loading |= Inserted;
16931 }
16932 }
16933 function FiberRootNode(containerInfo, tag, hydrate2, identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator, formState) {
16934 this.tag = 1;
16935 this.containerInfo = containerInfo;
16936 this.pingCache = this.current = this.pendingChildren = null;
16937 this.timeoutHandle = noTimeout;
16938 this.callbackNode = this.next = this.pendingContext = this.context = this.cancelPendingCommit = null;
16939 this.callbackPriority = 0;
16940 this.expirationTimes = createLaneMap(-1);
16941 this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0;
16942 this.entanglements = createLaneMap(0);
16943 this.hiddenUpdates = createLaneMap(null);
16944 this.identifierPrefix = identifierPrefix;
16945 this.onUncaughtError = onUncaughtError;
16946 this.onCaughtError = onCaughtError;
16947 this.onRecoverableError = onRecoverableError;
16948 this.pooledCache = null;
16949 this.pooledCacheLanes = 0;
16950 this.formState = formState;
16951 this.incompleteTransitions = /* @__PURE__ */ new Map();
16952 this.passiveEffectDuration = this.effectDuration = -0;
16953 this.memoizedUpdaters = /* @__PURE__ */ new Set();
16954 containerInfo = this.pendingUpdatersLaneMap = [];
16955 for (tag = 0; 31 > tag; tag++) containerInfo.push(/* @__PURE__ */ new Set());
16956 this._debugRootType = hydrate2 ? "hydrateRoot()" : "createRoot()";
16957 }
16958 function createFiberRoot(containerInfo, tag, hydrate2, initialChildren, hydrationCallbacks, isStrictMode, identifierPrefix, formState, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator) {
16959 containerInfo = new FiberRootNode(
16960 containerInfo,
16961 tag,
16962 hydrate2,
16963 identifierPrefix,
16964 onUncaughtError,
16965 onCaughtError,
16966 onRecoverableError,
16967 onDefaultTransitionIndicator,
16968 formState
16969 );
16970 tag = ConcurrentMode;
16971 true === isStrictMode && (tag |= StrictLegacyMode | StrictEffectsMode);
16972 tag |= ProfileMode;
16973 isStrictMode = createFiber(3, null, null, tag);
16974 containerInfo.current = isStrictMode;
16975 isStrictMode.stateNode = containerInfo;
16976 tag = createCache();
16977 retainCache(tag);
16978 containerInfo.pooledCache = tag;
16979 retainCache(tag);
16980 isStrictMode.memoizedState = {
16981 element: initialChildren,
16982 isDehydrated: hydrate2,
16983 cache: tag
16984 };
16985 initializeUpdateQueue(isStrictMode);
16986 return containerInfo;
16987 }
16988 function getContextForSubtree(parentComponent) {
16989 if (!parentComponent) return emptyContextObject;
16990 parentComponent = emptyContextObject;
16991 return parentComponent;
16992 }
16993 function updateContainerImpl(rootFiber, lane, element, container, parentComponent, callback) {
16994 if (injectedHook && "function" === typeof injectedHook.onScheduleFiberRoot)
16995 try {
16996 injectedHook.onScheduleFiberRoot(rendererID, container, element);
16997 } catch (err) {
16998 hasLoggedError || (hasLoggedError = true, console.error(
16999 "React instrumentation encountered an error: %o",
17000 err
17001 ));
17002 }
17003 parentComponent = getContextForSubtree(parentComponent);
17004 null === container.context ? container.context = parentComponent : container.pendingContext = parentComponent;
17005 isRendering && null !== current && !didWarnAboutNestedUpdates && (didWarnAboutNestedUpdates = true, console.error(
17006 "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\nCheck the render method of %s.",
17007 getComponentNameFromFiber(current) || "Unknown"
17008 ));
17009 container = createUpdate(lane);
17010 container.payload = { element };
17011 callback = void 0 === callback ? null : callback;
17012 null !== callback && ("function" !== typeof callback && console.error(
17013 "Expected the last optional `callback` argument to be a function. Instead received: %s.",
17014 callback
17015 ), container.callback = callback);
17016 element = enqueueUpdate(rootFiber, container, lane);
17017 null !== element && (startUpdateTimerByLane(lane, "root.render()", null), scheduleUpdateOnFiber(element, rootFiber, lane), entangleTransitions(element, rootFiber, lane));
17018 }
17019 function markRetryLaneImpl(fiber, retryLane) {
17020 fiber = fiber.memoizedState;
17021 if (null !== fiber && null !== fiber.dehydrated) {
17022 var a = fiber.retryLane;
17023 fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;
17024 }
17025 }
17026 function markRetryLaneIfNotHydrated(fiber, retryLane) {
17027 markRetryLaneImpl(fiber, retryLane);
17028 (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);
17029 }
17030 function attemptContinuousHydration(fiber) {
17031 if (13 === fiber.tag || 31 === fiber.tag) {
17032 var root2 = enqueueConcurrentRenderForLane(fiber, 67108864);
17033 null !== root2 && scheduleUpdateOnFiber(root2, fiber, 67108864);
17034 markRetryLaneIfNotHydrated(fiber, 67108864);
17035 }
17036 }
17037 function attemptHydrationAtCurrentPriority(fiber) {
17038 if (13 === fiber.tag || 31 === fiber.tag) {
17039 var lane = requestUpdateLane(fiber);
17040 lane = getBumpedLaneForHydrationByLane(lane);
17041 var root2 = enqueueConcurrentRenderForLane(fiber, lane);
17042 null !== root2 && scheduleUpdateOnFiber(root2, fiber, lane);
17043 markRetryLaneIfNotHydrated(fiber, lane);
17044 }
17045 }
17046 function getCurrentFiberForDevTools() {
17047 return current;
17048 }
17049 function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
17050 var prevTransition = ReactSharedInternals.T;
17051 ReactSharedInternals.T = null;
17052 var previousPriority = ReactDOMSharedInternals.p;
17053 try {
17054 ReactDOMSharedInternals.p = DiscreteEventPriority, dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
17055 } finally {
17056 ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition;
17057 }
17058 }
17059 function dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {
17060 var prevTransition = ReactSharedInternals.T;
17061 ReactSharedInternals.T = null;
17062 var previousPriority = ReactDOMSharedInternals.p;
17063 try {
17064 ReactDOMSharedInternals.p = ContinuousEventPriority, dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
17065 } finally {
17066 ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition;
17067 }
17068 }
17069 function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
17070 if (_enabled) {
17071 var blockedOn = findInstanceBlockingEvent(nativeEvent);
17072 if (null === blockedOn)
17073 dispatchEventForPluginEventSystem(
17074 domEventName,
17075 eventSystemFlags,
17076 nativeEvent,
17077 return_targetInst,
17078 targetContainer
17079 ), clearIfContinuousEvent(domEventName, nativeEvent);
17080 else if (queueIfContinuousEvent(
17081 blockedOn,
17082 domEventName,
17083 eventSystemFlags,
17084 targetContainer,
17085 nativeEvent
17086 ))
17087 nativeEvent.stopPropagation();
17088 else if (clearIfContinuousEvent(domEventName, nativeEvent), eventSystemFlags & 4 && -1 < discreteReplayableEvents.indexOf(domEventName)) {
17089 for (; null !== blockedOn; ) {
17090 var fiber = getInstanceFromNode(blockedOn);
17091 if (null !== fiber)
17092 switch (fiber.tag) {
17093 case 3:
17094 fiber = fiber.stateNode;
17095 if (fiber.current.memoizedState.isDehydrated) {
17096 var lanes = getHighestPriorityLanes(fiber.pendingLanes);
17097 if (0 !== lanes) {
17098 var root2 = fiber;
17099 root2.pendingLanes |= 2;
17100 for (root2.entangledLanes |= 2; lanes; ) {
17101 var lane = 1 << 31 - clz32(lanes);
17102 root2.entanglements[1] |= lane;
17103 lanes &= ~lane;
17104 }
17105 ensureRootIsScheduled(fiber);
17106 (executionContext & (RenderContext | CommitContext)) === NoContext && (workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS, flushSyncWorkAcrossRoots_impl(0, false));
17107 }
17108 }
17109 break;
17110 case 31:
17111 case 13:
17112 root2 = enqueueConcurrentRenderForLane(fiber, 2), null !== root2 && scheduleUpdateOnFiber(root2, fiber, 2), flushSyncWork$1(), markRetryLaneIfNotHydrated(fiber, 2);
17113 }
17114 fiber = findInstanceBlockingEvent(nativeEvent);
17115 null === fiber && dispatchEventForPluginEventSystem(
17116 domEventName,
17117 eventSystemFlags,
17118 nativeEvent,
17119 return_targetInst,
17120 targetContainer
17121 );
17122 if (fiber === blockedOn) break;
17123 blockedOn = fiber;
17124 }
17125 null !== blockedOn && nativeEvent.stopPropagation();
17126 } else
17127 dispatchEventForPluginEventSystem(
17128 domEventName,
17129 eventSystemFlags,
17130 nativeEvent,
17131 null,
17132 targetContainer
17133 );
17134 }
17135 }
17136 function findInstanceBlockingEvent(nativeEvent) {
17137 nativeEvent = getEventTarget(nativeEvent);
17138 return findInstanceBlockingTarget(nativeEvent);
17139 }
17140 function findInstanceBlockingTarget(targetNode) {
17141 return_targetInst = null;
17142 targetNode = getClosestInstanceFromNode(targetNode);
17143 if (null !== targetNode) {
17144 var nearestMounted = getNearestMountedFiber(targetNode);
17145 if (null === nearestMounted) targetNode = null;
17146 else {
17147 var tag = nearestMounted.tag;
17148 if (13 === tag) {
17149 targetNode = getSuspenseInstanceFromFiber(nearestMounted);
17150 if (null !== targetNode) return targetNode;
17151 targetNode = null;
17152 } else if (31 === tag) {
17153 targetNode = getActivityInstanceFromFiber(nearestMounted);
17154 if (null !== targetNode) return targetNode;
17155 targetNode = null;
17156 } else if (3 === tag) {
17157 if (nearestMounted.stateNode.current.memoizedState.isDehydrated)
17158 return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo : null;
17159 targetNode = null;
17160 } else nearestMounted !== targetNode && (targetNode = null);
17161 }
17162 }
17163 return_targetInst = targetNode;
17164 return null;
17165 }
17166 function getEventPriority(domEventName) {
17167 switch (domEventName) {
17168 case "beforetoggle":
17169 case "cancel":
17170 case "click":
17171 case "close":
17172 case "contextmenu":
17173 case "copy":
17174 case "cut":
17175 case "auxclick":
17176 case "dblclick":
17177 case "dragend":
17178 case "dragstart":
17179 case "drop":
17180 case "focusin":
17181 case "focusout":
17182 case "input":
17183 case "invalid":
17184 case "keydown":
17185 case "keypress":
17186 case "keyup":
17187 case "mousedown":
17188 case "mouseup":
17189 case "paste":
17190 case "pause":
17191 case "play":
17192 case "pointercancel":
17193 case "pointerdown":
17194 case "pointerup":
17195 case "ratechange":
17196 case "reset":
17197 case "resize":
17198 case "seeked":
17199 case "submit":
17200 case "toggle":
17201 case "touchcancel":
17202 case "touchend":
17203 case "touchstart":
17204 case "volumechange":
17205 case "change":
17206 case "selectionchange":
17207 case "textInput":
17208 case "compositionstart":
17209 case "compositionend":
17210 case "compositionupdate":
17211 case "beforeblur":
17212 case "afterblur":
17213 case "beforeinput":
17214 case "blur":
17215 case "fullscreenchange":
17216 case "focus":
17217 case "hashchange":
17218 case "popstate":
17219 case "select":
17220 case "selectstart":
17221 return DiscreteEventPriority;
17222 case "drag":
17223 case "dragenter":
17224 case "dragexit":
17225 case "dragleave":
17226 case "dragover":
17227 case "mousemove":
17228 case "mouseout":
17229 case "mouseover":
17230 case "pointermove":
17231 case "pointerout":
17232 case "pointerover":
17233 case "scroll":
17234 case "touchmove":
17235 case "wheel":
17236 case "mouseenter":
17237 case "mouseleave":
17238 case "pointerenter":
17239 case "pointerleave":
17240 return ContinuousEventPriority;
17241 case "message":
17242 switch (getCurrentPriorityLevel()) {
17243 case ImmediatePriority:
17244 return DiscreteEventPriority;
17245 case UserBlockingPriority:
17246 return ContinuousEventPriority;
17247 case NormalPriority$1:
17248 case LowPriority:
17249 return DefaultEventPriority;
17250 case IdlePriority:
17251 return IdleEventPriority;
17252 default:
17253 return DefaultEventPriority;
17254 }
17255 default:
17256 return DefaultEventPriority;
17257 }
17258 }
17259 function clearIfContinuousEvent(domEventName, nativeEvent) {
17260 switch (domEventName) {
17261 case "focusin":
17262 case "focusout":
17263 queuedFocus = null;
17264 break;
17265 case "dragenter":
17266 case "dragleave":
17267 queuedDrag = null;
17268 break;
17269 case "mouseover":
17270 case "mouseout":
17271 queuedMouse = null;
17272 break;
17273 case "pointerover":
17274 case "pointerout":
17275 queuedPointers.delete(nativeEvent.pointerId);
17276 break;
17277 case "gotpointercapture":
17278 case "lostpointercapture":
17279 queuedPointerCaptures.delete(nativeEvent.pointerId);
17280 }
17281 }
17282 function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
17283 if (null === existingQueuedEvent || existingQueuedEvent.nativeEvent !== nativeEvent)
17284 return existingQueuedEvent = {
17285 blockedOn,
17286 domEventName,
17287 eventSystemFlags,
17288 nativeEvent,
17289 targetContainers: [targetContainer]
17290 }, null !== blockedOn && (blockedOn = getInstanceFromNode(blockedOn), null !== blockedOn && attemptContinuousHydration(blockedOn)), existingQueuedEvent;
17291 existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
17292 blockedOn = existingQueuedEvent.targetContainers;
17293 null !== targetContainer && -1 === blockedOn.indexOf(targetContainer) && blockedOn.push(targetContainer);
17294 return existingQueuedEvent;
17295 }
17296 function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
17297 switch (domEventName) {
17298 case "focusin":
17299 return queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(
17300 queuedFocus,
17301 blockedOn,
17302 domEventName,
17303 eventSystemFlags,
17304 targetContainer,
17305 nativeEvent
17306 ), true;
17307 case "dragenter":
17308 return queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(
17309 queuedDrag,
17310 blockedOn,
17311 domEventName,
17312 eventSystemFlags,
17313 targetContainer,
17314 nativeEvent
17315 ), true;
17316 case "mouseover":
17317 return queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(
17318 queuedMouse,
17319 blockedOn,
17320 domEventName,
17321 eventSystemFlags,
17322 targetContainer,
17323 nativeEvent
17324 ), true;
17325 case "pointerover":
17326 var pointerId = nativeEvent.pointerId;
17327 queuedPointers.set(
17328 pointerId,
17329 accumulateOrCreateContinuousQueuedReplayableEvent(
17330 queuedPointers.get(pointerId) || null,
17331 blockedOn,
17332 domEventName,
17333 eventSystemFlags,
17334 targetContainer,
17335 nativeEvent
17336 )
17337 );
17338 return true;
17339 case "gotpointercapture":
17340 return pointerId = nativeEvent.pointerId, queuedPointerCaptures.set(
17341 pointerId,
17342 accumulateOrCreateContinuousQueuedReplayableEvent(
17343 queuedPointerCaptures.get(pointerId) || null,
17344 blockedOn,
17345 domEventName,
17346 eventSystemFlags,
17347 targetContainer,
17348 nativeEvent
17349 )
17350 ), true;
17351 }
17352 return false;
17353 }
17354 function attemptExplicitHydrationTarget(queuedTarget) {
17355 var targetInst = getClosestInstanceFromNode(queuedTarget.target);
17356 if (null !== targetInst) {
17357 var nearestMounted = getNearestMountedFiber(targetInst);
17358 if (null !== nearestMounted) {
17359 if (targetInst = nearestMounted.tag, 13 === targetInst) {
17360 if (targetInst = getSuspenseInstanceFromFiber(nearestMounted), null !== targetInst) {
17361 queuedTarget.blockedOn = targetInst;
17362 runWithPriority(queuedTarget.priority, function() {
17363 attemptHydrationAtCurrentPriority(nearestMounted);
17364 });
17365 return;
17366 }
17367 } else if (31 === targetInst) {
17368 if (targetInst = getActivityInstanceFromFiber(nearestMounted), null !== targetInst) {
17369 queuedTarget.blockedOn = targetInst;
17370 runWithPriority(queuedTarget.priority, function() {
17371 attemptHydrationAtCurrentPriority(nearestMounted);
17372 });
17373 return;
17374 }
17375 } else if (3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated) {
17376 queuedTarget.blockedOn = 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo : null;
17377 return;
17378 }
17379 }
17380 }
17381 queuedTarget.blockedOn = null;
17382 }
17383 function attemptReplayContinuousQueuedEvent(queuedEvent) {
17384 if (null !== queuedEvent.blockedOn) return false;
17385 for (var targetContainers = queuedEvent.targetContainers; 0 < targetContainers.length; ) {
17386 var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);
17387 if (null === nextBlockedOn) {
17388 nextBlockedOn = queuedEvent.nativeEvent;
17389 var nativeEventClone = new nextBlockedOn.constructor(
17390 nextBlockedOn.type,
17391 nextBlockedOn
17392 ), event = nativeEventClone;
17393 null !== currentReplayingEvent && console.error(
17394 "Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."
17395 );
17396 currentReplayingEvent = event;
17397 nextBlockedOn.target.dispatchEvent(nativeEventClone);
17398 null === currentReplayingEvent && console.error(
17399 "Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."
17400 );
17401 currentReplayingEvent = null;
17402 } else
17403 return targetContainers = getInstanceFromNode(nextBlockedOn), null !== targetContainers && attemptContinuousHydration(targetContainers), queuedEvent.blockedOn = nextBlockedOn, false;
17404 targetContainers.shift();
17405 }
17406 return true;
17407 }
17408 function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
17409 attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);
17410 }
17411 function replayUnblockedEvents() {
17412 hasScheduledReplayAttempt = false;
17413 null !== queuedFocus && attemptReplayContinuousQueuedEvent(queuedFocus) && (queuedFocus = null);
17414 null !== queuedDrag && attemptReplayContinuousQueuedEvent(queuedDrag) && (queuedDrag = null);
17415 null !== queuedMouse && attemptReplayContinuousQueuedEvent(queuedMouse) && (queuedMouse = null);
17416 queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
17417 queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
17418 }
17419 function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
17420 queuedEvent.blockedOn === unblocked && (queuedEvent.blockedOn = null, hasScheduledReplayAttempt || (hasScheduledReplayAttempt = true, Scheduler.unstable_scheduleCallback(
17421 Scheduler.unstable_NormalPriority,
17422 replayUnblockedEvents
17423 )));
17424 }
17425 function scheduleReplayQueueIfNeeded(formReplayingQueue) {
17426 lastScheduledReplayQueue !== formReplayingQueue && (lastScheduledReplayQueue = formReplayingQueue, Scheduler.unstable_scheduleCallback(
17427 Scheduler.unstable_NormalPriority,
17428 function() {
17429 lastScheduledReplayQueue === formReplayingQueue && (lastScheduledReplayQueue = null);
17430 for (var i = 0; i < formReplayingQueue.length; i += 3) {
17431 var form = formReplayingQueue[i], submitterOrAction = formReplayingQueue[i + 1], formData = formReplayingQueue[i + 2];
17432 if ("function" !== typeof submitterOrAction)
17433 if (null === findInstanceBlockingTarget(submitterOrAction || form))
17434 continue;
17435 else break;
17436 var formInst = getInstanceFromNode(form);
17437 null !== formInst && (formReplayingQueue.splice(i, 3), i -= 3, form = {
17438 pending: true,
17439 data: formData,
17440 method: form.method,
17441 action: submitterOrAction
17442 }, Object.freeze(form), startHostTransition(
17443 formInst,
17444 form,
17445 submitterOrAction,
17446 formData
17447 ));
17448 }
17449 }
17450 ));
17451 }
17452 function retryIfBlockedOn(unblocked) {
17453 function unblock(queuedEvent) {
17454 return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
17455 }
17456 null !== queuedFocus && scheduleCallbackIfUnblocked(queuedFocus, unblocked);
17457 null !== queuedDrag && scheduleCallbackIfUnblocked(queuedDrag, unblocked);
17458 null !== queuedMouse && scheduleCallbackIfUnblocked(queuedMouse, unblocked);
17459 queuedPointers.forEach(unblock);
17460 queuedPointerCaptures.forEach(unblock);
17461 for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {
17462 var queuedTarget = queuedExplicitHydrationTargets[i];
17463 queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);
17464 }
17465 for (; 0 < queuedExplicitHydrationTargets.length && (i = queuedExplicitHydrationTargets[0], null === i.blockedOn); )
17466 attemptExplicitHydrationTarget(i), null === i.blockedOn && queuedExplicitHydrationTargets.shift();
17467 i = (unblocked.ownerDocument || unblocked).$$reactFormReplay;
17468 if (null != i)
17469 for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {
17470 var form = i[queuedTarget], submitterOrAction = i[queuedTarget + 1], formProps = form[internalPropsKey] || null;
17471 if ("function" === typeof submitterOrAction)
17472 formProps || scheduleReplayQueueIfNeeded(i);
17473 else if (formProps) {
17474 var action = null;
17475 if (submitterOrAction && submitterOrAction.hasAttribute("formAction"))
17476 if (form = submitterOrAction, formProps = submitterOrAction[internalPropsKey] || null)
17477 action = formProps.formAction;
17478 else {
17479 if (null !== findInstanceBlockingTarget(form)) continue;
17480 }
17481 else action = formProps.action;
17482 "function" === typeof action ? i[queuedTarget + 1] = action : (i.splice(queuedTarget, 3), queuedTarget -= 3);
17483 scheduleReplayQueueIfNeeded(i);
17484 }
17485 }
17486 }
17487 function defaultOnDefaultTransitionIndicator() {
17488 function handleNavigate(event) {
17489 event.canIntercept && "react-transition" === event.info && event.intercept({
17490 handler: function() {
17491 return new Promise(function(resolve) {
17492 return pendingResolve = resolve;
17493 });
17494 },
17495 focusReset: "manual",
17496 scroll: "manual"
17497 });
17498 }
17499 function handleNavigateComplete() {
17500 null !== pendingResolve && (pendingResolve(), pendingResolve = null);
17501 isCancelled || setTimeout(startFakeNavigation, 20);
17502 }
17503 function startFakeNavigation() {
17504 if (!isCancelled && !navigation.transition) {
17505 var currentEntry = navigation.currentEntry;
17506 currentEntry && null != currentEntry.url && navigation.navigate(currentEntry.url, {
17507 state: currentEntry.getState(),
17508 info: "react-transition",
17509 history: "replace"
17510 });
17511 }
17512 }
17513 if ("object" === typeof navigation) {
17514 var isCancelled = false, pendingResolve = null;
17515 navigation.addEventListener("navigate", handleNavigate);
17516 navigation.addEventListener("navigatesuccess", handleNavigateComplete);
17517 navigation.addEventListener("navigateerror", handleNavigateComplete);
17518 setTimeout(startFakeNavigation, 100);
17519 return function() {
17520 isCancelled = true;
17521 navigation.removeEventListener("navigate", handleNavigate);
17522 navigation.removeEventListener(
17523 "navigatesuccess",
17524 handleNavigateComplete
17525 );
17526 navigation.removeEventListener(
17527 "navigateerror",
17528 handleNavigateComplete
17529 );
17530 null !== pendingResolve && (pendingResolve(), pendingResolve = null);
17531 };
17532 }
17533 }
17534 function ReactDOMRoot(internalRoot) {
17535 this._internalRoot = internalRoot;
17536 }
17537 function ReactDOMHydrationRoot(internalRoot) {
17538 this._internalRoot = internalRoot;
17539 }
17540 function warnIfReactDOMContainerInDEV(container) {
17541 container[internalContainerInstanceKey] && (container._reactRootContainer ? console.error(
17542 "You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."
17543 ) : console.error(
17544 "You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."
17545 ));
17546 }
17547 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
17548 var Scheduler = require_scheduler(), React = require_react(), ReactDOM = require_react_dom(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
17549 /* @__PURE__ */ Symbol.for("react.scope");
17550 var REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity");
17551 /* @__PURE__ */ Symbol.for("react.legacy_hidden");
17552 /* @__PURE__ */ Symbol.for("react.tracing_marker");
17553 var REACT_MEMO_CACHE_SENTINEL = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel");
17554 /* @__PURE__ */ Symbol.for("react.view_transition");
17555 var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ReactDOMSharedInternals = ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, NotPending = Object.freeze({
17556 pending: false,
17557 data: null,
17558 method: null,
17559 action: null
17560 }), valueStack = [];
17561 var fiberStack = [];
17562 var index$jscomp$0 = -1, contextStackCursor = createCursor(null), contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), hostTransitionProviderCursor = createCursor(null), disabledDepth = 0, prevLog, prevInfo, prevWarn, prevError, prevGroup, prevGroupCollapsed, prevGroupEnd;
17563 disabledLog.__reactDisabledLog = true;
17564 var prefix, suffix, reentry = false;
17565 var componentFrameCache = new ("function" === typeof WeakMap ? WeakMap : Map)();
17566 var current = null, isRendering = false, hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, shouldYield = Scheduler.unstable_shouldYield, requestPaint = Scheduler.unstable_requestPaint, now$1 = Scheduler.unstable_now, getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel, ImmediatePriority = Scheduler.unstable_ImmediatePriority, UserBlockingPriority = Scheduler.unstable_UserBlockingPriority, NormalPriority$1 = Scheduler.unstable_NormalPriority, LowPriority = Scheduler.unstable_LowPriority, IdlePriority = Scheduler.unstable_IdlePriority, log$1 = Scheduler.log, unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue, rendererID = null, injectedHook = null, hasLoggedError = false, isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__, clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, log = Math.log, LN2 = Math.LN2, nextTransitionUpdateLane = 256, nextTransitionDeferredLane = 262144, nextRetryLane = 4194304, DiscreteEventPriority = 2, ContinuousEventPriority = 8, DefaultEventPriority = 32, IdleEventPriority = 268435456, randomKey = Math.random().toString(36).slice(2), internalInstanceKey = "__reactFiber$" + randomKey, internalPropsKey = "__reactProps$" + randomKey, internalContainerInstanceKey = "__reactContainer$" + randomKey, internalEventHandlersKey = "__reactEvents$" + randomKey, internalEventHandlerListenersKey = "__reactListeners$" + randomKey, internalEventHandlesSetKey = "__reactHandles$" + randomKey, internalRootNodeResourcesKey = "__reactResources$" + randomKey, internalHoistableMarker = "__reactMarker$" + randomKey, allNativeEvents = /* @__PURE__ */ new Set(), registrationNameDependencies = {}, possibleRegistrationNames = {}, hasReadOnlyValue = {
17567 button: true,
17568 checkbox: true,
17569 image: true,
17570 hidden: true,
17571 radio: true,
17572 reset: true,
17573 submit: true
17574 }, VALID_ATTRIBUTE_NAME_REGEX = RegExp(
17575 "^[: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][: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\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
17576 ), illegalAttributeNameCache = {}, validatedAttributeNameCache = {}, escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g, didWarnValueDefaultValue$1 = false, didWarnCheckedDefaultChecked = false, didWarnSelectedSetOnOption = false, didWarnInvalidChild = false, didWarnInvalidInnerHTML = false;
17577 var didWarnValueDefaultValue = false;
17578 var valuePropNames = ["value", "defaultValue"], didWarnValDefaultVal = false, needsEscaping = /["'&<>\n\t]|^\s|\s$/, 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".split(
17579 " "
17580 ), inScopeTags = "applet caption html table td th marquee object template foreignObject desc title".split(
17581 " "
17582 ), buttonScopeTags = inScopeTags.concat(["button"]), impliedEndTags = "dd dt li option optgroup p rp rt".split(" "), emptyAncestorInfoDev = {
17583 current: null,
17584 formTag: null,
17585 aTagInScope: null,
17586 buttonTagInScope: null,
17587 nobrTagInScope: null,
17588 pTagInButtonScope: null,
17589 listItemTagAutoclosing: null,
17590 dlItemTagAutoclosing: null,
17591 containerTagInScope: null,
17592 implicitRootScope: false
17593 }, didWarn = {}, shorthandToLonghand = {
17594 animation: "animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(
17595 " "
17596 ),
17597 background: "backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(
17598 " "
17599 ),
17600 backgroundPosition: ["backgroundPositionX", "backgroundPositionY"],
17601 border: "borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(
17602 " "
17603 ),
17604 borderBlockEnd: [
17605 "borderBlockEndColor",
17606 "borderBlockEndStyle",
17607 "borderBlockEndWidth"
17608 ],
17609 borderBlockStart: [
17610 "borderBlockStartColor",
17611 "borderBlockStartStyle",
17612 "borderBlockStartWidth"
17613 ],
17614 borderBottom: [
17615 "borderBottomColor",
17616 "borderBottomStyle",
17617 "borderBottomWidth"
17618 ],
17619 borderColor: [
17620 "borderBottomColor",
17621 "borderLeftColor",
17622 "borderRightColor",
17623 "borderTopColor"
17624 ],
17625 borderImage: [
17626 "borderImageOutset",
17627 "borderImageRepeat",
17628 "borderImageSlice",
17629 "borderImageSource",
17630 "borderImageWidth"
17631 ],
17632 borderInlineEnd: [
17633 "borderInlineEndColor",
17634 "borderInlineEndStyle",
17635 "borderInlineEndWidth"
17636 ],
17637 borderInlineStart: [
17638 "borderInlineStartColor",
17639 "borderInlineStartStyle",
17640 "borderInlineStartWidth"
17641 ],
17642 borderLeft: ["borderLeftColor", "borderLeftStyle", "borderLeftWidth"],
17643 borderRadius: [
17644 "borderBottomLeftRadius",
17645 "borderBottomRightRadius",
17646 "borderTopLeftRadius",
17647 "borderTopRightRadius"
17648 ],
17649 borderRight: [
17650 "borderRightColor",
17651 "borderRightStyle",
17652 "borderRightWidth"
17653 ],
17654 borderStyle: [
17655 "borderBottomStyle",
17656 "borderLeftStyle",
17657 "borderRightStyle",
17658 "borderTopStyle"
17659 ],
17660 borderTop: ["borderTopColor", "borderTopStyle", "borderTopWidth"],
17661 borderWidth: [
17662 "borderBottomWidth",
17663 "borderLeftWidth",
17664 "borderRightWidth",
17665 "borderTopWidth"
17666 ],
17667 columnRule: ["columnRuleColor", "columnRuleStyle", "columnRuleWidth"],
17668 columns: ["columnCount", "columnWidth"],
17669 flex: ["flexBasis", "flexGrow", "flexShrink"],
17670 flexFlow: ["flexDirection", "flexWrap"],
17671 font: "fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(
17672 " "
17673 ),
17674 fontVariant: "fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(
17675 " "
17676 ),
17677 gap: ["columnGap", "rowGap"],
17678 grid: "gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(
17679 " "
17680 ),
17681 gridArea: [
17682 "gridColumnEnd",
17683 "gridColumnStart",
17684 "gridRowEnd",
17685 "gridRowStart"
17686 ],
17687 gridColumn: ["gridColumnEnd", "gridColumnStart"],
17688 gridColumnGap: ["columnGap"],
17689 gridGap: ["columnGap", "rowGap"],
17690 gridRow: ["gridRowEnd", "gridRowStart"],
17691 gridRowGap: ["rowGap"],
17692 gridTemplate: [
17693 "gridTemplateAreas",
17694 "gridTemplateColumns",
17695 "gridTemplateRows"
17696 ],
17697 listStyle: ["listStyleImage", "listStylePosition", "listStyleType"],
17698 margin: ["marginBottom", "marginLeft", "marginRight", "marginTop"],
17699 marker: ["markerEnd", "markerMid", "markerStart"],
17700 mask: "maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(
17701 " "
17702 ),
17703 maskPosition: ["maskPositionX", "maskPositionY"],
17704 outline: ["outlineColor", "outlineStyle", "outlineWidth"],
17705 overflow: ["overflowX", "overflowY"],
17706 padding: ["paddingBottom", "paddingLeft", "paddingRight", "paddingTop"],
17707 placeContent: ["alignContent", "justifyContent"],
17708 placeItems: ["alignItems", "justifyItems"],
17709 placeSelf: ["alignSelf", "justifySelf"],
17710 textDecoration: [
17711 "textDecorationColor",
17712 "textDecorationLine",
17713 "textDecorationStyle"
17714 ],
17715 textEmphasis: ["textEmphasisColor", "textEmphasisStyle"],
17716 transition: [
17717 "transitionDelay",
17718 "transitionDuration",
17719 "transitionProperty",
17720 "transitionTimingFunction"
17721 ],
17722 wordWrap: ["overflowWrap"]
17723 }, uppercasePattern = /([A-Z])/g, msPattern$1 = /^ms-/, badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/, msPattern = /^-ms-/, hyphenPattern = /-(.)/g, badStyleValueWithSemicolonPattern = /;\s*$/, warnedStyleNames = {}, warnedStyleValues = {}, warnedForNaNValue = false, warnedForInfinityValue = false, unitlessNumbers = new Set(
17724 "animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(
17725 " "
17726 )
17727 ), MATH_NAMESPACE = "http://www.w3.org/1998/Math/MathML", SVG_NAMESPACE = "http://www.w3.org/2000/svg", aliases = /* @__PURE__ */ new Map([
17728 ["acceptCharset", "accept-charset"],
17729 ["htmlFor", "for"],
17730 ["httpEquiv", "http-equiv"],
17731 ["crossOrigin", "crossorigin"],
17732 ["accentHeight", "accent-height"],
17733 ["alignmentBaseline", "alignment-baseline"],
17734 ["arabicForm", "arabic-form"],
17735 ["baselineShift", "baseline-shift"],
17736 ["capHeight", "cap-height"],
17737 ["clipPath", "clip-path"],
17738 ["clipRule", "clip-rule"],
17739 ["colorInterpolation", "color-interpolation"],
17740 ["colorInterpolationFilters", "color-interpolation-filters"],
17741 ["colorProfile", "color-profile"],
17742 ["colorRendering", "color-rendering"],
17743 ["dominantBaseline", "dominant-baseline"],
17744 ["enableBackground", "enable-background"],
17745 ["fillOpacity", "fill-opacity"],
17746 ["fillRule", "fill-rule"],
17747 ["floodColor", "flood-color"],
17748 ["floodOpacity", "flood-opacity"],
17749 ["fontFamily", "font-family"],
17750 ["fontSize", "font-size"],
17751 ["fontSizeAdjust", "font-size-adjust"],
17752 ["fontStretch", "font-stretch"],
17753 ["fontStyle", "font-style"],
17754 ["fontVariant", "font-variant"],
17755 ["fontWeight", "font-weight"],
17756 ["glyphName", "glyph-name"],
17757 ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
17758 ["glyphOrientationVertical", "glyph-orientation-vertical"],
17759 ["horizAdvX", "horiz-adv-x"],
17760 ["horizOriginX", "horiz-origin-x"],
17761 ["imageRendering", "image-rendering"],
17762 ["letterSpacing", "letter-spacing"],
17763 ["lightingColor", "lighting-color"],
17764 ["markerEnd", "marker-end"],
17765 ["markerMid", "marker-mid"],
17766 ["markerStart", "marker-start"],
17767 ["overlinePosition", "overline-position"],
17768 ["overlineThickness", "overline-thickness"],
17769 ["paintOrder", "paint-order"],
17770 ["panose-1", "panose-1"],
17771 ["pointerEvents", "pointer-events"],
17772 ["renderingIntent", "rendering-intent"],
17773 ["shapeRendering", "shape-rendering"],
17774 ["stopColor", "stop-color"],
17775 ["stopOpacity", "stop-opacity"],
17776 ["strikethroughPosition", "strikethrough-position"],
17777 ["strikethroughThickness", "strikethrough-thickness"],
17778 ["strokeDasharray", "stroke-dasharray"],
17779 ["strokeDashoffset", "stroke-dashoffset"],
17780 ["strokeLinecap", "stroke-linecap"],
17781 ["strokeLinejoin", "stroke-linejoin"],
17782 ["strokeMiterlimit", "stroke-miterlimit"],
17783 ["strokeOpacity", "stroke-opacity"],
17784 ["strokeWidth", "stroke-width"],
17785 ["textAnchor", "text-anchor"],
17786 ["textDecoration", "text-decoration"],
17787 ["textRendering", "text-rendering"],
17788 ["transformOrigin", "transform-origin"],
17789 ["underlinePosition", "underline-position"],
17790 ["underlineThickness", "underline-thickness"],
17791 ["unicodeBidi", "unicode-bidi"],
17792 ["unicodeRange", "unicode-range"],
17793 ["unitsPerEm", "units-per-em"],
17794 ["vAlphabetic", "v-alphabetic"],
17795 ["vHanging", "v-hanging"],
17796 ["vIdeographic", "v-ideographic"],
17797 ["vMathematical", "v-mathematical"],
17798 ["vectorEffect", "vector-effect"],
17799 ["vertAdvY", "vert-adv-y"],
17800 ["vertOriginX", "vert-origin-x"],
17801 ["vertOriginY", "vert-origin-y"],
17802 ["wordSpacing", "word-spacing"],
17803 ["writingMode", "writing-mode"],
17804 ["xmlnsXlink", "xmlns:xlink"],
17805 ["xHeight", "x-height"]
17806 ]), possibleStandardNames = {
17807 accept: "accept",
17808 acceptcharset: "acceptCharset",
17809 "accept-charset": "acceptCharset",
17810 accesskey: "accessKey",
17811 action: "action",
17812 allowfullscreen: "allowFullScreen",
17813 alt: "alt",
17814 as: "as",
17815 async: "async",
17816 autocapitalize: "autoCapitalize",
17817 autocomplete: "autoComplete",
17818 autocorrect: "autoCorrect",
17819 autofocus: "autoFocus",
17820 autoplay: "autoPlay",
17821 autosave: "autoSave",
17822 capture: "capture",
17823 cellpadding: "cellPadding",
17824 cellspacing: "cellSpacing",
17825 challenge: "challenge",
17826 charset: "charSet",
17827 checked: "checked",
17828 children: "children",
17829 cite: "cite",
17830 class: "className",
17831 classid: "classID",
17832 classname: "className",
17833 cols: "cols",
17834 colspan: "colSpan",
17835 content: "content",
17836 contenteditable: "contentEditable",
17837 contextmenu: "contextMenu",
17838 controls: "controls",
17839 controlslist: "controlsList",
17840 coords: "coords",
17841 crossorigin: "crossOrigin",
17842 dangerouslysetinnerhtml: "dangerouslySetInnerHTML",
17843 data: "data",
17844 datetime: "dateTime",
17845 default: "default",
17846 defaultchecked: "defaultChecked",
17847 defaultvalue: "defaultValue",
17848 defer: "defer",
17849 dir: "dir",
17850 disabled: "disabled",
17851 disablepictureinpicture: "disablePictureInPicture",
17852 disableremoteplayback: "disableRemotePlayback",
17853 download: "download",
17854 draggable: "draggable",
17855 enctype: "encType",
17856 enterkeyhint: "enterKeyHint",
17857 fetchpriority: "fetchPriority",
17858 for: "htmlFor",
17859 form: "form",
17860 formmethod: "formMethod",
17861 formaction: "formAction",
17862 formenctype: "formEncType",
17863 formnovalidate: "formNoValidate",
17864 formtarget: "formTarget",
17865 frameborder: "frameBorder",
17866 headers: "headers",
17867 height: "height",
17868 hidden: "hidden",
17869 high: "high",
17870 href: "href",
17871 hreflang: "hrefLang",
17872 htmlfor: "htmlFor",
17873 httpequiv: "httpEquiv",
17874 "http-equiv": "httpEquiv",
17875 icon: "icon",
17876 id: "id",
17877 imagesizes: "imageSizes",
17878 imagesrcset: "imageSrcSet",
17879 inert: "inert",
17880 innerhtml: "innerHTML",
17881 inputmode: "inputMode",
17882 integrity: "integrity",
17883 is: "is",
17884 itemid: "itemID",
17885 itemprop: "itemProp",
17886 itemref: "itemRef",
17887 itemscope: "itemScope",
17888 itemtype: "itemType",
17889 keyparams: "keyParams",
17890 keytype: "keyType",
17891 kind: "kind",
17892 label: "label",
17893 lang: "lang",
17894 list: "list",
17895 loop: "loop",
17896 low: "low",
17897 manifest: "manifest",
17898 marginwidth: "marginWidth",
17899 marginheight: "marginHeight",
17900 max: "max",
17901 maxlength: "maxLength",
17902 media: "media",
17903 mediagroup: "mediaGroup",
17904 method: "method",
17905 min: "min",
17906 minlength: "minLength",
17907 multiple: "multiple",
17908 muted: "muted",
17909 name: "name",
17910 nomodule: "noModule",
17911 nonce: "nonce",
17912 novalidate: "noValidate",
17913 open: "open",
17914 optimum: "optimum",
17915 pattern: "pattern",
17916 placeholder: "placeholder",
17917 playsinline: "playsInline",
17918 poster: "poster",
17919 preload: "preload",
17920 profile: "profile",
17921 radiogroup: "radioGroup",
17922 readonly: "readOnly",
17923 referrerpolicy: "referrerPolicy",
17924 rel: "rel",
17925 required: "required",
17926 reversed: "reversed",
17927 role: "role",
17928 rows: "rows",
17929 rowspan: "rowSpan",
17930 sandbox: "sandbox",
17931 scope: "scope",
17932 scoped: "scoped",
17933 scrolling: "scrolling",
17934 seamless: "seamless",
17935 selected: "selected",
17936 shape: "shape",
17937 size: "size",
17938 sizes: "sizes",
17939 span: "span",
17940 spellcheck: "spellCheck",
17941 src: "src",
17942 srcdoc: "srcDoc",
17943 srclang: "srcLang",
17944 srcset: "srcSet",
17945 start: "start",
17946 step: "step",
17947 style: "style",
17948 summary: "summary",
17949 tabindex: "tabIndex",
17950 target: "target",
17951 title: "title",
17952 type: "type",
17953 usemap: "useMap",
17954 value: "value",
17955 width: "width",
17956 wmode: "wmode",
17957 wrap: "wrap",
17958 about: "about",
17959 accentheight: "accentHeight",
17960 "accent-height": "accentHeight",
17961 accumulate: "accumulate",
17962 additive: "additive",
17963 alignmentbaseline: "alignmentBaseline",
17964 "alignment-baseline": "alignmentBaseline",
17965 allowreorder: "allowReorder",
17966 alphabetic: "alphabetic",
17967 amplitude: "amplitude",
17968 arabicform: "arabicForm",
17969 "arabic-form": "arabicForm",
17970 ascent: "ascent",
17971 attributename: "attributeName",
17972 attributetype: "attributeType",
17973 autoreverse: "autoReverse",
17974 azimuth: "azimuth",
17975 basefrequency: "baseFrequency",
17976 baselineshift: "baselineShift",
17977 "baseline-shift": "baselineShift",
17978 baseprofile: "baseProfile",
17979 bbox: "bbox",
17980 begin: "begin",
17981 bias: "bias",
17982 by: "by",
17983 calcmode: "calcMode",
17984 capheight: "capHeight",
17985 "cap-height": "capHeight",
17986 clip: "clip",
17987 clippath: "clipPath",
17988 "clip-path": "clipPath",
17989 clippathunits: "clipPathUnits",
17990 cliprule: "clipRule",
17991 "clip-rule": "clipRule",
17992 color: "color",
17993 colorinterpolation: "colorInterpolation",
17994 "color-interpolation": "colorInterpolation",
17995 colorinterpolationfilters: "colorInterpolationFilters",
17996 "color-interpolation-filters": "colorInterpolationFilters",
17997 colorprofile: "colorProfile",
17998 "color-profile": "colorProfile",
17999 colorrendering: "colorRendering",
18000 "color-rendering": "colorRendering",
18001 contentscripttype: "contentScriptType",
18002 contentstyletype: "contentStyleType",
18003 cursor: "cursor",
18004 cx: "cx",
18005 cy: "cy",
18006 d: "d",
18007 datatype: "datatype",
18008 decelerate: "decelerate",
18009 descent: "descent",
18010 diffuseconstant: "diffuseConstant",
18011 direction: "direction",
18012 display: "display",
18013 divisor: "divisor",
18014 dominantbaseline: "dominantBaseline",
18015 "dominant-baseline": "dominantBaseline",
18016 dur: "dur",
18017 dx: "dx",
18018 dy: "dy",
18019 edgemode: "edgeMode",
18020 elevation: "elevation",
18021 enablebackground: "enableBackground",
18022 "enable-background": "enableBackground",
18023 end: "end",
18024 exponent: "exponent",
18025 externalresourcesrequired: "externalResourcesRequired",
18026 fill: "fill",
18027 fillopacity: "fillOpacity",
18028 "fill-opacity": "fillOpacity",
18029 fillrule: "fillRule",
18030 "fill-rule": "fillRule",
18031 filter: "filter",
18032 filterres: "filterRes",
18033 filterunits: "filterUnits",
18034 floodopacity: "floodOpacity",
18035 "flood-opacity": "floodOpacity",
18036 floodcolor: "floodColor",
18037 "flood-color": "floodColor",
18038 focusable: "focusable",
18039 fontfamily: "fontFamily",
18040 "font-family": "fontFamily",
18041 fontsize: "fontSize",
18042 "font-size": "fontSize",
18043 fontsizeadjust: "fontSizeAdjust",
18044 "font-size-adjust": "fontSizeAdjust",
18045 fontstretch: "fontStretch",
18046 "font-stretch": "fontStretch",
18047 fontstyle: "fontStyle",
18048 "font-style": "fontStyle",
18049 fontvariant: "fontVariant",
18050 "font-variant": "fontVariant",
18051 fontweight: "fontWeight",
18052 "font-weight": "fontWeight",
18053 format: "format",
18054 from: "from",
18055 fx: "fx",
18056 fy: "fy",
18057 g1: "g1",
18058 g2: "g2",
18059 glyphname: "glyphName",
18060 "glyph-name": "glyphName",
18061 glyphorientationhorizontal: "glyphOrientationHorizontal",
18062 "glyph-orientation-horizontal": "glyphOrientationHorizontal",
18063 glyphorientationvertical: "glyphOrientationVertical",
18064 "glyph-orientation-vertical": "glyphOrientationVertical",
18065 glyphref: "glyphRef",
18066 gradienttransform: "gradientTransform",
18067 gradientunits: "gradientUnits",
18068 hanging: "hanging",
18069 horizadvx: "horizAdvX",
18070 "horiz-adv-x": "horizAdvX",
18071 horizoriginx: "horizOriginX",
18072 "horiz-origin-x": "horizOriginX",
18073 ideographic: "ideographic",
18074 imagerendering: "imageRendering",
18075 "image-rendering": "imageRendering",
18076 in2: "in2",
18077 in: "in",
18078 inlist: "inlist",
18079 intercept: "intercept",
18080 k1: "k1",
18081 k2: "k2",
18082 k3: "k3",
18083 k4: "k4",
18084 k: "k",
18085 kernelmatrix: "kernelMatrix",
18086 kernelunitlength: "kernelUnitLength",
18087 kerning: "kerning",
18088 keypoints: "keyPoints",
18089 keysplines: "keySplines",
18090 keytimes: "keyTimes",
18091 lengthadjust: "lengthAdjust",
18092 letterspacing: "letterSpacing",
18093 "letter-spacing": "letterSpacing",
18094 lightingcolor: "lightingColor",
18095 "lighting-color": "lightingColor",
18096 limitingconeangle: "limitingConeAngle",
18097 local: "local",
18098 markerend: "markerEnd",
18099 "marker-end": "markerEnd",
18100 markerheight: "markerHeight",
18101 markermid: "markerMid",
18102 "marker-mid": "markerMid",
18103 markerstart: "markerStart",
18104 "marker-start": "markerStart",
18105 markerunits: "markerUnits",
18106 markerwidth: "markerWidth",
18107 mask: "mask",
18108 maskcontentunits: "maskContentUnits",
18109 maskunits: "maskUnits",
18110 mathematical: "mathematical",
18111 mode: "mode",
18112 numoctaves: "numOctaves",
18113 offset: "offset",
18114 opacity: "opacity",
18115 operator: "operator",
18116 order: "order",
18117 orient: "orient",
18118 orientation: "orientation",
18119 origin: "origin",
18120 overflow: "overflow",
18121 overlineposition: "overlinePosition",
18122 "overline-position": "overlinePosition",
18123 overlinethickness: "overlineThickness",
18124 "overline-thickness": "overlineThickness",
18125 paintorder: "paintOrder",
18126 "paint-order": "paintOrder",
18127 panose1: "panose1",
18128 "panose-1": "panose1",
18129 pathlength: "pathLength",
18130 patterncontentunits: "patternContentUnits",
18131 patterntransform: "patternTransform",
18132 patternunits: "patternUnits",
18133 pointerevents: "pointerEvents",
18134 "pointer-events": "pointerEvents",
18135 points: "points",
18136 pointsatx: "pointsAtX",
18137 pointsaty: "pointsAtY",
18138 pointsatz: "pointsAtZ",
18139 popover: "popover",
18140 popovertarget: "popoverTarget",
18141 popovertargetaction: "popoverTargetAction",
18142 prefix: "prefix",
18143 preservealpha: "preserveAlpha",
18144 preserveaspectratio: "preserveAspectRatio",
18145 primitiveunits: "primitiveUnits",
18146 property: "property",
18147 r: "r",
18148 radius: "radius",
18149 refx: "refX",
18150 refy: "refY",
18151 renderingintent: "renderingIntent",
18152 "rendering-intent": "renderingIntent",
18153 repeatcount: "repeatCount",
18154 repeatdur: "repeatDur",
18155 requiredextensions: "requiredExtensions",
18156 requiredfeatures: "requiredFeatures",
18157 resource: "resource",
18158 restart: "restart",
18159 result: "result",
18160 results: "results",
18161 rotate: "rotate",
18162 rx: "rx",
18163 ry: "ry",
18164 scale: "scale",
18165 security: "security",
18166 seed: "seed",
18167 shaperendering: "shapeRendering",
18168 "shape-rendering": "shapeRendering",
18169 slope: "slope",
18170 spacing: "spacing",
18171 specularconstant: "specularConstant",
18172 specularexponent: "specularExponent",
18173 speed: "speed",
18174 spreadmethod: "spreadMethod",
18175 startoffset: "startOffset",
18176 stddeviation: "stdDeviation",
18177 stemh: "stemh",
18178 stemv: "stemv",
18179 stitchtiles: "stitchTiles",
18180 stopcolor: "stopColor",
18181 "stop-color": "stopColor",
18182 stopopacity: "stopOpacity",
18183 "stop-opacity": "stopOpacity",
18184 strikethroughposition: "strikethroughPosition",
18185 "strikethrough-position": "strikethroughPosition",
18186 strikethroughthickness: "strikethroughThickness",
18187 "strikethrough-thickness": "strikethroughThickness",
18188 string: "string",
18189 stroke: "stroke",
18190 strokedasharray: "strokeDasharray",
18191 "stroke-dasharray": "strokeDasharray",
18192 strokedashoffset: "strokeDashoffset",
18193 "stroke-dashoffset": "strokeDashoffset",
18194 strokelinecap: "strokeLinecap",
18195 "stroke-linecap": "strokeLinecap",
18196 strokelinejoin: "strokeLinejoin",
18197 "stroke-linejoin": "strokeLinejoin",
18198 strokemiterlimit: "strokeMiterlimit",
18199 "stroke-miterlimit": "strokeMiterlimit",
18200 strokewidth: "strokeWidth",
18201 "stroke-width": "strokeWidth",
18202 strokeopacity: "strokeOpacity",
18203 "stroke-opacity": "strokeOpacity",
18204 suppresscontenteditablewarning: "suppressContentEditableWarning",
18205 suppresshydrationwarning: "suppressHydrationWarning",
18206 surfacescale: "surfaceScale",
18207 systemlanguage: "systemLanguage",
18208 tablevalues: "tableValues",
18209 targetx: "targetX",
18210 targety: "targetY",
18211 textanchor: "textAnchor",
18212 "text-anchor": "textAnchor",
18213 textdecoration: "textDecoration",
18214 "text-decoration": "textDecoration",
18215 textlength: "textLength",
18216 textrendering: "textRendering",
18217 "text-rendering": "textRendering",
18218 to: "to",
18219 transform: "transform",
18220 transformorigin: "transformOrigin",
18221 "transform-origin": "transformOrigin",
18222 typeof: "typeof",
18223 u1: "u1",
18224 u2: "u2",
18225 underlineposition: "underlinePosition",
18226 "underline-position": "underlinePosition",
18227 underlinethickness: "underlineThickness",
18228 "underline-thickness": "underlineThickness",
18229 unicode: "unicode",
18230 unicodebidi: "unicodeBidi",
18231 "unicode-bidi": "unicodeBidi",
18232 unicoderange: "unicodeRange",
18233 "unicode-range": "unicodeRange",
18234 unitsperem: "unitsPerEm",
18235 "units-per-em": "unitsPerEm",
18236 unselectable: "unselectable",
18237 valphabetic: "vAlphabetic",
18238 "v-alphabetic": "vAlphabetic",
18239 values: "values",
18240 vectoreffect: "vectorEffect",
18241 "vector-effect": "vectorEffect",
18242 version: "version",
18243 vertadvy: "vertAdvY",
18244 "vert-adv-y": "vertAdvY",
18245 vertoriginx: "vertOriginX",
18246 "vert-origin-x": "vertOriginX",
18247 vertoriginy: "vertOriginY",
18248 "vert-origin-y": "vertOriginY",
18249 vhanging: "vHanging",
18250 "v-hanging": "vHanging",
18251 videographic: "vIdeographic",
18252 "v-ideographic": "vIdeographic",
18253 viewbox: "viewBox",
18254 viewtarget: "viewTarget",
18255 visibility: "visibility",
18256 vmathematical: "vMathematical",
18257 "v-mathematical": "vMathematical",
18258 vocab: "vocab",
18259 widths: "widths",
18260 wordspacing: "wordSpacing",
18261 "word-spacing": "wordSpacing",
18262 writingmode: "writingMode",
18263 "writing-mode": "writingMode",
18264 x1: "x1",
18265 x2: "x2",
18266 x: "x",
18267 xchannelselector: "xChannelSelector",
18268 xheight: "xHeight",
18269 "x-height": "xHeight",
18270 xlinkactuate: "xlinkActuate",
18271 "xlink:actuate": "xlinkActuate",
18272 xlinkarcrole: "xlinkArcrole",
18273 "xlink:arcrole": "xlinkArcrole",
18274 xlinkhref: "xlinkHref",
18275 "xlink:href": "xlinkHref",
18276 xlinkrole: "xlinkRole",
18277 "xlink:role": "xlinkRole",
18278 xlinkshow: "xlinkShow",
18279 "xlink:show": "xlinkShow",
18280 xlinktitle: "xlinkTitle",
18281 "xlink:title": "xlinkTitle",
18282 xlinktype: "xlinkType",
18283 "xlink:type": "xlinkType",
18284 xmlbase: "xmlBase",
18285 "xml:base": "xmlBase",
18286 xmllang: "xmlLang",
18287 "xml:lang": "xmlLang",
18288 xmlns: "xmlns",
18289 "xml:space": "xmlSpace",
18290 xmlnsxlink: "xmlnsXlink",
18291 "xmlns:xlink": "xmlnsXlink",
18292 xmlspace: "xmlSpace",
18293 y1: "y1",
18294 y2: "y2",
18295 y: "y",
18296 ychannelselector: "yChannelSelector",
18297 z: "z",
18298 zoomandpan: "zoomAndPan"
18299 }, ariaProperties = {
18300 "aria-current": 0,
18301 "aria-description": 0,
18302 "aria-details": 0,
18303 "aria-disabled": 0,
18304 "aria-hidden": 0,
18305 "aria-invalid": 0,
18306 "aria-keyshortcuts": 0,
18307 "aria-label": 0,
18308 "aria-roledescription": 0,
18309 "aria-autocomplete": 0,
18310 "aria-checked": 0,
18311 "aria-expanded": 0,
18312 "aria-haspopup": 0,
18313 "aria-level": 0,
18314 "aria-modal": 0,
18315 "aria-multiline": 0,
18316 "aria-multiselectable": 0,
18317 "aria-orientation": 0,
18318 "aria-placeholder": 0,
18319 "aria-pressed": 0,
18320 "aria-readonly": 0,
18321 "aria-required": 0,
18322 "aria-selected": 0,
18323 "aria-sort": 0,
18324 "aria-valuemax": 0,
18325 "aria-valuemin": 0,
18326 "aria-valuenow": 0,
18327 "aria-valuetext": 0,
18328 "aria-atomic": 0,
18329 "aria-busy": 0,
18330 "aria-live": 0,
18331 "aria-relevant": 0,
18332 "aria-dropeffect": 0,
18333 "aria-grabbed": 0,
18334 "aria-activedescendant": 0,
18335 "aria-colcount": 0,
18336 "aria-colindex": 0,
18337 "aria-colspan": 0,
18338 "aria-controls": 0,
18339 "aria-describedby": 0,
18340 "aria-errormessage": 0,
18341 "aria-flowto": 0,
18342 "aria-labelledby": 0,
18343 "aria-owns": 0,
18344 "aria-posinset": 0,
18345 "aria-rowcount": 0,
18346 "aria-rowindex": 0,
18347 "aria-rowspan": 0,
18348 "aria-setsize": 0,
18349 "aria-braillelabel": 0,
18350 "aria-brailleroledescription": 0,
18351 "aria-colindextext": 0,
18352 "aria-rowindextext": 0
18353 }, warnedProperties$1 = {}, rARIA$1 = RegExp(
18354 "^(aria)-[: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\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
18355 ), rARIACamel$1 = RegExp(
18356 "^(aria)[A-Z][: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\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
18357 ), didWarnValueNull = false, warnedProperties = {}, EVENT_NAME_REGEX = /^on./, INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/, rARIA = RegExp(
18358 "^(aria)-[: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\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
18359 ), rARIACamel = RegExp(
18360 "^(aria)[A-Z][: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\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
18361 ), isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i, currentReplayingEvent = null, restoreTarget = null, restoreQueue = null, isInsideEventHandler = false, canUseDOM = !("undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement), passiveBrowserEventsSupported = false;
18362 if (canUseDOM)
18363 try {
18364 var options$jscomp$0 = {};
18365 Object.defineProperty(options$jscomp$0, "passive", {
18366 get: function() {
18367 passiveBrowserEventsSupported = true;
18368 }
18369 });
18370 window.addEventListener("test", options$jscomp$0, options$jscomp$0);
18371 window.removeEventListener("test", options$jscomp$0, options$jscomp$0);
18372 } catch (e) {
18373 passiveBrowserEventsSupported = false;
18374 }
18375 var root = null, startText = null, fallbackText = null, EventInterface = {
18376 eventPhase: 0,
18377 bubbles: 0,
18378 cancelable: 0,
18379 timeStamp: function(event) {
18380 return event.timeStamp || Date.now();
18381 },
18382 defaultPrevented: 0,
18383 isTrusted: 0
18384 }, SyntheticEvent = createSyntheticEvent(EventInterface), UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }), SyntheticUIEvent = createSyntheticEvent(UIEventInterface), lastMovementX, lastMovementY, lastMouseEvent, MouseEventInterface = assign({}, UIEventInterface, {
18385 screenX: 0,
18386 screenY: 0,
18387 clientX: 0,
18388 clientY: 0,
18389 pageX: 0,
18390 pageY: 0,
18391 ctrlKey: 0,
18392 shiftKey: 0,
18393 altKey: 0,
18394 metaKey: 0,
18395 getModifierState: getEventModifierState,
18396 button: 0,
18397 buttons: 0,
18398 relatedTarget: function(event) {
18399 return void 0 === event.relatedTarget ? event.fromElement === event.srcElement ? event.toElement : event.fromElement : event.relatedTarget;
18400 },
18401 movementX: function(event) {
18402 if ("movementX" in event) return event.movementX;
18403 event !== lastMouseEvent && (lastMouseEvent && "mousemove" === event.type ? (lastMovementX = event.screenX - lastMouseEvent.screenX, lastMovementY = event.screenY - lastMouseEvent.screenY) : lastMovementY = lastMovementX = 0, lastMouseEvent = event);
18404 return lastMovementX;
18405 },
18406 movementY: function(event) {
18407 return "movementY" in event ? event.movementY : lastMovementY;
18408 }
18409 }), SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface), DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }), SyntheticDragEvent = createSyntheticEvent(DragEventInterface), FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }), SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface), AnimationEventInterface = assign({}, EventInterface, {
18410 animationName: 0,
18411 elapsedTime: 0,
18412 pseudoElement: 0
18413 }), SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface), ClipboardEventInterface = assign({}, EventInterface, {
18414 clipboardData: function(event) {
18415 return "clipboardData" in event ? event.clipboardData : window.clipboardData;
18416 }
18417 }), SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface), CompositionEventInterface = assign({}, EventInterface, { data: 0 }), SyntheticCompositionEvent = createSyntheticEvent(
18418 CompositionEventInterface
18419 ), SyntheticInputEvent = SyntheticCompositionEvent, normalizeKey = {
18420 Esc: "Escape",
18421 Spacebar: " ",
18422 Left: "ArrowLeft",
18423 Up: "ArrowUp",
18424 Right: "ArrowRight",
18425 Down: "ArrowDown",
18426 Del: "Delete",
18427 Win: "OS",
18428 Menu: "ContextMenu",
18429 Apps: "ContextMenu",
18430 Scroll: "ScrollLock",
18431 MozPrintableKey: "Unidentified"
18432 }, translateToKey = {
18433 8: "Backspace",
18434 9: "Tab",
18435 12: "Clear",
18436 13: "Enter",
18437 16: "Shift",
18438 17: "Control",
18439 18: "Alt",
18440 19: "Pause",
18441 20: "CapsLock",
18442 27: "Escape",
18443 32: " ",
18444 33: "PageUp",
18445 34: "PageDown",
18446 35: "End",
18447 36: "Home",
18448 37: "ArrowLeft",
18449 38: "ArrowUp",
18450 39: "ArrowRight",
18451 40: "ArrowDown",
18452 45: "Insert",
18453 46: "Delete",
18454 112: "F1",
18455 113: "F2",
18456 114: "F3",
18457 115: "F4",
18458 116: "F5",
18459 117: "F6",
18460 118: "F7",
18461 119: "F8",
18462 120: "F9",
18463 121: "F10",
18464 122: "F11",
18465 123: "F12",
18466 144: "NumLock",
18467 145: "ScrollLock",
18468 224: "Meta"
18469 }, modifierKeyToProp = {
18470 Alt: "altKey",
18471 Control: "ctrlKey",
18472 Meta: "metaKey",
18473 Shift: "shiftKey"
18474 }, KeyboardEventInterface = assign({}, UIEventInterface, {
18475 key: function(nativeEvent) {
18476 if (nativeEvent.key) {
18477 var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
18478 if ("Unidentified" !== key) return key;
18479 }
18480 return "keypress" === nativeEvent.type ? (nativeEvent = getEventCharCode(nativeEvent), 13 === nativeEvent ? "Enter" : String.fromCharCode(nativeEvent)) : "keydown" === nativeEvent.type || "keyup" === nativeEvent.type ? translateToKey[nativeEvent.keyCode] || "Unidentified" : "";
18481 },
18482 code: 0,
18483 location: 0,
18484 ctrlKey: 0,
18485 shiftKey: 0,
18486 altKey: 0,
18487 metaKey: 0,
18488 repeat: 0,
18489 locale: 0,
18490 getModifierState: getEventModifierState,
18491 charCode: function(event) {
18492 return "keypress" === event.type ? getEventCharCode(event) : 0;
18493 },
18494 keyCode: function(event) {
18495 return "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0;
18496 },
18497 which: function(event) {
18498 return "keypress" === event.type ? getEventCharCode(event) : "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0;
18499 }
18500 }), SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface), PointerEventInterface = assign({}, MouseEventInterface, {
18501 pointerId: 0,
18502 width: 0,
18503 height: 0,
18504 pressure: 0,
18505 tangentialPressure: 0,
18506 tiltX: 0,
18507 tiltY: 0,
18508 twist: 0,
18509 pointerType: 0,
18510 isPrimary: 0
18511 }), SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface), TouchEventInterface = assign({}, UIEventInterface, {
18512 touches: 0,
18513 targetTouches: 0,
18514 changedTouches: 0,
18515 altKey: 0,
18516 metaKey: 0,
18517 ctrlKey: 0,
18518 shiftKey: 0,
18519 getModifierState: getEventModifierState
18520 }), SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface), TransitionEventInterface = assign({}, EventInterface, {
18521 propertyName: 0,
18522 elapsedTime: 0,
18523 pseudoElement: 0
18524 }), SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface), WheelEventInterface = assign({}, MouseEventInterface, {
18525 deltaX: function(event) {
18526 return "deltaX" in event ? event.deltaX : "wheelDeltaX" in event ? -event.wheelDeltaX : 0;
18527 },
18528 deltaY: function(event) {
18529 return "deltaY" in event ? event.deltaY : "wheelDeltaY" in event ? -event.wheelDeltaY : "wheelDelta" in event ? -event.wheelDelta : 0;
18530 },
18531 deltaZ: 0,
18532 deltaMode: 0
18533 }), SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface), ToggleEventInterface = assign({}, EventInterface, {
18534 newState: 0,
18535 oldState: 0
18536 }), SyntheticToggleEvent = createSyntheticEvent(ToggleEventInterface), END_KEYCODES = [9, 13, 27, 32], START_KEYCODE = 229, canUseCompositionEvent = canUseDOM && "CompositionEvent" in window, documentMode = null;
18537 canUseDOM && "documentMode" in document && (documentMode = document.documentMode);
18538 var canUseTextInputEvent = canUseDOM && "TextEvent" in window && !documentMode, useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && 8 < documentMode && 11 >= documentMode), SPACEBAR_CODE = 32, SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE), hasSpaceKeypress = false, isComposing = false, supportedInputTypes = {
18539 color: true,
18540 date: true,
18541 datetime: true,
18542 "datetime-local": true,
18543 email: true,
18544 month: true,
18545 number: true,
18546 password: true,
18547 range: true,
18548 search: true,
18549 tel: true,
18550 text: true,
18551 time: true,
18552 url: true,
18553 week: true
18554 }, activeElement$1 = null, activeElementInst$1 = null, isInputEventSupported = false;
18555 canUseDOM && (isInputEventSupported = isEventSupported("input") && (!document.documentMode || 9 < document.documentMode));
18556 var objectIs = "function" === typeof Object.is ? Object.is : is, skipSelectionChangeEvent = canUseDOM && "documentMode" in document && 11 >= document.documentMode, activeElement = null, activeElementInst = null, lastSelection = null, mouseDown = false, vendorPrefixes = {
18557 animationend: makePrefixMap("Animation", "AnimationEnd"),
18558 animationiteration: makePrefixMap("Animation", "AnimationIteration"),
18559 animationstart: makePrefixMap("Animation", "AnimationStart"),
18560 transitionrun: makePrefixMap("Transition", "TransitionRun"),
18561 transitionstart: makePrefixMap("Transition", "TransitionStart"),
18562 transitioncancel: makePrefixMap("Transition", "TransitionCancel"),
18563 transitionend: makePrefixMap("Transition", "TransitionEnd")
18564 }, prefixedEventNames = {}, style = {};
18565 canUseDOM && (style = document.createElement("div").style, "AnimationEvent" in window || (delete vendorPrefixes.animationend.animation, delete vendorPrefixes.animationiteration.animation, delete vendorPrefixes.animationstart.animation), "TransitionEvent" in window || delete vendorPrefixes.transitionend.transition);
18566 var ANIMATION_END = getVendorPrefixedEventName("animationend"), ANIMATION_ITERATION = getVendorPrefixedEventName("animationiteration"), ANIMATION_START = getVendorPrefixedEventName("animationstart"), TRANSITION_RUN = getVendorPrefixedEventName("transitionrun"), TRANSITION_START = getVendorPrefixedEventName("transitionstart"), TRANSITION_CANCEL = getVendorPrefixedEventName("transitioncancel"), TRANSITION_END = getVendorPrefixedEventName("transitionend"), topLevelEventsToReactNames = /* @__PURE__ */ new Map(), simpleEventPluginEvents = "abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(
18567 " "
18568 );
18569 simpleEventPluginEvents.push("scrollEnd");
18570 var lastResetTime = 0;
18571 if ("object" === typeof performance && "function" === typeof performance.now) {
18572 var localPerformance = performance;
18573 var getCurrentTime = function() {
18574 return localPerformance.now();
18575 };
18576 } else {
18577 var localDate = Date;
18578 getCurrentTime = function() {
18579 return localDate.now();
18580 };
18581 }
18582 var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
18583 if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
18584 var event = new window.ErrorEvent("error", {
18585 bubbles: true,
18586 cancelable: true,
18587 message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
18588 error
18589 });
18590 if (!window.dispatchEvent(event)) return;
18591 } else if ("object" === typeof process && "function" === typeof process.emit) {
18592 process.emit("uncaughtException", error);
18593 return;
18594 }
18595 console.error(error);
18596 }, OMITTED_PROP_ERROR = "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.", EMPTY_ARRAY = 0, COMPLEX_ARRAY = 1, PRIMITIVE_ARRAY = 2, ENTRIES_ARRAY = 3, REMOVED = "\u2013\xA0", ADDED = "+\xA0", UNCHANGED = "\u2007\xA0", supportsUserTiming = "undefined" !== typeof console && "function" === typeof console.timeStamp && "undefined" !== typeof performance && "function" === typeof performance.measure, COMPONENTS_TRACK = "Components \u269B", LANES_TRACK_GROUP = "Scheduler \u269B", currentTrack = "Blocking", alreadyWarnedForDeepEquality = false, reusableComponentDevToolDetails = {
18597 color: "primary",
18598 properties: null,
18599 tooltipText: "",
18600 track: COMPONENTS_TRACK
18601 }, reusableComponentOptions = {
18602 start: -0,
18603 end: -0,
18604 detail: { devtools: reusableComponentDevToolDetails }
18605 }, resuableChangedPropsEntry = ["Changed Props", ""], DEEP_EQUALITY_WARNING = "This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.", reusableDeeplyEqualPropsEntry = ["Changed Props", DEEP_EQUALITY_WARNING], OffscreenVisible = 1, OffscreenPassiveEffectsConnected = 2, concurrentQueues = [], concurrentQueuesIndex = 0, concurrentlyUpdatedLanes = 0, emptyContextObject = {};
18606 Object.freeze(emptyContextObject);
18607 var resolveFamily = null, failedBoundaries = null, NoMode = 0, ConcurrentMode = 1, ProfileMode = 2, StrictLegacyMode = 8, StrictEffectsMode = 16, SuspenseyImagesMode = 32;
18608 var hasBadMapPolyfill = false;
18609 try {
18610 var nonExtensibleObject = Object.preventExtensions({});
18611 /* @__PURE__ */ new Map([[nonExtensibleObject, null]]);
18612 /* @__PURE__ */ new Set([nonExtensibleObject]);
18613 } catch (e$3) {
18614 hasBadMapPolyfill = true;
18615 }
18616 var CapturedStacks = /* @__PURE__ */ new WeakMap(), forkStack = [], forkStackIndex = 0, treeForkProvider = null, treeForkCount = 0, idStack = [], idStackIndex = 0, treeContextProvider = null, treeContextId = 1, treeContextOverflow = "", hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = false, didSuspendOrErrorDEV = false, hydrationDiffRootDEV = null, hydrationErrors = null, rootOrSingletonContext = false, HydrationMismatchException = Error(
18617 "Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."
18618 ), valueCursor = createCursor(null);
18619 var rendererCursorDEV = createCursor(null);
18620 var rendererSigil = {};
18621 var currentlyRenderingFiber$1 = null, lastContextDependency = null, isDisallowedContextReadInDEV = false, AbortControllerLocal = "undefined" !== typeof AbortController ? AbortController : function() {
18622 var listeners = [], signal = this.signal = {
18623 aborted: false,
18624 addEventListener: function(type, listener) {
18625 listeners.push(listener);
18626 }
18627 };
18628 this.abort = function() {
18629 signal.aborted = true;
18630 listeners.forEach(function(listener) {
18631 return listener();
18632 });
18633 };
18634 }, scheduleCallback$2 = Scheduler.unstable_scheduleCallback, NormalPriority = Scheduler.unstable_NormalPriority, CacheContext = {
18635 $$typeof: REACT_CONTEXT_TYPE,
18636 Consumer: null,
18637 Provider: null,
18638 _currentValue: null,
18639 _currentValue2: null,
18640 _threadCount: 0,
18641 _currentRenderer: null,
18642 _currentRenderer2: null
18643 }, now = Scheduler.unstable_now, createTask = console.createTask ? console.createTask : function() {
18644 return null;
18645 }, SPAWNED_UPDATE = 1, PINGED_UPDATE = 2, renderStartTime = -0, commitStartTime = -0, commitEndTime = -0, commitErrors = null, profilerStartTime = -1.1, profilerEffectDuration = -0, componentEffectDuration = -0, componentEffectStartTime = -1.1, componentEffectEndTime = -1.1, componentEffectErrors = null, componentEffectSpawnedUpdate = false, blockingClampTime = -0, blockingUpdateTime = -1.1, blockingUpdateTask = null, blockingUpdateType = 0, blockingUpdateMethodName = null, blockingUpdateComponentName = null, blockingEventTime = -1.1, blockingEventType = null, blockingEventRepeatTime = -1.1, blockingSuspendedTime = -1.1, transitionClampTime = -0, transitionStartTime = -1.1, transitionUpdateTime = -1.1, transitionUpdateType = 0, transitionUpdateTask = null, transitionUpdateMethodName = null, transitionUpdateComponentName = null, transitionEventTime = -1.1, transitionEventType = null, transitionEventRepeatTime = -1.1, transitionSuspendedTime = -1.1, retryClampTime = -0, idleClampTime = -0, animatingLanes = 0, animatingTask = null, yieldReason = 0, yieldStartTime = -1.1, currentUpdateIsNested = false, nestedUpdateScheduled = false, currentEntangledListeners = null, currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, prevOnStartTransitionFinish = ReactSharedInternals.S;
18646 ReactSharedInternals.S = function(transition, returnValue) {
18647 globalMostRecentTransitionTime = now$1();
18648 if ("object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then) {
18649 if (0 > transitionStartTime && 0 > transitionUpdateTime) {
18650 transitionStartTime = now();
18651 var newEventTime = resolveEventTimeStamp(), newEventType = resolveEventType();
18652 if (newEventTime !== transitionEventRepeatTime || newEventType !== transitionEventType)
18653 transitionEventRepeatTime = -1.1;
18654 transitionEventTime = newEventTime;
18655 transitionEventType = newEventType;
18656 }
18657 entangleAsyncAction(transition, returnValue);
18658 }
18659 null !== prevOnStartTransitionFinish && prevOnStartTransitionFinish(transition, returnValue);
18660 };
18661 var resumedCache = createCursor(null), ReactStrictModeWarnings = {
18662 recordUnsafeLifecycleWarnings: function() {
18663 },
18664 flushPendingUnsafeLifecycleWarnings: function() {
18665 },
18666 recordLegacyContextWarning: function() {
18667 },
18668 flushLegacyContextWarning: function() {
18669 },
18670 discardPendingWarnings: function() {
18671 }
18672 }, pendingComponentWillMountWarnings = [], pendingUNSAFE_ComponentWillMountWarnings = [], pendingComponentWillReceivePropsWarnings = [], pendingUNSAFE_ComponentWillReceivePropsWarnings = [], pendingComponentWillUpdateWarnings = [], pendingUNSAFE_ComponentWillUpdateWarnings = [], didWarnAboutUnsafeLifecycles = /* @__PURE__ */ new Set();
18673 ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function(fiber, instance) {
18674 didWarnAboutUnsafeLifecycles.has(fiber.type) || ("function" === typeof instance.componentWillMount && true !== instance.componentWillMount.__suppressDeprecationWarning && pendingComponentWillMountWarnings.push(fiber), fiber.mode & StrictLegacyMode && "function" === typeof instance.UNSAFE_componentWillMount && pendingUNSAFE_ComponentWillMountWarnings.push(fiber), "function" === typeof instance.componentWillReceiveProps && true !== instance.componentWillReceiveProps.__suppressDeprecationWarning && pendingComponentWillReceivePropsWarnings.push(fiber), fiber.mode & StrictLegacyMode && "function" === typeof instance.UNSAFE_componentWillReceiveProps && pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber), "function" === typeof instance.componentWillUpdate && true !== instance.componentWillUpdate.__suppressDeprecationWarning && pendingComponentWillUpdateWarnings.push(fiber), fiber.mode & StrictLegacyMode && "function" === typeof instance.UNSAFE_componentWillUpdate && pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber));
18675 };
18676 ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function() {
18677 var componentWillMountUniqueNames = /* @__PURE__ */ new Set();
18678 0 < pendingComponentWillMountWarnings.length && (pendingComponentWillMountWarnings.forEach(function(fiber) {
18679 componentWillMountUniqueNames.add(
18680 getComponentNameFromFiber(fiber) || "Component"
18681 );
18682 didWarnAboutUnsafeLifecycles.add(fiber.type);
18683 }), pendingComponentWillMountWarnings = []);
18684 var UNSAFE_componentWillMountUniqueNames = /* @__PURE__ */ new Set();
18685 0 < pendingUNSAFE_ComponentWillMountWarnings.length && (pendingUNSAFE_ComponentWillMountWarnings.forEach(function(fiber) {
18686 UNSAFE_componentWillMountUniqueNames.add(
18687 getComponentNameFromFiber(fiber) || "Component"
18688 );
18689 didWarnAboutUnsafeLifecycles.add(fiber.type);
18690 }), pendingUNSAFE_ComponentWillMountWarnings = []);
18691 var componentWillReceivePropsUniqueNames = /* @__PURE__ */ new Set();
18692 0 < pendingComponentWillReceivePropsWarnings.length && (pendingComponentWillReceivePropsWarnings.forEach(function(fiber) {
18693 componentWillReceivePropsUniqueNames.add(
18694 getComponentNameFromFiber(fiber) || "Component"
18695 );
18696 didWarnAboutUnsafeLifecycles.add(fiber.type);
18697 }), pendingComponentWillReceivePropsWarnings = []);
18698 var UNSAFE_componentWillReceivePropsUniqueNames = /* @__PURE__ */ new Set();
18699 0 < pendingUNSAFE_ComponentWillReceivePropsWarnings.length && (pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(
18700 function(fiber) {
18701 UNSAFE_componentWillReceivePropsUniqueNames.add(
18702 getComponentNameFromFiber(fiber) || "Component"
18703 );
18704 didWarnAboutUnsafeLifecycles.add(fiber.type);
18705 }
18706 ), pendingUNSAFE_ComponentWillReceivePropsWarnings = []);
18707 var componentWillUpdateUniqueNames = /* @__PURE__ */ new Set();
18708 0 < pendingComponentWillUpdateWarnings.length && (pendingComponentWillUpdateWarnings.forEach(function(fiber) {
18709 componentWillUpdateUniqueNames.add(
18710 getComponentNameFromFiber(fiber) || "Component"
18711 );
18712 didWarnAboutUnsafeLifecycles.add(fiber.type);
18713 }), pendingComponentWillUpdateWarnings = []);
18714 var UNSAFE_componentWillUpdateUniqueNames = /* @__PURE__ */ new Set();
18715 0 < pendingUNSAFE_ComponentWillUpdateWarnings.length && (pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function(fiber) {
18716 UNSAFE_componentWillUpdateUniqueNames.add(
18717 getComponentNameFromFiber(fiber) || "Component"
18718 );
18719 didWarnAboutUnsafeLifecycles.add(fiber.type);
18720 }), pendingUNSAFE_ComponentWillUpdateWarnings = []);
18721 if (0 < UNSAFE_componentWillMountUniqueNames.size) {
18722 var sortedNames = setToSortedString(
18723 UNSAFE_componentWillMountUniqueNames
18724 );
18725 console.error(
18726 "Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s",
18727 sortedNames
18728 );
18729 }
18730 0 < UNSAFE_componentWillReceivePropsUniqueNames.size && (sortedNames = setToSortedString(
18731 UNSAFE_componentWillReceivePropsUniqueNames
18732 ), console.error(
18733 "Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n\nPlease update the following components: %s",
18734 sortedNames
18735 ));
18736 0 < UNSAFE_componentWillUpdateUniqueNames.size && (sortedNames = setToSortedString(
18737 UNSAFE_componentWillUpdateUniqueNames
18738 ), console.error(
18739 "Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s",
18740 sortedNames
18741 ));
18742 0 < componentWillMountUniqueNames.size && (sortedNames = setToSortedString(componentWillMountUniqueNames), console.warn(
18743 "componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",
18744 sortedNames
18745 ));
18746 0 < componentWillReceivePropsUniqueNames.size && (sortedNames = setToSortedString(
18747 componentWillReceivePropsUniqueNames
18748 ), console.warn(
18749 "componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",
18750 sortedNames
18751 ));
18752 0 < componentWillUpdateUniqueNames.size && (sortedNames = setToSortedString(componentWillUpdateUniqueNames), console.warn(
18753 "componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",
18754 sortedNames
18755 ));
18756 };
18757 var pendingLegacyContextWarning = /* @__PURE__ */ new Map(), didWarnAboutLegacyContext = /* @__PURE__ */ new Set();
18758 ReactStrictModeWarnings.recordLegacyContextWarning = function(fiber, instance) {
18759 var strictRoot = null;
18760 for (var node = fiber; null !== node; )
18761 node.mode & StrictLegacyMode && (strictRoot = node), node = node.return;
18762 null === strictRoot ? console.error(
18763 "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."
18764 ) : !didWarnAboutLegacyContext.has(fiber.type) && (node = pendingLegacyContextWarning.get(strictRoot), null != fiber.type.contextTypes || null != fiber.type.childContextTypes || null !== instance && "function" === typeof instance.getChildContext) && (void 0 === node && (node = [], pendingLegacyContextWarning.set(strictRoot, node)), node.push(fiber));
18765 };
18766 ReactStrictModeWarnings.flushLegacyContextWarning = function() {
18767 pendingLegacyContextWarning.forEach(function(fiberArray) {
18768 if (0 !== fiberArray.length) {
18769 var firstFiber = fiberArray[0], uniqueNames = /* @__PURE__ */ new Set();
18770 fiberArray.forEach(function(fiber) {
18771 uniqueNames.add(getComponentNameFromFiber(fiber) || "Component");
18772 didWarnAboutLegacyContext.add(fiber.type);
18773 });
18774 var sortedNames = setToSortedString(uniqueNames);
18775 runWithFiberInDEV(firstFiber, function() {
18776 console.error(
18777 "Legacy context API has been detected within a strict-mode tree.\n\nThe old API will be supported in all 16.x releases, but applications using it should migrate to the new version.\n\nPlease update the following components: %s\n\nLearn more about this warning here: https://react.dev/link/legacy-context",
18778 sortedNames
18779 );
18780 });
18781 }
18782 });
18783 };
18784 ReactStrictModeWarnings.discardPendingWarnings = function() {
18785 pendingComponentWillMountWarnings = [];
18786 pendingUNSAFE_ComponentWillMountWarnings = [];
18787 pendingComponentWillReceivePropsWarnings = [];
18788 pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
18789 pendingComponentWillUpdateWarnings = [];
18790 pendingUNSAFE_ComponentWillUpdateWarnings = [];
18791 pendingLegacyContextWarning = /* @__PURE__ */ new Map();
18792 };
18793 var callComponent = {
18794 react_stack_bottom_frame: function(Component, props, secondArg) {
18795 var wasRendering = isRendering;
18796 isRendering = true;
18797 try {
18798 return Component(props, secondArg);
18799 } finally {
18800 isRendering = wasRendering;
18801 }
18802 }
18803 }, callComponentInDEV = callComponent.react_stack_bottom_frame.bind(callComponent), callRender = {
18804 react_stack_bottom_frame: function(instance) {
18805 var wasRendering = isRendering;
18806 isRendering = true;
18807 try {
18808 return instance.render();
18809 } finally {
18810 isRendering = wasRendering;
18811 }
18812 }
18813 }, callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender), callComponentDidMount = {
18814 react_stack_bottom_frame: function(finishedWork, instance) {
18815 try {
18816 instance.componentDidMount();
18817 } catch (error) {
18818 captureCommitPhaseError(finishedWork, finishedWork.return, error);
18819 }
18820 }
18821 }, callComponentDidMountInDEV = callComponentDidMount.react_stack_bottom_frame.bind(
18822 callComponentDidMount
18823 ), callComponentDidUpdate = {
18824 react_stack_bottom_frame: function(finishedWork, instance, prevProps, prevState, snapshot) {
18825 try {
18826 instance.componentDidUpdate(prevProps, prevState, snapshot);
18827 } catch (error) {
18828 captureCommitPhaseError(finishedWork, finishedWork.return, error);
18829 }
18830 }
18831 }, callComponentDidUpdateInDEV = callComponentDidUpdate.react_stack_bottom_frame.bind(
18832 callComponentDidUpdate
18833 ), callComponentDidCatch = {
18834 react_stack_bottom_frame: function(instance, errorInfo) {
18835 var stack = errorInfo.stack;
18836 instance.componentDidCatch(errorInfo.value, {
18837 componentStack: null !== stack ? stack : ""
18838 });
18839 }
18840 }, callComponentDidCatchInDEV = callComponentDidCatch.react_stack_bottom_frame.bind(
18841 callComponentDidCatch
18842 ), callComponentWillUnmount = {
18843 react_stack_bottom_frame: function(current2, nearestMountedAncestor, instance) {
18844 try {
18845 instance.componentWillUnmount();
18846 } catch (error) {
18847 captureCommitPhaseError(current2, nearestMountedAncestor, error);
18848 }
18849 }
18850 }, callComponentWillUnmountInDEV = callComponentWillUnmount.react_stack_bottom_frame.bind(
18851 callComponentWillUnmount
18852 ), callCreate = {
18853 react_stack_bottom_frame: function(effect) {
18854 var create = effect.create;
18855 effect = effect.inst;
18856 create = create();
18857 return effect.destroy = create;
18858 }
18859 }, callCreateInDEV = callCreate.react_stack_bottom_frame.bind(callCreate), callDestroy = {
18860 react_stack_bottom_frame: function(current2, nearestMountedAncestor, destroy) {
18861 try {
18862 destroy();
18863 } catch (error) {
18864 captureCommitPhaseError(current2, nearestMountedAncestor, error);
18865 }
18866 }
18867 }, callDestroyInDEV = callDestroy.react_stack_bottom_frame.bind(callDestroy), callLazyInit = {
18868 react_stack_bottom_frame: function(lazy) {
18869 var init = lazy._init;
18870 return init(lazy._payload);
18871 }
18872 }, callLazyInitInDEV = callLazyInit.react_stack_bottom_frame.bind(callLazyInit), SuspenseException = Error(
18873 "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."
18874 ), SuspenseyCommitException = Error(
18875 "Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."
18876 ), SuspenseActionException = Error(
18877 "Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."
18878 ), noopSuspenseyCommitThenable = {
18879 then: function() {
18880 console.error(
18881 'Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.'
18882 );
18883 }
18884 }, suspendedThenable = null, needsToResetSuspendedThenableDEV = false, thenableState$1 = null, thenableIndexCounter$1 = 0, currentDebugInfo = null, didWarnAboutMaps;
18885 var didWarnAboutGenerators = didWarnAboutMaps = false;
18886 var ownerHasKeyUseWarning = {};
18887 var ownerHasFunctionTypeWarning = {};
18888 var ownerHasSymbolTypeWarning = {};
18889 warnForMissingKey = function(returnFiber, workInProgress2, child) {
18890 if (null !== child && "object" === typeof child && child._store && (!child._store.validated && null == child.key || 2 === child._store.validated)) {
18891 if ("object" !== typeof child._store)
18892 throw Error(
18893 "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
18894 );
18895 child._store.validated = 1;
18896 var componentName2 = getComponentNameFromFiber(returnFiber), componentKey = componentName2 || "null";
18897 if (!ownerHasKeyUseWarning[componentKey]) {
18898 ownerHasKeyUseWarning[componentKey] = true;
18899 child = child._owner;
18900 returnFiber = returnFiber._debugOwner;
18901 var currentComponentErrorInfo = "";
18902 returnFiber && "number" === typeof returnFiber.tag && (componentKey = getComponentNameFromFiber(returnFiber)) && (currentComponentErrorInfo = "\n\nCheck the render method of `" + componentKey + "`.");
18903 currentComponentErrorInfo || componentName2 && (currentComponentErrorInfo = "\n\nCheck the top-level render call using <" + componentName2 + ">.");
18904 var childOwnerAppendix = "";
18905 null != child && returnFiber !== child && (componentName2 = null, "number" === typeof child.tag ? componentName2 = getComponentNameFromFiber(child) : "string" === typeof child.name && (componentName2 = child.name), componentName2 && (childOwnerAppendix = " It was passed a child from " + componentName2 + "."));
18906 runWithFiberInDEV(workInProgress2, function() {
18907 console.error(
18908 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
18909 currentComponentErrorInfo,
18910 childOwnerAppendix
18911 );
18912 });
18913 }
18914 }
18915 };
18916 var reconcileChildFibers = createChildReconciler(true), mountChildFibers = createChildReconciler(false), UpdateState = 0, ReplaceState = 1, ForceUpdate = 2, CaptureUpdate = 3, hasForceUpdate = false;
18917 var didWarnUpdateInsideUpdate = false;
18918 var currentlyProcessingQueue = null;
18919 var didReadFromEntangledAsyncAction = false, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), suspenseHandlerStackCursor = createCursor(null), shellBoundary = null, SubtreeSuspenseContextMask = 1, ForceSuspenseFallback = 2, suspenseStackCursor = createCursor(0), NoFlags = 0, HasEffect = 1, Insertion = 2, Layout = 4, Passive = 8, didWarnUncachedGetSnapshot;
18920 var didWarnAboutMismatchedHooksForComponent = /* @__PURE__ */ new Set();
18921 var didWarnAboutUseWrappedInTryCatch = /* @__PURE__ */ new Set();
18922 var didWarnAboutAsyncClientComponent = /* @__PURE__ */ new Set();
18923 var didWarnAboutUseFormState = /* @__PURE__ */ new Set();
18924 var renderLanes = 0, currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = false, didScheduleRenderPhaseUpdateDuringThisPass = false, shouldDoubleInvokeUserFnsInHooksDEV = false, localIdCounter = 0, thenableIndexCounter = 0, thenableState = null, globalClientIdCounter = 0, RE_RENDER_LIMIT = 25, currentHookNameInDev = null, hookTypesDev = null, hookTypesUpdateIndexDev = -1, ignorePreviousDependencies = false, ContextOnlyDispatcher = {
18925 readContext,
18926 use,
18927 useCallback: throwInvalidHookError,
18928 useContext: throwInvalidHookError,
18929 useEffect: throwInvalidHookError,
18930 useImperativeHandle: throwInvalidHookError,
18931 useLayoutEffect: throwInvalidHookError,
18932 useInsertionEffect: throwInvalidHookError,
18933 useMemo: throwInvalidHookError,
18934 useReducer: throwInvalidHookError,
18935 useRef: throwInvalidHookError,
18936 useState: throwInvalidHookError,
18937 useDebugValue: throwInvalidHookError,
18938 useDeferredValue: throwInvalidHookError,
18939 useTransition: throwInvalidHookError,
18940 useSyncExternalStore: throwInvalidHookError,
18941 useId: throwInvalidHookError,
18942 useHostTransitionStatus: throwInvalidHookError,
18943 useFormState: throwInvalidHookError,
18944 useActionState: throwInvalidHookError,
18945 useOptimistic: throwInvalidHookError,
18946 useMemoCache: throwInvalidHookError,
18947 useCacheRefresh: throwInvalidHookError
18948 };
18949 ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
18950 var HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, HooksDispatcherOnRerenderInDEV = null, InvalidNestedHooksDispatcherOnMountInDEV = null, InvalidNestedHooksDispatcherOnUpdateInDEV = null, InvalidNestedHooksDispatcherOnRerenderInDEV = null;
18951 HooksDispatcherOnMountInDEV = {
18952 readContext: function(context) {
18953 return readContext(context);
18954 },
18955 use,
18956 useCallback: function(callback, deps) {
18957 currentHookNameInDev = "useCallback";
18958 mountHookTypesDev();
18959 checkDepsAreArrayDev(deps);
18960 return mountCallback(callback, deps);
18961 },
18962 useContext: function(context) {
18963 currentHookNameInDev = "useContext";
18964 mountHookTypesDev();
18965 return readContext(context);
18966 },
18967 useEffect: function(create, deps) {
18968 currentHookNameInDev = "useEffect";
18969 mountHookTypesDev();
18970 checkDepsAreArrayDev(deps);
18971 return mountEffect(create, deps);
18972 },
18973 useImperativeHandle: function(ref, create, deps) {
18974 currentHookNameInDev = "useImperativeHandle";
18975 mountHookTypesDev();
18976 checkDepsAreArrayDev(deps);
18977 return mountImperativeHandle(ref, create, deps);
18978 },
18979 useInsertionEffect: function(create, deps) {
18980 currentHookNameInDev = "useInsertionEffect";
18981 mountHookTypesDev();
18982 checkDepsAreArrayDev(deps);
18983 mountEffectImpl(4, Insertion, create, deps);
18984 },
18985 useLayoutEffect: function(create, deps) {
18986 currentHookNameInDev = "useLayoutEffect";
18987 mountHookTypesDev();
18988 checkDepsAreArrayDev(deps);
18989 return mountLayoutEffect(create, deps);
18990 },
18991 useMemo: function(create, deps) {
18992 currentHookNameInDev = "useMemo";
18993 mountHookTypesDev();
18994 checkDepsAreArrayDev(deps);
18995 var prevDispatcher = ReactSharedInternals.H;
18996 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
18997 try {
18998 return mountMemo(create, deps);
18999 } finally {
19000 ReactSharedInternals.H = prevDispatcher;
19001 }
19002 },
19003 useReducer: function(reducer, initialArg, init) {
19004 currentHookNameInDev = "useReducer";
19005 mountHookTypesDev();
19006 var prevDispatcher = ReactSharedInternals.H;
19007 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19008 try {
19009 return mountReducer(reducer, initialArg, init);
19010 } finally {
19011 ReactSharedInternals.H = prevDispatcher;
19012 }
19013 },
19014 useRef: function(initialValue) {
19015 currentHookNameInDev = "useRef";
19016 mountHookTypesDev();
19017 return mountRef(initialValue);
19018 },
19019 useState: function(initialState) {
19020 currentHookNameInDev = "useState";
19021 mountHookTypesDev();
19022 var prevDispatcher = ReactSharedInternals.H;
19023 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19024 try {
19025 return mountState(initialState);
19026 } finally {
19027 ReactSharedInternals.H = prevDispatcher;
19028 }
19029 },
19030 useDebugValue: function() {
19031 currentHookNameInDev = "useDebugValue";
19032 mountHookTypesDev();
19033 },
19034 useDeferredValue: function(value, initialValue) {
19035 currentHookNameInDev = "useDeferredValue";
19036 mountHookTypesDev();
19037 return mountDeferredValue(value, initialValue);
19038 },
19039 useTransition: function() {
19040 currentHookNameInDev = "useTransition";
19041 mountHookTypesDev();
19042 return mountTransition();
19043 },
19044 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19045 currentHookNameInDev = "useSyncExternalStore";
19046 mountHookTypesDev();
19047 return mountSyncExternalStore(
19048 subscribe,
19049 getSnapshot,
19050 getServerSnapshot
19051 );
19052 },
19053 useId: function() {
19054 currentHookNameInDev = "useId";
19055 mountHookTypesDev();
19056 return mountId();
19057 },
19058 useFormState: function(action, initialState) {
19059 currentHookNameInDev = "useFormState";
19060 mountHookTypesDev();
19061 warnOnUseFormStateInDev();
19062 return mountActionState(action, initialState);
19063 },
19064 useActionState: function(action, initialState) {
19065 currentHookNameInDev = "useActionState";
19066 mountHookTypesDev();
19067 return mountActionState(action, initialState);
19068 },
19069 useOptimistic: function(passthrough) {
19070 currentHookNameInDev = "useOptimistic";
19071 mountHookTypesDev();
19072 return mountOptimistic(passthrough);
19073 },
19074 useHostTransitionStatus,
19075 useMemoCache,
19076 useCacheRefresh: function() {
19077 currentHookNameInDev = "useCacheRefresh";
19078 mountHookTypesDev();
19079 return mountRefresh();
19080 },
19081 useEffectEvent: function(callback) {
19082 currentHookNameInDev = "useEffectEvent";
19083 mountHookTypesDev();
19084 return mountEvent(callback);
19085 }
19086 };
19087 HooksDispatcherOnMountWithHookTypesInDEV = {
19088 readContext: function(context) {
19089 return readContext(context);
19090 },
19091 use,
19092 useCallback: function(callback, deps) {
19093 currentHookNameInDev = "useCallback";
19094 updateHookTypesDev();
19095 return mountCallback(callback, deps);
19096 },
19097 useContext: function(context) {
19098 currentHookNameInDev = "useContext";
19099 updateHookTypesDev();
19100 return readContext(context);
19101 },
19102 useEffect: function(create, deps) {
19103 currentHookNameInDev = "useEffect";
19104 updateHookTypesDev();
19105 return mountEffect(create, deps);
19106 },
19107 useImperativeHandle: function(ref, create, deps) {
19108 currentHookNameInDev = "useImperativeHandle";
19109 updateHookTypesDev();
19110 return mountImperativeHandle(ref, create, deps);
19111 },
19112 useInsertionEffect: function(create, deps) {
19113 currentHookNameInDev = "useInsertionEffect";
19114 updateHookTypesDev();
19115 mountEffectImpl(4, Insertion, create, deps);
19116 },
19117 useLayoutEffect: function(create, deps) {
19118 currentHookNameInDev = "useLayoutEffect";
19119 updateHookTypesDev();
19120 return mountLayoutEffect(create, deps);
19121 },
19122 useMemo: function(create, deps) {
19123 currentHookNameInDev = "useMemo";
19124 updateHookTypesDev();
19125 var prevDispatcher = ReactSharedInternals.H;
19126 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19127 try {
19128 return mountMemo(create, deps);
19129 } finally {
19130 ReactSharedInternals.H = prevDispatcher;
19131 }
19132 },
19133 useReducer: function(reducer, initialArg, init) {
19134 currentHookNameInDev = "useReducer";
19135 updateHookTypesDev();
19136 var prevDispatcher = ReactSharedInternals.H;
19137 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19138 try {
19139 return mountReducer(reducer, initialArg, init);
19140 } finally {
19141 ReactSharedInternals.H = prevDispatcher;
19142 }
19143 },
19144 useRef: function(initialValue) {
19145 currentHookNameInDev = "useRef";
19146 updateHookTypesDev();
19147 return mountRef(initialValue);
19148 },
19149 useState: function(initialState) {
19150 currentHookNameInDev = "useState";
19151 updateHookTypesDev();
19152 var prevDispatcher = ReactSharedInternals.H;
19153 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19154 try {
19155 return mountState(initialState);
19156 } finally {
19157 ReactSharedInternals.H = prevDispatcher;
19158 }
19159 },
19160 useDebugValue: function() {
19161 currentHookNameInDev = "useDebugValue";
19162 updateHookTypesDev();
19163 },
19164 useDeferredValue: function(value, initialValue) {
19165 currentHookNameInDev = "useDeferredValue";
19166 updateHookTypesDev();
19167 return mountDeferredValue(value, initialValue);
19168 },
19169 useTransition: function() {
19170 currentHookNameInDev = "useTransition";
19171 updateHookTypesDev();
19172 return mountTransition();
19173 },
19174 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19175 currentHookNameInDev = "useSyncExternalStore";
19176 updateHookTypesDev();
19177 return mountSyncExternalStore(
19178 subscribe,
19179 getSnapshot,
19180 getServerSnapshot
19181 );
19182 },
19183 useId: function() {
19184 currentHookNameInDev = "useId";
19185 updateHookTypesDev();
19186 return mountId();
19187 },
19188 useActionState: function(action, initialState) {
19189 currentHookNameInDev = "useActionState";
19190 updateHookTypesDev();
19191 return mountActionState(action, initialState);
19192 },
19193 useFormState: function(action, initialState) {
19194 currentHookNameInDev = "useFormState";
19195 updateHookTypesDev();
19196 warnOnUseFormStateInDev();
19197 return mountActionState(action, initialState);
19198 },
19199 useOptimistic: function(passthrough) {
19200 currentHookNameInDev = "useOptimistic";
19201 updateHookTypesDev();
19202 return mountOptimistic(passthrough);
19203 },
19204 useHostTransitionStatus,
19205 useMemoCache,
19206 useCacheRefresh: function() {
19207 currentHookNameInDev = "useCacheRefresh";
19208 updateHookTypesDev();
19209 return mountRefresh();
19210 },
19211 useEffectEvent: function(callback) {
19212 currentHookNameInDev = "useEffectEvent";
19213 updateHookTypesDev();
19214 return mountEvent(callback);
19215 }
19216 };
19217 HooksDispatcherOnUpdateInDEV = {
19218 readContext: function(context) {
19219 return readContext(context);
19220 },
19221 use,
19222 useCallback: function(callback, deps) {
19223 currentHookNameInDev = "useCallback";
19224 updateHookTypesDev();
19225 return updateCallback(callback, deps);
19226 },
19227 useContext: function(context) {
19228 currentHookNameInDev = "useContext";
19229 updateHookTypesDev();
19230 return readContext(context);
19231 },
19232 useEffect: function(create, deps) {
19233 currentHookNameInDev = "useEffect";
19234 updateHookTypesDev();
19235 updateEffectImpl(2048, Passive, create, deps);
19236 },
19237 useImperativeHandle: function(ref, create, deps) {
19238 currentHookNameInDev = "useImperativeHandle";
19239 updateHookTypesDev();
19240 return updateImperativeHandle(ref, create, deps);
19241 },
19242 useInsertionEffect: function(create, deps) {
19243 currentHookNameInDev = "useInsertionEffect";
19244 updateHookTypesDev();
19245 return updateEffectImpl(4, Insertion, create, deps);
19246 },
19247 useLayoutEffect: function(create, deps) {
19248 currentHookNameInDev = "useLayoutEffect";
19249 updateHookTypesDev();
19250 return updateEffectImpl(4, Layout, create, deps);
19251 },
19252 useMemo: function(create, deps) {
19253 currentHookNameInDev = "useMemo";
19254 updateHookTypesDev();
19255 var prevDispatcher = ReactSharedInternals.H;
19256 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19257 try {
19258 return updateMemo(create, deps);
19259 } finally {
19260 ReactSharedInternals.H = prevDispatcher;
19261 }
19262 },
19263 useReducer: function(reducer, initialArg, init) {
19264 currentHookNameInDev = "useReducer";
19265 updateHookTypesDev();
19266 var prevDispatcher = ReactSharedInternals.H;
19267 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19268 try {
19269 return updateReducer(reducer, initialArg, init);
19270 } finally {
19271 ReactSharedInternals.H = prevDispatcher;
19272 }
19273 },
19274 useRef: function() {
19275 currentHookNameInDev = "useRef";
19276 updateHookTypesDev();
19277 return updateWorkInProgressHook().memoizedState;
19278 },
19279 useState: function() {
19280 currentHookNameInDev = "useState";
19281 updateHookTypesDev();
19282 var prevDispatcher = ReactSharedInternals.H;
19283 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19284 try {
19285 return updateReducer(basicStateReducer);
19286 } finally {
19287 ReactSharedInternals.H = prevDispatcher;
19288 }
19289 },
19290 useDebugValue: function() {
19291 currentHookNameInDev = "useDebugValue";
19292 updateHookTypesDev();
19293 },
19294 useDeferredValue: function(value, initialValue) {
19295 currentHookNameInDev = "useDeferredValue";
19296 updateHookTypesDev();
19297 return updateDeferredValue(value, initialValue);
19298 },
19299 useTransition: function() {
19300 currentHookNameInDev = "useTransition";
19301 updateHookTypesDev();
19302 return updateTransition();
19303 },
19304 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19305 currentHookNameInDev = "useSyncExternalStore";
19306 updateHookTypesDev();
19307 return updateSyncExternalStore(
19308 subscribe,
19309 getSnapshot,
19310 getServerSnapshot
19311 );
19312 },
19313 useId: function() {
19314 currentHookNameInDev = "useId";
19315 updateHookTypesDev();
19316 return updateWorkInProgressHook().memoizedState;
19317 },
19318 useFormState: function(action) {
19319 currentHookNameInDev = "useFormState";
19320 updateHookTypesDev();
19321 warnOnUseFormStateInDev();
19322 return updateActionState(action);
19323 },
19324 useActionState: function(action) {
19325 currentHookNameInDev = "useActionState";
19326 updateHookTypesDev();
19327 return updateActionState(action);
19328 },
19329 useOptimistic: function(passthrough, reducer) {
19330 currentHookNameInDev = "useOptimistic";
19331 updateHookTypesDev();
19332 return updateOptimistic(passthrough, reducer);
19333 },
19334 useHostTransitionStatus,
19335 useMemoCache,
19336 useCacheRefresh: function() {
19337 currentHookNameInDev = "useCacheRefresh";
19338 updateHookTypesDev();
19339 return updateWorkInProgressHook().memoizedState;
19340 },
19341 useEffectEvent: function(callback) {
19342 currentHookNameInDev = "useEffectEvent";
19343 updateHookTypesDev();
19344 return updateEvent(callback);
19345 }
19346 };
19347 HooksDispatcherOnRerenderInDEV = {
19348 readContext: function(context) {
19349 return readContext(context);
19350 },
19351 use,
19352 useCallback: function(callback, deps) {
19353 currentHookNameInDev = "useCallback";
19354 updateHookTypesDev();
19355 return updateCallback(callback, deps);
19356 },
19357 useContext: function(context) {
19358 currentHookNameInDev = "useContext";
19359 updateHookTypesDev();
19360 return readContext(context);
19361 },
19362 useEffect: function(create, deps) {
19363 currentHookNameInDev = "useEffect";
19364 updateHookTypesDev();
19365 updateEffectImpl(2048, Passive, create, deps);
19366 },
19367 useImperativeHandle: function(ref, create, deps) {
19368 currentHookNameInDev = "useImperativeHandle";
19369 updateHookTypesDev();
19370 return updateImperativeHandle(ref, create, deps);
19371 },
19372 useInsertionEffect: function(create, deps) {
19373 currentHookNameInDev = "useInsertionEffect";
19374 updateHookTypesDev();
19375 return updateEffectImpl(4, Insertion, create, deps);
19376 },
19377 useLayoutEffect: function(create, deps) {
19378 currentHookNameInDev = "useLayoutEffect";
19379 updateHookTypesDev();
19380 return updateEffectImpl(4, Layout, create, deps);
19381 },
19382 useMemo: function(create, deps) {
19383 currentHookNameInDev = "useMemo";
19384 updateHookTypesDev();
19385 var prevDispatcher = ReactSharedInternals.H;
19386 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
19387 try {
19388 return updateMemo(create, deps);
19389 } finally {
19390 ReactSharedInternals.H = prevDispatcher;
19391 }
19392 },
19393 useReducer: function(reducer, initialArg, init) {
19394 currentHookNameInDev = "useReducer";
19395 updateHookTypesDev();
19396 var prevDispatcher = ReactSharedInternals.H;
19397 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
19398 try {
19399 return rerenderReducer(reducer, initialArg, init);
19400 } finally {
19401 ReactSharedInternals.H = prevDispatcher;
19402 }
19403 },
19404 useRef: function() {
19405 currentHookNameInDev = "useRef";
19406 updateHookTypesDev();
19407 return updateWorkInProgressHook().memoizedState;
19408 },
19409 useState: function() {
19410 currentHookNameInDev = "useState";
19411 updateHookTypesDev();
19412 var prevDispatcher = ReactSharedInternals.H;
19413 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
19414 try {
19415 return rerenderReducer(basicStateReducer);
19416 } finally {
19417 ReactSharedInternals.H = prevDispatcher;
19418 }
19419 },
19420 useDebugValue: function() {
19421 currentHookNameInDev = "useDebugValue";
19422 updateHookTypesDev();
19423 },
19424 useDeferredValue: function(value, initialValue) {
19425 currentHookNameInDev = "useDeferredValue";
19426 updateHookTypesDev();
19427 return rerenderDeferredValue(value, initialValue);
19428 },
19429 useTransition: function() {
19430 currentHookNameInDev = "useTransition";
19431 updateHookTypesDev();
19432 return rerenderTransition();
19433 },
19434 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19435 currentHookNameInDev = "useSyncExternalStore";
19436 updateHookTypesDev();
19437 return updateSyncExternalStore(
19438 subscribe,
19439 getSnapshot,
19440 getServerSnapshot
19441 );
19442 },
19443 useId: function() {
19444 currentHookNameInDev = "useId";
19445 updateHookTypesDev();
19446 return updateWorkInProgressHook().memoizedState;
19447 },
19448 useFormState: function(action) {
19449 currentHookNameInDev = "useFormState";
19450 updateHookTypesDev();
19451 warnOnUseFormStateInDev();
19452 return rerenderActionState(action);
19453 },
19454 useActionState: function(action) {
19455 currentHookNameInDev = "useActionState";
19456 updateHookTypesDev();
19457 return rerenderActionState(action);
19458 },
19459 useOptimistic: function(passthrough, reducer) {
19460 currentHookNameInDev = "useOptimistic";
19461 updateHookTypesDev();
19462 return rerenderOptimistic(passthrough, reducer);
19463 },
19464 useHostTransitionStatus,
19465 useMemoCache,
19466 useCacheRefresh: function() {
19467 currentHookNameInDev = "useCacheRefresh";
19468 updateHookTypesDev();
19469 return updateWorkInProgressHook().memoizedState;
19470 },
19471 useEffectEvent: function(callback) {
19472 currentHookNameInDev = "useEffectEvent";
19473 updateHookTypesDev();
19474 return updateEvent(callback);
19475 }
19476 };
19477 InvalidNestedHooksDispatcherOnMountInDEV = {
19478 readContext: function(context) {
19479 warnInvalidContextAccess();
19480 return readContext(context);
19481 },
19482 use: function(usable) {
19483 warnInvalidHookAccess();
19484 return use(usable);
19485 },
19486 useCallback: function(callback, deps) {
19487 currentHookNameInDev = "useCallback";
19488 warnInvalidHookAccess();
19489 mountHookTypesDev();
19490 return mountCallback(callback, deps);
19491 },
19492 useContext: function(context) {
19493 currentHookNameInDev = "useContext";
19494 warnInvalidHookAccess();
19495 mountHookTypesDev();
19496 return readContext(context);
19497 },
19498 useEffect: function(create, deps) {
19499 currentHookNameInDev = "useEffect";
19500 warnInvalidHookAccess();
19501 mountHookTypesDev();
19502 return mountEffect(create, deps);
19503 },
19504 useImperativeHandle: function(ref, create, deps) {
19505 currentHookNameInDev = "useImperativeHandle";
19506 warnInvalidHookAccess();
19507 mountHookTypesDev();
19508 return mountImperativeHandle(ref, create, deps);
19509 },
19510 useInsertionEffect: function(create, deps) {
19511 currentHookNameInDev = "useInsertionEffect";
19512 warnInvalidHookAccess();
19513 mountHookTypesDev();
19514 mountEffectImpl(4, Insertion, create, deps);
19515 },
19516 useLayoutEffect: function(create, deps) {
19517 currentHookNameInDev = "useLayoutEffect";
19518 warnInvalidHookAccess();
19519 mountHookTypesDev();
19520 return mountLayoutEffect(create, deps);
19521 },
19522 useMemo: function(create, deps) {
19523 currentHookNameInDev = "useMemo";
19524 warnInvalidHookAccess();
19525 mountHookTypesDev();
19526 var prevDispatcher = ReactSharedInternals.H;
19527 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19528 try {
19529 return mountMemo(create, deps);
19530 } finally {
19531 ReactSharedInternals.H = prevDispatcher;
19532 }
19533 },
19534 useReducer: function(reducer, initialArg, init) {
19535 currentHookNameInDev = "useReducer";
19536 warnInvalidHookAccess();
19537 mountHookTypesDev();
19538 var prevDispatcher = ReactSharedInternals.H;
19539 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19540 try {
19541 return mountReducer(reducer, initialArg, init);
19542 } finally {
19543 ReactSharedInternals.H = prevDispatcher;
19544 }
19545 },
19546 useRef: function(initialValue) {
19547 currentHookNameInDev = "useRef";
19548 warnInvalidHookAccess();
19549 mountHookTypesDev();
19550 return mountRef(initialValue);
19551 },
19552 useState: function(initialState) {
19553 currentHookNameInDev = "useState";
19554 warnInvalidHookAccess();
19555 mountHookTypesDev();
19556 var prevDispatcher = ReactSharedInternals.H;
19557 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19558 try {
19559 return mountState(initialState);
19560 } finally {
19561 ReactSharedInternals.H = prevDispatcher;
19562 }
19563 },
19564 useDebugValue: function() {
19565 currentHookNameInDev = "useDebugValue";
19566 warnInvalidHookAccess();
19567 mountHookTypesDev();
19568 },
19569 useDeferredValue: function(value, initialValue) {
19570 currentHookNameInDev = "useDeferredValue";
19571 warnInvalidHookAccess();
19572 mountHookTypesDev();
19573 return mountDeferredValue(value, initialValue);
19574 },
19575 useTransition: function() {
19576 currentHookNameInDev = "useTransition";
19577 warnInvalidHookAccess();
19578 mountHookTypesDev();
19579 return mountTransition();
19580 },
19581 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19582 currentHookNameInDev = "useSyncExternalStore";
19583 warnInvalidHookAccess();
19584 mountHookTypesDev();
19585 return mountSyncExternalStore(
19586 subscribe,
19587 getSnapshot,
19588 getServerSnapshot
19589 );
19590 },
19591 useId: function() {
19592 currentHookNameInDev = "useId";
19593 warnInvalidHookAccess();
19594 mountHookTypesDev();
19595 return mountId();
19596 },
19597 useFormState: function(action, initialState) {
19598 currentHookNameInDev = "useFormState";
19599 warnInvalidHookAccess();
19600 mountHookTypesDev();
19601 return mountActionState(action, initialState);
19602 },
19603 useActionState: function(action, initialState) {
19604 currentHookNameInDev = "useActionState";
19605 warnInvalidHookAccess();
19606 mountHookTypesDev();
19607 return mountActionState(action, initialState);
19608 },
19609 useOptimistic: function(passthrough) {
19610 currentHookNameInDev = "useOptimistic";
19611 warnInvalidHookAccess();
19612 mountHookTypesDev();
19613 return mountOptimistic(passthrough);
19614 },
19615 useMemoCache: function(size) {
19616 warnInvalidHookAccess();
19617 return useMemoCache(size);
19618 },
19619 useHostTransitionStatus,
19620 useCacheRefresh: function() {
19621 currentHookNameInDev = "useCacheRefresh";
19622 mountHookTypesDev();
19623 return mountRefresh();
19624 },
19625 useEffectEvent: function(callback) {
19626 currentHookNameInDev = "useEffectEvent";
19627 warnInvalidHookAccess();
19628 mountHookTypesDev();
19629 return mountEvent(callback);
19630 }
19631 };
19632 InvalidNestedHooksDispatcherOnUpdateInDEV = {
19633 readContext: function(context) {
19634 warnInvalidContextAccess();
19635 return readContext(context);
19636 },
19637 use: function(usable) {
19638 warnInvalidHookAccess();
19639 return use(usable);
19640 },
19641 useCallback: function(callback, deps) {
19642 currentHookNameInDev = "useCallback";
19643 warnInvalidHookAccess();
19644 updateHookTypesDev();
19645 return updateCallback(callback, deps);
19646 },
19647 useContext: function(context) {
19648 currentHookNameInDev = "useContext";
19649 warnInvalidHookAccess();
19650 updateHookTypesDev();
19651 return readContext(context);
19652 },
19653 useEffect: function(create, deps) {
19654 currentHookNameInDev = "useEffect";
19655 warnInvalidHookAccess();
19656 updateHookTypesDev();
19657 updateEffectImpl(2048, Passive, create, deps);
19658 },
19659 useImperativeHandle: function(ref, create, deps) {
19660 currentHookNameInDev = "useImperativeHandle";
19661 warnInvalidHookAccess();
19662 updateHookTypesDev();
19663 return updateImperativeHandle(ref, create, deps);
19664 },
19665 useInsertionEffect: function(create, deps) {
19666 currentHookNameInDev = "useInsertionEffect";
19667 warnInvalidHookAccess();
19668 updateHookTypesDev();
19669 return updateEffectImpl(4, Insertion, create, deps);
19670 },
19671 useLayoutEffect: function(create, deps) {
19672 currentHookNameInDev = "useLayoutEffect";
19673 warnInvalidHookAccess();
19674 updateHookTypesDev();
19675 return updateEffectImpl(4, Layout, create, deps);
19676 },
19677 useMemo: function(create, deps) {
19678 currentHookNameInDev = "useMemo";
19679 warnInvalidHookAccess();
19680 updateHookTypesDev();
19681 var prevDispatcher = ReactSharedInternals.H;
19682 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19683 try {
19684 return updateMemo(create, deps);
19685 } finally {
19686 ReactSharedInternals.H = prevDispatcher;
19687 }
19688 },
19689 useReducer: function(reducer, initialArg, init) {
19690 currentHookNameInDev = "useReducer";
19691 warnInvalidHookAccess();
19692 updateHookTypesDev();
19693 var prevDispatcher = ReactSharedInternals.H;
19694 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19695 try {
19696 return updateReducer(reducer, initialArg, init);
19697 } finally {
19698 ReactSharedInternals.H = prevDispatcher;
19699 }
19700 },
19701 useRef: function() {
19702 currentHookNameInDev = "useRef";
19703 warnInvalidHookAccess();
19704 updateHookTypesDev();
19705 return updateWorkInProgressHook().memoizedState;
19706 },
19707 useState: function() {
19708 currentHookNameInDev = "useState";
19709 warnInvalidHookAccess();
19710 updateHookTypesDev();
19711 var prevDispatcher = ReactSharedInternals.H;
19712 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19713 try {
19714 return updateReducer(basicStateReducer);
19715 } finally {
19716 ReactSharedInternals.H = prevDispatcher;
19717 }
19718 },
19719 useDebugValue: function() {
19720 currentHookNameInDev = "useDebugValue";
19721 warnInvalidHookAccess();
19722 updateHookTypesDev();
19723 },
19724 useDeferredValue: function(value, initialValue) {
19725 currentHookNameInDev = "useDeferredValue";
19726 warnInvalidHookAccess();
19727 updateHookTypesDev();
19728 return updateDeferredValue(value, initialValue);
19729 },
19730 useTransition: function() {
19731 currentHookNameInDev = "useTransition";
19732 warnInvalidHookAccess();
19733 updateHookTypesDev();
19734 return updateTransition();
19735 },
19736 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19737 currentHookNameInDev = "useSyncExternalStore";
19738 warnInvalidHookAccess();
19739 updateHookTypesDev();
19740 return updateSyncExternalStore(
19741 subscribe,
19742 getSnapshot,
19743 getServerSnapshot
19744 );
19745 },
19746 useId: function() {
19747 currentHookNameInDev = "useId";
19748 warnInvalidHookAccess();
19749 updateHookTypesDev();
19750 return updateWorkInProgressHook().memoizedState;
19751 },
19752 useFormState: function(action) {
19753 currentHookNameInDev = "useFormState";
19754 warnInvalidHookAccess();
19755 updateHookTypesDev();
19756 return updateActionState(action);
19757 },
19758 useActionState: function(action) {
19759 currentHookNameInDev = "useActionState";
19760 warnInvalidHookAccess();
19761 updateHookTypesDev();
19762 return updateActionState(action);
19763 },
19764 useOptimistic: function(passthrough, reducer) {
19765 currentHookNameInDev = "useOptimistic";
19766 warnInvalidHookAccess();
19767 updateHookTypesDev();
19768 return updateOptimistic(passthrough, reducer);
19769 },
19770 useMemoCache: function(size) {
19771 warnInvalidHookAccess();
19772 return useMemoCache(size);
19773 },
19774 useHostTransitionStatus,
19775 useCacheRefresh: function() {
19776 currentHookNameInDev = "useCacheRefresh";
19777 updateHookTypesDev();
19778 return updateWorkInProgressHook().memoizedState;
19779 },
19780 useEffectEvent: function(callback) {
19781 currentHookNameInDev = "useEffectEvent";
19782 warnInvalidHookAccess();
19783 updateHookTypesDev();
19784 return updateEvent(callback);
19785 }
19786 };
19787 InvalidNestedHooksDispatcherOnRerenderInDEV = {
19788 readContext: function(context) {
19789 warnInvalidContextAccess();
19790 return readContext(context);
19791 },
19792 use: function(usable) {
19793 warnInvalidHookAccess();
19794 return use(usable);
19795 },
19796 useCallback: function(callback, deps) {
19797 currentHookNameInDev = "useCallback";
19798 warnInvalidHookAccess();
19799 updateHookTypesDev();
19800 return updateCallback(callback, deps);
19801 },
19802 useContext: function(context) {
19803 currentHookNameInDev = "useContext";
19804 warnInvalidHookAccess();
19805 updateHookTypesDev();
19806 return readContext(context);
19807 },
19808 useEffect: function(create, deps) {
19809 currentHookNameInDev = "useEffect";
19810 warnInvalidHookAccess();
19811 updateHookTypesDev();
19812 updateEffectImpl(2048, Passive, create, deps);
19813 },
19814 useImperativeHandle: function(ref, create, deps) {
19815 currentHookNameInDev = "useImperativeHandle";
19816 warnInvalidHookAccess();
19817 updateHookTypesDev();
19818 return updateImperativeHandle(ref, create, deps);
19819 },
19820 useInsertionEffect: function(create, deps) {
19821 currentHookNameInDev = "useInsertionEffect";
19822 warnInvalidHookAccess();
19823 updateHookTypesDev();
19824 return updateEffectImpl(4, Insertion, create, deps);
19825 },
19826 useLayoutEffect: function(create, deps) {
19827 currentHookNameInDev = "useLayoutEffect";
19828 warnInvalidHookAccess();
19829 updateHookTypesDev();
19830 return updateEffectImpl(4, Layout, create, deps);
19831 },
19832 useMemo: function(create, deps) {
19833 currentHookNameInDev = "useMemo";
19834 warnInvalidHookAccess();
19835 updateHookTypesDev();
19836 var prevDispatcher = ReactSharedInternals.H;
19837 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19838 try {
19839 return updateMemo(create, deps);
19840 } finally {
19841 ReactSharedInternals.H = prevDispatcher;
19842 }
19843 },
19844 useReducer: function(reducer, initialArg, init) {
19845 currentHookNameInDev = "useReducer";
19846 warnInvalidHookAccess();
19847 updateHookTypesDev();
19848 var prevDispatcher = ReactSharedInternals.H;
19849 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19850 try {
19851 return rerenderReducer(reducer, initialArg, init);
19852 } finally {
19853 ReactSharedInternals.H = prevDispatcher;
19854 }
19855 },
19856 useRef: function() {
19857 currentHookNameInDev = "useRef";
19858 warnInvalidHookAccess();
19859 updateHookTypesDev();
19860 return updateWorkInProgressHook().memoizedState;
19861 },
19862 useState: function() {
19863 currentHookNameInDev = "useState";
19864 warnInvalidHookAccess();
19865 updateHookTypesDev();
19866 var prevDispatcher = ReactSharedInternals.H;
19867 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19868 try {
19869 return rerenderReducer(basicStateReducer);
19870 } finally {
19871 ReactSharedInternals.H = prevDispatcher;
19872 }
19873 },
19874 useDebugValue: function() {
19875 currentHookNameInDev = "useDebugValue";
19876 warnInvalidHookAccess();
19877 updateHookTypesDev();
19878 },
19879 useDeferredValue: function(value, initialValue) {
19880 currentHookNameInDev = "useDeferredValue";
19881 warnInvalidHookAccess();
19882 updateHookTypesDev();
19883 return rerenderDeferredValue(value, initialValue);
19884 },
19885 useTransition: function() {
19886 currentHookNameInDev = "useTransition";
19887 warnInvalidHookAccess();
19888 updateHookTypesDev();
19889 return rerenderTransition();
19890 },
19891 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19892 currentHookNameInDev = "useSyncExternalStore";
19893 warnInvalidHookAccess();
19894 updateHookTypesDev();
19895 return updateSyncExternalStore(
19896 subscribe,
19897 getSnapshot,
19898 getServerSnapshot
19899 );
19900 },
19901 useId: function() {
19902 currentHookNameInDev = "useId";
19903 warnInvalidHookAccess();
19904 updateHookTypesDev();
19905 return updateWorkInProgressHook().memoizedState;
19906 },
19907 useFormState: function(action) {
19908 currentHookNameInDev = "useFormState";
19909 warnInvalidHookAccess();
19910 updateHookTypesDev();
19911 return rerenderActionState(action);
19912 },
19913 useActionState: function(action) {
19914 currentHookNameInDev = "useActionState";
19915 warnInvalidHookAccess();
19916 updateHookTypesDev();
19917 return rerenderActionState(action);
19918 },
19919 useOptimistic: function(passthrough, reducer) {
19920 currentHookNameInDev = "useOptimistic";
19921 warnInvalidHookAccess();
19922 updateHookTypesDev();
19923 return rerenderOptimistic(passthrough, reducer);
19924 },
19925 useMemoCache: function(size) {
19926 warnInvalidHookAccess();
19927 return useMemoCache(size);
19928 },
19929 useHostTransitionStatus,
19930 useCacheRefresh: function() {
19931 currentHookNameInDev = "useCacheRefresh";
19932 updateHookTypesDev();
19933 return updateWorkInProgressHook().memoizedState;
19934 },
19935 useEffectEvent: function(callback) {
19936 currentHookNameInDev = "useEffectEvent";
19937 warnInvalidHookAccess();
19938 updateHookTypesDev();
19939 return updateEvent(callback);
19940 }
19941 };
19942 var fakeInternalInstance = {};
19943 var didWarnAboutStateAssignmentForComponent = /* @__PURE__ */ new Set();
19944 var didWarnAboutUninitializedState = /* @__PURE__ */ new Set();
19945 var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = /* @__PURE__ */ new Set();
19946 var didWarnAboutLegacyLifecyclesAndDerivedState = /* @__PURE__ */ new Set();
19947 var didWarnAboutDirectlyAssigningPropsToState = /* @__PURE__ */ new Set();
19948 var didWarnAboutUndefinedDerivedState = /* @__PURE__ */ new Set();
19949 var didWarnAboutContextTypes$1 = /* @__PURE__ */ new Set();
19950 var didWarnAboutChildContextTypes = /* @__PURE__ */ new Set();
19951 var didWarnAboutInvalidateContextType = /* @__PURE__ */ new Set();
19952 var didWarnOnInvalidCallback = /* @__PURE__ */ new Set();
19953 Object.freeze(fakeInternalInstance);
19954 var classComponentUpdater = {
19955 enqueueSetState: function(inst, payload, callback) {
19956 inst = inst._reactInternals;
19957 var lane = requestUpdateLane(inst), update = createUpdate(lane);
19958 update.payload = payload;
19959 void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
19960 payload = enqueueUpdate(inst, update, lane);
19961 null !== payload && (startUpdateTimerByLane(lane, "this.setState()", inst), scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
19962 },
19963 enqueueReplaceState: function(inst, payload, callback) {
19964 inst = inst._reactInternals;
19965 var lane = requestUpdateLane(inst), update = createUpdate(lane);
19966 update.tag = ReplaceState;
19967 update.payload = payload;
19968 void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
19969 payload = enqueueUpdate(inst, update, lane);
19970 null !== payload && (startUpdateTimerByLane(lane, "this.replaceState()", inst), scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
19971 },
19972 enqueueForceUpdate: function(inst, callback) {
19973 inst = inst._reactInternals;
19974 var lane = requestUpdateLane(inst), update = createUpdate(lane);
19975 update.tag = ForceUpdate;
19976 void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
19977 callback = enqueueUpdate(inst, update, lane);
19978 null !== callback && (startUpdateTimerByLane(lane, "this.forceUpdate()", inst), scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane));
19979 }
19980 }, componentName = null, errorBoundaryName = null, SelectiveHydrationException = Error(
19981 "This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."
19982 ), didReceiveUpdate = false;
19983 var didWarnAboutBadClass = {};
19984 var didWarnAboutContextTypeOnFunctionComponent = {};
19985 var didWarnAboutContextTypes = {};
19986 var didWarnAboutGetDerivedStateOnFunctionComponent = {};
19987 var didWarnAboutReassigningProps = false;
19988 var didWarnAboutRevealOrder = {};
19989 var didWarnAboutTailOptions = {};
19990 var SUSPENDED_MARKER = {
19991 dehydrated: null,
19992 treeContext: null,
19993 retryLane: 0,
19994 hydrationErrors: null
19995 }, hasWarnedAboutUsingNoValuePropOnContextProvider = false, didWarnAboutUndefinedSnapshotBeforeUpdate = null;
19996 didWarnAboutUndefinedSnapshotBeforeUpdate = /* @__PURE__ */ new Set();
19997 var offscreenSubtreeIsHidden = false, offscreenSubtreeWasHidden = false, needsFormReset = false, PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set, nextEffect = null, inProgressLanes = null, inProgressRoot = null, hostParent = null, hostParentIsContainer = false, currentHoistableRoot = null, inHydratedSubtree = false, suspenseyCommitFlag = 8192, DefaultAsyncDispatcher = {
19998 getCacheForType: function(resourceType) {
19999 var cache = readContext(CacheContext), cacheForType = cache.data.get(resourceType);
20000 void 0 === cacheForType && (cacheForType = resourceType(), cache.data.set(resourceType, cacheForType));
20001 return cacheForType;
20002 },
20003 cacheSignal: function() {
20004 return readContext(CacheContext).controller.signal;
20005 },
20006 getOwner: function() {
20007 return current;
20008 }
20009 };
20010 if ("function" === typeof Symbol && Symbol.for) {
20011 var symbolFor = Symbol.for;
20012 symbolFor("selector.component");
20013 symbolFor("selector.has_pseudo_class");
20014 symbolFor("selector.role");
20015 symbolFor("selector.test_id");
20016 symbolFor("selector.text");
20017 }
20018 var commitHooks = [], PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, NoContext = 0, RenderContext = 2, CommitContext = 4, RootInProgress = 0, RootFatalErrored = 1, RootErrored = 2, RootSuspended = 3, RootSuspendedWithDelay = 4, RootSuspendedAtTheShell = 6, RootCompleted = 5, executionContext = NoContext, workInProgressRoot = null, workInProgress = null, workInProgressRootRenderLanes = 0, NotSuspended = 0, SuspendedOnError = 1, SuspendedOnData = 2, SuspendedOnImmediate = 3, SuspendedOnInstance = 4, SuspendedOnInstanceAndReadyToContinue = 5, SuspendedOnDeprecatedThrowPromise = 6, SuspendedAndReadyToContinue = 7, SuspendedOnHydration = 8, SuspendedOnAction = 9, workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, workInProgressRootDidSkipSuspendedSiblings = false, workInProgressRootIsPrerendering = false, workInProgressRootDidAttachPingListener = false, entangledRenderLanes = 0, workInProgressRootExitStatus = RootInProgress, workInProgressRootSkippedLanes = 0, workInProgressRootInterleavedUpdatedLanes = 0, workInProgressRootPingedLanes = 0, workInProgressDeferredLane = 0, workInProgressSuspendedRetryLanes = 0, workInProgressRootConcurrentErrors = null, workInProgressRootRecoverableErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = false, globalMostRecentFallbackTime = 0, globalMostRecentTransitionTime = 0, FALLBACK_THROTTLE_MS = 300, workInProgressRootRenderTargetTime = Infinity, RENDER_TIMEOUT_MS = 500, workInProgressTransitions = null, workInProgressUpdateTask = null, legacyErrorBoundariesThatAlreadyFailed = null, IMMEDIATE_COMMIT = 0, ABORTED_VIEW_TRANSITION_COMMIT = 1, DELAYED_PASSIVE_COMMIT = 2, ANIMATION_STARTED_COMMIT = 3, NO_PENDING_EFFECTS = 0, PENDING_MUTATION_PHASE = 1, PENDING_LAYOUT_PHASE = 2, PENDING_AFTER_MUTATION_PHASE = 3, PENDING_SPAWNED_WORK = 4, PENDING_PASSIVE_PHASE = 5, pendingEffectsStatus = 0, pendingEffectsRoot = null, pendingFinishedWork = null, pendingEffectsLanes = 0, pendingEffectsRemainingLanes = 0, pendingEffectsRenderEndTime = -0, pendingPassiveTransitions = null, pendingRecoverableErrors = null, pendingSuspendedCommitReason = null, pendingDelayedCommitReason = IMMEDIATE_COMMIT, pendingSuspendedViewTransitionReason = null, NESTED_UPDATE_LIMIT = 50, nestedUpdateCount = 0, rootWithNestedUpdates = null, isFlushingPassiveEffects = false, didScheduleUpdateDuringPassiveEffects = false, NESTED_PASSIVE_UPDATE_LIMIT = 50, nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null, isRunningInsertionEffect = false, didWarnStateUpdateForNotYetMountedComponent = null, didWarnAboutUpdateInRender = false;
20019 var didWarnAboutUpdateInRenderForAnotherComponent = /* @__PURE__ */ new Set();
20020 var fakeActCallbackNode$1 = {}, firstScheduledRoot = null, lastScheduledRoot = null, didScheduleMicrotask = false, didScheduleMicrotask_act = false, mightHavePendingSyncWork = false, isFlushingWork = false, currentEventTransitionLane = 0, fakeActCallbackNode = {};
20021 (function() {
20022 for (var i = 0; i < simpleEventPluginEvents.length; i++) {
20023 var eventName = simpleEventPluginEvents[i], domEventName = eventName.toLowerCase();
20024 eventName = eventName[0].toUpperCase() + eventName.slice(1);
20025 registerSimpleEvent(domEventName, "on" + eventName);
20026 }
20027 registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
20028 registerSimpleEvent(ANIMATION_ITERATION, "onAnimationIteration");
20029 registerSimpleEvent(ANIMATION_START, "onAnimationStart");
20030 registerSimpleEvent("dblclick", "onDoubleClick");
20031 registerSimpleEvent("focusin", "onFocus");
20032 registerSimpleEvent("focusout", "onBlur");
20033 registerSimpleEvent(TRANSITION_RUN, "onTransitionRun");
20034 registerSimpleEvent(TRANSITION_START, "onTransitionStart");
20035 registerSimpleEvent(TRANSITION_CANCEL, "onTransitionCancel");
20036 registerSimpleEvent(TRANSITION_END, "onTransitionEnd");
20037 })();
20038 registerDirectEvent("onMouseEnter", ["mouseout", "mouseover"]);
20039 registerDirectEvent("onMouseLeave", ["mouseout", "mouseover"]);
20040 registerDirectEvent("onPointerEnter", ["pointerout", "pointerover"]);
20041 registerDirectEvent("onPointerLeave", ["pointerout", "pointerover"]);
20042 registerTwoPhaseEvent(
20043 "onChange",
20044 "change click focusin focusout input keydown keyup selectionchange".split(
20045 " "
20046 )
20047 );
20048 registerTwoPhaseEvent(
20049 "onSelect",
20050 "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(
20051 " "
20052 )
20053 );
20054 registerTwoPhaseEvent("onBeforeInput", [
20055 "compositionend",
20056 "keypress",
20057 "textInput",
20058 "paste"
20059 ]);
20060 registerTwoPhaseEvent(
20061 "onCompositionEnd",
20062 "compositionend focusout keydown keypress keyup mousedown".split(" ")
20063 );
20064 registerTwoPhaseEvent(
20065 "onCompositionStart",
20066 "compositionstart focusout keydown keypress keyup mousedown".split(" ")
20067 );
20068 registerTwoPhaseEvent(
20069 "onCompositionUpdate",
20070 "compositionupdate focusout keydown keypress keyup mousedown".split(" ")
20071 );
20072 var mediaEventTypes = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(
20073 " "
20074 ), nonDelegatedEvents = new Set(
20075 "beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(mediaEventTypes)
20076 ), listeningMarker = "_reactListening" + Math.random().toString(36).slice(2), didWarnControlledToUncontrolled = false, didWarnUncontrolledToControlled = false, didWarnFormActionType = false, didWarnFormActionName = false, didWarnFormActionTarget = false, didWarnFormActionMethod = false, didWarnPopoverTargetObject = false;
20077 var didWarnForNewBooleanPropsWithEmptyValue = {};
20078 var NORMALIZE_NEWLINES_REGEX = /\r\n?/g, NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g, xlinkNamespace = "http://www.w3.org/1999/xlink", xmlNamespace = "http://www.w3.org/XML/1998/namespace", EXPECTED_FORM_ACTION_URL = "javascript:throw new Error('React form unexpectedly submitted.')", SUPPRESS_HYDRATION_WARNING = "suppressHydrationWarning", ACTIVITY_START_DATA = "&", ACTIVITY_END_DATA = "/&", SUSPENSE_START_DATA = "$", SUSPENSE_END_DATA = "/$", SUSPENSE_PENDING_START_DATA = "$?", SUSPENSE_QUEUED_START_DATA = "$~", SUSPENSE_FALLBACK_START_DATA = "$!", PREAMBLE_CONTRIBUTION_HTML = "html", PREAMBLE_CONTRIBUTION_BODY = "body", PREAMBLE_CONTRIBUTION_HEAD = "head", FORM_STATE_IS_MATCHING = "F!", FORM_STATE_IS_NOT_MATCHING = "F", DOCUMENT_READY_STATE_LOADING = "loading", STYLE = "style", HostContextNamespaceNone = 0, HostContextNamespaceSvg = 1, HostContextNamespaceMath = 2, eventsEnabled = null, selectionInformation = null, warnedUnknownTags = { dialog: true, webview: true }, currentPopstateTransitionEvent = null, schedulerEvent = void 0, scheduleTimeout = "function" === typeof setTimeout ? setTimeout : void 0, cancelTimeout = "function" === typeof clearTimeout ? clearTimeout : void 0, noTimeout = -1, localPromise = "function" === typeof Promise ? Promise : void 0, scheduleMicrotask = "function" === typeof queueMicrotask ? queueMicrotask : "undefined" !== typeof localPromise ? function(callback) {
20079 return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);
20080 } : scheduleTimeout, previousHydratableOnEnteringScopedSingleton = null, NotLoaded = 0, Loaded = 1, Errored = 2, Settled = 3, Inserted = 4, preloadPropsMap = /* @__PURE__ */ new Map(), preconnectsSet = /* @__PURE__ */ new Set(), previousDispatcher = ReactDOMSharedInternals.d;
20081 ReactDOMSharedInternals.d = {
20082 f: function() {
20083 var previousWasRendering = previousDispatcher.f(), wasRendering = flushSyncWork$1();
20084 return previousWasRendering || wasRendering;
20085 },
20086 r: function(form) {
20087 var formInst = getInstanceFromNode(form);
20088 null !== formInst && 5 === formInst.tag && "form" === formInst.type ? requestFormReset$1(formInst) : previousDispatcher.r(form);
20089 },
20090 D: function(href) {
20091 previousDispatcher.D(href);
20092 preconnectAs("dns-prefetch", href, null);
20093 },
20094 C: function(href, crossOrigin) {
20095 previousDispatcher.C(href, crossOrigin);
20096 preconnectAs("preconnect", href, crossOrigin);
20097 },
20098 L: function(href, as, options) {
20099 previousDispatcher.L(href, as, options);
20100 var ownerDocument = globalDocument;
20101 if (ownerDocument && href && as) {
20102 var preloadSelector = 'link[rel="preload"][as="' + escapeSelectorAttributeValueInsideDoubleQuotes(as) + '"]';
20103 "image" === as ? options && options.imageSrcSet ? (preloadSelector += '[imagesrcset="' + escapeSelectorAttributeValueInsideDoubleQuotes(
20104 options.imageSrcSet
20105 ) + '"]', "string" === typeof options.imageSizes && (preloadSelector += '[imagesizes="' + escapeSelectorAttributeValueInsideDoubleQuotes(
20106 options.imageSizes
20107 ) + '"]')) : preloadSelector += '[href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]' : preloadSelector += '[href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]';
20108 var key = preloadSelector;
20109 switch (as) {
20110 case "style":
20111 key = getStyleKey(href);
20112 break;
20113 case "script":
20114 key = getScriptKey(href);
20115 }
20116 preloadPropsMap.has(key) || (href = assign(
20117 {
20118 rel: "preload",
20119 href: "image" === as && options && options.imageSrcSet ? void 0 : href,
20120 as
20121 },
20122 options
20123 ), preloadPropsMap.set(key, href), null !== ownerDocument.querySelector(preloadSelector) || "style" === as && ownerDocument.querySelector(
20124 getStylesheetSelectorFromKey(key)
20125 ) || "script" === as && ownerDocument.querySelector(getScriptSelectorFromKey(key)) || (as = ownerDocument.createElement("link"), setInitialProperties(as, "link", href), markNodeAsHoistable(as), ownerDocument.head.appendChild(as)));
20126 }
20127 },
20128 m: function(href, options) {
20129 previousDispatcher.m(href, options);
20130 var ownerDocument = globalDocument;
20131 if (ownerDocument && href) {
20132 var as = options && "string" === typeof options.as ? options.as : "script", preloadSelector = 'link[rel="modulepreload"][as="' + escapeSelectorAttributeValueInsideDoubleQuotes(as) + '"][href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]', key = preloadSelector;
20133 switch (as) {
20134 case "audioworklet":
20135 case "paintworklet":
20136 case "serviceworker":
20137 case "sharedworker":
20138 case "worker":
20139 case "script":
20140 key = getScriptKey(href);
20141 }
20142 if (!preloadPropsMap.has(key) && (href = assign({ rel: "modulepreload", href }, options), preloadPropsMap.set(key, href), null === ownerDocument.querySelector(preloadSelector))) {
20143 switch (as) {
20144 case "audioworklet":
20145 case "paintworklet":
20146 case "serviceworker":
20147 case "sharedworker":
20148 case "worker":
20149 case "script":
20150 if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))
20151 return;
20152 }
20153 as = ownerDocument.createElement("link");
20154 setInitialProperties(as, "link", href);
20155 markNodeAsHoistable(as);
20156 ownerDocument.head.appendChild(as);
20157 }
20158 }
20159 },
20160 X: function(src, options) {
20161 previousDispatcher.X(src, options);
20162 var ownerDocument = globalDocument;
20163 if (ownerDocument && src) {
20164 var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts, key = getScriptKey(src), resource = scripts.get(key);
20165 resource || (resource = ownerDocument.querySelector(
20166 getScriptSelectorFromKey(key)
20167 ), resource || (src = assign({ src, async: true }, options), (options = preloadPropsMap.get(key)) && adoptPreloadPropsForScript(src, options), resource = ownerDocument.createElement("script"), markNodeAsHoistable(resource), setInitialProperties(resource, "link", src), ownerDocument.head.appendChild(resource)), resource = {
20168 type: "script",
20169 instance: resource,
20170 count: 1,
20171 state: null
20172 }, scripts.set(key, resource));
20173 }
20174 },
20175 S: function(href, precedence, options) {
20176 previousDispatcher.S(href, precedence, options);
20177 var ownerDocument = globalDocument;
20178 if (ownerDocument && href) {
20179 var styles = getResourcesFromRoot(ownerDocument).hoistableStyles, key = getStyleKey(href);
20180 precedence = precedence || "default";
20181 var resource = styles.get(key);
20182 if (!resource) {
20183 var state = { loading: NotLoaded, preload: null };
20184 if (resource = ownerDocument.querySelector(
20185 getStylesheetSelectorFromKey(key)
20186 ))
20187 state.loading = Loaded | Inserted;
20188 else {
20189 href = assign(
20190 {
20191 rel: "stylesheet",
20192 href,
20193 "data-precedence": precedence
20194 },
20195 options
20196 );
20197 (options = preloadPropsMap.get(key)) && adoptPreloadPropsForStylesheet(href, options);
20198 var link = resource = ownerDocument.createElement("link");
20199 markNodeAsHoistable(link);
20200 setInitialProperties(link, "link", href);
20201 link._p = new Promise(function(resolve, reject) {
20202 link.onload = resolve;
20203 link.onerror = reject;
20204 });
20205 link.addEventListener("load", function() {
20206 state.loading |= Loaded;
20207 });
20208 link.addEventListener("error", function() {
20209 state.loading |= Errored;
20210 });
20211 state.loading |= Inserted;
20212 insertStylesheet(resource, precedence, ownerDocument);
20213 }
20214 resource = {
20215 type: "stylesheet",
20216 instance: resource,
20217 count: 1,
20218 state
20219 };
20220 styles.set(key, resource);
20221 }
20222 }
20223 },
20224 M: function(src, options) {
20225 previousDispatcher.M(src, options);
20226 var ownerDocument = globalDocument;
20227 if (ownerDocument && src) {
20228 var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts, key = getScriptKey(src), resource = scripts.get(key);
20229 resource || (resource = ownerDocument.querySelector(
20230 getScriptSelectorFromKey(key)
20231 ), resource || (src = assign({ src, async: true, type: "module" }, options), (options = preloadPropsMap.get(key)) && adoptPreloadPropsForScript(src, options), resource = ownerDocument.createElement("script"), markNodeAsHoistable(resource), setInitialProperties(resource, "link", src), ownerDocument.head.appendChild(resource)), resource = {
20232 type: "script",
20233 instance: resource,
20234 count: 1,
20235 state: null
20236 }, scripts.set(key, resource));
20237 }
20238 }
20239 };
20240 var globalDocument = "undefined" === typeof document ? null : document, tagCaches = null, SUSPENSEY_STYLESHEET_TIMEOUT = 6e4, SUSPENSEY_IMAGE_TIMEOUT = 800, SUSPENSEY_IMAGE_TIME_ESTIMATE = 500, estimatedBytesWithinLimit = 0, LAST_PRECEDENCE = null, precedencesByRoot = null, NotPendingTransition = NotPending, HostTransitionContext = {
20241 $$typeof: REACT_CONTEXT_TYPE,
20242 Provider: null,
20243 Consumer: null,
20244 _currentValue: NotPendingTransition,
20245 _currentValue2: NotPendingTransition,
20246 _threadCount: 0
20247 }, badgeFormat = "%c%s%c", badgeStyle = "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", resetStyle = "", pad = " ", bind = Function.prototype.bind;
20248 var didWarnAboutNestedUpdates = false;
20249 var overrideHookState = null, overrideHookStateDeletePath = null, overrideHookStateRenamePath = null, overrideProps = null, overridePropsDeletePath = null, overridePropsRenamePath = null, scheduleUpdate = null, scheduleRetry = null, setErrorHandler = null, setSuspenseHandler = null;
20250 overrideHookState = function(fiber, id, path, value) {
20251 id = findHook(fiber, id);
20252 null !== id && (path = copyWithSetImpl(id.memoizedState, path, 0, value), id.memoizedState = path, id.baseState = path, fiber.memoizedProps = assign({}, fiber.memoizedProps), path = enqueueConcurrentRenderForLane(fiber, 2), null !== path && scheduleUpdateOnFiber(path, fiber, 2));
20253 };
20254 overrideHookStateDeletePath = function(fiber, id, path) {
20255 id = findHook(fiber, id);
20256 null !== id && (path = copyWithDeleteImpl(id.memoizedState, path, 0), id.memoizedState = path, id.baseState = path, fiber.memoizedProps = assign({}, fiber.memoizedProps), path = enqueueConcurrentRenderForLane(fiber, 2), null !== path && scheduleUpdateOnFiber(path, fiber, 2));
20257 };
20258 overrideHookStateRenamePath = function(fiber, id, oldPath, newPath) {
20259 id = findHook(fiber, id);
20260 null !== id && (oldPath = copyWithRename(id.memoizedState, oldPath, newPath), id.memoizedState = oldPath, id.baseState = oldPath, fiber.memoizedProps = assign({}, fiber.memoizedProps), oldPath = enqueueConcurrentRenderForLane(fiber, 2), null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2));
20261 };
20262 overrideProps = function(fiber, path, value) {
20263 fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path, 0, value);
20264 fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
20265 path = enqueueConcurrentRenderForLane(fiber, 2);
20266 null !== path && scheduleUpdateOnFiber(path, fiber, 2);
20267 };
20268 overridePropsDeletePath = function(fiber, path) {
20269 fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path, 0);
20270 fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
20271 path = enqueueConcurrentRenderForLane(fiber, 2);
20272 null !== path && scheduleUpdateOnFiber(path, fiber, 2);
20273 };
20274 overridePropsRenamePath = function(fiber, oldPath, newPath) {
20275 fiber.pendingProps = copyWithRename(
20276 fiber.memoizedProps,
20277 oldPath,
20278 newPath
20279 );
20280 fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
20281 oldPath = enqueueConcurrentRenderForLane(fiber, 2);
20282 null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2);
20283 };
20284 scheduleUpdate = function(fiber) {
20285 var root2 = enqueueConcurrentRenderForLane(fiber, 2);
20286 null !== root2 && scheduleUpdateOnFiber(root2, fiber, 2);
20287 };
20288 scheduleRetry = function(fiber) {
20289 var lane = claimNextRetryLane(), root2 = enqueueConcurrentRenderForLane(fiber, lane);
20290 null !== root2 && scheduleUpdateOnFiber(root2, fiber, lane);
20291 };
20292 setErrorHandler = function(newShouldErrorImpl) {
20293 shouldErrorImpl = newShouldErrorImpl;
20294 };
20295 setSuspenseHandler = function(newShouldSuspendImpl) {
20296 shouldSuspendImpl = newShouldSuspendImpl;
20297 };
20298 var _enabled = true, return_targetInst = null, hasScheduledReplayAttempt = false, queuedFocus = null, queuedDrag = null, queuedMouse = null, queuedPointers = /* @__PURE__ */ new Map(), queuedPointerCaptures = /* @__PURE__ */ new Map(), queuedExplicitHydrationTargets = [], discreteReplayableEvents = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(
20299 " "
20300 ), lastScheduledReplayQueue = null;
20301 ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function(children) {
20302 var root2 = this._internalRoot;
20303 if (null === root2) throw Error("Cannot update an unmounted root.");
20304 var args = arguments;
20305 "function" === typeof args[1] ? console.error(
20306 "does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
20307 ) : isValidContainer(args[1]) ? console.error(
20308 "You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."
20309 ) : "undefined" !== typeof args[1] && console.error(
20310 "You passed a second argument to root.render(...) but it only accepts one argument."
20311 );
20312 args = children;
20313 var current2 = root2.current, lane = requestUpdateLane(current2);
20314 updateContainerImpl(current2, lane, args, root2, null, null);
20315 };
20316 ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function() {
20317 var args = arguments;
20318 "function" === typeof args[0] && console.error(
20319 "does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
20320 );
20321 args = this._internalRoot;
20322 if (null !== args) {
20323 this._internalRoot = null;
20324 var container = args.containerInfo;
20325 (executionContext & (RenderContext | CommitContext)) !== NoContext && console.error(
20326 "Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."
20327 );
20328 updateContainerImpl(args.current, 2, null, args, null, null);
20329 flushSyncWork$1();
20330 container[internalContainerInstanceKey] = null;
20331 }
20332 };
20333 ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function(target) {
20334 if (target) {
20335 var updatePriority = resolveUpdatePriority();
20336 target = { blockedOn: null, target, priority: updatePriority };
20337 for (var i = 0; i < queuedExplicitHydrationTargets.length && 0 !== updatePriority && updatePriority < queuedExplicitHydrationTargets[i].priority; i++) ;
20338 queuedExplicitHydrationTargets.splice(i, 0, target);
20339 0 === i && attemptExplicitHydrationTarget(target);
20340 }
20341 };
20342 (function() {
20343 var isomorphicReactPackageVersion = React.version;
20344 if ("19.2.7" !== isomorphicReactPackageVersion)
20345 throw Error(
20346 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + "\n - react-dom: 19.2.7\nLearn more: https://react.dev/warnings/version-mismatch")
20347 );
20348 })();
20349 "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error(
20350 "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"
20351 );
20352 ReactDOMSharedInternals.findDOMNode = function(componentOrElement) {
20353 var fiber = componentOrElement._reactInternals;
20354 if (void 0 === fiber) {
20355 if ("function" === typeof componentOrElement.render)
20356 throw Error("Unable to find node on an unmounted component.");
20357 componentOrElement = Object.keys(componentOrElement).join(",");
20358 throw Error(
20359 "Argument appears to not be a ReactComponent. Keys: " + componentOrElement
20360 );
20361 }
20362 componentOrElement = findCurrentFiberUsingSlowPath(fiber);
20363 componentOrElement = null !== componentOrElement ? findCurrentHostFiberImpl(componentOrElement) : null;
20364 componentOrElement = null === componentOrElement ? null : componentOrElement.stateNode;
20365 return componentOrElement;
20366 };
20367 if (!(function() {
20368 var internals = {
20369 bundleType: 1,
20370 version: "19.2.7",
20371 rendererPackageName: "react-dom",
20372 currentDispatcherRef: ReactSharedInternals,
20373 reconcilerVersion: "19.2.7"
20374 };
20375 internals.overrideHookState = overrideHookState;
20376 internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
20377 internals.overrideHookStateRenamePath = overrideHookStateRenamePath;
20378 internals.overrideProps = overrideProps;
20379 internals.overridePropsDeletePath = overridePropsDeletePath;
20380 internals.overridePropsRenamePath = overridePropsRenamePath;
20381 internals.scheduleUpdate = scheduleUpdate;
20382 internals.scheduleRetry = scheduleRetry;
20383 internals.setErrorHandler = setErrorHandler;
20384 internals.setSuspenseHandler = setSuspenseHandler;
20385 internals.scheduleRefresh = scheduleRefresh;
20386 internals.scheduleRoot = scheduleRoot;
20387 internals.setRefreshHandler = setRefreshHandler;
20388 internals.getCurrentFiber = getCurrentFiberForDevTools;
20389 return injectInternals(internals);
20390 })() && canUseDOM && window.top === window.self && (-1 < navigator.userAgent.indexOf("Chrome") && -1 === navigator.userAgent.indexOf("Edge") || -1 < navigator.userAgent.indexOf("Firefox"))) {
20391 var protocol = window.location.protocol;
20392 /^(https?|file):$/.test(protocol) && console.info(
20393 "%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools" + ("file:" === protocol ? "\nYou might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq" : ""),
20394 "font-weight:bold"
20395 );
20396 }
20397 exports.createRoot = function(container, options) {
20398 if (!isValidContainer(container))
20399 throw Error("Target container is not a DOM element.");
20400 warnIfReactDOMContainerInDEV(container);
20401 var isStrictMode = false, identifierPrefix = "", onUncaughtError = defaultOnUncaughtError, onCaughtError = defaultOnCaughtError, onRecoverableError = defaultOnRecoverableError;
20402 null !== options && void 0 !== options && (options.hydrate ? console.warn(
20403 "hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."
20404 ) : "object" === typeof options && null !== options && (options.$$typeof === REACT_ELEMENT_TYPE || options.$$typeof === REACT_LEGACY_ELEMENT_TYPE) && console.error(
20405 "You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:\n\n let root = createRoot(domContainer);\n root.render(<App />);"
20406 ), true === options.unstable_strictMode && (isStrictMode = true), void 0 !== options.identifierPrefix && (identifierPrefix = options.identifierPrefix), void 0 !== options.onUncaughtError && (onUncaughtError = options.onUncaughtError), void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError), void 0 !== options.onRecoverableError && (onRecoverableError = options.onRecoverableError));
20407 options = createFiberRoot(
20408 container,
20409 1,
20410 false,
20411 null,
20412 null,
20413 isStrictMode,
20414 identifierPrefix,
20415 null,
20416 onUncaughtError,
20417 onCaughtError,
20418 onRecoverableError,
20419 defaultOnDefaultTransitionIndicator
20420 );
20421 container[internalContainerInstanceKey] = options.current;
20422 listenToAllSupportedEvents(container);
20423 return new ReactDOMRoot(options);
20424 };
20425 exports.hydrateRoot = function(container, initialChildren, options) {
20426 if (!isValidContainer(container))
20427 throw Error("Target container is not a DOM element.");
20428 warnIfReactDOMContainerInDEV(container);
20429 void 0 === initialChildren && console.error(
20430 "Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)"
20431 );
20432 var isStrictMode = false, identifierPrefix = "", onUncaughtError = defaultOnUncaughtError, onCaughtError = defaultOnCaughtError, onRecoverableError = defaultOnRecoverableError, formState = null;
20433 null !== options && void 0 !== options && (true === options.unstable_strictMode && (isStrictMode = true), void 0 !== options.identifierPrefix && (identifierPrefix = options.identifierPrefix), void 0 !== options.onUncaughtError && (onUncaughtError = options.onUncaughtError), void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError), void 0 !== options.onRecoverableError && (onRecoverableError = options.onRecoverableError), void 0 !== options.formState && (formState = options.formState));
20434 initialChildren = createFiberRoot(
20435 container,
20436 1,
20437 true,
20438 initialChildren,
20439 null != options ? options : null,
20440 isStrictMode,
20441 identifierPrefix,
20442 formState,
20443 onUncaughtError,
20444 onCaughtError,
20445 onRecoverableError,
20446 defaultOnDefaultTransitionIndicator
20447 );
20448 initialChildren.context = getContextForSubtree(null);
20449 options = initialChildren.current;
20450 isStrictMode = requestUpdateLane(options);
20451 isStrictMode = getBumpedLaneForHydrationByLane(isStrictMode);
20452 identifierPrefix = createUpdate(isStrictMode);
20453 identifierPrefix.callback = null;
20454 enqueueUpdate(options, identifierPrefix, isStrictMode);
20455 startUpdateTimerByLane(isStrictMode, "hydrateRoot()", null);
20456 options = isStrictMode;
20457 initialChildren.current.lanes = options;
20458 markRootUpdated$1(initialChildren, options);
20459 ensureRootIsScheduled(initialChildren);
20460 container[internalContainerInstanceKey] = initialChildren.current;
20461 listenToAllSupportedEvents(container);
20462 return new ReactDOMHydrationRoot(initialChildren);
20463 };
20464 exports.version = "19.2.7";
20465 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
20466 })();
20467 }
20468 });
20469
20470 // ../react-19/node_modules/react-dom/client.js
20471 var require_client = __commonJS({
20472 "../react-19/node_modules/react-dom/client.js"(exports, module) {
20473 "use strict";
20474 if (false) {
20475 checkDCE();
20476 module.exports = null;
20477 } else {
20478 module.exports = require_react_dom_client_development();
20479 }
20480 }
20481 });
20482
20483 // ../react-19/react-polyfill.js
20484 var react_polyfill_exports = {};
20485 __export(react_polyfill_exports, {
20486 findDOMNode: () => findDOMNode,
20487 hydrate: () => hydrate,
20488 render: () => render,
20489 unmountComponentAtNode: () => unmountComponentAtNode
20490 });
20491 function findCurrentFiber(fiber) {
20492 if (!fiber.alternate) {
20493 return fiber;
20494 }
20495 let node = fiber;
20496 while (node.return) {
20497 node = node.return;
20498 }
20499 if (node.stateNode.current === node) {
20500 return fiber;
20501 }
20502 return fiber.alternate;
20503 }
20504 function findHostFiber(fiber) {
20505 const current = findCurrentFiber(fiber);
20506 if (!current) {
20507 return null;
20508 }
20509 return findHostFiberImpl(current);
20510 }
20511 function findHostFiberImpl(fiber) {
20512 if (fiber.tag === HostComponent || fiber.tag === HostText) {
20513 return fiber;
20514 }
20515 let child = fiber.child;
20516 while (child) {
20517 const hostFiber = findHostFiberImpl(child);
20518 if (hostFiber) {
20519 return hostFiber;
20520 }
20521 child = child.sibling;
20522 }
20523 return null;
20524 }
20525 function findDOMNode(instance) {
20526 if (instance === null || instance === void 0) {
20527 return null;
20528 }
20529 if (instance.nodeType !== void 0) {
20530 return instance;
20531 }
20532 const fiber = instance[internalsKey];
20533 if (fiber === void 0) {
20534 if (typeof instance.render === "function") {
20535 throw new Error("Unable to find node on an unmounted component.");
20536 }
20537 const keys = Object.keys(instance).join(",");
20538 throw new Error(
20539 `Argument appears to not be a ReactComponent. Keys: ${keys}`
20540 );
20541 }
20542 const hostFiber = findHostFiber(fiber);
20543 return hostFiber?.stateNode ?? null;
20544 }
20545 function render(element, container, callback) {
20546 let root = roots.get(container);
20547 if (!root) {
20548 root = (0, import_client.createRoot)(container);
20549 roots.set(container, root);
20550 }
20551 (0, import_react_dom.flushSync)(() => {
20552 root.render(element);
20553 });
20554 if (typeof callback === "function") {
20555 callback();
20556 }
20557 }
20558 function hydrate(element, container, callback) {
20559 let root = roots.get(container);
20560 if (!root) {
20561 root = (0, import_client.hydrateRoot)(container, element);
20562 roots.set(container, root);
20563 } else {
20564 root.render(element);
20565 }
20566 if (typeof callback === "function") {
20567 callback();
20568 }
20569 }
20570 function unmountComponentAtNode(container) {
20571 const root = roots.get(container);
20572 if (!root) {
20573 return false;
20574 }
20575 (0, import_react_dom.flushSync)(() => {
20576 root.unmount();
20577 });
20578 roots.delete(container);
20579 return true;
20580 }
20581 var import_react_dom, import_client, internalsKey, HostComponent, HostText, roots;
20582 var init_react_polyfill = __esm({
20583 "../react-19/react-polyfill.js"() {
20584 import_react_dom = __toESM(require_react_dom());
20585 import_client = __toESM(require_client());
20586 internalsKey = "_reactInternals";
20587 HostComponent = 5;
20588 HostText = 6;
20589 roots = /* @__PURE__ */ new WeakMap();
20590 }
20591 });
20592
20593 // ../react-19/react-dom.js
20594 var require_react_dom2 = __commonJS({
20595 "../react-19/react-dom.js"(exports, module) {
20596 module.exports = {
20597 ...require_react_dom(),
20598 ...require_client(),
20599 ...(init_react_polyfill(), __toCommonJS(react_polyfill_exports)),
20600 __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {}
20601 };
20602 }
20603 });
20604 return require_react_dom2();
20605 })();
20606 /*! Bundled license information:
20607
20608 react-dom/cjs/react-dom.development.js:
20609 (**
20610 * @license React
20611 * react-dom.development.js
20612 *
20613 * Copyright (c) Meta Platforms, Inc. and affiliates.
20614 *
20615 * This source code is licensed under the MIT license found in the
20616 * LICENSE file in the root directory of this source tree.
20617 *)
20618
20619 scheduler/cjs/scheduler.development.js:
20620 (**
20621 * @license React
20622 * scheduler.development.js
20623 *
20624 * Copyright (c) Meta Platforms, Inc. and affiliates.
20625 *
20626 * This source code is licensed under the MIT license found in the
20627 * LICENSE file in the root directory of this source tree.
20628 *)
20629
20630 react-dom/cjs/react-dom-client.development.js:
20631 (**
20632 * @license React
20633 * react-dom-client.development.js
20634 *
20635 * Copyright (c) Meta Platforms, Inc. and affiliates.
20636 *
20637 * This source code is licensed under the MIT license found in the
20638 * LICENSE file in the root directory of this source tree.
20639 *)
20640 */
20641