UNPKG

212 kBJavaScriptView Raw
1/**
2 * @license React
3 * react-dom-server.node.production.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */
10
11"use strict";
12var util = require("util"),
13 crypto = require("crypto"),
14 async_hooks = require("async_hooks"),
15 React = require("react"),
16 ReactDOM = require("react-dom"),
17 REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
18 REACT_PORTAL_TYPE = Symbol.for("react.portal"),
19 REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
20 REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
21 REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
22 REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
23 REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
24 REACT_CONTEXT_TYPE = Symbol.for("react.context"),
25 REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
26 REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
27 REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
28 REACT_MEMO_TYPE = Symbol.for("react.memo"),
29 REACT_LAZY_TYPE = Symbol.for("react.lazy"),
30 REACT_SCOPE_TYPE = Symbol.for("react.scope"),
31 REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for("react.debug_trace_mode"),
32 REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
33 REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"),
34 MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
35 isArrayImpl = Array.isArray;
36function flushBuffered(destination) {
37 "function" === typeof destination.flush && destination.flush();
38}
39var currentView = null,
40 writtenBytes = 0,
41 destinationHasCapacity$1 = !0;
42function writeChunk(destination, chunk) {
43 if ("string" === typeof chunk) {
44 if (0 !== chunk.length)
45 if (2048 < 3 * chunk.length)
46 0 < writtenBytes &&
47 (writeToDestination(
48 destination,
49 currentView.subarray(0, writtenBytes)
50 ),
51 (currentView = new Uint8Array(2048)),
52 (writtenBytes = 0)),
53 writeToDestination(destination, textEncoder.encode(chunk));
54 else {
55 var target = currentView;
56 0 < writtenBytes && (target = currentView.subarray(writtenBytes));
57 target = textEncoder.encodeInto(chunk, target);
58 var read = target.read;
59 writtenBytes += target.written;
60 read < chunk.length &&
61 (writeToDestination(
62 destination,
63 currentView.subarray(0, writtenBytes)
64 ),
65 (currentView = new Uint8Array(2048)),
66 (writtenBytes = textEncoder.encodeInto(
67 chunk.slice(read),
68 currentView
69 ).written));
70 2048 === writtenBytes &&
71 (writeToDestination(destination, currentView),
72 (currentView = new Uint8Array(2048)),
73 (writtenBytes = 0));
74 }
75 } else
76 0 !== chunk.byteLength &&
77 (2048 < chunk.byteLength
78 ? (0 < writtenBytes &&
79 (writeToDestination(
80 destination,
81 currentView.subarray(0, writtenBytes)
82 ),
83 (currentView = new Uint8Array(2048)),
84 (writtenBytes = 0)),
85 writeToDestination(destination, chunk))
86 : ((target = currentView.length - writtenBytes),
87 target < chunk.byteLength &&
88 (0 === target
89 ? writeToDestination(destination, currentView)
90 : (currentView.set(chunk.subarray(0, target), writtenBytes),
91 (writtenBytes += target),
92 writeToDestination(destination, currentView),
93 (chunk = chunk.subarray(target))),
94 (currentView = new Uint8Array(2048)),
95 (writtenBytes = 0)),
96 currentView.set(chunk, writtenBytes),
97 (writtenBytes += chunk.byteLength),
98 2048 === writtenBytes &&
99 (writeToDestination(destination, currentView),
100 (currentView = new Uint8Array(2048)),
101 (writtenBytes = 0))));
102}
103function writeToDestination(destination, view) {
104 destination = destination.write(view);
105 destinationHasCapacity$1 = destinationHasCapacity$1 && destination;
106}
107function writeChunkAndReturn(destination, chunk) {
108 writeChunk(destination, chunk);
109 return destinationHasCapacity$1;
110}
111function completeWriting(destination) {
112 currentView &&
113 0 < writtenBytes &&
114 destination.write(currentView.subarray(0, writtenBytes));
115 currentView = null;
116 writtenBytes = 0;
117 destinationHasCapacity$1 = !0;
118}
119var textEncoder = new util.TextEncoder();
120function stringToPrecomputedChunk(content) {
121 return textEncoder.encode(content);
122}
123var assign = Object.assign,
124 hasOwnProperty = Object.prototype.hasOwnProperty,
125 VALID_ATTRIBUTE_NAME_REGEX = RegExp(
126 "^[: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]*$"
127 ),
128 illegalAttributeNameCache = {},
129 validatedAttributeNameCache = {};
130function isAttributeNameSafe(attributeName) {
131 if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
132 return !0;
133 if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return !1;
134 if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
135 return (validatedAttributeNameCache[attributeName] = !0);
136 illegalAttributeNameCache[attributeName] = !0;
137 return !1;
138}
139var unitlessNumbers = new Set(
140 "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(
141 " "
142 )
143 ),
144 aliases = new Map([
145 ["acceptCharset", "accept-charset"],
146 ["htmlFor", "for"],
147 ["httpEquiv", "http-equiv"],
148 ["crossOrigin", "crossorigin"],
149 ["accentHeight", "accent-height"],
150 ["alignmentBaseline", "alignment-baseline"],
151 ["arabicForm", "arabic-form"],
152 ["baselineShift", "baseline-shift"],
153 ["capHeight", "cap-height"],
154 ["clipPath", "clip-path"],
155 ["clipRule", "clip-rule"],
156 ["colorInterpolation", "color-interpolation"],
157 ["colorInterpolationFilters", "color-interpolation-filters"],
158 ["colorProfile", "color-profile"],
159 ["colorRendering", "color-rendering"],
160 ["dominantBaseline", "dominant-baseline"],
161 ["enableBackground", "enable-background"],
162 ["fillOpacity", "fill-opacity"],
163 ["fillRule", "fill-rule"],
164 ["floodColor", "flood-color"],
165 ["floodOpacity", "flood-opacity"],
166 ["fontFamily", "font-family"],
167 ["fontSize", "font-size"],
168 ["fontSizeAdjust", "font-size-adjust"],
169 ["fontStretch", "font-stretch"],
170 ["fontStyle", "font-style"],
171 ["fontVariant", "font-variant"],
172 ["fontWeight", "font-weight"],
173 ["glyphName", "glyph-name"],
174 ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
175 ["glyphOrientationVertical", "glyph-orientation-vertical"],
176 ["horizAdvX", "horiz-adv-x"],
177 ["horizOriginX", "horiz-origin-x"],
178 ["imageRendering", "image-rendering"],
179 ["letterSpacing", "letter-spacing"],
180 ["lightingColor", "lighting-color"],
181 ["markerEnd", "marker-end"],
182 ["markerMid", "marker-mid"],
183 ["markerStart", "marker-start"],
184 ["overlinePosition", "overline-position"],
185 ["overlineThickness", "overline-thickness"],
186 ["paintOrder", "paint-order"],
187 ["panose-1", "panose-1"],
188 ["pointerEvents", "pointer-events"],
189 ["renderingIntent", "rendering-intent"],
190 ["shapeRendering", "shape-rendering"],
191 ["stopColor", "stop-color"],
192 ["stopOpacity", "stop-opacity"],
193 ["strikethroughPosition", "strikethrough-position"],
194 ["strikethroughThickness", "strikethrough-thickness"],
195 ["strokeDasharray", "stroke-dasharray"],
196 ["strokeDashoffset", "stroke-dashoffset"],
197 ["strokeLinecap", "stroke-linecap"],
198 ["strokeLinejoin", "stroke-linejoin"],
199 ["strokeMiterlimit", "stroke-miterlimit"],
200 ["strokeOpacity", "stroke-opacity"],
201 ["strokeWidth", "stroke-width"],
202 ["textAnchor", "text-anchor"],
203 ["textDecoration", "text-decoration"],
204 ["textRendering", "text-rendering"],
205 ["transformOrigin", "transform-origin"],
206 ["underlinePosition", "underline-position"],
207 ["underlineThickness", "underline-thickness"],
208 ["unicodeBidi", "unicode-bidi"],
209 ["unicodeRange", "unicode-range"],
210 ["unitsPerEm", "units-per-em"],
211 ["vAlphabetic", "v-alphabetic"],
212 ["vHanging", "v-hanging"],
213 ["vIdeographic", "v-ideographic"],
214 ["vMathematical", "v-mathematical"],
215 ["vectorEffect", "vector-effect"],
216 ["vertAdvY", "vert-adv-y"],
217 ["vertOriginX", "vert-origin-x"],
218 ["vertOriginY", "vert-origin-y"],
219 ["wordSpacing", "word-spacing"],
220 ["writingMode", "writing-mode"],
221 ["xmlnsXlink", "xmlns:xlink"],
222 ["xHeight", "x-height"]
223 ]),
224 matchHtmlRegExp = /["'&<>]/;
225function escapeTextForBrowser(text) {
226 if (
227 "boolean" === typeof text ||
228 "number" === typeof text ||
229 "bigint" === typeof text
230 )
231 return "" + text;
232 text = "" + text;
233 var match = matchHtmlRegExp.exec(text);
234 if (match) {
235 var html = "",
236 index,
237 lastIndex = 0;
238 for (index = match.index; index < text.length; index++) {
239 switch (text.charCodeAt(index)) {
240 case 34:
241 match = "&quot;";
242 break;
243 case 38:
244 match = "&amp;";
245 break;
246 case 39:
247 match = "&#x27;";
248 break;
249 case 60:
250 match = "&lt;";
251 break;
252 case 62:
253 match = "&gt;";
254 break;
255 default:
256 continue;
257 }
258 lastIndex !== index && (html += text.slice(lastIndex, index));
259 lastIndex = index + 1;
260 html += match;
261 }
262 text = lastIndex !== index ? html + text.slice(lastIndex, index) : html;
263 }
264 return text;
265}
266var uppercasePattern = /([A-Z])/g,
267 msPattern = /^ms-/,
268 isJavaScriptProtocol =
269 /^[\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;
270function sanitizeURL(url) {
271 return isJavaScriptProtocol.test("" + url)
272 ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')"
273 : url;
274}
275var ReactSharedInternals =
276 React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
277 ReactDOMSharedInternals =
278 ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
279 sharedNotPendingObject = {
280 pending: !1,
281 data: null,
282 method: null,
283 action: null
284 },
285 previousDispatcher = ReactDOMSharedInternals.d;
286ReactDOMSharedInternals.d = {
287 f: previousDispatcher.f,
288 r: previousDispatcher.r,
289 D: prefetchDNS,
290 C: preconnect,
291 L: preload,
292 m: preloadModule,
293 X: preinitScript,
294 S: preinitStyle,
295 M: preinitModuleScript
296};
297var PRELOAD_NO_CREDS = [];
298stringToPrecomputedChunk('"></template>');
299var startInlineScript = stringToPrecomputedChunk("<script>"),
300 endInlineScript = stringToPrecomputedChunk("\x3c/script>"),
301 startScriptSrc = stringToPrecomputedChunk('<script src="'),
302 startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'),
303 scriptNonce = stringToPrecomputedChunk('" nonce="'),
304 scriptIntegirty = stringToPrecomputedChunk('" integrity="'),
305 scriptCrossOrigin = stringToPrecomputedChunk('" crossorigin="'),
306 endAsyncScript = stringToPrecomputedChunk('" async="">\x3c/script>'),
307 scriptRegex = /(<\/|<)(s)(cript)/gi;
308function scriptReplacer(match, prefix, s, suffix) {
309 return "" + prefix + ("s" === s ? "\\u0073" : "\\u0053") + suffix;
310}
311var importMapScriptStart = stringToPrecomputedChunk(
312 '<script type="importmap">'
313 ),
314 importMapScriptEnd = stringToPrecomputedChunk("\x3c/script>");
315function createFormatContext(insertionMode, selectedValue, tagScope) {
316 return {
317 insertionMode: insertionMode,
318 selectedValue: selectedValue,
319 tagScope: tagScope
320 };
321}
322function getChildFormatContext(parentContext, type, props) {
323 switch (type) {
324 case "noscript":
325 return createFormatContext(2, null, parentContext.tagScope | 1);
326 case "select":
327 return createFormatContext(
328 2,
329 null != props.value ? props.value : props.defaultValue,
330 parentContext.tagScope
331 );
332 case "svg":
333 return createFormatContext(3, null, parentContext.tagScope);
334 case "picture":
335 return createFormatContext(2, null, parentContext.tagScope | 2);
336 case "math":
337 return createFormatContext(4, null, parentContext.tagScope);
338 case "foreignObject":
339 return createFormatContext(2, null, parentContext.tagScope);
340 case "table":
341 return createFormatContext(5, null, parentContext.tagScope);
342 case "thead":
343 case "tbody":
344 case "tfoot":
345 return createFormatContext(6, null, parentContext.tagScope);
346 case "colgroup":
347 return createFormatContext(8, null, parentContext.tagScope);
348 case "tr":
349 return createFormatContext(7, null, parentContext.tagScope);
350 }
351 return 5 <= parentContext.insertionMode
352 ? createFormatContext(2, null, parentContext.tagScope)
353 : 0 === parentContext.insertionMode
354 ? "html" === type
355 ? createFormatContext(1, null, parentContext.tagScope)
356 : createFormatContext(2, null, parentContext.tagScope)
357 : 1 === parentContext.insertionMode
358 ? createFormatContext(2, null, parentContext.tagScope)
359 : parentContext;
360}
361var textSeparator = stringToPrecomputedChunk("\x3c!-- --\x3e");
362function pushTextInstance(target, text, renderState, textEmbedded) {
363 if ("" === text) return textEmbedded;
364 textEmbedded && target.push(textSeparator);
365 target.push(escapeTextForBrowser(text));
366 return !0;
367}
368var styleNameCache = new Map(),
369 styleAttributeStart = stringToPrecomputedChunk(' style="'),
370 styleAssign = stringToPrecomputedChunk(":"),
371 styleSeparator = stringToPrecomputedChunk(";");
372function pushStyleAttribute(target, style) {
373 if ("object" !== typeof style)
374 throw Error(
375 "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
376 );
377 var isFirst = !0,
378 styleName;
379 for (styleName in style)
380 if (hasOwnProperty.call(style, styleName)) {
381 var styleValue = style[styleName];
382 if (
383 null != styleValue &&
384 "boolean" !== typeof styleValue &&
385 "" !== styleValue
386 ) {
387 if (0 === styleName.indexOf("--")) {
388 var nameChunk = escapeTextForBrowser(styleName);
389 styleValue = escapeTextForBrowser(("" + styleValue).trim());
390 } else
391 (nameChunk = styleNameCache.get(styleName)),
392 void 0 === nameChunk &&
393 ((nameChunk = stringToPrecomputedChunk(
394 escapeTextForBrowser(
395 styleName
396 .replace(uppercasePattern, "-$1")
397 .toLowerCase()
398 .replace(msPattern, "-ms-")
399 )
400 )),
401 styleNameCache.set(styleName, nameChunk)),
402 (styleValue =
403 "number" === typeof styleValue
404 ? 0 === styleValue || unitlessNumbers.has(styleName)
405 ? "" + styleValue
406 : styleValue + "px"
407 : escapeTextForBrowser(("" + styleValue).trim()));
408 isFirst
409 ? ((isFirst = !1),
410 target.push(
411 styleAttributeStart,
412 nameChunk,
413 styleAssign,
414 styleValue
415 ))
416 : target.push(styleSeparator, nameChunk, styleAssign, styleValue);
417 }
418 }
419 isFirst || target.push(attributeEnd);
420}
421var attributeSeparator = stringToPrecomputedChunk(" "),
422 attributeAssign = stringToPrecomputedChunk('="'),
423 attributeEnd = stringToPrecomputedChunk('"'),
424 attributeEmptyString = stringToPrecomputedChunk('=""');
425function pushBooleanAttribute(target, name, value) {
426 value &&
427 "function" !== typeof value &&
428 "symbol" !== typeof value &&
429 target.push(attributeSeparator, name, attributeEmptyString);
430}
431function pushStringAttribute(target, name, value) {
432 "function" !== typeof value &&
433 "symbol" !== typeof value &&
434 "boolean" !== typeof value &&
435 target.push(
436 attributeSeparator,
437 name,
438 attributeAssign,
439 escapeTextForBrowser(value),
440 attributeEnd
441 );
442}
443var actionJavaScriptURL = stringToPrecomputedChunk(
444 escapeTextForBrowser(
445 "javascript:throw new Error('React form unexpectedly submitted.')"
446 )
447 ),
448 startHiddenInputChunk = stringToPrecomputedChunk('<input type="hidden"');
449function pushAdditionalFormField(value, key) {
450 this.push(startHiddenInputChunk);
451 if ("string" !== typeof value)
452 throw Error(
453 "File/Blob fields are not yet supported in progressive forms. It probably means you are closing over binary data or FormData in a Server Action."
454 );
455 pushStringAttribute(this, "name", key);
456 pushStringAttribute(this, "value", value);
457 this.push(endOfStartTagSelfClosing);
458}
459function getCustomFormFields(resumableState, formAction) {
460 if ("function" === typeof formAction.$$FORM_ACTION) {
461 var id = resumableState.nextFormID++;
462 resumableState = resumableState.idPrefix + id;
463 try {
464 return formAction.$$FORM_ACTION(resumableState);
465 } catch (x) {
466 if ("object" === typeof x && null !== x && "function" === typeof x.then)
467 throw x;
468 }
469 }
470 return null;
471}
472function pushFormActionAttribute(
473 target,
474 resumableState,
475 renderState,
476 formAction,
477 formEncType,
478 formMethod,
479 formTarget,
480 name
481) {
482 var formData = null;
483 if ("function" === typeof formAction) {
484 var customFields = getCustomFormFields(resumableState, formAction);
485 null !== customFields
486 ? ((name = customFields.name),
487 (formAction = customFields.action || ""),
488 (formEncType = customFields.encType),
489 (formMethod = customFields.method),
490 (formTarget = customFields.target),
491 (formData = customFields.data))
492 : (target.push(
493 attributeSeparator,
494 "formAction",
495 attributeAssign,
496 actionJavaScriptURL,
497 attributeEnd
498 ),
499 (formTarget = formMethod = formEncType = formAction = name = null),
500 injectFormReplayingRuntime(resumableState, renderState));
501 }
502 null != name && pushAttribute(target, "name", name);
503 null != formAction && pushAttribute(target, "formAction", formAction);
504 null != formEncType && pushAttribute(target, "formEncType", formEncType);
505 null != formMethod && pushAttribute(target, "formMethod", formMethod);
506 null != formTarget && pushAttribute(target, "formTarget", formTarget);
507 return formData;
508}
509function pushAttribute(target, name, value) {
510 switch (name) {
511 case "className":
512 pushStringAttribute(target, "class", value);
513 break;
514 case "tabIndex":
515 pushStringAttribute(target, "tabindex", value);
516 break;
517 case "dir":
518 case "role":
519 case "viewBox":
520 case "width":
521 case "height":
522 pushStringAttribute(target, name, value);
523 break;
524 case "style":
525 pushStyleAttribute(target, value);
526 break;
527 case "src":
528 case "href":
529 if ("" === value) break;
530 case "action":
531 case "formAction":
532 if (
533 null == value ||
534 "function" === typeof value ||
535 "symbol" === typeof value ||
536 "boolean" === typeof value
537 )
538 break;
539 value = sanitizeURL("" + value);
540 target.push(
541 attributeSeparator,
542 name,
543 attributeAssign,
544 escapeTextForBrowser(value),
545 attributeEnd
546 );
547 break;
548 case "defaultValue":
549 case "defaultChecked":
550 case "innerHTML":
551 case "suppressContentEditableWarning":
552 case "suppressHydrationWarning":
553 case "ref":
554 break;
555 case "autoFocus":
556 case "multiple":
557 case "muted":
558 pushBooleanAttribute(target, name.toLowerCase(), value);
559 break;
560 case "xlinkHref":
561 if (
562 "function" === typeof value ||
563 "symbol" === typeof value ||
564 "boolean" === typeof value
565 )
566 break;
567 value = sanitizeURL("" + value);
568 target.push(
569 attributeSeparator,
570 "xlink:href",
571 attributeAssign,
572 escapeTextForBrowser(value),
573 attributeEnd
574 );
575 break;
576 case "contentEditable":
577 case "spellCheck":
578 case "draggable":
579 case "value":
580 case "autoReverse":
581 case "externalResourcesRequired":
582 case "focusable":
583 case "preserveAlpha":
584 "function" !== typeof value &&
585 "symbol" !== typeof value &&
586 target.push(
587 attributeSeparator,
588 name,
589 attributeAssign,
590 escapeTextForBrowser(value),
591 attributeEnd
592 );
593 break;
594 case "inert":
595 case "allowFullScreen":
596 case "async":
597 case "autoPlay":
598 case "controls":
599 case "default":
600 case "defer":
601 case "disabled":
602 case "disablePictureInPicture":
603 case "disableRemotePlayback":
604 case "formNoValidate":
605 case "hidden":
606 case "loop":
607 case "noModule":
608 case "noValidate":
609 case "open":
610 case "playsInline":
611 case "readOnly":
612 case "required":
613 case "reversed":
614 case "scoped":
615 case "seamless":
616 case "itemScope":
617 value &&
618 "function" !== typeof value &&
619 "symbol" !== typeof value &&
620 target.push(attributeSeparator, name, attributeEmptyString);
621 break;
622 case "capture":
623 case "download":
624 !0 === value
625 ? target.push(attributeSeparator, name, attributeEmptyString)
626 : !1 !== value &&
627 "function" !== typeof value &&
628 "symbol" !== typeof value &&
629 target.push(
630 attributeSeparator,
631 name,
632 attributeAssign,
633 escapeTextForBrowser(value),
634 attributeEnd
635 );
636 break;
637 case "cols":
638 case "rows":
639 case "size":
640 case "span":
641 "function" !== typeof value &&
642 "symbol" !== typeof value &&
643 !isNaN(value) &&
644 1 <= value &&
645 target.push(
646 attributeSeparator,
647 name,
648 attributeAssign,
649 escapeTextForBrowser(value),
650 attributeEnd
651 );
652 break;
653 case "rowSpan":
654 case "start":
655 "function" === typeof value ||
656 "symbol" === typeof value ||
657 isNaN(value) ||
658 target.push(
659 attributeSeparator,
660 name,
661 attributeAssign,
662 escapeTextForBrowser(value),
663 attributeEnd
664 );
665 break;
666 case "xlinkActuate":
667 pushStringAttribute(target, "xlink:actuate", value);
668 break;
669 case "xlinkArcrole":
670 pushStringAttribute(target, "xlink:arcrole", value);
671 break;
672 case "xlinkRole":
673 pushStringAttribute(target, "xlink:role", value);
674 break;
675 case "xlinkShow":
676 pushStringAttribute(target, "xlink:show", value);
677 break;
678 case "xlinkTitle":
679 pushStringAttribute(target, "xlink:title", value);
680 break;
681 case "xlinkType":
682 pushStringAttribute(target, "xlink:type", value);
683 break;
684 case "xmlBase":
685 pushStringAttribute(target, "xml:base", value);
686 break;
687 case "xmlLang":
688 pushStringAttribute(target, "xml:lang", value);
689 break;
690 case "xmlSpace":
691 pushStringAttribute(target, "xml:space", value);
692 break;
693 default:
694 if (
695 !(2 < name.length) ||
696 ("o" !== name[0] && "O" !== name[0]) ||
697 ("n" !== name[1] && "N" !== name[1])
698 )
699 if (((name = aliases.get(name) || name), isAttributeNameSafe(name))) {
700 switch (typeof value) {
701 case "function":
702 case "symbol":
703 return;
704 case "boolean":
705 var prefix$8 = name.toLowerCase().slice(0, 5);
706 if ("data-" !== prefix$8 && "aria-" !== prefix$8) return;
707 }
708 target.push(
709 attributeSeparator,
710 name,
711 attributeAssign,
712 escapeTextForBrowser(value),
713 attributeEnd
714 );
715 }
716 }
717}
718var endOfStartTag = stringToPrecomputedChunk(">"),
719 endOfStartTagSelfClosing = stringToPrecomputedChunk("/>");
720function pushInnerHTML(target, innerHTML, children) {
721 if (null != innerHTML) {
722 if (null != children)
723 throw Error(
724 "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
725 );
726 if ("object" !== typeof innerHTML || !("__html" in innerHTML))
727 throw Error(
728 "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
729 );
730 innerHTML = innerHTML.__html;
731 null !== innerHTML && void 0 !== innerHTML && target.push("" + innerHTML);
732 }
733}
734function flattenOptionChildren(children) {
735 var content = "";
736 React.Children.forEach(children, function (child) {
737 null != child && (content += child);
738 });
739 return content;
740}
741var selectedMarkerAttribute = stringToPrecomputedChunk(' selected=""'),
742 formReplayingRuntimeScript = stringToPrecomputedChunk(
743 'addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error(\'React form unexpectedly submitted.\')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});'
744 );
745function injectFormReplayingRuntime(resumableState, renderState) {
746 0 === (resumableState.instructions & 16) &&
747 ((resumableState.instructions |= 16),
748 renderState.bootstrapChunks.unshift(
749 renderState.startInlineScript,
750 formReplayingRuntimeScript,
751 endInlineScript
752 ));
753}
754var formStateMarkerIsMatching = stringToPrecomputedChunk("\x3c!--F!--\x3e"),
755 formStateMarkerIsNotMatching = stringToPrecomputedChunk("\x3c!--F--\x3e");
756function pushLinkImpl(target, props) {
757 target.push(startChunkForTag("link"));
758 for (var propKey in props)
759 if (hasOwnProperty.call(props, propKey)) {
760 var propValue = props[propKey];
761 if (null != propValue)
762 switch (propKey) {
763 case "children":
764 case "dangerouslySetInnerHTML":
765 throw Error(
766 "link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
767 );
768 default:
769 pushAttribute(target, propKey, propValue);
770 }
771 }
772 target.push(endOfStartTagSelfClosing);
773 return null;
774}
775var styleRegex = /(<\/|<)(s)(tyle)/gi;
776function styleReplacer(match, prefix, s, suffix) {
777 return "" + prefix + ("s" === s ? "\\73 " : "\\53 ") + suffix;
778}
779function pushSelfClosing(target, props, tag) {
780 target.push(startChunkForTag(tag));
781 for (var propKey in props)
782 if (hasOwnProperty.call(props, propKey)) {
783 var propValue = props[propKey];
784 if (null != propValue)
785 switch (propKey) {
786 case "children":
787 case "dangerouslySetInnerHTML":
788 throw Error(
789 tag +
790 " is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
791 );
792 default:
793 pushAttribute(target, propKey, propValue);
794 }
795 }
796 target.push(endOfStartTagSelfClosing);
797 return null;
798}
799function pushTitleImpl(target, props) {
800 target.push(startChunkForTag("title"));
801 var children = null,
802 innerHTML = null,
803 propKey;
804 for (propKey in props)
805 if (hasOwnProperty.call(props, propKey)) {
806 var propValue = props[propKey];
807 if (null != propValue)
808 switch (propKey) {
809 case "children":
810 children = propValue;
811 break;
812 case "dangerouslySetInnerHTML":
813 innerHTML = propValue;
814 break;
815 default:
816 pushAttribute(target, propKey, propValue);
817 }
818 }
819 target.push(endOfStartTag);
820 props = Array.isArray(children)
821 ? 2 > children.length
822 ? children[0]
823 : null
824 : children;
825 "function" !== typeof props &&
826 "symbol" !== typeof props &&
827 null !== props &&
828 void 0 !== props &&
829 target.push(escapeTextForBrowser("" + props));
830 pushInnerHTML(target, innerHTML, children);
831 target.push(endChunkForTag("title"));
832 return null;
833}
834function pushScriptImpl(target, props) {
835 target.push(startChunkForTag("script"));
836 var children = null,
837 innerHTML = null,
838 propKey;
839 for (propKey in props)
840 if (hasOwnProperty.call(props, propKey)) {
841 var propValue = props[propKey];
842 if (null != propValue)
843 switch (propKey) {
844 case "children":
845 children = propValue;
846 break;
847 case "dangerouslySetInnerHTML":
848 innerHTML = propValue;
849 break;
850 default:
851 pushAttribute(target, propKey, propValue);
852 }
853 }
854 target.push(endOfStartTag);
855 pushInnerHTML(target, innerHTML, children);
856 "string" === typeof children &&
857 target.push(("" + children).replace(scriptRegex, scriptReplacer));
858 target.push(endChunkForTag("script"));
859 return null;
860}
861function pushStartGenericElement(target, props, tag) {
862 target.push(startChunkForTag(tag));
863 var innerHTML = (tag = null),
864 propKey;
865 for (propKey in props)
866 if (hasOwnProperty.call(props, propKey)) {
867 var propValue = props[propKey];
868 if (null != propValue)
869 switch (propKey) {
870 case "children":
871 tag = propValue;
872 break;
873 case "dangerouslySetInnerHTML":
874 innerHTML = propValue;
875 break;
876 default:
877 pushAttribute(target, propKey, propValue);
878 }
879 }
880 target.push(endOfStartTag);
881 pushInnerHTML(target, innerHTML, tag);
882 return "string" === typeof tag
883 ? (target.push(escapeTextForBrowser(tag)), null)
884 : tag;
885}
886var leadingNewline = stringToPrecomputedChunk("\n"),
887 VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,
888 validatedTagCache = new Map();
889function startChunkForTag(tag) {
890 var tagStartChunk = validatedTagCache.get(tag);
891 if (void 0 === tagStartChunk) {
892 if (!VALID_TAG_REGEX.test(tag)) throw Error("Invalid tag: " + tag);
893 tagStartChunk = stringToPrecomputedChunk("<" + tag);
894 validatedTagCache.set(tag, tagStartChunk);
895 }
896 return tagStartChunk;
897}
898var doctypeChunk = stringToPrecomputedChunk("<!DOCTYPE html>");
899function pushStartInstance(
900 target$jscomp$0,
901 type,
902 props,
903 resumableState,
904 renderState,
905 hoistableState,
906 formatContext,
907 textEmbedded,
908 isFallback
909) {
910 switch (type) {
911 case "div":
912 case "span":
913 case "svg":
914 case "path":
915 break;
916 case "a":
917 target$jscomp$0.push(startChunkForTag("a"));
918 var children = null,
919 innerHTML = null,
920 propKey;
921 for (propKey in props)
922 if (hasOwnProperty.call(props, propKey)) {
923 var propValue = props[propKey];
924 if (null != propValue)
925 switch (propKey) {
926 case "children":
927 children = propValue;
928 break;
929 case "dangerouslySetInnerHTML":
930 innerHTML = propValue;
931 break;
932 case "href":
933 "" === propValue
934 ? pushStringAttribute(target$jscomp$0, "href", "")
935 : pushAttribute(target$jscomp$0, propKey, propValue);
936 break;
937 default:
938 pushAttribute(target$jscomp$0, propKey, propValue);
939 }
940 }
941 target$jscomp$0.push(endOfStartTag);
942 pushInnerHTML(target$jscomp$0, innerHTML, children);
943 if ("string" === typeof children) {
944 target$jscomp$0.push(escapeTextForBrowser(children));
945 var JSCompiler_inline_result = null;
946 } else JSCompiler_inline_result = children;
947 return JSCompiler_inline_result;
948 case "g":
949 case "p":
950 case "li":
951 break;
952 case "select":
953 target$jscomp$0.push(startChunkForTag("select"));
954 var children$jscomp$0 = null,
955 innerHTML$jscomp$0 = null,
956 propKey$jscomp$0;
957 for (propKey$jscomp$0 in props)
958 if (hasOwnProperty.call(props, propKey$jscomp$0)) {
959 var propValue$jscomp$0 = props[propKey$jscomp$0];
960 if (null != propValue$jscomp$0)
961 switch (propKey$jscomp$0) {
962 case "children":
963 children$jscomp$0 = propValue$jscomp$0;
964 break;
965 case "dangerouslySetInnerHTML":
966 innerHTML$jscomp$0 = propValue$jscomp$0;
967 break;
968 case "defaultValue":
969 case "value":
970 break;
971 default:
972 pushAttribute(
973 target$jscomp$0,
974 propKey$jscomp$0,
975 propValue$jscomp$0
976 );
977 }
978 }
979 target$jscomp$0.push(endOfStartTag);
980 pushInnerHTML(target$jscomp$0, innerHTML$jscomp$0, children$jscomp$0);
981 return children$jscomp$0;
982 case "option":
983 var selectedValue = formatContext.selectedValue;
984 target$jscomp$0.push(startChunkForTag("option"));
985 var children$jscomp$1 = null,
986 value = null,
987 selected = null,
988 innerHTML$jscomp$1 = null,
989 propKey$jscomp$1;
990 for (propKey$jscomp$1 in props)
991 if (hasOwnProperty.call(props, propKey$jscomp$1)) {
992 var propValue$jscomp$1 = props[propKey$jscomp$1];
993 if (null != propValue$jscomp$1)
994 switch (propKey$jscomp$1) {
995 case "children":
996 children$jscomp$1 = propValue$jscomp$1;
997 break;
998 case "selected":
999 selected = propValue$jscomp$1;
1000 break;
1001 case "dangerouslySetInnerHTML":
1002 innerHTML$jscomp$1 = propValue$jscomp$1;
1003 break;
1004 case "value":
1005 value = propValue$jscomp$1;
1006 default:
1007 pushAttribute(
1008 target$jscomp$0,
1009 propKey$jscomp$1,
1010 propValue$jscomp$1
1011 );
1012 }
1013 }
1014 if (null != selectedValue) {
1015 var stringValue =
1016 null !== value
1017 ? "" + value
1018 : flattenOptionChildren(children$jscomp$1);
1019 if (isArrayImpl(selectedValue))
1020 for (var i = 0; i < selectedValue.length; i++) {
1021 if ("" + selectedValue[i] === stringValue) {
1022 target$jscomp$0.push(selectedMarkerAttribute);
1023 break;
1024 }
1025 }
1026 else
1027 "" + selectedValue === stringValue &&
1028 target$jscomp$0.push(selectedMarkerAttribute);
1029 } else selected && target$jscomp$0.push(selectedMarkerAttribute);
1030 target$jscomp$0.push(endOfStartTag);
1031 pushInnerHTML(target$jscomp$0, innerHTML$jscomp$1, children$jscomp$1);
1032 return children$jscomp$1;
1033 case "textarea":
1034 target$jscomp$0.push(startChunkForTag("textarea"));
1035 var value$jscomp$0 = null,
1036 defaultValue = null,
1037 children$jscomp$2 = null,
1038 propKey$jscomp$2;
1039 for (propKey$jscomp$2 in props)
1040 if (hasOwnProperty.call(props, propKey$jscomp$2)) {
1041 var propValue$jscomp$2 = props[propKey$jscomp$2];
1042 if (null != propValue$jscomp$2)
1043 switch (propKey$jscomp$2) {
1044 case "children":
1045 children$jscomp$2 = propValue$jscomp$2;
1046 break;
1047 case "value":
1048 value$jscomp$0 = propValue$jscomp$2;
1049 break;
1050 case "defaultValue":
1051 defaultValue = propValue$jscomp$2;
1052 break;
1053 case "dangerouslySetInnerHTML":
1054 throw Error(
1055 "`dangerouslySetInnerHTML` does not make sense on <textarea>."
1056 );
1057 default:
1058 pushAttribute(
1059 target$jscomp$0,
1060 propKey$jscomp$2,
1061 propValue$jscomp$2
1062 );
1063 }
1064 }
1065 null === value$jscomp$0 &&
1066 null !== defaultValue &&
1067 (value$jscomp$0 = defaultValue);
1068 target$jscomp$0.push(endOfStartTag);
1069 if (null != children$jscomp$2) {
1070 if (null != value$jscomp$0)
1071 throw Error(
1072 "If you supply `defaultValue` on a <textarea>, do not pass children."
1073 );
1074 if (isArrayImpl(children$jscomp$2)) {
1075 if (1 < children$jscomp$2.length)
1076 throw Error("<textarea> can only have at most one child.");
1077 value$jscomp$0 = "" + children$jscomp$2[0];
1078 }
1079 value$jscomp$0 = "" + children$jscomp$2;
1080 }
1081 "string" === typeof value$jscomp$0 &&
1082 "\n" === value$jscomp$0[0] &&
1083 target$jscomp$0.push(leadingNewline);
1084 null !== value$jscomp$0 &&
1085 target$jscomp$0.push(escapeTextForBrowser("" + value$jscomp$0));
1086 return null;
1087 case "input":
1088 target$jscomp$0.push(startChunkForTag("input"));
1089 var name = null,
1090 formAction = null,
1091 formEncType = null,
1092 formMethod = null,
1093 formTarget = null,
1094 value$jscomp$1 = null,
1095 defaultValue$jscomp$0 = null,
1096 checked = null,
1097 defaultChecked = null,
1098 propKey$jscomp$3;
1099 for (propKey$jscomp$3 in props)
1100 if (hasOwnProperty.call(props, propKey$jscomp$3)) {
1101 var propValue$jscomp$3 = props[propKey$jscomp$3];
1102 if (null != propValue$jscomp$3)
1103 switch (propKey$jscomp$3) {
1104 case "children":
1105 case "dangerouslySetInnerHTML":
1106 throw Error(
1107 "input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
1108 );
1109 case "name":
1110 name = propValue$jscomp$3;
1111 break;
1112 case "formAction":
1113 formAction = propValue$jscomp$3;
1114 break;
1115 case "formEncType":
1116 formEncType = propValue$jscomp$3;
1117 break;
1118 case "formMethod":
1119 formMethod = propValue$jscomp$3;
1120 break;
1121 case "formTarget":
1122 formTarget = propValue$jscomp$3;
1123 break;
1124 case "defaultChecked":
1125 defaultChecked = propValue$jscomp$3;
1126 break;
1127 case "defaultValue":
1128 defaultValue$jscomp$0 = propValue$jscomp$3;
1129 break;
1130 case "checked":
1131 checked = propValue$jscomp$3;
1132 break;
1133 case "value":
1134 value$jscomp$1 = propValue$jscomp$3;
1135 break;
1136 default:
1137 pushAttribute(
1138 target$jscomp$0,
1139 propKey$jscomp$3,
1140 propValue$jscomp$3
1141 );
1142 }
1143 }
1144 var formData = pushFormActionAttribute(
1145 target$jscomp$0,
1146 resumableState,
1147 renderState,
1148 formAction,
1149 formEncType,
1150 formMethod,
1151 formTarget,
1152 name
1153 );
1154 null !== checked
1155 ? pushBooleanAttribute(target$jscomp$0, "checked", checked)
1156 : null !== defaultChecked &&
1157 pushBooleanAttribute(target$jscomp$0, "checked", defaultChecked);
1158 null !== value$jscomp$1
1159 ? pushAttribute(target$jscomp$0, "value", value$jscomp$1)
1160 : null !== defaultValue$jscomp$0 &&
1161 pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0);
1162 target$jscomp$0.push(endOfStartTagSelfClosing);
1163 null != formData &&
1164 formData.forEach(pushAdditionalFormField, target$jscomp$0);
1165 return null;
1166 case "button":
1167 target$jscomp$0.push(startChunkForTag("button"));
1168 var children$jscomp$3 = null,
1169 innerHTML$jscomp$2 = null,
1170 name$jscomp$0 = null,
1171 formAction$jscomp$0 = null,
1172 formEncType$jscomp$0 = null,
1173 formMethod$jscomp$0 = null,
1174 formTarget$jscomp$0 = null,
1175 propKey$jscomp$4;
1176 for (propKey$jscomp$4 in props)
1177 if (hasOwnProperty.call(props, propKey$jscomp$4)) {
1178 var propValue$jscomp$4 = props[propKey$jscomp$4];
1179 if (null != propValue$jscomp$4)
1180 switch (propKey$jscomp$4) {
1181 case "children":
1182 children$jscomp$3 = propValue$jscomp$4;
1183 break;
1184 case "dangerouslySetInnerHTML":
1185 innerHTML$jscomp$2 = propValue$jscomp$4;
1186 break;
1187 case "name":
1188 name$jscomp$0 = propValue$jscomp$4;
1189 break;
1190 case "formAction":
1191 formAction$jscomp$0 = propValue$jscomp$4;
1192 break;
1193 case "formEncType":
1194 formEncType$jscomp$0 = propValue$jscomp$4;
1195 break;
1196 case "formMethod":
1197 formMethod$jscomp$0 = propValue$jscomp$4;
1198 break;
1199 case "formTarget":
1200 formTarget$jscomp$0 = propValue$jscomp$4;
1201 break;
1202 default:
1203 pushAttribute(
1204 target$jscomp$0,
1205 propKey$jscomp$4,
1206 propValue$jscomp$4
1207 );
1208 }
1209 }
1210 var formData$jscomp$0 = pushFormActionAttribute(
1211 target$jscomp$0,
1212 resumableState,
1213 renderState,
1214 formAction$jscomp$0,
1215 formEncType$jscomp$0,
1216 formMethod$jscomp$0,
1217 formTarget$jscomp$0,
1218 name$jscomp$0
1219 );
1220 target$jscomp$0.push(endOfStartTag);
1221 null != formData$jscomp$0 &&
1222 formData$jscomp$0.forEach(pushAdditionalFormField, target$jscomp$0);
1223 pushInnerHTML(target$jscomp$0, innerHTML$jscomp$2, children$jscomp$3);
1224 if ("string" === typeof children$jscomp$3) {
1225 target$jscomp$0.push(escapeTextForBrowser(children$jscomp$3));
1226 var JSCompiler_inline_result$jscomp$0 = null;
1227 } else JSCompiler_inline_result$jscomp$0 = children$jscomp$3;
1228 return JSCompiler_inline_result$jscomp$0;
1229 case "form":
1230 target$jscomp$0.push(startChunkForTag("form"));
1231 var children$jscomp$4 = null,
1232 innerHTML$jscomp$3 = null,
1233 formAction$jscomp$1 = null,
1234 formEncType$jscomp$1 = null,
1235 formMethod$jscomp$1 = null,
1236 formTarget$jscomp$1 = null,
1237 propKey$jscomp$5;
1238 for (propKey$jscomp$5 in props)
1239 if (hasOwnProperty.call(props, propKey$jscomp$5)) {
1240 var propValue$jscomp$5 = props[propKey$jscomp$5];
1241 if (null != propValue$jscomp$5)
1242 switch (propKey$jscomp$5) {
1243 case "children":
1244 children$jscomp$4 = propValue$jscomp$5;
1245 break;
1246 case "dangerouslySetInnerHTML":
1247 innerHTML$jscomp$3 = propValue$jscomp$5;
1248 break;
1249 case "action":
1250 formAction$jscomp$1 = propValue$jscomp$5;
1251 break;
1252 case "encType":
1253 formEncType$jscomp$1 = propValue$jscomp$5;
1254 break;
1255 case "method":
1256 formMethod$jscomp$1 = propValue$jscomp$5;
1257 break;
1258 case "target":
1259 formTarget$jscomp$1 = propValue$jscomp$5;
1260 break;
1261 default:
1262 pushAttribute(
1263 target$jscomp$0,
1264 propKey$jscomp$5,
1265 propValue$jscomp$5
1266 );
1267 }
1268 }
1269 var formData$jscomp$1 = null,
1270 formActionName = null;
1271 if ("function" === typeof formAction$jscomp$1) {
1272 var customFields = getCustomFormFields(
1273 resumableState,
1274 formAction$jscomp$1
1275 );
1276 null !== customFields
1277 ? ((formAction$jscomp$1 = customFields.action || ""),
1278 (formEncType$jscomp$1 = customFields.encType),
1279 (formMethod$jscomp$1 = customFields.method),
1280 (formTarget$jscomp$1 = customFields.target),
1281 (formData$jscomp$1 = customFields.data),
1282 (formActionName = customFields.name))
1283 : (target$jscomp$0.push(
1284 attributeSeparator,
1285 "action",
1286 attributeAssign,
1287 actionJavaScriptURL,
1288 attributeEnd
1289 ),
1290 (formTarget$jscomp$1 =
1291 formMethod$jscomp$1 =
1292 formEncType$jscomp$1 =
1293 formAction$jscomp$1 =
1294 null),
1295 injectFormReplayingRuntime(resumableState, renderState));
1296 }
1297 null != formAction$jscomp$1 &&
1298 pushAttribute(target$jscomp$0, "action", formAction$jscomp$1);
1299 null != formEncType$jscomp$1 &&
1300 pushAttribute(target$jscomp$0, "encType", formEncType$jscomp$1);
1301 null != formMethod$jscomp$1 &&
1302 pushAttribute(target$jscomp$0, "method", formMethod$jscomp$1);
1303 null != formTarget$jscomp$1 &&
1304 pushAttribute(target$jscomp$0, "target", formTarget$jscomp$1);
1305 target$jscomp$0.push(endOfStartTag);
1306 null !== formActionName &&
1307 (target$jscomp$0.push(startHiddenInputChunk),
1308 pushStringAttribute(target$jscomp$0, "name", formActionName),
1309 target$jscomp$0.push(endOfStartTagSelfClosing),
1310 null != formData$jscomp$1 &&
1311 formData$jscomp$1.forEach(pushAdditionalFormField, target$jscomp$0));
1312 pushInnerHTML(target$jscomp$0, innerHTML$jscomp$3, children$jscomp$4);
1313 if ("string" === typeof children$jscomp$4) {
1314 target$jscomp$0.push(escapeTextForBrowser(children$jscomp$4));
1315 var JSCompiler_inline_result$jscomp$1 = null;
1316 } else JSCompiler_inline_result$jscomp$1 = children$jscomp$4;
1317 return JSCompiler_inline_result$jscomp$1;
1318 case "menuitem":
1319 target$jscomp$0.push(startChunkForTag("menuitem"));
1320 for (var propKey$jscomp$6 in props)
1321 if (hasOwnProperty.call(props, propKey$jscomp$6)) {
1322 var propValue$jscomp$6 = props[propKey$jscomp$6];
1323 if (null != propValue$jscomp$6)
1324 switch (propKey$jscomp$6) {
1325 case "children":
1326 case "dangerouslySetInnerHTML":
1327 throw Error(
1328 "menuitems cannot have `children` nor `dangerouslySetInnerHTML`."
1329 );
1330 default:
1331 pushAttribute(
1332 target$jscomp$0,
1333 propKey$jscomp$6,
1334 propValue$jscomp$6
1335 );
1336 }
1337 }
1338 target$jscomp$0.push(endOfStartTag);
1339 return null;
1340 case "title":
1341 if (
1342 3 === formatContext.insertionMode ||
1343 formatContext.tagScope & 1 ||
1344 null != props.itemProp
1345 )
1346 var JSCompiler_inline_result$jscomp$2 = pushTitleImpl(
1347 target$jscomp$0,
1348 props
1349 );
1350 else
1351 isFallback
1352 ? (JSCompiler_inline_result$jscomp$2 = null)
1353 : (pushTitleImpl(renderState.hoistableChunks, props),
1354 (JSCompiler_inline_result$jscomp$2 = void 0));
1355 return JSCompiler_inline_result$jscomp$2;
1356 case "link":
1357 var rel = props.rel,
1358 href = props.href,
1359 precedence = props.precedence;
1360 if (
1361 3 === formatContext.insertionMode ||
1362 formatContext.tagScope & 1 ||
1363 null != props.itemProp ||
1364 "string" !== typeof rel ||
1365 "string" !== typeof href ||
1366 "" === href
1367 ) {
1368 pushLinkImpl(target$jscomp$0, props);
1369 var JSCompiler_inline_result$jscomp$3 = null;
1370 } else if ("stylesheet" === props.rel)
1371 if (
1372 "string" !== typeof precedence ||
1373 null != props.disabled ||
1374 props.onLoad ||
1375 props.onError
1376 )
1377 JSCompiler_inline_result$jscomp$3 = pushLinkImpl(
1378 target$jscomp$0,
1379 props
1380 );
1381 else {
1382 var styleQueue = renderState.styles.get(precedence),
1383 resourceState = resumableState.styleResources.hasOwnProperty(href)
1384 ? resumableState.styleResources[href]
1385 : void 0;
1386 if (null !== resourceState) {
1387 resumableState.styleResources[href] = null;
1388 styleQueue ||
1389 ((styleQueue = {
1390 precedence: escapeTextForBrowser(precedence),
1391 rules: [],
1392 hrefs: [],
1393 sheets: new Map()
1394 }),
1395 renderState.styles.set(precedence, styleQueue));
1396 var resource = {
1397 state: 0,
1398 props: assign({}, props, {
1399 "data-precedence": props.precedence,
1400 precedence: null
1401 })
1402 };
1403 if (resourceState) {
1404 2 === resourceState.length &&
1405 adoptPreloadCredentials(resource.props, resourceState);
1406 var preloadResource = renderState.preloads.stylesheets.get(href);
1407 preloadResource && 0 < preloadResource.length
1408 ? (preloadResource.length = 0)
1409 : (resource.state = 1);
1410 }
1411 styleQueue.sheets.set(href, resource);
1412 hoistableState && hoistableState.stylesheets.add(resource);
1413 } else if (styleQueue) {
1414 var resource$9 = styleQueue.sheets.get(href);
1415 resource$9 &&
1416 hoistableState &&
1417 hoistableState.stylesheets.add(resource$9);
1418 }
1419 textEmbedded && target$jscomp$0.push(textSeparator);
1420 JSCompiler_inline_result$jscomp$3 = null;
1421 }
1422 else
1423 props.onLoad || props.onError
1424 ? (JSCompiler_inline_result$jscomp$3 = pushLinkImpl(
1425 target$jscomp$0,
1426 props
1427 ))
1428 : (textEmbedded && target$jscomp$0.push(textSeparator),
1429 (JSCompiler_inline_result$jscomp$3 = isFallback
1430 ? null
1431 : pushLinkImpl(renderState.hoistableChunks, props)));
1432 return JSCompiler_inline_result$jscomp$3;
1433 case "script":
1434 var asyncProp = props.async;
1435 if (
1436 "string" !== typeof props.src ||
1437 !props.src ||
1438 !asyncProp ||
1439 "function" === typeof asyncProp ||
1440 "symbol" === typeof asyncProp ||
1441 props.onLoad ||
1442 props.onError ||
1443 3 === formatContext.insertionMode ||
1444 formatContext.tagScope & 1 ||
1445 null != props.itemProp
1446 )
1447 var JSCompiler_inline_result$jscomp$4 = pushScriptImpl(
1448 target$jscomp$0,
1449 props
1450 );
1451 else {
1452 var key = props.src;
1453 if ("module" === props.type) {
1454 var resources = resumableState.moduleScriptResources;
1455 var preloads = renderState.preloads.moduleScripts;
1456 } else
1457 (resources = resumableState.scriptResources),
1458 (preloads = renderState.preloads.scripts);
1459 var resourceState$jscomp$0 = resources.hasOwnProperty(key)
1460 ? resources[key]
1461 : void 0;
1462 if (null !== resourceState$jscomp$0) {
1463 resources[key] = null;
1464 var scriptProps = props;
1465 if (resourceState$jscomp$0) {
1466 2 === resourceState$jscomp$0.length &&
1467 ((scriptProps = assign({}, props)),
1468 adoptPreloadCredentials(scriptProps, resourceState$jscomp$0));
1469 var preloadResource$jscomp$0 = preloads.get(key);
1470 preloadResource$jscomp$0 && (preloadResource$jscomp$0.length = 0);
1471 }
1472 var resource$jscomp$0 = [];
1473 renderState.scripts.add(resource$jscomp$0);
1474 pushScriptImpl(resource$jscomp$0, scriptProps);
1475 }
1476 textEmbedded && target$jscomp$0.push(textSeparator);
1477 JSCompiler_inline_result$jscomp$4 = null;
1478 }
1479 return JSCompiler_inline_result$jscomp$4;
1480 case "style":
1481 var precedence$jscomp$0 = props.precedence,
1482 href$jscomp$0 = props.href;
1483 if (
1484 3 === formatContext.insertionMode ||
1485 formatContext.tagScope & 1 ||
1486 null != props.itemProp ||
1487 "string" !== typeof precedence$jscomp$0 ||
1488 "string" !== typeof href$jscomp$0 ||
1489 "" === href$jscomp$0
1490 ) {
1491 target$jscomp$0.push(startChunkForTag("style"));
1492 var children$jscomp$5 = null,
1493 innerHTML$jscomp$4 = null,
1494 propKey$jscomp$7;
1495 for (propKey$jscomp$7 in props)
1496 if (hasOwnProperty.call(props, propKey$jscomp$7)) {
1497 var propValue$jscomp$7 = props[propKey$jscomp$7];
1498 if (null != propValue$jscomp$7)
1499 switch (propKey$jscomp$7) {
1500 case "children":
1501 children$jscomp$5 = propValue$jscomp$7;
1502 break;
1503 case "dangerouslySetInnerHTML":
1504 innerHTML$jscomp$4 = propValue$jscomp$7;
1505 break;
1506 default:
1507 pushAttribute(
1508 target$jscomp$0,
1509 propKey$jscomp$7,
1510 propValue$jscomp$7
1511 );
1512 }
1513 }
1514 target$jscomp$0.push(endOfStartTag);
1515 var child = Array.isArray(children$jscomp$5)
1516 ? 2 > children$jscomp$5.length
1517 ? children$jscomp$5[0]
1518 : null
1519 : children$jscomp$5;
1520 "function" !== typeof child &&
1521 "symbol" !== typeof child &&
1522 null !== child &&
1523 void 0 !== child &&
1524 target$jscomp$0.push(("" + child).replace(styleRegex, styleReplacer));
1525 pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
1526 target$jscomp$0.push(endChunkForTag("style"));
1527 var JSCompiler_inline_result$jscomp$5 = null;
1528 } else {
1529 var styleQueue$jscomp$0 = renderState.styles.get(precedence$jscomp$0);
1530 if (
1531 null !==
1532 (resumableState.styleResources.hasOwnProperty(href$jscomp$0)
1533 ? resumableState.styleResources[href$jscomp$0]
1534 : void 0)
1535 ) {
1536 resumableState.styleResources[href$jscomp$0] = null;
1537 styleQueue$jscomp$0
1538 ? styleQueue$jscomp$0.hrefs.push(
1539 escapeTextForBrowser(href$jscomp$0)
1540 )
1541 : ((styleQueue$jscomp$0 = {
1542 precedence: escapeTextForBrowser(precedence$jscomp$0),
1543 rules: [],
1544 hrefs: [escapeTextForBrowser(href$jscomp$0)],
1545 sheets: new Map()
1546 }),
1547 renderState.styles.set(precedence$jscomp$0, styleQueue$jscomp$0));
1548 var target = styleQueue$jscomp$0.rules,
1549 children$jscomp$6 = null,
1550 innerHTML$jscomp$5 = null,
1551 propKey$jscomp$8;
1552 for (propKey$jscomp$8 in props)
1553 if (hasOwnProperty.call(props, propKey$jscomp$8)) {
1554 var propValue$jscomp$8 = props[propKey$jscomp$8];
1555 if (null != propValue$jscomp$8)
1556 switch (propKey$jscomp$8) {
1557 case "children":
1558 children$jscomp$6 = propValue$jscomp$8;
1559 break;
1560 case "dangerouslySetInnerHTML":
1561 innerHTML$jscomp$5 = propValue$jscomp$8;
1562 }
1563 }
1564 var child$jscomp$0 = Array.isArray(children$jscomp$6)
1565 ? 2 > children$jscomp$6.length
1566 ? children$jscomp$6[0]
1567 : null
1568 : children$jscomp$6;
1569 "function" !== typeof child$jscomp$0 &&
1570 "symbol" !== typeof child$jscomp$0 &&
1571 null !== child$jscomp$0 &&
1572 void 0 !== child$jscomp$0 &&
1573 target.push(
1574 ("" + child$jscomp$0).replace(styleRegex, styleReplacer)
1575 );
1576 pushInnerHTML(target, innerHTML$jscomp$5, children$jscomp$6);
1577 }
1578 styleQueue$jscomp$0 &&
1579 hoistableState &&
1580 hoistableState.styles.add(styleQueue$jscomp$0);
1581 textEmbedded && target$jscomp$0.push(textSeparator);
1582 JSCompiler_inline_result$jscomp$5 = void 0;
1583 }
1584 return JSCompiler_inline_result$jscomp$5;
1585 case "meta":
1586 if (
1587 3 === formatContext.insertionMode ||
1588 formatContext.tagScope & 1 ||
1589 null != props.itemProp
1590 )
1591 var JSCompiler_inline_result$jscomp$6 = pushSelfClosing(
1592 target$jscomp$0,
1593 props,
1594 "meta"
1595 );
1596 else
1597 textEmbedded && target$jscomp$0.push(textSeparator),
1598 (JSCompiler_inline_result$jscomp$6 = isFallback
1599 ? null
1600 : "string" === typeof props.charSet
1601 ? pushSelfClosing(renderState.charsetChunks, props, "meta")
1602 : "viewport" === props.name
1603 ? pushSelfClosing(renderState.viewportChunks, props, "meta")
1604 : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
1605 return JSCompiler_inline_result$jscomp$6;
1606 case "listing":
1607 case "pre":
1608 target$jscomp$0.push(startChunkForTag(type));
1609 var children$jscomp$7 = null,
1610 innerHTML$jscomp$6 = null,
1611 propKey$jscomp$9;
1612 for (propKey$jscomp$9 in props)
1613 if (hasOwnProperty.call(props, propKey$jscomp$9)) {
1614 var propValue$jscomp$9 = props[propKey$jscomp$9];
1615 if (null != propValue$jscomp$9)
1616 switch (propKey$jscomp$9) {
1617 case "children":
1618 children$jscomp$7 = propValue$jscomp$9;
1619 break;
1620 case "dangerouslySetInnerHTML":
1621 innerHTML$jscomp$6 = propValue$jscomp$9;
1622 break;
1623 default:
1624 pushAttribute(
1625 target$jscomp$0,
1626 propKey$jscomp$9,
1627 propValue$jscomp$9
1628 );
1629 }
1630 }
1631 target$jscomp$0.push(endOfStartTag);
1632 if (null != innerHTML$jscomp$6) {
1633 if (null != children$jscomp$7)
1634 throw Error(
1635 "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
1636 );
1637 if (
1638 "object" !== typeof innerHTML$jscomp$6 ||
1639 !("__html" in innerHTML$jscomp$6)
1640 )
1641 throw Error(
1642 "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
1643 );
1644 var html = innerHTML$jscomp$6.__html;
1645 null !== html &&
1646 void 0 !== html &&
1647 ("string" === typeof html && 0 < html.length && "\n" === html[0]
1648 ? target$jscomp$0.push(leadingNewline, html)
1649 : target$jscomp$0.push("" + html));
1650 }
1651 "string" === typeof children$jscomp$7 &&
1652 "\n" === children$jscomp$7[0] &&
1653 target$jscomp$0.push(leadingNewline);
1654 return children$jscomp$7;
1655 case "img":
1656 var src = props.src,
1657 srcSet = props.srcSet;
1658 if (
1659 !(
1660 "lazy" === props.loading ||
1661 (!src && !srcSet) ||
1662 ("string" !== typeof src && null != src) ||
1663 ("string" !== typeof srcSet && null != srcSet)
1664 ) &&
1665 "low" !== props.fetchPriority &&
1666 !1 === !!(formatContext.tagScope & 3) &&
1667 ("string" !== typeof src ||
1668 ":" !== src[4] ||
1669 ("d" !== src[0] && "D" !== src[0]) ||
1670 ("a" !== src[1] && "A" !== src[1]) ||
1671 ("t" !== src[2] && "T" !== src[2]) ||
1672 ("a" !== src[3] && "A" !== src[3])) &&
1673 ("string" !== typeof srcSet ||
1674 ":" !== srcSet[4] ||
1675 ("d" !== srcSet[0] && "D" !== srcSet[0]) ||
1676 ("a" !== srcSet[1] && "A" !== srcSet[1]) ||
1677 ("t" !== srcSet[2] && "T" !== srcSet[2]) ||
1678 ("a" !== srcSet[3] && "A" !== srcSet[3]))
1679 ) {
1680 var sizes = "string" === typeof props.sizes ? props.sizes : void 0,
1681 key$jscomp$0 = srcSet ? srcSet + "\n" + (sizes || "") : src,
1682 promotablePreloads = renderState.preloads.images,
1683 resource$jscomp$1 = promotablePreloads.get(key$jscomp$0);
1684 if (resource$jscomp$1) {
1685 if (
1686 "high" === props.fetchPriority ||
1687 10 > renderState.highImagePreloads.size
1688 )
1689 promotablePreloads.delete(key$jscomp$0),
1690 renderState.highImagePreloads.add(resource$jscomp$1);
1691 } else if (
1692 !resumableState.imageResources.hasOwnProperty(key$jscomp$0)
1693 ) {
1694 resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;
1695 var input = props.crossOrigin;
1696 var JSCompiler_inline_result$jscomp$7 =
1697 "string" === typeof input
1698 ? "use-credentials" === input
1699 ? input
1700 : ""
1701 : void 0;
1702 var headers = renderState.headers,
1703 header;
1704 headers &&
1705 0 < headers.remainingCapacity &&
1706 ("high" === props.fetchPriority ||
1707 500 > headers.highImagePreloads.length) &&
1708 ((header = getPreloadAsHeader(src, "image", {
1709 imageSrcSet: props.srcSet,
1710 imageSizes: props.sizes,
1711 crossOrigin: JSCompiler_inline_result$jscomp$7,
1712 integrity: props.integrity,
1713 nonce: props.nonce,
1714 type: props.type,
1715 fetchPriority: props.fetchPriority,
1716 referrerPolicy: props.refererPolicy
1717 })),
1718 2 <= (headers.remainingCapacity -= header.length))
1719 ? ((renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS),
1720 headers.highImagePreloads && (headers.highImagePreloads += ", "),
1721 (headers.highImagePreloads += header))
1722 : ((resource$jscomp$1 = []),
1723 pushLinkImpl(resource$jscomp$1, {
1724 rel: "preload",
1725 as: "image",
1726 href: srcSet ? void 0 : src,
1727 imageSrcSet: srcSet,
1728 imageSizes: sizes,
1729 crossOrigin: JSCompiler_inline_result$jscomp$7,
1730 integrity: props.integrity,
1731 type: props.type,
1732 fetchPriority: props.fetchPriority,
1733 referrerPolicy: props.referrerPolicy
1734 }),
1735 "high" === props.fetchPriority ||
1736 10 > renderState.highImagePreloads.size
1737 ? renderState.highImagePreloads.add(resource$jscomp$1)
1738 : (renderState.bulkPreloads.add(resource$jscomp$1),
1739 promotablePreloads.set(key$jscomp$0, resource$jscomp$1)));
1740 }
1741 }
1742 return pushSelfClosing(target$jscomp$0, props, "img");
1743 case "base":
1744 case "area":
1745 case "br":
1746 case "col":
1747 case "embed":
1748 case "hr":
1749 case "keygen":
1750 case "param":
1751 case "source":
1752 case "track":
1753 case "wbr":
1754 return pushSelfClosing(target$jscomp$0, props, type);
1755 case "annotation-xml":
1756 case "color-profile":
1757 case "font-face":
1758 case "font-face-src":
1759 case "font-face-uri":
1760 case "font-face-format":
1761 case "font-face-name":
1762 case "missing-glyph":
1763 break;
1764 case "head":
1765 if (2 > formatContext.insertionMode && null === renderState.headChunks) {
1766 renderState.headChunks = [];
1767 var JSCompiler_inline_result$jscomp$8 = pushStartGenericElement(
1768 renderState.headChunks,
1769 props,
1770 "head"
1771 );
1772 } else
1773 JSCompiler_inline_result$jscomp$8 = pushStartGenericElement(
1774 target$jscomp$0,
1775 props,
1776 "head"
1777 );
1778 return JSCompiler_inline_result$jscomp$8;
1779 case "html":
1780 if (
1781 0 === formatContext.insertionMode &&
1782 null === renderState.htmlChunks
1783 ) {
1784 renderState.htmlChunks = [doctypeChunk];
1785 var JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
1786 renderState.htmlChunks,
1787 props,
1788 "html"
1789 );
1790 } else
1791 JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
1792 target$jscomp$0,
1793 props,
1794 "html"
1795 );
1796 return JSCompiler_inline_result$jscomp$9;
1797 default:
1798 if (-1 !== type.indexOf("-")) {
1799 target$jscomp$0.push(startChunkForTag(type));
1800 var children$jscomp$8 = null,
1801 innerHTML$jscomp$7 = null,
1802 propKey$jscomp$10;
1803 for (propKey$jscomp$10 in props)
1804 if (hasOwnProperty.call(props, propKey$jscomp$10)) {
1805 var propValue$jscomp$10 = props[propKey$jscomp$10];
1806 if (null != propValue$jscomp$10) {
1807 var attributeName = propKey$jscomp$10;
1808 switch (propKey$jscomp$10) {
1809 case "children":
1810 children$jscomp$8 = propValue$jscomp$10;
1811 break;
1812 case "dangerouslySetInnerHTML":
1813 innerHTML$jscomp$7 = propValue$jscomp$10;
1814 break;
1815 case "style":
1816 pushStyleAttribute(target$jscomp$0, propValue$jscomp$10);
1817 break;
1818 case "suppressContentEditableWarning":
1819 case "suppressHydrationWarning":
1820 case "ref":
1821 break;
1822 case "className":
1823 attributeName = "class";
1824 default:
1825 if (
1826 isAttributeNameSafe(propKey$jscomp$10) &&
1827 "function" !== typeof propValue$jscomp$10 &&
1828 "symbol" !== typeof propValue$jscomp$10 &&
1829 !1 !== propValue$jscomp$10
1830 ) {
1831 if (!0 === propValue$jscomp$10) propValue$jscomp$10 = "";
1832 else if ("object" === typeof propValue$jscomp$10) continue;
1833 target$jscomp$0.push(
1834 attributeSeparator,
1835 attributeName,
1836 attributeAssign,
1837 escapeTextForBrowser(propValue$jscomp$10),
1838 attributeEnd
1839 );
1840 }
1841 }
1842 }
1843 }
1844 target$jscomp$0.push(endOfStartTag);
1845 pushInnerHTML(target$jscomp$0, innerHTML$jscomp$7, children$jscomp$8);
1846 return children$jscomp$8;
1847 }
1848 }
1849 return pushStartGenericElement(target$jscomp$0, props, type);
1850}
1851var endTagCache = new Map();
1852function endChunkForTag(tag) {
1853 var chunk = endTagCache.get(tag);
1854 void 0 === chunk &&
1855 ((chunk = stringToPrecomputedChunk("</" + tag + ">")),
1856 endTagCache.set(tag, chunk));
1857 return chunk;
1858}
1859function writeBootstrap(destination, renderState) {
1860 renderState = renderState.bootstrapChunks;
1861 for (var i = 0; i < renderState.length - 1; i++)
1862 writeChunk(destination, renderState[i]);
1863 return i < renderState.length
1864 ? ((i = renderState[i]),
1865 (renderState.length = 0),
1866 writeChunkAndReturn(destination, i))
1867 : !0;
1868}
1869var placeholder1 = stringToPrecomputedChunk('<template id="'),
1870 placeholder2 = stringToPrecomputedChunk('"></template>'),
1871 startCompletedSuspenseBoundary = stringToPrecomputedChunk("\x3c!--$--\x3e"),
1872 startPendingSuspenseBoundary1 = stringToPrecomputedChunk(
1873 '\x3c!--$?--\x3e<template id="'
1874 ),
1875 startPendingSuspenseBoundary2 = stringToPrecomputedChunk('"></template>'),
1876 startClientRenderedSuspenseBoundary =
1877 stringToPrecomputedChunk("\x3c!--$!--\x3e"),
1878 endSuspenseBoundary = stringToPrecomputedChunk("\x3c!--/$--\x3e"),
1879 clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk("<template"),
1880 clientRenderedSuspenseBoundaryErrorAttrInterstitial =
1881 stringToPrecomputedChunk('"'),
1882 clientRenderedSuspenseBoundaryError1A =
1883 stringToPrecomputedChunk(' data-dgst="');
1884stringToPrecomputedChunk(' data-msg="');
1885stringToPrecomputedChunk(' data-stck="');
1886stringToPrecomputedChunk(' data-cstck="');
1887var clientRenderedSuspenseBoundaryError2 =
1888 stringToPrecomputedChunk("></template>");
1889function writeStartPendingSuspenseBoundary(destination, renderState, id) {
1890 writeChunk(destination, startPendingSuspenseBoundary1);
1891 if (null === id)
1892 throw Error(
1893 "An ID must have been assigned before we can complete the boundary."
1894 );
1895 writeChunk(destination, renderState.boundaryPrefix);
1896 writeChunk(destination, id.toString(16));
1897 return writeChunkAndReturn(destination, startPendingSuspenseBoundary2);
1898}
1899var startSegmentHTML = stringToPrecomputedChunk('<div hidden id="'),
1900 startSegmentHTML2 = stringToPrecomputedChunk('">'),
1901 endSegmentHTML = stringToPrecomputedChunk("</div>"),
1902 startSegmentSVG = stringToPrecomputedChunk(
1903 '<svg aria-hidden="true" style="display:none" id="'
1904 ),
1905 startSegmentSVG2 = stringToPrecomputedChunk('">'),
1906 endSegmentSVG = stringToPrecomputedChunk("</svg>"),
1907 startSegmentMathML = stringToPrecomputedChunk(
1908 '<math aria-hidden="true" style="display:none" id="'
1909 ),
1910 startSegmentMathML2 = stringToPrecomputedChunk('">'),
1911 endSegmentMathML = stringToPrecomputedChunk("</math>"),
1912 startSegmentTable = stringToPrecomputedChunk('<table hidden id="'),
1913 startSegmentTable2 = stringToPrecomputedChunk('">'),
1914 endSegmentTable = stringToPrecomputedChunk("</table>"),
1915 startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id="'),
1916 startSegmentTableBody2 = stringToPrecomputedChunk('">'),
1917 endSegmentTableBody = stringToPrecomputedChunk("</tbody></table>"),
1918 startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id="'),
1919 startSegmentTableRow2 = stringToPrecomputedChunk('">'),
1920 endSegmentTableRow = stringToPrecomputedChunk("</tr></table>"),
1921 startSegmentColGroup = stringToPrecomputedChunk(
1922 '<table hidden><colgroup id="'
1923 ),
1924 startSegmentColGroup2 = stringToPrecomputedChunk('">'),
1925 endSegmentColGroup = stringToPrecomputedChunk("</colgroup></table>");
1926function writeStartSegment(destination, renderState, formatContext, id) {
1927 switch (formatContext.insertionMode) {
1928 case 0:
1929 case 1:
1930 case 2:
1931 return (
1932 writeChunk(destination, startSegmentHTML),
1933 writeChunk(destination, renderState.segmentPrefix),
1934 writeChunk(destination, id.toString(16)),
1935 writeChunkAndReturn(destination, startSegmentHTML2)
1936 );
1937 case 3:
1938 return (
1939 writeChunk(destination, startSegmentSVG),
1940 writeChunk(destination, renderState.segmentPrefix),
1941 writeChunk(destination, id.toString(16)),
1942 writeChunkAndReturn(destination, startSegmentSVG2)
1943 );
1944 case 4:
1945 return (
1946 writeChunk(destination, startSegmentMathML),
1947 writeChunk(destination, renderState.segmentPrefix),
1948 writeChunk(destination, id.toString(16)),
1949 writeChunkAndReturn(destination, startSegmentMathML2)
1950 );
1951 case 5:
1952 return (
1953 writeChunk(destination, startSegmentTable),
1954 writeChunk(destination, renderState.segmentPrefix),
1955 writeChunk(destination, id.toString(16)),
1956 writeChunkAndReturn(destination, startSegmentTable2)
1957 );
1958 case 6:
1959 return (
1960 writeChunk(destination, startSegmentTableBody),
1961 writeChunk(destination, renderState.segmentPrefix),
1962 writeChunk(destination, id.toString(16)),
1963 writeChunkAndReturn(destination, startSegmentTableBody2)
1964 );
1965 case 7:
1966 return (
1967 writeChunk(destination, startSegmentTableRow),
1968 writeChunk(destination, renderState.segmentPrefix),
1969 writeChunk(destination, id.toString(16)),
1970 writeChunkAndReturn(destination, startSegmentTableRow2)
1971 );
1972 case 8:
1973 return (
1974 writeChunk(destination, startSegmentColGroup),
1975 writeChunk(destination, renderState.segmentPrefix),
1976 writeChunk(destination, id.toString(16)),
1977 writeChunkAndReturn(destination, startSegmentColGroup2)
1978 );
1979 default:
1980 throw Error("Unknown insertion mode. This is a bug in React.");
1981 }
1982}
1983function writeEndSegment(destination, formatContext) {
1984 switch (formatContext.insertionMode) {
1985 case 0:
1986 case 1:
1987 case 2:
1988 return writeChunkAndReturn(destination, endSegmentHTML);
1989 case 3:
1990 return writeChunkAndReturn(destination, endSegmentSVG);
1991 case 4:
1992 return writeChunkAndReturn(destination, endSegmentMathML);
1993 case 5:
1994 return writeChunkAndReturn(destination, endSegmentTable);
1995 case 6:
1996 return writeChunkAndReturn(destination, endSegmentTableBody);
1997 case 7:
1998 return writeChunkAndReturn(destination, endSegmentTableRow);
1999 case 8:
2000 return writeChunkAndReturn(destination, endSegmentColGroup);
2001 default:
2002 throw Error("Unknown insertion mode. This is a bug in React.");
2003 }
2004}
2005var completeSegmentScript1Full = stringToPrecomputedChunk(
2006 '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'
2007 ),
2008 completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("'),
2009 completeSegmentScript2 = stringToPrecomputedChunk('","'),
2010 completeSegmentScriptEnd = stringToPrecomputedChunk('")\x3c/script>');
2011stringToPrecomputedChunk('<template data-rsi="" data-sid="');
2012stringToPrecomputedChunk('" data-pid="');
2013var completeBoundaryScript1Full = stringToPrecomputedChunk(
2014 '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("'
2015 ),
2016 completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'),
2017 completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(
2018 '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(r,t,w){for(var u=$RC,n=$RM,p=new Map,q=document,g,b,h=q.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&n.set(b.getAttribute("href"),b),p.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var f=w[b++];if(!f){k=!1;b=0;continue}var c=!1,m=0;var d=f[m++];if(a=n.get(d)){var e=a._p;c=!0}else{a=q.createElement("link");a.href=d;a.rel="stylesheet";for(a.dataset.precedence=\nl=f[m++];e=f[m++];)a.setAttribute(e,f[m++]);e=a._p=new Promise(function(x,y){a.onload=x;a.onerror=y});n.set(d,a)}d=a.getAttribute("media");!e||"l"===e.s||d&&!matchMedia(d).matches||h.push(e);if(c)continue}else{a=v[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=p.get(l)||g;c===g&&(g=a);p.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=q.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(u.bind(null,r,t,""),u.bind(null,r,t,"Resource failed to load"))};$RR("'
2019 ),
2020 completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(
2021 '$RM=new Map;\n$RR=function(r,t,w){for(var u=$RC,n=$RM,p=new Map,q=document,g,b,h=q.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&n.set(b.getAttribute("href"),b),p.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var f=w[b++];if(!f){k=!1;b=0;continue}var c=!1,m=0;var d=f[m++];if(a=n.get(d)){var e=a._p;c=!0}else{a=q.createElement("link");a.href=d;a.rel="stylesheet";for(a.dataset.precedence=\nl=f[m++];e=f[m++];)a.setAttribute(e,f[m++]);e=a._p=new Promise(function(x,y){a.onload=x;a.onerror=y});n.set(d,a)}d=a.getAttribute("media");!e||"l"===e.s||d&&!matchMedia(d).matches||h.push(e);if(c)continue}else{a=v[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=p.get(l)||g;c===g&&(g=a);p.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=q.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(u.bind(null,r,t,""),u.bind(null,r,t,"Resource failed to load"))};$RR("'
2022 ),
2023 completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'),
2024 completeBoundaryScript2 = stringToPrecomputedChunk('","'),
2025 completeBoundaryScript3a = stringToPrecomputedChunk('",'),
2026 completeBoundaryScript3b = stringToPrecomputedChunk('"'),
2027 completeBoundaryScriptEnd = stringToPrecomputedChunk(")\x3c/script>");
2028stringToPrecomputedChunk('<template data-rci="" data-bid="');
2029stringToPrecomputedChunk('<template data-rri="" data-bid="');
2030stringToPrecomputedChunk('" data-sid="');
2031stringToPrecomputedChunk('" data-sty="');
2032var clientRenderScript1Full = stringToPrecomputedChunk(
2033 '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("'
2034 ),
2035 clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'),
2036 clientRenderScript1A = stringToPrecomputedChunk('"'),
2037 clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(","),
2038 clientRenderScriptEnd = stringToPrecomputedChunk(")\x3c/script>");
2039stringToPrecomputedChunk('<template data-rxi="" data-bid="');
2040stringToPrecomputedChunk('" data-dgst="');
2041stringToPrecomputedChunk('" data-msg="');
2042stringToPrecomputedChunk('" data-stck="');
2043stringToPrecomputedChunk('" data-cstck="');
2044var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g;
2045function escapeJSStringsForInstructionScripts(input) {
2046 return JSON.stringify(input).replace(
2047 regexForJSStringsInInstructionScripts,
2048 function (match) {
2049 switch (match) {
2050 case "<":
2051 return "\\u003c";
2052 case "\u2028":
2053 return "\\u2028";
2054 case "\u2029":
2055 return "\\u2029";
2056 default:
2057 throw Error(
2058 "escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
2059 );
2060 }
2061 }
2062 );
2063}
2064var regexForJSStringsInScripts = /[&><\u2028\u2029]/g;
2065function escapeJSObjectForInstructionScripts(input) {
2066 return JSON.stringify(input).replace(
2067 regexForJSStringsInScripts,
2068 function (match) {
2069 switch (match) {
2070 case "&":
2071 return "\\u0026";
2072 case ">":
2073 return "\\u003e";
2074 case "<":
2075 return "\\u003c";
2076 case "\u2028":
2077 return "\\u2028";
2078 case "\u2029":
2079 return "\\u2029";
2080 default:
2081 throw Error(
2082 "escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
2083 );
2084 }
2085 }
2086 );
2087}
2088var lateStyleTagResourceOpen1 = stringToPrecomputedChunk(
2089 '<style media="not all" data-precedence="'
2090 ),
2091 lateStyleTagResourceOpen2 = stringToPrecomputedChunk('" data-href="'),
2092 lateStyleTagResourceOpen3 = stringToPrecomputedChunk('">'),
2093 lateStyleTagTemplateClose = stringToPrecomputedChunk("</style>"),
2094 currentlyRenderingBoundaryHasStylesToHoist = !1,
2095 destinationHasCapacity = !0;
2096function flushStyleTagsLateForBoundary(styleQueue) {
2097 var rules = styleQueue.rules,
2098 hrefs = styleQueue.hrefs,
2099 i = 0;
2100 if (hrefs.length) {
2101 writeChunk(this, lateStyleTagResourceOpen1);
2102 writeChunk(this, styleQueue.precedence);
2103 for (writeChunk(this, lateStyleTagResourceOpen2); i < hrefs.length - 1; i++)
2104 writeChunk(this, hrefs[i]), writeChunk(this, spaceSeparator);
2105 writeChunk(this, hrefs[i]);
2106 writeChunk(this, lateStyleTagResourceOpen3);
2107 for (i = 0; i < rules.length; i++) writeChunk(this, rules[i]);
2108 destinationHasCapacity = writeChunkAndReturn(
2109 this,
2110 lateStyleTagTemplateClose
2111 );
2112 currentlyRenderingBoundaryHasStylesToHoist = !0;
2113 rules.length = 0;
2114 hrefs.length = 0;
2115 }
2116}
2117function hasStylesToHoist(stylesheet) {
2118 return 2 !== stylesheet.state
2119 ? (currentlyRenderingBoundaryHasStylesToHoist = !0)
2120 : !1;
2121}
2122function writeHoistablesForBoundary(destination, hoistableState, renderState) {
2123 currentlyRenderingBoundaryHasStylesToHoist = !1;
2124 destinationHasCapacity = !0;
2125 hoistableState.styles.forEach(flushStyleTagsLateForBoundary, destination);
2126 hoistableState.stylesheets.forEach(hasStylesToHoist);
2127 currentlyRenderingBoundaryHasStylesToHoist &&
2128 (renderState.stylesToHoist = !0);
2129 return destinationHasCapacity;
2130}
2131function flushResource(resource) {
2132 for (var i = 0; i < resource.length; i++) writeChunk(this, resource[i]);
2133 resource.length = 0;
2134}
2135var stylesheetFlushingQueue = [];
2136function flushStyleInPreamble(stylesheet) {
2137 pushLinkImpl(stylesheetFlushingQueue, stylesheet.props);
2138 for (var i = 0; i < stylesheetFlushingQueue.length; i++)
2139 writeChunk(this, stylesheetFlushingQueue[i]);
2140 stylesheetFlushingQueue.length = 0;
2141 stylesheet.state = 2;
2142}
2143var styleTagResourceOpen1 = stringToPrecomputedChunk(
2144 '<style data-precedence="'
2145 ),
2146 styleTagResourceOpen2 = stringToPrecomputedChunk('" data-href="'),
2147 spaceSeparator = stringToPrecomputedChunk(" "),
2148 styleTagResourceOpen3 = stringToPrecomputedChunk('">'),
2149 styleTagResourceClose = stringToPrecomputedChunk("</style>");
2150function flushStylesInPreamble(styleQueue) {
2151 var hasStylesheets = 0 < styleQueue.sheets.size;
2152 styleQueue.sheets.forEach(flushStyleInPreamble, this);
2153 styleQueue.sheets.clear();
2154 var rules = styleQueue.rules,
2155 hrefs = styleQueue.hrefs;
2156 if (!hasStylesheets || hrefs.length) {
2157 writeChunk(this, styleTagResourceOpen1);
2158 writeChunk(this, styleQueue.precedence);
2159 styleQueue = 0;
2160 if (hrefs.length) {
2161 for (
2162 writeChunk(this, styleTagResourceOpen2);
2163 styleQueue < hrefs.length - 1;
2164 styleQueue++
2165 )
2166 writeChunk(this, hrefs[styleQueue]), writeChunk(this, spaceSeparator);
2167 writeChunk(this, hrefs[styleQueue]);
2168 }
2169 writeChunk(this, styleTagResourceOpen3);
2170 for (styleQueue = 0; styleQueue < rules.length; styleQueue++)
2171 writeChunk(this, rules[styleQueue]);
2172 writeChunk(this, styleTagResourceClose);
2173 rules.length = 0;
2174 hrefs.length = 0;
2175 }
2176}
2177function preloadLateStyle(stylesheet) {
2178 if (0 === stylesheet.state) {
2179 stylesheet.state = 1;
2180 var props = stylesheet.props;
2181 pushLinkImpl(stylesheetFlushingQueue, {
2182 rel: "preload",
2183 as: "style",
2184 href: stylesheet.props.href,
2185 crossOrigin: props.crossOrigin,
2186 fetchPriority: props.fetchPriority,
2187 integrity: props.integrity,
2188 media: props.media,
2189 hrefLang: props.hrefLang,
2190 referrerPolicy: props.referrerPolicy
2191 });
2192 for (
2193 stylesheet = 0;
2194 stylesheet < stylesheetFlushingQueue.length;
2195 stylesheet++
2196 )
2197 writeChunk(this, stylesheetFlushingQueue[stylesheet]);
2198 stylesheetFlushingQueue.length = 0;
2199 }
2200}
2201function preloadLateStyles(styleQueue) {
2202 styleQueue.sheets.forEach(preloadLateStyle, this);
2203 styleQueue.sheets.clear();
2204}
2205var arrayFirstOpenBracket = stringToPrecomputedChunk("["),
2206 arraySubsequentOpenBracket = stringToPrecomputedChunk(",["),
2207 arrayInterstitial = stringToPrecomputedChunk(","),
2208 arrayCloseBracket = stringToPrecomputedChunk("]");
2209function writeStyleResourceDependenciesInJS(destination, hoistableState) {
2210 writeChunk(destination, arrayFirstOpenBracket);
2211 var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
2212 hoistableState.stylesheets.forEach(function (resource) {
2213 if (2 !== resource.state)
2214 if (3 === resource.state)
2215 writeChunk(destination, nextArrayOpenBrackChunk),
2216 writeChunk(
2217 destination,
2218 escapeJSObjectForInstructionScripts("" + resource.props.href)
2219 ),
2220 writeChunk(destination, arrayCloseBracket),
2221 (nextArrayOpenBrackChunk = arraySubsequentOpenBracket);
2222 else {
2223 writeChunk(destination, nextArrayOpenBrackChunk);
2224 var precedence = resource.props["data-precedence"],
2225 props = resource.props,
2226 coercedHref = sanitizeURL("" + resource.props.href);
2227 writeChunk(
2228 destination,
2229 escapeJSObjectForInstructionScripts(coercedHref)
2230 );
2231 precedence = "" + precedence;
2232 writeChunk(destination, arrayInterstitial);
2233 writeChunk(
2234 destination,
2235 escapeJSObjectForInstructionScripts(precedence)
2236 );
2237 for (var propKey in props)
2238 if (
2239 hasOwnProperty.call(props, propKey) &&
2240 ((precedence = props[propKey]), null != precedence)
2241 )
2242 switch (propKey) {
2243 case "href":
2244 case "rel":
2245 case "precedence":
2246 case "data-precedence":
2247 break;
2248 case "children":
2249 case "dangerouslySetInnerHTML":
2250 throw Error(
2251 "link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
2252 );
2253 default:
2254 writeStyleResourceAttributeInJS(
2255 destination,
2256 propKey,
2257 precedence
2258 );
2259 }
2260 writeChunk(destination, arrayCloseBracket);
2261 nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
2262 resource.state = 3;
2263 }
2264 });
2265 writeChunk(destination, arrayCloseBracket);
2266}
2267function writeStyleResourceAttributeInJS(destination, name, value) {
2268 var attributeName = name.toLowerCase();
2269 switch (typeof value) {
2270 case "function":
2271 case "symbol":
2272 return;
2273 }
2274 switch (name) {
2275 case "innerHTML":
2276 case "dangerouslySetInnerHTML":
2277 case "suppressContentEditableWarning":
2278 case "suppressHydrationWarning":
2279 case "style":
2280 case "ref":
2281 return;
2282 case "className":
2283 attributeName = "class";
2284 name = "" + value;
2285 break;
2286 case "hidden":
2287 if (!1 === value) return;
2288 name = "";
2289 break;
2290 case "src":
2291 case "href":
2292 value = sanitizeURL(value);
2293 name = "" + value;
2294 break;
2295 default:
2296 if (
2297 (2 < name.length &&
2298 ("o" === name[0] || "O" === name[0]) &&
2299 ("n" === name[1] || "N" === name[1])) ||
2300 !isAttributeNameSafe(name)
2301 )
2302 return;
2303 name = "" + value;
2304 }
2305 writeChunk(destination, arrayInterstitial);
2306 writeChunk(destination, escapeJSObjectForInstructionScripts(attributeName));
2307 writeChunk(destination, arrayInterstitial);
2308 writeChunk(destination, escapeJSObjectForInstructionScripts(name));
2309}
2310function createHoistableState() {
2311 return { styles: new Set(), stylesheets: new Set() };
2312}
2313function prefetchDNS(href) {
2314 var request = resolveRequest();
2315 if (request) {
2316 var resumableState = request.resumableState,
2317 renderState = request.renderState;
2318 if ("string" === typeof href && href) {
2319 if (!resumableState.dnsResources.hasOwnProperty(href)) {
2320 resumableState.dnsResources[href] = null;
2321 resumableState = renderState.headers;
2322 var header, JSCompiler_temp;
2323 if (
2324 (JSCompiler_temp =
2325 resumableState && 0 < resumableState.remainingCapacity)
2326 )
2327 JSCompiler_temp =
2328 ((header =
2329 "<" +
2330 ("" + href).replace(
2331 regexForHrefInLinkHeaderURLContext,
2332 escapeHrefForLinkHeaderURLContextReplacer
2333 ) +
2334 ">; rel=dns-prefetch"),
2335 2 <= (resumableState.remainingCapacity -= header.length));
2336 JSCompiler_temp
2337 ? ((renderState.resets.dns[href] = null),
2338 resumableState.preconnects && (resumableState.preconnects += ", "),
2339 (resumableState.preconnects += header))
2340 : ((header = []),
2341 pushLinkImpl(header, { href: href, rel: "dns-prefetch" }),
2342 renderState.preconnects.add(header));
2343 }
2344 enqueueFlush(request);
2345 }
2346 } else previousDispatcher.D(href);
2347}
2348function preconnect(href, crossOrigin) {
2349 var request = resolveRequest();
2350 if (request) {
2351 var resumableState = request.resumableState,
2352 renderState = request.renderState;
2353 if ("string" === typeof href && href) {
2354 var bucket =
2355 "use-credentials" === crossOrigin
2356 ? "credentials"
2357 : "string" === typeof crossOrigin
2358 ? "anonymous"
2359 : "default";
2360 if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {
2361 resumableState.connectResources[bucket][href] = null;
2362 resumableState = renderState.headers;
2363 var header, JSCompiler_temp;
2364 if (
2365 (JSCompiler_temp =
2366 resumableState && 0 < resumableState.remainingCapacity)
2367 ) {
2368 JSCompiler_temp =
2369 "<" +
2370 ("" + href).replace(
2371 regexForHrefInLinkHeaderURLContext,
2372 escapeHrefForLinkHeaderURLContextReplacer
2373 ) +
2374 ">; rel=preconnect";
2375 if ("string" === typeof crossOrigin) {
2376 var escapedCrossOrigin = ("" + crossOrigin).replace(
2377 regexForLinkHeaderQuotedParamValueContext,
2378 escapeStringForLinkHeaderQuotedParamValueContextReplacer
2379 );
2380 JSCompiler_temp += '; crossorigin="' + escapedCrossOrigin + '"';
2381 }
2382 JSCompiler_temp =
2383 ((header = JSCompiler_temp),
2384 2 <= (resumableState.remainingCapacity -= header.length));
2385 }
2386 JSCompiler_temp
2387 ? ((renderState.resets.connect[bucket][href] = null),
2388 resumableState.preconnects && (resumableState.preconnects += ", "),
2389 (resumableState.preconnects += header))
2390 : ((bucket = []),
2391 pushLinkImpl(bucket, {
2392 rel: "preconnect",
2393 href: href,
2394 crossOrigin: crossOrigin
2395 }),
2396 renderState.preconnects.add(bucket));
2397 }
2398 enqueueFlush(request);
2399 }
2400 } else previousDispatcher.C(href, crossOrigin);
2401}
2402function preload(href, as, options) {
2403 var request = resolveRequest();
2404 if (request) {
2405 var resumableState = request.resumableState,
2406 renderState = request.renderState;
2407 if (as && href) {
2408 switch (as) {
2409 case "image":
2410 if (options) {
2411 var imageSrcSet = options.imageSrcSet;
2412 var imageSizes = options.imageSizes;
2413 var fetchPriority = options.fetchPriority;
2414 }
2415 var key = imageSrcSet
2416 ? imageSrcSet + "\n" + (imageSizes || "")
2417 : href;
2418 if (resumableState.imageResources.hasOwnProperty(key)) return;
2419 resumableState.imageResources[key] = PRELOAD_NO_CREDS;
2420 resumableState = renderState.headers;
2421 var header;
2422 resumableState &&
2423 0 < resumableState.remainingCapacity &&
2424 "high" === fetchPriority &&
2425 ((header = getPreloadAsHeader(href, as, options)),
2426 2 <= (resumableState.remainingCapacity -= header.length))
2427 ? ((renderState.resets.image[key] = PRELOAD_NO_CREDS),
2428 resumableState.highImagePreloads &&
2429 (resumableState.highImagePreloads += ", "),
2430 (resumableState.highImagePreloads += header))
2431 : ((resumableState = []),
2432 pushLinkImpl(
2433 resumableState,
2434 assign(
2435 { rel: "preload", href: imageSrcSet ? void 0 : href, as: as },
2436 options
2437 )
2438 ),
2439 "high" === fetchPriority
2440 ? renderState.highImagePreloads.add(resumableState)
2441 : (renderState.bulkPreloads.add(resumableState),
2442 renderState.preloads.images.set(key, resumableState)));
2443 break;
2444 case "style":
2445 if (resumableState.styleResources.hasOwnProperty(href)) return;
2446 imageSrcSet = [];
2447 pushLinkImpl(
2448 imageSrcSet,
2449 assign({ rel: "preload", href: href, as: as }, options)
2450 );
2451 resumableState.styleResources[href] =
2452 !options ||
2453 ("string" !== typeof options.crossOrigin &&
2454 "string" !== typeof options.integrity)
2455 ? PRELOAD_NO_CREDS
2456 : [options.crossOrigin, options.integrity];
2457 renderState.preloads.stylesheets.set(href, imageSrcSet);
2458 renderState.bulkPreloads.add(imageSrcSet);
2459 break;
2460 case "script":
2461 if (resumableState.scriptResources.hasOwnProperty(href)) return;
2462 imageSrcSet = [];
2463 renderState.preloads.scripts.set(href, imageSrcSet);
2464 renderState.bulkPreloads.add(imageSrcSet);
2465 pushLinkImpl(
2466 imageSrcSet,
2467 assign({ rel: "preload", href: href, as: as }, options)
2468 );
2469 resumableState.scriptResources[href] =
2470 !options ||
2471 ("string" !== typeof options.crossOrigin &&
2472 "string" !== typeof options.integrity)
2473 ? PRELOAD_NO_CREDS
2474 : [options.crossOrigin, options.integrity];
2475 break;
2476 default:
2477 if (resumableState.unknownResources.hasOwnProperty(as)) {
2478 if (
2479 ((imageSrcSet = resumableState.unknownResources[as]),
2480 imageSrcSet.hasOwnProperty(href))
2481 )
2482 return;
2483 } else
2484 (imageSrcSet = {}),
2485 (resumableState.unknownResources[as] = imageSrcSet);
2486 imageSrcSet[href] = PRELOAD_NO_CREDS;
2487 if (
2488 (resumableState = renderState.headers) &&
2489 0 < resumableState.remainingCapacity &&
2490 "font" === as &&
2491 ((key = getPreloadAsHeader(href, as, options)),
2492 2 <= (resumableState.remainingCapacity -= key.length))
2493 )
2494 (renderState.resets.font[href] = PRELOAD_NO_CREDS),
2495 resumableState.fontPreloads &&
2496 (resumableState.fontPreloads += ", "),
2497 (resumableState.fontPreloads += key);
2498 else
2499 switch (
2500 ((resumableState = []),
2501 (href = assign({ rel: "preload", href: href, as: as }, options)),
2502 pushLinkImpl(resumableState, href),
2503 as)
2504 ) {
2505 case "font":
2506 renderState.fontPreloads.add(resumableState);
2507 break;
2508 default:
2509 renderState.bulkPreloads.add(resumableState);
2510 }
2511 }
2512 enqueueFlush(request);
2513 }
2514 } else previousDispatcher.L(href, as, options);
2515}
2516function preloadModule(href, options) {
2517 var request = resolveRequest();
2518 if (request) {
2519 var resumableState = request.resumableState,
2520 renderState = request.renderState;
2521 if (href) {
2522 var as =
2523 options && "string" === typeof options.as ? options.as : "script";
2524 switch (as) {
2525 case "script":
2526 if (resumableState.moduleScriptResources.hasOwnProperty(href)) return;
2527 as = [];
2528 resumableState.moduleScriptResources[href] =
2529 !options ||
2530 ("string" !== typeof options.crossOrigin &&
2531 "string" !== typeof options.integrity)
2532 ? PRELOAD_NO_CREDS
2533 : [options.crossOrigin, options.integrity];
2534 renderState.preloads.moduleScripts.set(href, as);
2535 break;
2536 default:
2537 if (resumableState.moduleUnknownResources.hasOwnProperty(as)) {
2538 var resources = resumableState.unknownResources[as];
2539 if (resources.hasOwnProperty(href)) return;
2540 } else
2541 (resources = {}),
2542 (resumableState.moduleUnknownResources[as] = resources);
2543 as = [];
2544 resources[href] = PRELOAD_NO_CREDS;
2545 }
2546 pushLinkImpl(as, assign({ rel: "modulepreload", href: href }, options));
2547 renderState.bulkPreloads.add(as);
2548 enqueueFlush(request);
2549 }
2550 } else previousDispatcher.m(href, options);
2551}
2552function preinitStyle(href, precedence, options) {
2553 var request = resolveRequest();
2554 if (request) {
2555 var resumableState = request.resumableState,
2556 renderState = request.renderState;
2557 if (href) {
2558 precedence = precedence || "default";
2559 var styleQueue = renderState.styles.get(precedence),
2560 resourceState = resumableState.styleResources.hasOwnProperty(href)
2561 ? resumableState.styleResources[href]
2562 : void 0;
2563 null !== resourceState &&
2564 ((resumableState.styleResources[href] = null),
2565 styleQueue ||
2566 ((styleQueue = {
2567 precedence: escapeTextForBrowser(precedence),
2568 rules: [],
2569 hrefs: [],
2570 sheets: new Map()
2571 }),
2572 renderState.styles.set(precedence, styleQueue)),
2573 (precedence = {
2574 state: 0,
2575 props: assign(
2576 { rel: "stylesheet", href: href, "data-precedence": precedence },
2577 options
2578 )
2579 }),
2580 resourceState &&
2581 (2 === resourceState.length &&
2582 adoptPreloadCredentials(precedence.props, resourceState),
2583 (renderState = renderState.preloads.stylesheets.get(href)) &&
2584 0 < renderState.length
2585 ? (renderState.length = 0)
2586 : (precedence.state = 1)),
2587 styleQueue.sheets.set(href, precedence),
2588 enqueueFlush(request));
2589 }
2590 } else previousDispatcher.S(href, precedence, options);
2591}
2592function preinitScript(src, options) {
2593 var request = resolveRequest();
2594 if (request) {
2595 var resumableState = request.resumableState,
2596 renderState = request.renderState;
2597 if (src) {
2598 var resourceState = resumableState.scriptResources.hasOwnProperty(src)
2599 ? resumableState.scriptResources[src]
2600 : void 0;
2601 null !== resourceState &&
2602 ((resumableState.scriptResources[src] = null),
2603 (options = assign({ src: src, async: !0 }, options)),
2604 resourceState &&
2605 (2 === resourceState.length &&
2606 adoptPreloadCredentials(options, resourceState),
2607 (src = renderState.preloads.scripts.get(src))) &&
2608 (src.length = 0),
2609 (src = []),
2610 renderState.scripts.add(src),
2611 pushScriptImpl(src, options),
2612 enqueueFlush(request));
2613 }
2614 } else previousDispatcher.X(src, options);
2615}
2616function preinitModuleScript(src, options) {
2617 var request = resolveRequest();
2618 if (request) {
2619 var resumableState = request.resumableState,
2620 renderState = request.renderState;
2621 if (src) {
2622 var resourceState = resumableState.moduleScriptResources.hasOwnProperty(
2623 src
2624 )
2625 ? resumableState.moduleScriptResources[src]
2626 : void 0;
2627 null !== resourceState &&
2628 ((resumableState.moduleScriptResources[src] = null),
2629 (options = assign({ src: src, type: "module", async: !0 }, options)),
2630 resourceState &&
2631 (2 === resourceState.length &&
2632 adoptPreloadCredentials(options, resourceState),
2633 (src = renderState.preloads.moduleScripts.get(src))) &&
2634 (src.length = 0),
2635 (src = []),
2636 renderState.scripts.add(src),
2637 pushScriptImpl(src, options),
2638 enqueueFlush(request));
2639 }
2640 } else previousDispatcher.M(src, options);
2641}
2642function adoptPreloadCredentials(target, preloadState) {
2643 null == target.crossOrigin && (target.crossOrigin = preloadState[0]);
2644 null == target.integrity && (target.integrity = preloadState[1]);
2645}
2646function getPreloadAsHeader(href, as, params) {
2647 href = ("" + href).replace(
2648 regexForHrefInLinkHeaderURLContext,
2649 escapeHrefForLinkHeaderURLContextReplacer
2650 );
2651 as = ("" + as).replace(
2652 regexForLinkHeaderQuotedParamValueContext,
2653 escapeStringForLinkHeaderQuotedParamValueContextReplacer
2654 );
2655 as = "<" + href + '>; rel=preload; as="' + as + '"';
2656 for (var paramName in params)
2657 hasOwnProperty.call(params, paramName) &&
2658 ((href = params[paramName]),
2659 "string" === typeof href &&
2660 (as +=
2661 "; " +
2662 paramName.toLowerCase() +
2663 '="' +
2664 ("" + href).replace(
2665 regexForLinkHeaderQuotedParamValueContext,
2666 escapeStringForLinkHeaderQuotedParamValueContextReplacer
2667 ) +
2668 '"'));
2669 return as;
2670}
2671var regexForHrefInLinkHeaderURLContext = /[<>\r\n]/g;
2672function escapeHrefForLinkHeaderURLContextReplacer(match) {
2673 switch (match) {
2674 case "<":
2675 return "%3C";
2676 case ">":
2677 return "%3E";
2678 case "\n":
2679 return "%0A";
2680 case "\r":
2681 return "%0D";
2682 default:
2683 throw Error(
2684 "escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
2685 );
2686 }
2687}
2688var regexForLinkHeaderQuotedParamValueContext = /["';,\r\n]/g;
2689function escapeStringForLinkHeaderQuotedParamValueContextReplacer(match) {
2690 switch (match) {
2691 case '"':
2692 return "%22";
2693 case "'":
2694 return "%27";
2695 case ";":
2696 return "%3B";
2697 case ",":
2698 return "%2C";
2699 case "\n":
2700 return "%0A";
2701 case "\r":
2702 return "%0D";
2703 default:
2704 throw Error(
2705 "escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
2706 );
2707 }
2708}
2709function hoistStyleQueueDependency(styleQueue) {
2710 this.styles.add(styleQueue);
2711}
2712function hoistStylesheetDependency(stylesheet) {
2713 this.stylesheets.add(stylesheet);
2714}
2715var requestStorage = new async_hooks.AsyncLocalStorage(),
2716 REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
2717function getComponentNameFromType(type) {
2718 if (null == type) return null;
2719 if ("function" === typeof type)
2720 return type.$$typeof === REACT_CLIENT_REFERENCE
2721 ? null
2722 : type.displayName || type.name || null;
2723 if ("string" === typeof type) return type;
2724 switch (type) {
2725 case REACT_FRAGMENT_TYPE:
2726 return "Fragment";
2727 case REACT_PORTAL_TYPE:
2728 return "Portal";
2729 case REACT_PROFILER_TYPE:
2730 return "Profiler";
2731 case REACT_STRICT_MODE_TYPE:
2732 return "StrictMode";
2733 case REACT_SUSPENSE_TYPE:
2734 return "Suspense";
2735 case REACT_SUSPENSE_LIST_TYPE:
2736 return "SuspenseList";
2737 }
2738 if ("object" === typeof type)
2739 switch (type.$$typeof) {
2740 case REACT_CONTEXT_TYPE:
2741 return (type.displayName || "Context") + ".Provider";
2742 case REACT_CONSUMER_TYPE:
2743 return (type._context.displayName || "Context") + ".Consumer";
2744 case REACT_FORWARD_REF_TYPE:
2745 var innerType = type.render;
2746 type = type.displayName;
2747 type ||
2748 ((type = innerType.displayName || innerType.name || ""),
2749 (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
2750 return type;
2751 case REACT_MEMO_TYPE:
2752 return (
2753 (innerType = type.displayName || null),
2754 null !== innerType
2755 ? innerType
2756 : getComponentNameFromType(type.type) || "Memo"
2757 );
2758 case REACT_LAZY_TYPE:
2759 innerType = type._payload;
2760 type = type._init;
2761 try {
2762 return getComponentNameFromType(type(innerType));
2763 } catch (x) {}
2764 }
2765 return null;
2766}
2767var emptyContextObject = {},
2768 currentActiveSnapshot = null;
2769function popToNearestCommonAncestor(prev, next) {
2770 if (prev !== next) {
2771 prev.context._currentValue = prev.parentValue;
2772 prev = prev.parent;
2773 var parentNext = next.parent;
2774 if (null === prev) {
2775 if (null !== parentNext)
2776 throw Error(
2777 "The stacks must reach the root at the same time. This is a bug in React."
2778 );
2779 } else {
2780 if (null === parentNext)
2781 throw Error(
2782 "The stacks must reach the root at the same time. This is a bug in React."
2783 );
2784 popToNearestCommonAncestor(prev, parentNext);
2785 }
2786 next.context._currentValue = next.value;
2787 }
2788}
2789function popAllPrevious(prev) {
2790 prev.context._currentValue = prev.parentValue;
2791 prev = prev.parent;
2792 null !== prev && popAllPrevious(prev);
2793}
2794function pushAllNext(next) {
2795 var parentNext = next.parent;
2796 null !== parentNext && pushAllNext(parentNext);
2797 next.context._currentValue = next.value;
2798}
2799function popPreviousToCommonLevel(prev, next) {
2800 prev.context._currentValue = prev.parentValue;
2801 prev = prev.parent;
2802 if (null === prev)
2803 throw Error(
2804 "The depth must equal at least at zero before reaching the root. This is a bug in React."
2805 );
2806 prev.depth === next.depth
2807 ? popToNearestCommonAncestor(prev, next)
2808 : popPreviousToCommonLevel(prev, next);
2809}
2810function popNextToCommonLevel(prev, next) {
2811 var parentNext = next.parent;
2812 if (null === parentNext)
2813 throw Error(
2814 "The depth must equal at least at zero before reaching the root. This is a bug in React."
2815 );
2816 prev.depth === parentNext.depth
2817 ? popToNearestCommonAncestor(prev, parentNext)
2818 : popNextToCommonLevel(prev, parentNext);
2819 next.context._currentValue = next.value;
2820}
2821function switchContext(newSnapshot) {
2822 var prev = currentActiveSnapshot;
2823 prev !== newSnapshot &&
2824 (null === prev
2825 ? pushAllNext(newSnapshot)
2826 : null === newSnapshot
2827 ? popAllPrevious(prev)
2828 : prev.depth === newSnapshot.depth
2829 ? popToNearestCommonAncestor(prev, newSnapshot)
2830 : prev.depth > newSnapshot.depth
2831 ? popPreviousToCommonLevel(prev, newSnapshot)
2832 : popNextToCommonLevel(prev, newSnapshot),
2833 (currentActiveSnapshot = newSnapshot));
2834}
2835var classComponentUpdater = {
2836 isMounted: function () {
2837 return !1;
2838 },
2839 enqueueSetState: function (inst, payload) {
2840 inst = inst._reactInternals;
2841 null !== inst.queue && inst.queue.push(payload);
2842 },
2843 enqueueReplaceState: function (inst, payload) {
2844 inst = inst._reactInternals;
2845 inst.replace = !0;
2846 inst.queue = [payload];
2847 },
2848 enqueueForceUpdate: function () {}
2849 },
2850 emptyTreeContext = { id: 1, overflow: "" };
2851function pushTreeContext(baseContext, totalChildren, index) {
2852 var baseIdWithLeadingBit = baseContext.id;
2853 baseContext = baseContext.overflow;
2854 var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
2855 baseIdWithLeadingBit &= ~(1 << baseLength);
2856 index += 1;
2857 var length = 32 - clz32(totalChildren) + baseLength;
2858 if (30 < length) {
2859 var numberOfOverflowBits = baseLength - (baseLength % 5);
2860 length = (
2861 baseIdWithLeadingBit &
2862 ((1 << numberOfOverflowBits) - 1)
2863 ).toString(32);
2864 baseIdWithLeadingBit >>= numberOfOverflowBits;
2865 baseLength -= numberOfOverflowBits;
2866 return {
2867 id:
2868 (1 << (32 - clz32(totalChildren) + baseLength)) |
2869 (index << baseLength) |
2870 baseIdWithLeadingBit,
2871 overflow: length + baseContext
2872 };
2873 }
2874 return {
2875 id: (1 << length) | (index << baseLength) | baseIdWithLeadingBit,
2876 overflow: baseContext
2877 };
2878}
2879var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,
2880 log = Math.log,
2881 LN2 = Math.LN2;
2882function clz32Fallback(x) {
2883 x >>>= 0;
2884 return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
2885}
2886var SuspenseException = Error(
2887 "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`"
2888);
2889function noop$2() {}
2890function trackUsedThenable(thenableState, thenable, index) {
2891 index = thenableState[index];
2892 void 0 === index
2893 ? thenableState.push(thenable)
2894 : index !== thenable && (thenable.then(noop$2, noop$2), (thenable = index));
2895 switch (thenable.status) {
2896 case "fulfilled":
2897 return thenable.value;
2898 case "rejected":
2899 throw thenable.reason;
2900 default:
2901 "string" === typeof thenable.status
2902 ? thenable.then(noop$2, noop$2)
2903 : ((thenableState = thenable),
2904 (thenableState.status = "pending"),
2905 thenableState.then(
2906 function (fulfilledValue) {
2907 if ("pending" === thenable.status) {
2908 var fulfilledThenable = thenable;
2909 fulfilledThenable.status = "fulfilled";
2910 fulfilledThenable.value = fulfilledValue;
2911 }
2912 },
2913 function (error) {
2914 if ("pending" === thenable.status) {
2915 var rejectedThenable = thenable;
2916 rejectedThenable.status = "rejected";
2917 rejectedThenable.reason = error;
2918 }
2919 }
2920 ));
2921 switch (thenable.status) {
2922 case "fulfilled":
2923 return thenable.value;
2924 case "rejected":
2925 throw thenable.reason;
2926 }
2927 suspendedThenable = thenable;
2928 throw SuspenseException;
2929 }
2930}
2931var suspendedThenable = null;
2932function getSuspendedThenable() {
2933 if (null === suspendedThenable)
2934 throw Error(
2935 "Expected a suspended thenable. This is a bug in React. Please file an issue."
2936 );
2937 var thenable = suspendedThenable;
2938 suspendedThenable = null;
2939 return thenable;
2940}
2941function is(x, y) {
2942 return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
2943}
2944var objectIs = "function" === typeof Object.is ? Object.is : is,
2945 currentlyRenderingComponent = null,
2946 currentlyRenderingTask = null,
2947 currentlyRenderingRequest = null,
2948 currentlyRenderingKeyPath = null,
2949 firstWorkInProgressHook = null,
2950 workInProgressHook = null,
2951 isReRender = !1,
2952 didScheduleRenderPhaseUpdate = !1,
2953 localIdCounter = 0,
2954 actionStateCounter = 0,
2955 actionStateMatchingIndex = -1,
2956 thenableIndexCounter = 0,
2957 thenableState = null,
2958 renderPhaseUpdates = null,
2959 numberOfReRenders = 0;
2960function resolveCurrentlyRenderingComponent() {
2961 if (null === currentlyRenderingComponent)
2962 throw Error(
2963 "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."
2964 );
2965 return currentlyRenderingComponent;
2966}
2967function createHook() {
2968 if (0 < numberOfReRenders)
2969 throw Error("Rendered more hooks than during the previous render");
2970 return { memoizedState: null, queue: null, next: null };
2971}
2972function createWorkInProgressHook() {
2973 null === workInProgressHook
2974 ? null === firstWorkInProgressHook
2975 ? ((isReRender = !1),
2976 (firstWorkInProgressHook = workInProgressHook = createHook()))
2977 : ((isReRender = !0), (workInProgressHook = firstWorkInProgressHook))
2978 : null === workInProgressHook.next
2979 ? ((isReRender = !1),
2980 (workInProgressHook = workInProgressHook.next = createHook()))
2981 : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));
2982 return workInProgressHook;
2983}
2984function getThenableStateAfterSuspending() {
2985 var state = thenableState;
2986 thenableState = null;
2987 return state;
2988}
2989function resetHooksState() {
2990 currentlyRenderingKeyPath =
2991 currentlyRenderingRequest =
2992 currentlyRenderingTask =
2993 currentlyRenderingComponent =
2994 null;
2995 didScheduleRenderPhaseUpdate = !1;
2996 firstWorkInProgressHook = null;
2997 numberOfReRenders = 0;
2998 workInProgressHook = renderPhaseUpdates = null;
2999}
3000function basicStateReducer(state, action) {
3001 return "function" === typeof action ? action(state) : action;
3002}
3003function useReducer(reducer, initialArg, init) {
3004 currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
3005 workInProgressHook = createWorkInProgressHook();
3006 if (isReRender) {
3007 var queue = workInProgressHook.queue;
3008 initialArg = queue.dispatch;
3009 if (
3010 null !== renderPhaseUpdates &&
3011 ((init = renderPhaseUpdates.get(queue)), void 0 !== init)
3012 ) {
3013 renderPhaseUpdates.delete(queue);
3014 queue = workInProgressHook.memoizedState;
3015 do (queue = reducer(queue, init.action)), (init = init.next);
3016 while (null !== init);
3017 workInProgressHook.memoizedState = queue;
3018 return [queue, initialArg];
3019 }
3020 return [workInProgressHook.memoizedState, initialArg];
3021 }
3022 reducer =
3023 reducer === basicStateReducer
3024 ? "function" === typeof initialArg
3025 ? initialArg()
3026 : initialArg
3027 : void 0 !== init
3028 ? init(initialArg)
3029 : initialArg;
3030 workInProgressHook.memoizedState = reducer;
3031 reducer = workInProgressHook.queue = { last: null, dispatch: null };
3032 reducer = reducer.dispatch = dispatchAction.bind(
3033 null,
3034 currentlyRenderingComponent,
3035 reducer
3036 );
3037 return [workInProgressHook.memoizedState, reducer];
3038}
3039function useMemo(nextCreate, deps) {
3040 currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
3041 workInProgressHook = createWorkInProgressHook();
3042 deps = void 0 === deps ? null : deps;
3043 if (null !== workInProgressHook) {
3044 var prevState = workInProgressHook.memoizedState;
3045 if (null !== prevState && null !== deps) {
3046 var prevDeps = prevState[1];
3047 a: if (null === prevDeps) prevDeps = !1;
3048 else {
3049 for (var i = 0; i < prevDeps.length && i < deps.length; i++)
3050 if (!objectIs(deps[i], prevDeps[i])) {
3051 prevDeps = !1;
3052 break a;
3053 }
3054 prevDeps = !0;
3055 }
3056 if (prevDeps) return prevState[0];
3057 }
3058 }
3059 nextCreate = nextCreate();
3060 workInProgressHook.memoizedState = [nextCreate, deps];
3061 return nextCreate;
3062}
3063function dispatchAction(componentIdentity, queue, action) {
3064 if (25 <= numberOfReRenders)
3065 throw Error(
3066 "Too many re-renders. React limits the number of renders to prevent an infinite loop."
3067 );
3068 if (componentIdentity === currentlyRenderingComponent)
3069 if (
3070 ((didScheduleRenderPhaseUpdate = !0),
3071 (componentIdentity = { action: action, next: null }),
3072 null === renderPhaseUpdates && (renderPhaseUpdates = new Map()),
3073 (action = renderPhaseUpdates.get(queue)),
3074 void 0 === action)
3075 )
3076 renderPhaseUpdates.set(queue, componentIdentity);
3077 else {
3078 for (queue = action; null !== queue.next; ) queue = queue.next;
3079 queue.next = componentIdentity;
3080 }
3081}
3082function unsupportedStartTransition() {
3083 throw Error("startTransition cannot be called during server rendering.");
3084}
3085function unsupportedSetOptimisticState() {
3086 throw Error("Cannot update optimistic state while rendering.");
3087}
3088function createPostbackActionStateKey(permalink, componentKeyPath, hookIndex) {
3089 if (void 0 !== permalink) return "p" + permalink;
3090 permalink = JSON.stringify([componentKeyPath, null, hookIndex]);
3091 componentKeyPath = crypto.createHash("md5");
3092 componentKeyPath.update(permalink);
3093 return "k" + componentKeyPath.digest("hex");
3094}
3095function useActionState(action, initialState, permalink) {
3096 resolveCurrentlyRenderingComponent();
3097 var actionStateHookIndex = actionStateCounter++,
3098 request = currentlyRenderingRequest;
3099 if ("function" === typeof action.$$FORM_ACTION) {
3100 var nextPostbackStateKey = null,
3101 componentKeyPath = currentlyRenderingKeyPath;
3102 request = request.formState;
3103 var isSignatureEqual = action.$$IS_SIGNATURE_EQUAL;
3104 if (null !== request && "function" === typeof isSignatureEqual) {
3105 var postbackKey = request[1];
3106 isSignatureEqual.call(action, request[2], request[3]) &&
3107 ((nextPostbackStateKey = createPostbackActionStateKey(
3108 permalink,
3109 componentKeyPath,
3110 actionStateHookIndex
3111 )),
3112 postbackKey === nextPostbackStateKey &&
3113 ((actionStateMatchingIndex = actionStateHookIndex),
3114 (initialState = request[0])));
3115 }
3116 var boundAction = action.bind(null, initialState);
3117 action = function (payload) {
3118 boundAction(payload);
3119 };
3120 "function" === typeof boundAction.$$FORM_ACTION &&
3121 (action.$$FORM_ACTION = function (prefix) {
3122 prefix = boundAction.$$FORM_ACTION(prefix);
3123 void 0 !== permalink &&
3124 ((permalink += ""), (prefix.action = permalink));
3125 var formData = prefix.data;
3126 formData &&
3127 (null === nextPostbackStateKey &&
3128 (nextPostbackStateKey = createPostbackActionStateKey(
3129 permalink,
3130 componentKeyPath,
3131 actionStateHookIndex
3132 )),
3133 formData.append("$ACTION_KEY", nextPostbackStateKey));
3134 return prefix;
3135 });
3136 return [initialState, action, !1];
3137 }
3138 var boundAction$22 = action.bind(null, initialState);
3139 return [
3140 initialState,
3141 function (payload) {
3142 boundAction$22(payload);
3143 },
3144 !1
3145 ];
3146}
3147function unwrapThenable(thenable) {
3148 var index = thenableIndexCounter;
3149 thenableIndexCounter += 1;
3150 null === thenableState && (thenableState = []);
3151 return trackUsedThenable(thenableState, thenable, index);
3152}
3153function unsupportedRefresh() {
3154 throw Error("Cache cannot be refreshed during server rendering.");
3155}
3156function noop$1() {}
3157var HooksDispatcher = {
3158 readContext: function (context) {
3159 return context._currentValue;
3160 },
3161 use: function (usable) {
3162 if (null !== usable && "object" === typeof usable) {
3163 if ("function" === typeof usable.then) return unwrapThenable(usable);
3164 if (usable.$$typeof === REACT_CONTEXT_TYPE) return usable._currentValue;
3165 }
3166 throw Error("An unsupported type was passed to use(): " + String(usable));
3167 },
3168 useContext: function (context) {
3169 resolveCurrentlyRenderingComponent();
3170 return context._currentValue;
3171 },
3172 useMemo: useMemo,
3173 useReducer: useReducer,
3174 useRef: function (initialValue) {
3175 currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
3176 workInProgressHook = createWorkInProgressHook();
3177 var previousRef = workInProgressHook.memoizedState;
3178 return null === previousRef
3179 ? ((initialValue = { current: initialValue }),
3180 (workInProgressHook.memoizedState = initialValue))
3181 : previousRef;
3182 },
3183 useState: function (initialState) {
3184 return useReducer(basicStateReducer, initialState);
3185 },
3186 useInsertionEffect: noop$1,
3187 useLayoutEffect: noop$1,
3188 useCallback: function (callback, deps) {
3189 return useMemo(function () {
3190 return callback;
3191 }, deps);
3192 },
3193 useImperativeHandle: noop$1,
3194 useEffect: noop$1,
3195 useDebugValue: noop$1,
3196 useDeferredValue: function (value, initialValue) {
3197 resolveCurrentlyRenderingComponent();
3198 return void 0 !== initialValue ? initialValue : value;
3199 },
3200 useTransition: function () {
3201 resolveCurrentlyRenderingComponent();
3202 return [!1, unsupportedStartTransition];
3203 },
3204 useId: function () {
3205 var JSCompiler_inline_result = currentlyRenderingTask.treeContext;
3206 var overflow = JSCompiler_inline_result.overflow;
3207 JSCompiler_inline_result = JSCompiler_inline_result.id;
3208 JSCompiler_inline_result =
3209 (
3210 JSCompiler_inline_result &
3211 ~(1 << (32 - clz32(JSCompiler_inline_result) - 1))
3212 ).toString(32) + overflow;
3213 var resumableState = currentResumableState;
3214 if (null === resumableState)
3215 throw Error(
3216 "Invalid hook call. Hooks can only be called inside of the body of a function component."
3217 );
3218 overflow = localIdCounter++;
3219 JSCompiler_inline_result =
3220 ":" + resumableState.idPrefix + "R" + JSCompiler_inline_result;
3221 0 < overflow && (JSCompiler_inline_result += "H" + overflow.toString(32));
3222 return JSCompiler_inline_result + ":";
3223 },
3224 useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
3225 if (void 0 === getServerSnapshot)
3226 throw Error(
3227 "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
3228 );
3229 return getServerSnapshot();
3230 },
3231 useCacheRefresh: function () {
3232 return unsupportedRefresh;
3233 },
3234 useHostTransitionStatus: function () {
3235 resolveCurrentlyRenderingComponent();
3236 return sharedNotPendingObject;
3237 },
3238 useOptimistic: function (passthrough) {
3239 resolveCurrentlyRenderingComponent();
3240 return [passthrough, unsupportedSetOptimisticState];
3241 }
3242};
3243HooksDispatcher.useFormState = useActionState;
3244HooksDispatcher.useActionState = useActionState;
3245var currentResumableState = null,
3246 DefaultAsyncDispatcher = {
3247 getCacheForType: function () {
3248 throw Error("Not implemented.");
3249 }
3250 },
3251 prefix;
3252function describeBuiltInComponentFrame(name) {
3253 if (void 0 === prefix)
3254 try {
3255 throw Error();
3256 } catch (x) {
3257 var match = x.stack.trim().match(/\n( *(at )?)/);
3258 prefix = (match && match[1]) || "";
3259 }
3260 return "\n" + prefix + name;
3261}
3262var reentry = !1;
3263function describeNativeComponentFrame(fn, construct) {
3264 if (!fn || reentry) return "";
3265 reentry = !0;
3266 var previousPrepareStackTrace = Error.prepareStackTrace;
3267 Error.prepareStackTrace = void 0;
3268 var RunInRootFrame = {
3269 DetermineComponentFrameRoot: function () {
3270 try {
3271 if (construct) {
3272 var Fake = function () {
3273 throw Error();
3274 };
3275 Object.defineProperty(Fake.prototype, "props", {
3276 set: function () {
3277 throw Error();
3278 }
3279 });
3280 if ("object" === typeof Reflect && Reflect.construct) {
3281 try {
3282 Reflect.construct(Fake, []);
3283 } catch (x) {
3284 var control = x;
3285 }
3286 Reflect.construct(fn, [], Fake);
3287 } else {
3288 try {
3289 Fake.call();
3290 } catch (x$24) {
3291 control = x$24;
3292 }
3293 fn.call(Fake.prototype);
3294 }
3295 } else {
3296 try {
3297 throw Error();
3298 } catch (x$25) {
3299 control = x$25;
3300 }
3301 (Fake = fn()) &&
3302 "function" === typeof Fake.catch &&
3303 Fake.catch(function () {});
3304 }
3305 } catch (sample) {
3306 if (sample && control && "string" === typeof sample.stack)
3307 return [sample.stack, control.stack];
3308 }
3309 return [null, null];
3310 }
3311 };
3312 RunInRootFrame.DetermineComponentFrameRoot.displayName =
3313 "DetermineComponentFrameRoot";
3314 var namePropDescriptor = Object.getOwnPropertyDescriptor(
3315 RunInRootFrame.DetermineComponentFrameRoot,
3316 "name"
3317 );
3318 namePropDescriptor &&
3319 namePropDescriptor.configurable &&
3320 Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, "name", {
3321 value: "DetermineComponentFrameRoot"
3322 });
3323 try {
3324 var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
3325 sampleStack = _RunInRootFrame$Deter[0],
3326 controlStack = _RunInRootFrame$Deter[1];
3327 if (sampleStack && controlStack) {
3328 var sampleLines = sampleStack.split("\n"),
3329 controlLines = controlStack.split("\n");
3330 for (
3331 namePropDescriptor = RunInRootFrame = 0;
3332 RunInRootFrame < sampleLines.length &&
3333 !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot");
3334
3335 )
3336 RunInRootFrame++;
3337 for (
3338 ;
3339 namePropDescriptor < controlLines.length &&
3340 !controlLines[namePropDescriptor].includes(
3341 "DetermineComponentFrameRoot"
3342 );
3343
3344 )
3345 namePropDescriptor++;
3346 if (
3347 RunInRootFrame === sampleLines.length ||
3348 namePropDescriptor === controlLines.length
3349 )
3350 for (
3351 RunInRootFrame = sampleLines.length - 1,
3352 namePropDescriptor = controlLines.length - 1;
3353 1 <= RunInRootFrame &&
3354 0 <= namePropDescriptor &&
3355 sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor];
3356
3357 )
3358 namePropDescriptor--;
3359 for (
3360 ;
3361 1 <= RunInRootFrame && 0 <= namePropDescriptor;
3362 RunInRootFrame--, namePropDescriptor--
3363 )
3364 if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {
3365 if (1 !== RunInRootFrame || 1 !== namePropDescriptor) {
3366 do
3367 if (
3368 (RunInRootFrame--,
3369 namePropDescriptor--,
3370 0 > namePropDescriptor ||
3371 sampleLines[RunInRootFrame] !==
3372 controlLines[namePropDescriptor])
3373 ) {
3374 var frame =
3375 "\n" +
3376 sampleLines[RunInRootFrame].replace(" at new ", " at ");
3377 fn.displayName &&
3378 frame.includes("<anonymous>") &&
3379 (frame = frame.replace("<anonymous>", fn.displayName));
3380 return frame;
3381 }
3382 while (1 <= RunInRootFrame && 0 <= namePropDescriptor);
3383 }
3384 break;
3385 }
3386 }
3387 } finally {
3388 (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace);
3389 }
3390 return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "")
3391 ? describeBuiltInComponentFrame(previousPrepareStackTrace)
3392 : "";
3393}
3394function defaultErrorHandler(error) {
3395 console.error(error);
3396 return null;
3397}
3398function noop() {}
3399var currentRequest = null;
3400function resolveRequest() {
3401 if (currentRequest) return currentRequest;
3402 var store = requestStorage.getStore();
3403 return store ? store : null;
3404}
3405function pingTask(request, task) {
3406 request.pingedTasks.push(task);
3407 1 === request.pingedTasks.length &&
3408 ((request.flushScheduled = null !== request.destination),
3409 setImmediate(function () {
3410 return performWork(request);
3411 }));
3412}
3413function createSuspenseBoundary(request, fallbackAbortableTasks) {
3414 return {
3415 status: 0,
3416 rootSegmentID: -1,
3417 parentFlushed: !1,
3418 pendingTasks: 0,
3419 completedSegments: [],
3420 byteSize: 0,
3421 fallbackAbortableTasks: fallbackAbortableTasks,
3422 errorDigest: null,
3423 contentState: createHoistableState(),
3424 fallbackState: createHoistableState(),
3425 trackedContentKeyPath: null,
3426 trackedFallbackNode: null
3427 };
3428}
3429function createRenderTask(
3430 request,
3431 thenableState,
3432 node,
3433 childIndex,
3434 blockedBoundary,
3435 blockedSegment,
3436 hoistableState,
3437 abortSet,
3438 keyPath,
3439 formatContext,
3440 legacyContext,
3441 context,
3442 treeContext,
3443 componentStack,
3444 isFallback
3445) {
3446 request.allPendingTasks++;
3447 null === blockedBoundary
3448 ? request.pendingRootTasks++
3449 : blockedBoundary.pendingTasks++;
3450 var task = {
3451 replay: null,
3452 node: node,
3453 childIndex: childIndex,
3454 ping: function () {
3455 return pingTask(request, task);
3456 },
3457 blockedBoundary: blockedBoundary,
3458 blockedSegment: blockedSegment,
3459 hoistableState: hoistableState,
3460 abortSet: abortSet,
3461 keyPath: keyPath,
3462 formatContext: formatContext,
3463 legacyContext: legacyContext,
3464 context: context,
3465 treeContext: treeContext,
3466 componentStack: componentStack,
3467 thenableState: thenableState,
3468 isFallback: isFallback
3469 };
3470 abortSet.add(task);
3471 return task;
3472}
3473function createReplayTask(
3474 request,
3475 thenableState,
3476 replay,
3477 node,
3478 childIndex,
3479 blockedBoundary,
3480 hoistableState,
3481 abortSet,
3482 keyPath,
3483 formatContext,
3484 legacyContext,
3485 context,
3486 treeContext,
3487 componentStack,
3488 isFallback
3489) {
3490 request.allPendingTasks++;
3491 null === blockedBoundary
3492 ? request.pendingRootTasks++
3493 : blockedBoundary.pendingTasks++;
3494 replay.pendingTasks++;
3495 var task = {
3496 replay: replay,
3497 node: node,
3498 childIndex: childIndex,
3499 ping: function () {
3500 return pingTask(request, task);
3501 },
3502 blockedBoundary: blockedBoundary,
3503 blockedSegment: null,
3504 hoistableState: hoistableState,
3505 abortSet: abortSet,
3506 keyPath: keyPath,
3507 formatContext: formatContext,
3508 legacyContext: legacyContext,
3509 context: context,
3510 treeContext: treeContext,
3511 componentStack: componentStack,
3512 thenableState: thenableState,
3513 isFallback: isFallback
3514 };
3515 abortSet.add(task);
3516 return task;
3517}
3518function createPendingSegment(
3519 request,
3520 index,
3521 boundary,
3522 parentFormatContext,
3523 lastPushedText,
3524 textEmbedded
3525) {
3526 return {
3527 status: 0,
3528 id: -1,
3529 index: index,
3530 parentFlushed: !1,
3531 chunks: [],
3532 children: [],
3533 parentFormatContext: parentFormatContext,
3534 boundary: boundary,
3535 lastPushedText: lastPushedText,
3536 textEmbedded: textEmbedded
3537 };
3538}
3539function createBuiltInComponentStack(task, type) {
3540 return { tag: 0, parent: task.componentStack, type: type };
3541}
3542function getThrownInfo(request, node) {
3543 if (node && null !== request.trackedPostpones) {
3544 try {
3545 request = "";
3546 do {
3547 switch (node.tag) {
3548 case 0:
3549 request += describeBuiltInComponentFrame(node.type);
3550 break;
3551 case 1:
3552 request += describeNativeComponentFrame(node.type, !1);
3553 break;
3554 case 2:
3555 request += describeNativeComponentFrame(node.type, !0);
3556 }
3557 node = node.parent;
3558 } while (node);
3559 var JSCompiler_temp = request;
3560 } catch (x) {
3561 JSCompiler_temp =
3562 "\nError generating stack: " + x.message + "\n" + x.stack;
3563 }
3564 JSCompiler_temp = { componentStack: JSCompiler_temp };
3565 } else JSCompiler_temp = {};
3566 return JSCompiler_temp;
3567}
3568function logRecoverableError(request, error, errorInfo) {
3569 request = request.onError(error, errorInfo);
3570 if (null == request || "string" === typeof request) return request;
3571}
3572function fatalError(request, error) {
3573 var onShellError = request.onShellError;
3574 onShellError(error);
3575 onShellError = request.onFatalError;
3576 onShellError(error);
3577 null !== request.destination
3578 ? ((request.status = 2), request.destination.destroy(error))
3579 : ((request.status = 1), (request.fatalError = error));
3580}
3581function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
3582 var prevThenableState = task.thenableState;
3583 task.thenableState = null;
3584 currentlyRenderingComponent = {};
3585 currentlyRenderingTask = task;
3586 currentlyRenderingRequest = request;
3587 currentlyRenderingKeyPath = keyPath;
3588 actionStateCounter = localIdCounter = 0;
3589 actionStateMatchingIndex = -1;
3590 thenableIndexCounter = 0;
3591 thenableState = prevThenableState;
3592 for (request = Component(props, secondArg); didScheduleRenderPhaseUpdate; )
3593 (didScheduleRenderPhaseUpdate = !1),
3594 (actionStateCounter = localIdCounter = 0),
3595 (actionStateMatchingIndex = -1),
3596 (thenableIndexCounter = 0),
3597 (numberOfReRenders += 1),
3598 (workInProgressHook = null),
3599 (request = Component(props, secondArg));
3600 resetHooksState();
3601 return request;
3602}
3603function finishFunctionComponent(
3604 request,
3605 task,
3606 keyPath,
3607 children,
3608 hasId,
3609 actionStateCount,
3610 actionStateMatchingIndex
3611) {
3612 var didEmitActionStateMarkers = !1;
3613 if (0 !== actionStateCount && null !== request.formState) {
3614 var segment = task.blockedSegment;
3615 if (null !== segment) {
3616 didEmitActionStateMarkers = !0;
3617 segment = segment.chunks;
3618 for (var i = 0; i < actionStateCount; i++)
3619 i === actionStateMatchingIndex
3620 ? segment.push(formStateMarkerIsMatching)
3621 : segment.push(formStateMarkerIsNotMatching);
3622 }
3623 }
3624 actionStateCount = task.keyPath;
3625 task.keyPath = keyPath;
3626 hasId
3627 ? ((keyPath = task.treeContext),
3628 (task.treeContext = pushTreeContext(keyPath, 1, 0)),
3629 renderNode(request, task, children, -1),
3630 (task.treeContext = keyPath))
3631 : didEmitActionStateMarkers
3632 ? renderNode(request, task, children, -1)
3633 : renderNodeDestructive(request, task, children, -1);
3634 task.keyPath = actionStateCount;
3635}
3636function renderElement(request, task, keyPath, type, props, ref) {
3637 if ("function" === typeof type)
3638 if (type.prototype && type.prototype.isReactComponent) {
3639 var JSCompiler_inline_result = props;
3640 if ("ref" in props) {
3641 JSCompiler_inline_result = {};
3642 for (var propName in props)
3643 "ref" !== propName &&
3644 (JSCompiler_inline_result[propName] = props[propName]);
3645 }
3646 var defaultProps = type.defaultProps;
3647 if (defaultProps) {
3648 JSCompiler_inline_result === props &&
3649 (JSCompiler_inline_result = assign(
3650 {},
3651 JSCompiler_inline_result,
3652 props
3653 ));
3654 for (var propName$31 in defaultProps)
3655 void 0 === JSCompiler_inline_result[propName$31] &&
3656 (JSCompiler_inline_result[propName$31] = defaultProps[propName$31]);
3657 }
3658 props = task.componentStack;
3659 task.componentStack = { tag: 2, parent: task.componentStack, type: type };
3660 defaultProps = emptyContextObject;
3661 ref = type.contextType;
3662 "object" === typeof ref &&
3663 null !== ref &&
3664 (defaultProps = ref._currentValue);
3665 defaultProps = new type(JSCompiler_inline_result, defaultProps);
3666 propName$31 = void 0 !== defaultProps.state ? defaultProps.state : null;
3667 defaultProps.updater = classComponentUpdater;
3668 defaultProps.props = JSCompiler_inline_result;
3669 defaultProps.state = propName$31;
3670 ref = { queue: [], replace: !1 };
3671 defaultProps._reactInternals = ref;
3672 var contextType = type.contextType;
3673 defaultProps.context =
3674 "object" === typeof contextType && null !== contextType
3675 ? contextType._currentValue
3676 : emptyContextObject;
3677 contextType = type.getDerivedStateFromProps;
3678 "function" === typeof contextType &&
3679 ((contextType = contextType(JSCompiler_inline_result, propName$31)),
3680 (propName$31 =
3681 null === contextType || void 0 === contextType
3682 ? propName$31
3683 : assign({}, propName$31, contextType)),
3684 (defaultProps.state = propName$31));
3685 if (
3686 "function" !== typeof type.getDerivedStateFromProps &&
3687 "function" !== typeof defaultProps.getSnapshotBeforeUpdate &&
3688 ("function" === typeof defaultProps.UNSAFE_componentWillMount ||
3689 "function" === typeof defaultProps.componentWillMount)
3690 )
3691 if (
3692 ((type = defaultProps.state),
3693 "function" === typeof defaultProps.componentWillMount &&
3694 defaultProps.componentWillMount(),
3695 "function" === typeof defaultProps.UNSAFE_componentWillMount &&
3696 defaultProps.UNSAFE_componentWillMount(),
3697 type !== defaultProps.state &&
3698 classComponentUpdater.enqueueReplaceState(
3699 defaultProps,
3700 defaultProps.state,
3701 null
3702 ),
3703 null !== ref.queue && 0 < ref.queue.length)
3704 )
3705 if (
3706 ((type = ref.queue),
3707 (contextType = ref.replace),
3708 (ref.queue = null),
3709 (ref.replace = !1),
3710 contextType && 1 === type.length)
3711 )
3712 defaultProps.state = type[0];
3713 else {
3714 ref = contextType ? type[0] : defaultProps.state;
3715 propName$31 = !0;
3716 for (
3717 contextType = contextType ? 1 : 0;
3718 contextType < type.length;
3719 contextType++
3720 )
3721 (propName = type[contextType]),
3722 (propName =
3723 "function" === typeof propName
3724 ? propName.call(
3725 defaultProps,
3726 ref,
3727 JSCompiler_inline_result,
3728 void 0
3729 )
3730 : propName),
3731 null != propName &&
3732 (propName$31
3733 ? ((propName$31 = !1), (ref = assign({}, ref, propName)))
3734 : assign(ref, propName));
3735 defaultProps.state = ref;
3736 }
3737 else ref.queue = null;
3738 type = defaultProps.render();
3739 JSCompiler_inline_result = task.keyPath;
3740 task.keyPath = keyPath;
3741 renderNodeDestructive(request, task, type, -1);
3742 task.keyPath = JSCompiler_inline_result;
3743 task.componentStack = props;
3744 } else
3745 (JSCompiler_inline_result = task.componentStack),
3746 (task.componentStack = {
3747 tag: 1,
3748 parent: task.componentStack,
3749 type: type
3750 }),
3751 (type = renderWithHooks(request, task, keyPath, type, props, void 0)),
3752 finishFunctionComponent(
3753 request,
3754 task,
3755 keyPath,
3756 type,
3757 0 !== localIdCounter,
3758 actionStateCounter,
3759 actionStateMatchingIndex
3760 ),
3761 (task.componentStack = JSCompiler_inline_result);
3762 else if ("string" === typeof type) {
3763 JSCompiler_inline_result = task.componentStack;
3764 task.componentStack = createBuiltInComponentStack(task, type);
3765 defaultProps = task.blockedSegment;
3766 if (null === defaultProps)
3767 (defaultProps = props.children),
3768 (ref = task.formatContext),
3769 (propName$31 = task.keyPath),
3770 (task.formatContext = getChildFormatContext(ref, type, props)),
3771 (task.keyPath = keyPath),
3772 renderNode(request, task, defaultProps, -1),
3773 (task.formatContext = ref),
3774 (task.keyPath = propName$31);
3775 else {
3776 propName$31 = pushStartInstance(
3777 defaultProps.chunks,
3778 type,
3779 props,
3780 request.resumableState,
3781 request.renderState,
3782 task.hoistableState,
3783 task.formatContext,
3784 defaultProps.lastPushedText,
3785 task.isFallback
3786 );
3787 defaultProps.lastPushedText = !1;
3788 ref = task.formatContext;
3789 contextType = task.keyPath;
3790 task.formatContext = getChildFormatContext(ref, type, props);
3791 task.keyPath = keyPath;
3792 renderNode(request, task, propName$31, -1);
3793 task.formatContext = ref;
3794 task.keyPath = contextType;
3795 a: {
3796 keyPath = defaultProps.chunks;
3797 request = request.resumableState;
3798 switch (type) {
3799 case "title":
3800 case "style":
3801 case "script":
3802 case "area":
3803 case "base":
3804 case "br":
3805 case "col":
3806 case "embed":
3807 case "hr":
3808 case "img":
3809 case "input":
3810 case "keygen":
3811 case "link":
3812 case "meta":
3813 case "param":
3814 case "source":
3815 case "track":
3816 case "wbr":
3817 break a;
3818 case "body":
3819 if (1 >= ref.insertionMode) {
3820 request.hasBody = !0;
3821 break a;
3822 }
3823 break;
3824 case "html":
3825 if (0 === ref.insertionMode) {
3826 request.hasHtml = !0;
3827 break a;
3828 }
3829 }
3830 keyPath.push(endChunkForTag(type));
3831 }
3832 defaultProps.lastPushedText = !1;
3833 }
3834 task.componentStack = JSCompiler_inline_result;
3835 } else {
3836 switch (type) {
3837 case REACT_LEGACY_HIDDEN_TYPE:
3838 case REACT_DEBUG_TRACING_MODE_TYPE:
3839 case REACT_STRICT_MODE_TYPE:
3840 case REACT_PROFILER_TYPE:
3841 case REACT_FRAGMENT_TYPE:
3842 type = task.keyPath;
3843 task.keyPath = keyPath;
3844 renderNodeDestructive(request, task, props.children, -1);
3845 task.keyPath = type;
3846 return;
3847 case REACT_OFFSCREEN_TYPE:
3848 "hidden" !== props.mode &&
3849 ((type = task.keyPath),
3850 (task.keyPath = keyPath),
3851 renderNodeDestructive(request, task, props.children, -1),
3852 (task.keyPath = type));
3853 return;
3854 case REACT_SUSPENSE_LIST_TYPE:
3855 type = task.componentStack;
3856 task.componentStack = createBuiltInComponentStack(task, "SuspenseList");
3857 JSCompiler_inline_result = task.keyPath;
3858 task.keyPath = keyPath;
3859 renderNodeDestructive(request, task, props.children, -1);
3860 task.keyPath = JSCompiler_inline_result;
3861 task.componentStack = type;
3862 return;
3863 case REACT_SCOPE_TYPE:
3864 throw Error("ReactDOMServer does not yet support scope components.");
3865 case REACT_SUSPENSE_TYPE:
3866 a: if (null !== task.replay) {
3867 type = task.keyPath;
3868 task.keyPath = keyPath;
3869 keyPath = props.children;
3870 try {
3871 renderNode(request, task, keyPath, -1);
3872 } finally {
3873 task.keyPath = type;
3874 }
3875 } else {
3876 var previousComponentStack = task.componentStack;
3877 type = task.componentStack = createBuiltInComponentStack(
3878 task,
3879 "Suspense"
3880 );
3881 var prevKeyPath = task.keyPath;
3882 ref = task.blockedBoundary;
3883 var parentHoistableState = task.hoistableState,
3884 parentSegment = task.blockedSegment;
3885 propName$31 = props.fallback;
3886 var content = props.children;
3887 props = new Set();
3888 contextType = createSuspenseBoundary(request, props);
3889 null !== request.trackedPostpones &&
3890 (contextType.trackedContentKeyPath = keyPath);
3891 propName = createPendingSegment(
3892 request,
3893 parentSegment.chunks.length,
3894 contextType,
3895 task.formatContext,
3896 !1,
3897 !1
3898 );
3899 parentSegment.children.push(propName);
3900 parentSegment.lastPushedText = !1;
3901 var contentRootSegment = createPendingSegment(
3902 request,
3903 0,
3904 null,
3905 task.formatContext,
3906 !1,
3907 !1
3908 );
3909 contentRootSegment.parentFlushed = !0;
3910 task.blockedBoundary = contextType;
3911 task.hoistableState = contextType.contentState;
3912 task.blockedSegment = contentRootSegment;
3913 task.keyPath = keyPath;
3914 try {
3915 if (
3916 (renderNode(request, task, content, -1),
3917 contentRootSegment.lastPushedText &&
3918 contentRootSegment.textEmbedded &&
3919 contentRootSegment.chunks.push(textSeparator),
3920 (contentRootSegment.status = 1),
3921 queueCompletedSegment(contextType, contentRootSegment),
3922 0 === contextType.pendingTasks && 0 === contextType.status)
3923 ) {
3924 contextType.status = 1;
3925 task.componentStack = previousComponentStack;
3926 break a;
3927 }
3928 } catch (error) {
3929 (contentRootSegment.status = 4),
3930 (contextType.status = 4),
3931 (JSCompiler_inline_result = getThrownInfo(
3932 request,
3933 task.componentStack
3934 )),
3935 (defaultProps = logRecoverableError(
3936 request,
3937 error,
3938 JSCompiler_inline_result
3939 )),
3940 (contextType.errorDigest = defaultProps),
3941 untrackBoundary(request, contextType);
3942 } finally {
3943 (task.blockedBoundary = ref),
3944 (task.hoistableState = parentHoistableState),
3945 (task.blockedSegment = parentSegment),
3946 (task.keyPath = prevKeyPath),
3947 (task.componentStack = previousComponentStack);
3948 }
3949 JSCompiler_inline_result = [
3950 keyPath[0],
3951 "Suspense Fallback",
3952 keyPath[2]
3953 ];
3954 defaultProps = request.trackedPostpones;
3955 null !== defaultProps &&
3956 ((previousComponentStack = [
3957 JSCompiler_inline_result[1],
3958 JSCompiler_inline_result[2],
3959 [],
3960 null
3961 ]),
3962 defaultProps.workingMap.set(
3963 JSCompiler_inline_result,
3964 previousComponentStack
3965 ),
3966 5 === contextType.status
3967 ? (defaultProps.workingMap.get(keyPath)[4] =
3968 previousComponentStack)
3969 : (contextType.trackedFallbackNode = previousComponentStack));
3970 task = createRenderTask(
3971 request,
3972 null,
3973 propName$31,
3974 -1,
3975 ref,
3976 propName,
3977 contextType.fallbackState,
3978 props,
3979 JSCompiler_inline_result,
3980 task.formatContext,
3981 task.legacyContext,
3982 task.context,
3983 task.treeContext,
3984 type,
3985 !0
3986 );
3987 request.pingedTasks.push(task);
3988 }
3989 return;
3990 }
3991 if ("object" === typeof type && null !== type)
3992 switch (type.$$typeof) {
3993 case REACT_FORWARD_REF_TYPE:
3994 JSCompiler_inline_result = task.componentStack;
3995 task.componentStack = {
3996 tag: 1,
3997 parent: task.componentStack,
3998 type: type.render
3999 };
4000 if ("ref" in props)
4001 for (contextType in ((defaultProps = {}), props))
4002 "ref" !== contextType &&
4003 (defaultProps[contextType] = props[contextType]);
4004 else defaultProps = props;
4005 type = renderWithHooks(
4006 request,
4007 task,
4008 keyPath,
4009 type.render,
4010 defaultProps,
4011 ref
4012 );
4013 finishFunctionComponent(
4014 request,
4015 task,
4016 keyPath,
4017 type,
4018 0 !== localIdCounter,
4019 actionStateCounter,
4020 actionStateMatchingIndex
4021 );
4022 task.componentStack = JSCompiler_inline_result;
4023 return;
4024 case REACT_MEMO_TYPE:
4025 renderElement(request, task, keyPath, type.type, props, ref);
4026 return;
4027 case REACT_PROVIDER_TYPE:
4028 case REACT_CONTEXT_TYPE:
4029 defaultProps = props.children;
4030 JSCompiler_inline_result = task.keyPath;
4031 props = props.value;
4032 ref = type._currentValue;
4033 type._currentValue = props;
4034 propName$31 = currentActiveSnapshot;
4035 currentActiveSnapshot = type = {
4036 parent: propName$31,
4037 depth: null === propName$31 ? 0 : propName$31.depth + 1,
4038 context: type,
4039 parentValue: ref,
4040 value: props
4041 };
4042 task.context = type;
4043 task.keyPath = keyPath;
4044 renderNodeDestructive(request, task, defaultProps, -1);
4045 request = currentActiveSnapshot;
4046 if (null === request)
4047 throw Error(
4048 "Tried to pop a Context at the root of the app. This is a bug in React."
4049 );
4050 request.context._currentValue = request.parentValue;
4051 request = currentActiveSnapshot = request.parent;
4052 task.context = request;
4053 task.keyPath = JSCompiler_inline_result;
4054 return;
4055 case REACT_CONSUMER_TYPE:
4056 props = props.children;
4057 type = props(type._context._currentValue);
4058 props = task.keyPath;
4059 task.keyPath = keyPath;
4060 renderNodeDestructive(request, task, type, -1);
4061 task.keyPath = props;
4062 return;
4063 case REACT_LAZY_TYPE:
4064 JSCompiler_inline_result = task.componentStack;
4065 task.componentStack = createBuiltInComponentStack(task, "Lazy");
4066 defaultProps = type._init;
4067 type = defaultProps(type._payload);
4068 renderElement(request, task, keyPath, type, props, void 0);
4069 task.componentStack = JSCompiler_inline_result;
4070 return;
4071 }
4072 throw Error(
4073 "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " +
4074 ((null == type ? type : typeof type) + ".")
4075 );
4076 }
4077}
4078function resumeNode(request, task, segmentId, node, childIndex) {
4079 var prevReplay = task.replay,
4080 blockedBoundary = task.blockedBoundary,
4081 resumedSegment = createPendingSegment(
4082 request,
4083 0,
4084 null,
4085 task.formatContext,
4086 !1,
4087 !1
4088 );
4089 resumedSegment.id = segmentId;
4090 resumedSegment.parentFlushed = !0;
4091 try {
4092 (task.replay = null),
4093 (task.blockedSegment = resumedSegment),
4094 renderNode(request, task, node, childIndex),
4095 (resumedSegment.status = 1),
4096 null === blockedBoundary
4097 ? (request.completedRootSegment = resumedSegment)
4098 : (queueCompletedSegment(blockedBoundary, resumedSegment),
4099 blockedBoundary.parentFlushed &&
4100 request.partialBoundaries.push(blockedBoundary));
4101 } finally {
4102 (task.replay = prevReplay), (task.blockedSegment = null);
4103 }
4104}
4105function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4106 if (null !== task.replay && "number" === typeof task.replay.slots)
4107 resumeNode(request, task, task.replay.slots, node$jscomp$0, childIndex);
4108 else if (
4109 ((task.node = node$jscomp$0),
4110 (task.childIndex = childIndex),
4111 null !== node$jscomp$0)
4112 ) {
4113 if ("object" === typeof node$jscomp$0) {
4114 switch (node$jscomp$0.$$typeof) {
4115 case REACT_ELEMENT_TYPE:
4116 var type = node$jscomp$0.type,
4117 key = node$jscomp$0.key,
4118 props = node$jscomp$0.props;
4119 node$jscomp$0 = props.ref;
4120 var ref = void 0 !== node$jscomp$0 ? node$jscomp$0 : null;
4121 var name = getComponentNameFromType(type),
4122 keyOrIndex =
4123 null == key ? (-1 === childIndex ? 0 : childIndex) : key;
4124 key = [task.keyPath, name, keyOrIndex];
4125 if (null !== task.replay)
4126 a: {
4127 var replay = task.replay;
4128 childIndex = replay.nodes;
4129 for (
4130 node$jscomp$0 = 0;
4131 node$jscomp$0 < childIndex.length;
4132 node$jscomp$0++
4133 ) {
4134 var node = childIndex[node$jscomp$0];
4135 if (keyOrIndex === node[1]) {
4136 if (4 === node.length) {
4137 if (null !== name && name !== node[0])
4138 throw Error(
4139 "Expected the resume to render <" +
4140 node[0] +
4141 "> in this slot but instead it rendered <" +
4142 name +
4143 ">. The tree doesn't match so React will fallback to client rendering."
4144 );
4145 var childNodes = node[2];
4146 name = node[3];
4147 keyOrIndex = task.node;
4148 task.replay = {
4149 nodes: childNodes,
4150 slots: name,
4151 pendingTasks: 1
4152 };
4153 try {
4154 renderElement(request, task, key, type, props, ref);
4155 if (
4156 1 === task.replay.pendingTasks &&
4157 0 < task.replay.nodes.length
4158 )
4159 throw Error(
4160 "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
4161 );
4162 task.replay.pendingTasks--;
4163 } catch (x) {
4164 if (
4165 "object" === typeof x &&
4166 null !== x &&
4167 (x === SuspenseException ||
4168 "function" === typeof x.then)
4169 )
4170 throw (
4171 (task.node === keyOrIndex && (task.replay = replay),
4172 x)
4173 );
4174 task.replay.pendingTasks--;
4175 props = getThrownInfo(request, task.componentStack);
4176 key = request;
4177 request = task.blockedBoundary;
4178 type = x;
4179 props = logRecoverableError(key, type, props);
4180 abortRemainingReplayNodes(
4181 key,
4182 request,
4183 childNodes,
4184 name,
4185 type,
4186 props
4187 );
4188 }
4189 task.replay = replay;
4190 } else {
4191 if (type !== REACT_SUSPENSE_TYPE)
4192 throw Error(
4193 "Expected the resume to render <Suspense> in this slot but instead it rendered <" +
4194 (getComponentNameFromType(type) || "Unknown") +
4195 ">. The tree doesn't match so React will fallback to client rendering."
4196 );
4197 b: {
4198 replay = void 0;
4199 type = node[5];
4200 ref = node[2];
4201 name = node[3];
4202 keyOrIndex = null === node[4] ? [] : node[4][2];
4203 node = null === node[4] ? null : node[4][3];
4204 var previousComponentStack = task.componentStack,
4205 suspenseComponentStack = (task.componentStack =
4206 createBuiltInComponentStack(task, "Suspense")),
4207 prevKeyPath = task.keyPath,
4208 previousReplaySet = task.replay,
4209 parentBoundary = task.blockedBoundary,
4210 parentHoistableState = task.hoistableState,
4211 content = props.children;
4212 props = props.fallback;
4213 var fallbackAbortSet = new Set(),
4214 resumedBoundary = createSuspenseBoundary(
4215 request,
4216 fallbackAbortSet
4217 );
4218 resumedBoundary.parentFlushed = !0;
4219 resumedBoundary.rootSegmentID = type;
4220 task.blockedBoundary = resumedBoundary;
4221 task.hoistableState = resumedBoundary.contentState;
4222 task.replay = {
4223 nodes: ref,
4224 slots: name,
4225 pendingTasks: 1
4226 };
4227 try {
4228 renderNode(request, task, content, -1);
4229 if (
4230 1 === task.replay.pendingTasks &&
4231 0 < task.replay.nodes.length
4232 )
4233 throw Error(
4234 "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
4235 );
4236 task.replay.pendingTasks--;
4237 if (
4238 0 === resumedBoundary.pendingTasks &&
4239 0 === resumedBoundary.status
4240 ) {
4241 resumedBoundary.status = 1;
4242 request.completedBoundaries.push(resumedBoundary);
4243 break b;
4244 }
4245 } catch (error) {
4246 (resumedBoundary.status = 4),
4247 (childNodes = getThrownInfo(
4248 request,
4249 task.componentStack
4250 )),
4251 (replay = logRecoverableError(
4252 request,
4253 error,
4254 childNodes
4255 )),
4256 (resumedBoundary.errorDigest = replay),
4257 task.replay.pendingTasks--,
4258 request.clientRenderedBoundaries.push(
4259 resumedBoundary
4260 );
4261 } finally {
4262 (task.blockedBoundary = parentBoundary),
4263 (task.hoistableState = parentHoistableState),
4264 (task.replay = previousReplaySet),
4265 (task.keyPath = prevKeyPath),
4266 (task.componentStack = previousComponentStack);
4267 }
4268 task = createReplayTask(
4269 request,
4270 null,
4271 { nodes: keyOrIndex, slots: node, pendingTasks: 0 },
4272 props,
4273 -1,
4274 parentBoundary,
4275 resumedBoundary.fallbackState,
4276 fallbackAbortSet,
4277 [key[0], "Suspense Fallback", key[2]],
4278 task.formatContext,
4279 task.legacyContext,
4280 task.context,
4281 task.treeContext,
4282 suspenseComponentStack,
4283 !0
4284 );
4285 request.pingedTasks.push(task);
4286 }
4287 }
4288 childIndex.splice(node$jscomp$0, 1);
4289 break a;
4290 }
4291 }
4292 }
4293 else renderElement(request, task, key, type, props, ref);
4294 return;
4295 case REACT_PORTAL_TYPE:
4296 throw Error(
4297 "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
4298 );
4299 case REACT_LAZY_TYPE:
4300 childNodes = task.componentStack;
4301 task.componentStack = createBuiltInComponentStack(task, "Lazy");
4302 props = node$jscomp$0._init;
4303 node$jscomp$0 = props(node$jscomp$0._payload);
4304 task.componentStack = childNodes;
4305 renderNodeDestructive(request, task, node$jscomp$0, childIndex);
4306 return;
4307 }
4308 if (isArrayImpl(node$jscomp$0)) {
4309 renderChildrenArray(request, task, node$jscomp$0, childIndex);
4310 return;
4311 }
4312 null === node$jscomp$0 || "object" !== typeof node$jscomp$0
4313 ? (childNodes = null)
4314 : ((childNodes =
4315 (MAYBE_ITERATOR_SYMBOL && node$jscomp$0[MAYBE_ITERATOR_SYMBOL]) ||
4316 node$jscomp$0["@@iterator"]),
4317 (childNodes = "function" === typeof childNodes ? childNodes : null));
4318 if (childNodes && (childNodes = childNodes.call(node$jscomp$0))) {
4319 node$jscomp$0 = childNodes.next();
4320 if (!node$jscomp$0.done) {
4321 props = [];
4322 do
4323 props.push(node$jscomp$0.value),
4324 (node$jscomp$0 = childNodes.next());
4325 while (!node$jscomp$0.done);
4326 renderChildrenArray(request, task, props, childIndex);
4327 }
4328 return;
4329 }
4330 if ("function" === typeof node$jscomp$0.then)
4331 return (
4332 (task.thenableState = null),
4333 renderNodeDestructive(
4334 request,
4335 task,
4336 unwrapThenable(node$jscomp$0),
4337 childIndex
4338 )
4339 );
4340 if (node$jscomp$0.$$typeof === REACT_CONTEXT_TYPE)
4341 return renderNodeDestructive(
4342 request,
4343 task,
4344 node$jscomp$0._currentValue,
4345 childIndex
4346 );
4347 childIndex = Object.prototype.toString.call(node$jscomp$0);
4348 throw Error(
4349 "Objects are not valid as a React child (found: " +
4350 ("[object Object]" === childIndex
4351 ? "object with keys {" + Object.keys(node$jscomp$0).join(", ") + "}"
4352 : childIndex) +
4353 "). If you meant to render a collection of children, use an array instead."
4354 );
4355 }
4356 if ("string" === typeof node$jscomp$0)
4357 (childIndex = task.blockedSegment),
4358 null !== childIndex &&
4359 (childIndex.lastPushedText = pushTextInstance(
4360 childIndex.chunks,
4361 node$jscomp$0,
4362 request.renderState,
4363 childIndex.lastPushedText
4364 ));
4365 else if (
4366 "number" === typeof node$jscomp$0 ||
4367 "bigint" === typeof node$jscomp$0
4368 )
4369 (childIndex = task.blockedSegment),
4370 null !== childIndex &&
4371 (childIndex.lastPushedText = pushTextInstance(
4372 childIndex.chunks,
4373 "" + node$jscomp$0,
4374 request.renderState,
4375 childIndex.lastPushedText
4376 ));
4377 }
4378}
4379function renderChildrenArray(request, task, children, childIndex) {
4380 var prevKeyPath = task.keyPath;
4381 if (
4382 -1 !== childIndex &&
4383 ((task.keyPath = [task.keyPath, "Fragment", childIndex]),
4384 null !== task.replay)
4385 ) {
4386 for (
4387 var replay = task.replay, replayNodes = replay.nodes, j = 0;
4388 j < replayNodes.length;
4389 j++
4390 ) {
4391 var node = replayNodes[j];
4392 if (node[1] === childIndex) {
4393 childIndex = node[2];
4394 node = node[3];
4395 task.replay = { nodes: childIndex, slots: node, pendingTasks: 1 };
4396 try {
4397 renderChildrenArray(request, task, children, -1);
4398 if (1 === task.replay.pendingTasks && 0 < task.replay.nodes.length)
4399 throw Error(
4400 "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
4401 );
4402 task.replay.pendingTasks--;
4403 } catch (x) {
4404 if (
4405 "object" === typeof x &&
4406 null !== x &&
4407 (x === SuspenseException || "function" === typeof x.then)
4408 )
4409 throw x;
4410 task.replay.pendingTasks--;
4411 children = getThrownInfo(request, task.componentStack);
4412 var boundary = task.blockedBoundary,
4413 error = x;
4414 children = logRecoverableError(request, error, children);
4415 abortRemainingReplayNodes(
4416 request,
4417 boundary,
4418 childIndex,
4419 node,
4420 error,
4421 children
4422 );
4423 }
4424 task.replay = replay;
4425 replayNodes.splice(j, 1);
4426 break;
4427 }
4428 }
4429 task.keyPath = prevKeyPath;
4430 return;
4431 }
4432 replay = task.treeContext;
4433 replayNodes = children.length;
4434 if (
4435 null !== task.replay &&
4436 ((j = task.replay.slots), null !== j && "object" === typeof j)
4437 ) {
4438 for (childIndex = 0; childIndex < replayNodes; childIndex++)
4439 (node = children[childIndex]),
4440 (task.treeContext = pushTreeContext(replay, replayNodes, childIndex)),
4441 (boundary = j[childIndex]),
4442 "number" === typeof boundary
4443 ? (resumeNode(request, task, boundary, node, childIndex),
4444 delete j[childIndex])
4445 : renderNode(request, task, node, childIndex);
4446 task.treeContext = replay;
4447 task.keyPath = prevKeyPath;
4448 return;
4449 }
4450 for (j = 0; j < replayNodes; j++)
4451 (childIndex = children[j]),
4452 (task.treeContext = pushTreeContext(replay, replayNodes, j)),
4453 renderNode(request, task, childIndex, j);
4454 task.treeContext = replay;
4455 task.keyPath = prevKeyPath;
4456}
4457function untrackBoundary(request, boundary) {
4458 request = request.trackedPostpones;
4459 null !== request &&
4460 ((boundary = boundary.trackedContentKeyPath),
4461 null !== boundary &&
4462 ((boundary = request.workingMap.get(boundary)),
4463 void 0 !== boundary &&
4464 ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));
4465}
4466function renderNode(request, task, node, childIndex) {
4467 var previousFormatContext = task.formatContext,
4468 previousLegacyContext = task.legacyContext,
4469 previousContext = task.context,
4470 previousKeyPath = task.keyPath,
4471 previousTreeContext = task.treeContext,
4472 previousComponentStack = task.componentStack,
4473 segment = task.blockedSegment;
4474 if (null === segment)
4475 try {
4476 return renderNodeDestructive(request, task, node, childIndex);
4477 } catch (thrownValue) {
4478 if (
4479 (resetHooksState(),
4480 (node =
4481 thrownValue === SuspenseException
4482 ? getSuspendedThenable()
4483 : thrownValue),
4484 "object" === typeof node &&
4485 null !== node &&
4486 "function" === typeof node.then)
4487 ) {
4488 childIndex = getThenableStateAfterSuspending();
4489 request = createReplayTask(
4490 request,
4491 childIndex,
4492 task.replay,
4493 task.node,
4494 task.childIndex,
4495 task.blockedBoundary,
4496 task.hoistableState,
4497 task.abortSet,
4498 task.keyPath,
4499 task.formatContext,
4500 task.legacyContext,
4501 task.context,
4502 task.treeContext,
4503 null !== task.componentStack ? task.componentStack.parent : null,
4504 task.isFallback
4505 ).ping;
4506 node.then(request, request);
4507 task.formatContext = previousFormatContext;
4508 task.legacyContext = previousLegacyContext;
4509 task.context = previousContext;
4510 task.keyPath = previousKeyPath;
4511 task.treeContext = previousTreeContext;
4512 task.componentStack = previousComponentStack;
4513 switchContext(previousContext);
4514 return;
4515 }
4516 }
4517 else {
4518 var childrenLength = segment.children.length,
4519 chunkLength = segment.chunks.length;
4520 try {
4521 return renderNodeDestructive(request, task, node, childIndex);
4522 } catch (thrownValue$40) {
4523 if (
4524 (resetHooksState(),
4525 (segment.children.length = childrenLength),
4526 (segment.chunks.length = chunkLength),
4527 (node =
4528 thrownValue$40 === SuspenseException
4529 ? getSuspendedThenable()
4530 : thrownValue$40),
4531 "object" === typeof node &&
4532 null !== node &&
4533 "function" === typeof node.then)
4534 ) {
4535 childIndex = getThenableStateAfterSuspending();
4536 segment = task.blockedSegment;
4537 childrenLength = createPendingSegment(
4538 request,
4539 segment.chunks.length,
4540 null,
4541 task.formatContext,
4542 segment.lastPushedText,
4543 !0
4544 );
4545 segment.children.push(childrenLength);
4546 segment.lastPushedText = !1;
4547 request = createRenderTask(
4548 request,
4549 childIndex,
4550 task.node,
4551 task.childIndex,
4552 task.blockedBoundary,
4553 childrenLength,
4554 task.hoistableState,
4555 task.abortSet,
4556 task.keyPath,
4557 task.formatContext,
4558 task.legacyContext,
4559 task.context,
4560 task.treeContext,
4561 null !== task.componentStack ? task.componentStack.parent : null,
4562 task.isFallback
4563 ).ping;
4564 node.then(request, request);
4565 task.formatContext = previousFormatContext;
4566 task.legacyContext = previousLegacyContext;
4567 task.context = previousContext;
4568 task.keyPath = previousKeyPath;
4569 task.treeContext = previousTreeContext;
4570 task.componentStack = previousComponentStack;
4571 switchContext(previousContext);
4572 return;
4573 }
4574 }
4575 }
4576 task.formatContext = previousFormatContext;
4577 task.legacyContext = previousLegacyContext;
4578 task.context = previousContext;
4579 task.keyPath = previousKeyPath;
4580 task.treeContext = previousTreeContext;
4581 switchContext(previousContext);
4582 throw node;
4583}
4584function abortTaskSoft(task) {
4585 var boundary = task.blockedBoundary;
4586 task = task.blockedSegment;
4587 null !== task && ((task.status = 3), finishedTask(this, boundary, task));
4588}
4589function abortRemainingReplayNodes(
4590 request$jscomp$0,
4591 boundary,
4592 nodes,
4593 slots,
4594 error,
4595 errorDigest$jscomp$0
4596) {
4597 for (var i = 0; i < nodes.length; i++) {
4598 var node = nodes[i];
4599 if (4 === node.length)
4600 abortRemainingReplayNodes(
4601 request$jscomp$0,
4602 boundary,
4603 node[2],
4604 node[3],
4605 error,
4606 errorDigest$jscomp$0
4607 );
4608 else {
4609 node = node[5];
4610 var request = request$jscomp$0,
4611 errorDigest = errorDigest$jscomp$0,
4612 resumedBoundary = createSuspenseBoundary(request, new Set());
4613 resumedBoundary.parentFlushed = !0;
4614 resumedBoundary.rootSegmentID = node;
4615 resumedBoundary.status = 4;
4616 resumedBoundary.errorDigest = errorDigest;
4617 resumedBoundary.parentFlushed &&
4618 request.clientRenderedBoundaries.push(resumedBoundary);
4619 }
4620 }
4621 nodes.length = 0;
4622 if (null !== slots) {
4623 if (null === boundary)
4624 throw Error(
4625 "We should not have any resumable nodes in the shell. This is a bug in React."
4626 );
4627 4 !== boundary.status &&
4628 ((boundary.status = 4),
4629 (boundary.errorDigest = errorDigest$jscomp$0),
4630 boundary.parentFlushed &&
4631 request$jscomp$0.clientRenderedBoundaries.push(boundary));
4632 if ("object" === typeof slots) for (var index in slots) delete slots[index];
4633 }
4634}
4635function abortTask(task, request, error) {
4636 var boundary = task.blockedBoundary,
4637 segment = task.blockedSegment;
4638 null !== segment && (segment.status = 3);
4639 if (null === boundary) {
4640 if (((boundary = {}), 1 !== request.status && 2 !== request.status)) {
4641 task = task.replay;
4642 if (null === task) {
4643 logRecoverableError(request, error, boundary);
4644 fatalError(request, error);
4645 return;
4646 }
4647 task.pendingTasks--;
4648 0 === task.pendingTasks &&
4649 0 < task.nodes.length &&
4650 ((boundary = logRecoverableError(request, error, boundary)),
4651 abortRemainingReplayNodes(
4652 request,
4653 null,
4654 task.nodes,
4655 task.slots,
4656 error,
4657 boundary
4658 ));
4659 request.pendingRootTasks--;
4660 0 === request.pendingRootTasks && completeShell(request);
4661 }
4662 } else
4663 boundary.pendingTasks--,
4664 4 !== boundary.status &&
4665 ((boundary.status = 4),
4666 (task = getThrownInfo(request, task.componentStack)),
4667 (task = logRecoverableError(request, error, task)),
4668 (boundary.errorDigest = task),
4669 untrackBoundary(request, boundary),
4670 boundary.parentFlushed &&
4671 request.clientRenderedBoundaries.push(boundary)),
4672 boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
4673 return abortTask(fallbackTask, request, error);
4674 }),
4675 boundary.fallbackAbortableTasks.clear();
4676 request.allPendingTasks--;
4677 0 === request.allPendingTasks && completeAll(request);
4678}
4679function safelyEmitEarlyPreloads(request, shellComplete) {
4680 try {
4681 var renderState = request.renderState,
4682 onHeaders = renderState.onHeaders;
4683 if (onHeaders) {
4684 var headers = renderState.headers;
4685 if (headers) {
4686 renderState.headers = null;
4687 var linkHeader = headers.preconnects;
4688 headers.fontPreloads &&
4689 (linkHeader && (linkHeader += ", "),
4690 (linkHeader += headers.fontPreloads));
4691 headers.highImagePreloads &&
4692 (linkHeader && (linkHeader += ", "),
4693 (linkHeader += headers.highImagePreloads));
4694 if (!shellComplete) {
4695 var queueIter = renderState.styles.values(),
4696 queueStep = queueIter.next();
4697 b: for (
4698 ;
4699 0 < headers.remainingCapacity && !queueStep.done;
4700 queueStep = queueIter.next()
4701 )
4702 for (
4703 var sheetIter = queueStep.value.sheets.values(),
4704 sheetStep = sheetIter.next();
4705 0 < headers.remainingCapacity && !sheetStep.done;
4706 sheetStep = sheetIter.next()
4707 ) {
4708 var sheet = sheetStep.value,
4709 props = sheet.props,
4710 key = props.href,
4711 props$jscomp$0 = sheet.props,
4712 header = getPreloadAsHeader(props$jscomp$0.href, "style", {
4713 crossOrigin: props$jscomp$0.crossOrigin,
4714 integrity: props$jscomp$0.integrity,
4715 nonce: props$jscomp$0.nonce,
4716 type: props$jscomp$0.type,
4717 fetchPriority: props$jscomp$0.fetchPriority,
4718 referrerPolicy: props$jscomp$0.referrerPolicy,
4719 media: props$jscomp$0.media
4720 });
4721 if (2 <= (headers.remainingCapacity -= header.length))
4722 (renderState.resets.style[key] = PRELOAD_NO_CREDS),
4723 linkHeader && (linkHeader += ", "),
4724 (linkHeader += header),
4725 (renderState.resets.style[key] =
4726 "string" === typeof props.crossOrigin ||
4727 "string" === typeof props.integrity
4728 ? [props.crossOrigin, props.integrity]
4729 : PRELOAD_NO_CREDS);
4730 else break b;
4731 }
4732 }
4733 linkHeader ? onHeaders({ Link: linkHeader }) : onHeaders({});
4734 }
4735 }
4736 } catch (error) {
4737 logRecoverableError(request, error, {});
4738 }
4739}
4740function completeShell(request) {
4741 null === request.trackedPostpones && safelyEmitEarlyPreloads(request, !0);
4742 request.onShellError = noop;
4743 request = request.onShellReady;
4744 request();
4745}
4746function completeAll(request) {
4747 safelyEmitEarlyPreloads(
4748 request,
4749 null === request.trackedPostpones
4750 ? !0
4751 : null === request.completedRootSegment ||
4752 5 !== request.completedRootSegment.status
4753 );
4754 request = request.onAllReady;
4755 request();
4756}
4757function queueCompletedSegment(boundary, segment) {
4758 if (
4759 0 === segment.chunks.length &&
4760 1 === segment.children.length &&
4761 null === segment.children[0].boundary &&
4762 -1 === segment.children[0].id
4763 ) {
4764 var childSegment = segment.children[0];
4765 childSegment.id = segment.id;
4766 childSegment.parentFlushed = !0;
4767 1 === childSegment.status && queueCompletedSegment(boundary, childSegment);
4768 } else boundary.completedSegments.push(segment);
4769}
4770function finishedTask(request, boundary, segment) {
4771 if (null === boundary) {
4772 if (null !== segment && segment.parentFlushed) {
4773 if (null !== request.completedRootSegment)
4774 throw Error(
4775 "There can only be one root segment. This is a bug in React."
4776 );
4777 request.completedRootSegment = segment;
4778 }
4779 request.pendingRootTasks--;
4780 0 === request.pendingRootTasks && completeShell(request);
4781 } else
4782 boundary.pendingTasks--,
4783 4 !== boundary.status &&
4784 (0 === boundary.pendingTasks
4785 ? (0 === boundary.status && (boundary.status = 1),
4786 null !== segment &&
4787 segment.parentFlushed &&
4788 1 === segment.status &&
4789 queueCompletedSegment(boundary, segment),
4790 boundary.parentFlushed &&
4791 request.completedBoundaries.push(boundary),
4792 1 === boundary.status &&
4793 (boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request),
4794 boundary.fallbackAbortableTasks.clear()))
4795 : null !== segment &&
4796 segment.parentFlushed &&
4797 1 === segment.status &&
4798 (queueCompletedSegment(boundary, segment),
4799 1 === boundary.completedSegments.length &&
4800 boundary.parentFlushed &&
4801 request.partialBoundaries.push(boundary)));
4802 request.allPendingTasks--;
4803 0 === request.allPendingTasks && completeAll(request);
4804}
4805function performWork(request$jscomp$2) {
4806 if (2 !== request$jscomp$2.status) {
4807 var prevContext = currentActiveSnapshot,
4808 prevDispatcher = ReactSharedInternals.H;
4809 ReactSharedInternals.H = HooksDispatcher;
4810 var prevAsyncDispatcher = ReactSharedInternals.A;
4811 ReactSharedInternals.A = DefaultAsyncDispatcher;
4812 var prevRequest = currentRequest;
4813 currentRequest = request$jscomp$2;
4814 var prevResumableState = currentResumableState;
4815 currentResumableState = request$jscomp$2.resumableState;
4816 try {
4817 var pingedTasks = request$jscomp$2.pingedTasks,
4818 i;
4819 for (i = 0; i < pingedTasks.length; i++) {
4820 var task = pingedTasks[i],
4821 request = request$jscomp$2,
4822 segment = task.blockedSegment;
4823 if (null === segment) {
4824 var request$jscomp$0 = request;
4825 if (0 !== task.replay.pendingTasks) {
4826 switchContext(task.context);
4827 try {
4828 renderNodeDestructive(
4829 request$jscomp$0,
4830 task,
4831 task.node,
4832 task.childIndex
4833 );
4834 if (
4835 1 === task.replay.pendingTasks &&
4836 0 < task.replay.nodes.length
4837 )
4838 throw Error(
4839 "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
4840 );
4841 task.replay.pendingTasks--;
4842 task.abortSet.delete(task);
4843 finishedTask(request$jscomp$0, task.blockedBoundary, null);
4844 } catch (thrownValue) {
4845 resetHooksState();
4846 var x =
4847 thrownValue === SuspenseException
4848 ? getSuspendedThenable()
4849 : thrownValue;
4850 if (
4851 "object" === typeof x &&
4852 null !== x &&
4853 "function" === typeof x.then
4854 ) {
4855 var ping = task.ping;
4856 x.then(ping, ping);
4857 task.thenableState = getThenableStateAfterSuspending();
4858 null !== task.componentStack &&
4859 (task.componentStack = task.componentStack.parent);
4860 } else {
4861 task.replay.pendingTasks--;
4862 task.abortSet.delete(task);
4863 var errorInfo = getThrownInfo(
4864 request$jscomp$0,
4865 task.componentStack
4866 );
4867 request = void 0;
4868 var request$jscomp$1 = request$jscomp$0,
4869 boundary = task.blockedBoundary,
4870 error$jscomp$0 = x,
4871 replayNodes = task.replay.nodes,
4872 resumeSlots = task.replay.slots;
4873 request = logRecoverableError(
4874 request$jscomp$1,
4875 error$jscomp$0,
4876 errorInfo
4877 );
4878 abortRemainingReplayNodes(
4879 request$jscomp$1,
4880 boundary,
4881 replayNodes,
4882 resumeSlots,
4883 error$jscomp$0,
4884 request
4885 );
4886 request$jscomp$0.pendingRootTasks--;
4887 0 === request$jscomp$0.pendingRootTasks &&
4888 completeShell(request$jscomp$0);
4889 request$jscomp$0.allPendingTasks--;
4890 0 === request$jscomp$0.allPendingTasks &&
4891 completeAll(request$jscomp$0);
4892 }
4893 } finally {
4894 }
4895 }
4896 } else if (
4897 ((request$jscomp$0 = void 0),
4898 (request$jscomp$1 = segment),
4899 0 === request$jscomp$1.status)
4900 ) {
4901 switchContext(task.context);
4902 var childrenLength = request$jscomp$1.children.length,
4903 chunkLength = request$jscomp$1.chunks.length;
4904 try {
4905 renderNodeDestructive(request, task, task.node, task.childIndex),
4906 request$jscomp$1.lastPushedText &&
4907 request$jscomp$1.textEmbedded &&
4908 request$jscomp$1.chunks.push(textSeparator),
4909 task.abortSet.delete(task),
4910 (request$jscomp$1.status = 1),
4911 finishedTask(request, task.blockedBoundary, request$jscomp$1);
4912 } catch (thrownValue) {
4913 resetHooksState();
4914 request$jscomp$1.children.length = childrenLength;
4915 request$jscomp$1.chunks.length = chunkLength;
4916 var x$jscomp$0 =
4917 thrownValue === SuspenseException
4918 ? getSuspendedThenable()
4919 : thrownValue;
4920 if (
4921 "object" === typeof x$jscomp$0 &&
4922 null !== x$jscomp$0 &&
4923 "function" === typeof x$jscomp$0.then
4924 ) {
4925 var ping$jscomp$0 = task.ping;
4926 x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
4927 task.thenableState = getThenableStateAfterSuspending();
4928 null !== task.componentStack &&
4929 (task.componentStack = task.componentStack.parent);
4930 } else {
4931 var errorInfo$jscomp$0 = getThrownInfo(
4932 request,
4933 task.componentStack
4934 );
4935 task.abortSet.delete(task);
4936 request$jscomp$1.status = 4;
4937 var boundary$jscomp$0 = task.blockedBoundary;
4938 request$jscomp$0 = logRecoverableError(
4939 request,
4940 x$jscomp$0,
4941 errorInfo$jscomp$0
4942 );
4943 null === boundary$jscomp$0
4944 ? fatalError(request, x$jscomp$0)
4945 : (boundary$jscomp$0.pendingTasks--,
4946 4 !== boundary$jscomp$0.status &&
4947 ((boundary$jscomp$0.status = 4),
4948 (boundary$jscomp$0.errorDigest = request$jscomp$0),
4949 untrackBoundary(request, boundary$jscomp$0),
4950 boundary$jscomp$0.parentFlushed &&
4951 request.clientRenderedBoundaries.push(
4952 boundary$jscomp$0
4953 )));
4954 request.allPendingTasks--;
4955 0 === request.allPendingTasks && completeAll(request);
4956 }
4957 } finally {
4958 }
4959 }
4960 }
4961 pingedTasks.splice(0, i);
4962 null !== request$jscomp$2.destination &&
4963 flushCompletedQueues(request$jscomp$2, request$jscomp$2.destination);
4964 } catch (error) {
4965 logRecoverableError(request$jscomp$2, error, {}),
4966 fatalError(request$jscomp$2, error);
4967 } finally {
4968 (currentResumableState = prevResumableState),
4969 (ReactSharedInternals.H = prevDispatcher),
4970 (ReactSharedInternals.A = prevAsyncDispatcher),
4971 prevDispatcher === HooksDispatcher && switchContext(prevContext),
4972 (currentRequest = prevRequest);
4973 }
4974 }
4975}
4976function flushSubtree(request, destination, segment, hoistableState) {
4977 segment.parentFlushed = !0;
4978 switch (segment.status) {
4979 case 0:
4980 segment.id = request.nextSegmentId++;
4981 case 5:
4982 return (
4983 (hoistableState = segment.id),
4984 (segment.lastPushedText = !1),
4985 (segment.textEmbedded = !1),
4986 (request = request.renderState),
4987 writeChunk(destination, placeholder1),
4988 writeChunk(destination, request.placeholderPrefix),
4989 (request = hoistableState.toString(16)),
4990 writeChunk(destination, request),
4991 writeChunkAndReturn(destination, placeholder2)
4992 );
4993 case 1:
4994 segment.status = 2;
4995 var r = !0,
4996 chunks = segment.chunks,
4997 chunkIdx = 0;
4998 segment = segment.children;
4999 for (var childIdx = 0; childIdx < segment.length; childIdx++) {
5000 for (r = segment[childIdx]; chunkIdx < r.index; chunkIdx++)
5001 writeChunk(destination, chunks[chunkIdx]);
5002 r = flushSegment(request, destination, r, hoistableState);
5003 }
5004 for (; chunkIdx < chunks.length - 1; chunkIdx++)
5005 writeChunk(destination, chunks[chunkIdx]);
5006 chunkIdx < chunks.length &&
5007 (r = writeChunkAndReturn(destination, chunks[chunkIdx]));
5008 return r;
5009 default:
5010 throw Error(
5011 "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."
5012 );
5013 }
5014}
5015function flushSegment(request, destination, segment, hoistableState) {
5016 var boundary = segment.boundary;
5017 if (null === boundary)
5018 return flushSubtree(request, destination, segment, hoistableState);
5019 boundary.parentFlushed = !0;
5020 if (4 === boundary.status)
5021 (boundary = boundary.errorDigest),
5022 writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary),
5023 writeChunk(destination, clientRenderedSuspenseBoundaryError1),
5024 boundary &&
5025 (writeChunk(destination, clientRenderedSuspenseBoundaryError1A),
5026 writeChunk(destination, escapeTextForBrowser(boundary)),
5027 writeChunk(
5028 destination,
5029 clientRenderedSuspenseBoundaryErrorAttrInterstitial
5030 )),
5031 writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2),
5032 flushSubtree(request, destination, segment, hoistableState);
5033 else if (1 !== boundary.status)
5034 0 === boundary.status && (boundary.rootSegmentID = request.nextSegmentId++),
5035 0 < boundary.completedSegments.length &&
5036 request.partialBoundaries.push(boundary),
5037 writeStartPendingSuspenseBoundary(
5038 destination,
5039 request.renderState,
5040 boundary.rootSegmentID
5041 ),
5042 hoistableState &&
5043 ((boundary = boundary.fallbackState),
5044 boundary.styles.forEach(hoistStyleQueueDependency, hoistableState),
5045 boundary.stylesheets.forEach(
5046 hoistStylesheetDependency,
5047 hoistableState
5048 )),
5049 flushSubtree(request, destination, segment, hoistableState);
5050 else if (boundary.byteSize > request.progressiveChunkSize)
5051 (boundary.rootSegmentID = request.nextSegmentId++),
5052 request.completedBoundaries.push(boundary),
5053 writeStartPendingSuspenseBoundary(
5054 destination,
5055 request.renderState,
5056 boundary.rootSegmentID
5057 ),
5058 flushSubtree(request, destination, segment, hoistableState);
5059 else {
5060 hoistableState &&
5061 ((segment = boundary.contentState),
5062 segment.styles.forEach(hoistStyleQueueDependency, hoistableState),
5063 segment.stylesheets.forEach(hoistStylesheetDependency, hoistableState));
5064 writeChunkAndReturn(destination, startCompletedSuspenseBoundary);
5065 segment = boundary.completedSegments;
5066 if (1 !== segment.length)
5067 throw Error(
5068 "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
5069 );
5070 flushSegment(request, destination, segment[0], hoistableState);
5071 }
5072 return writeChunkAndReturn(destination, endSuspenseBoundary);
5073}
5074function flushSegmentContainer(request, destination, segment, hoistableState) {
5075 writeStartSegment(
5076 destination,
5077 request.renderState,
5078 segment.parentFormatContext,
5079 segment.id
5080 );
5081 flushSegment(request, destination, segment, hoistableState);
5082 return writeEndSegment(destination, segment.parentFormatContext);
5083}
5084function flushCompletedBoundary(request, destination, boundary) {
5085 for (
5086 var completedSegments = boundary.completedSegments, i = 0;
5087 i < completedSegments.length;
5088 i++
5089 )
5090 flushPartiallyCompletedSegment(
5091 request,
5092 destination,
5093 boundary,
5094 completedSegments[i]
5095 );
5096 completedSegments.length = 0;
5097 writeHoistablesForBoundary(
5098 destination,
5099 boundary.contentState,
5100 request.renderState
5101 );
5102 completedSegments = request.resumableState;
5103 request = request.renderState;
5104 i = boundary.rootSegmentID;
5105 boundary = boundary.contentState;
5106 var requiresStyleInsertion = request.stylesToHoist;
5107 request.stylesToHoist = !1;
5108 writeChunk(destination, request.startInlineScript);
5109 requiresStyleInsertion
5110 ? 0 === (completedSegments.instructions & 2)
5111 ? ((completedSegments.instructions |= 10),
5112 writeChunk(destination, completeBoundaryWithStylesScript1FullBoth))
5113 : 0 === (completedSegments.instructions & 8)
5114 ? ((completedSegments.instructions |= 8),
5115 writeChunk(destination, completeBoundaryWithStylesScript1FullPartial))
5116 : writeChunk(destination, completeBoundaryWithStylesScript1Partial)
5117 : 0 === (completedSegments.instructions & 2)
5118 ? ((completedSegments.instructions |= 2),
5119 writeChunk(destination, completeBoundaryScript1Full))
5120 : writeChunk(destination, completeBoundaryScript1Partial);
5121 completedSegments = i.toString(16);
5122 writeChunk(destination, request.boundaryPrefix);
5123 writeChunk(destination, completedSegments);
5124 writeChunk(destination, completeBoundaryScript2);
5125 writeChunk(destination, request.segmentPrefix);
5126 writeChunk(destination, completedSegments);
5127 requiresStyleInsertion
5128 ? (writeChunk(destination, completeBoundaryScript3a),
5129 writeStyleResourceDependenciesInJS(destination, boundary))
5130 : writeChunk(destination, completeBoundaryScript3b);
5131 boundary = writeChunkAndReturn(destination, completeBoundaryScriptEnd);
5132 return writeBootstrap(destination, request) && boundary;
5133}
5134function flushPartiallyCompletedSegment(
5135 request,
5136 destination,
5137 boundary,
5138 segment
5139) {
5140 if (2 === segment.status) return !0;
5141 var hoistableState = boundary.contentState,
5142 segmentID = segment.id;
5143 if (-1 === segmentID) {
5144 if (-1 === (segment.id = boundary.rootSegmentID))
5145 throw Error(
5146 "A root segment ID must have been assigned by now. This is a bug in React."
5147 );
5148 return flushSegmentContainer(request, destination, segment, hoistableState);
5149 }
5150 if (segmentID === boundary.rootSegmentID)
5151 return flushSegmentContainer(request, destination, segment, hoistableState);
5152 flushSegmentContainer(request, destination, segment, hoistableState);
5153 boundary = request.resumableState;
5154 request = request.renderState;
5155 writeChunk(destination, request.startInlineScript);
5156 0 === (boundary.instructions & 1)
5157 ? ((boundary.instructions |= 1),
5158 writeChunk(destination, completeSegmentScript1Full))
5159 : writeChunk(destination, completeSegmentScript1Partial);
5160 writeChunk(destination, request.segmentPrefix);
5161 segmentID = segmentID.toString(16);
5162 writeChunk(destination, segmentID);
5163 writeChunk(destination, completeSegmentScript2);
5164 writeChunk(destination, request.placeholderPrefix);
5165 writeChunk(destination, segmentID);
5166 destination = writeChunkAndReturn(destination, completeSegmentScriptEnd);
5167 return destination;
5168}
5169function flushCompletedQueues(request, destination) {
5170 currentView = new Uint8Array(2048);
5171 writtenBytes = 0;
5172 destinationHasCapacity$1 = !0;
5173 try {
5174 if (!(0 < request.pendingRootTasks)) {
5175 var i,
5176 completedRootSegment = request.completedRootSegment;
5177 if (null !== completedRootSegment) {
5178 if (5 === completedRootSegment.status) return;
5179 var renderState = request.renderState,
5180 htmlChunks = renderState.htmlChunks,
5181 headChunks = renderState.headChunks,
5182 i$jscomp$0;
5183 if (htmlChunks) {
5184 for (i$jscomp$0 = 0; i$jscomp$0 < htmlChunks.length; i$jscomp$0++)
5185 writeChunk(destination, htmlChunks[i$jscomp$0]);
5186 if (headChunks)
5187 for (i$jscomp$0 = 0; i$jscomp$0 < headChunks.length; i$jscomp$0++)
5188 writeChunk(destination, headChunks[i$jscomp$0]);
5189 else
5190 writeChunk(destination, startChunkForTag("head")),
5191 writeChunk(destination, endOfStartTag);
5192 } else if (headChunks)
5193 for (i$jscomp$0 = 0; i$jscomp$0 < headChunks.length; i$jscomp$0++)
5194 writeChunk(destination, headChunks[i$jscomp$0]);
5195 var charsetChunks = renderState.charsetChunks;
5196 for (i$jscomp$0 = 0; i$jscomp$0 < charsetChunks.length; i$jscomp$0++)
5197 writeChunk(destination, charsetChunks[i$jscomp$0]);
5198 charsetChunks.length = 0;
5199 renderState.preconnects.forEach(flushResource, destination);
5200 renderState.preconnects.clear();
5201 var viewportChunks = renderState.viewportChunks;
5202 for (i$jscomp$0 = 0; i$jscomp$0 < viewportChunks.length; i$jscomp$0++)
5203 writeChunk(destination, viewportChunks[i$jscomp$0]);
5204 viewportChunks.length = 0;
5205 renderState.fontPreloads.forEach(flushResource, destination);
5206 renderState.fontPreloads.clear();
5207 renderState.highImagePreloads.forEach(flushResource, destination);
5208 renderState.highImagePreloads.clear();
5209 renderState.styles.forEach(flushStylesInPreamble, destination);
5210 var importMapChunks = renderState.importMapChunks;
5211 for (i$jscomp$0 = 0; i$jscomp$0 < importMapChunks.length; i$jscomp$0++)
5212 writeChunk(destination, importMapChunks[i$jscomp$0]);
5213 importMapChunks.length = 0;
5214 renderState.bootstrapScripts.forEach(flushResource, destination);
5215 renderState.scripts.forEach(flushResource, destination);
5216 renderState.scripts.clear();
5217 renderState.bulkPreloads.forEach(flushResource, destination);
5218 renderState.bulkPreloads.clear();
5219 var hoistableChunks = renderState.hoistableChunks;
5220 for (i$jscomp$0 = 0; i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
5221 writeChunk(destination, hoistableChunks[i$jscomp$0]);
5222 hoistableChunks.length = 0;
5223 htmlChunks &&
5224 null === headChunks &&
5225 writeChunk(destination, endChunkForTag("head"));
5226 flushSegment(request, destination, completedRootSegment, null);
5227 request.completedRootSegment = null;
5228 writeBootstrap(destination, request.renderState);
5229 }
5230 var renderState$jscomp$0 = request.renderState;
5231 completedRootSegment = 0;
5232 var viewportChunks$jscomp$0 = renderState$jscomp$0.viewportChunks;
5233 for (
5234 completedRootSegment = 0;
5235 completedRootSegment < viewportChunks$jscomp$0.length;
5236 completedRootSegment++
5237 )
5238 writeChunk(destination, viewportChunks$jscomp$0[completedRootSegment]);
5239 viewportChunks$jscomp$0.length = 0;
5240 renderState$jscomp$0.preconnects.forEach(flushResource, destination);
5241 renderState$jscomp$0.preconnects.clear();
5242 renderState$jscomp$0.fontPreloads.forEach(flushResource, destination);
5243 renderState$jscomp$0.fontPreloads.clear();
5244 renderState$jscomp$0.highImagePreloads.forEach(
5245 flushResource,
5246 destination
5247 );
5248 renderState$jscomp$0.highImagePreloads.clear();
5249 renderState$jscomp$0.styles.forEach(preloadLateStyles, destination);
5250 renderState$jscomp$0.scripts.forEach(flushResource, destination);
5251 renderState$jscomp$0.scripts.clear();
5252 renderState$jscomp$0.bulkPreloads.forEach(flushResource, destination);
5253 renderState$jscomp$0.bulkPreloads.clear();
5254 var hoistableChunks$jscomp$0 = renderState$jscomp$0.hoistableChunks;
5255 for (
5256 completedRootSegment = 0;
5257 completedRootSegment < hoistableChunks$jscomp$0.length;
5258 completedRootSegment++
5259 )
5260 writeChunk(destination, hoistableChunks$jscomp$0[completedRootSegment]);
5261 hoistableChunks$jscomp$0.length = 0;
5262 var clientRenderedBoundaries = request.clientRenderedBoundaries;
5263 for (i = 0; i < clientRenderedBoundaries.length; i++) {
5264 var boundary = clientRenderedBoundaries[i];
5265 renderState$jscomp$0 = destination;
5266 var resumableState = request.resumableState,
5267 renderState$jscomp$1 = request.renderState,
5268 id = boundary.rootSegmentID,
5269 errorDigest = boundary.errorDigest;
5270 writeChunk(
5271 renderState$jscomp$0,
5272 renderState$jscomp$1.startInlineScript
5273 );
5274 0 === (resumableState.instructions & 4)
5275 ? ((resumableState.instructions |= 4),
5276 writeChunk(renderState$jscomp$0, clientRenderScript1Full))
5277 : writeChunk(renderState$jscomp$0, clientRenderScript1Partial);
5278 writeChunk(renderState$jscomp$0, renderState$jscomp$1.boundaryPrefix);
5279 writeChunk(renderState$jscomp$0, id.toString(16));
5280 writeChunk(renderState$jscomp$0, clientRenderScript1A);
5281 errorDigest &&
5282 (writeChunk(
5283 renderState$jscomp$0,
5284 clientRenderErrorScriptArgInterstitial
5285 ),
5286 writeChunk(
5287 renderState$jscomp$0,
5288 escapeJSStringsForInstructionScripts(errorDigest || "")
5289 ));
5290 var JSCompiler_inline_result = writeChunkAndReturn(
5291 renderState$jscomp$0,
5292 clientRenderScriptEnd
5293 );
5294 if (!JSCompiler_inline_result) {
5295 request.destination = null;
5296 i++;
5297 clientRenderedBoundaries.splice(0, i);
5298 return;
5299 }
5300 }
5301 clientRenderedBoundaries.splice(0, i);
5302 var completedBoundaries = request.completedBoundaries;
5303 for (i = 0; i < completedBoundaries.length; i++)
5304 if (
5305 !flushCompletedBoundary(request, destination, completedBoundaries[i])
5306 ) {
5307 request.destination = null;
5308 i++;
5309 completedBoundaries.splice(0, i);
5310 return;
5311 }
5312 completedBoundaries.splice(0, i);
5313 completeWriting(destination);
5314 currentView = new Uint8Array(2048);
5315 writtenBytes = 0;
5316 destinationHasCapacity$1 = !0;
5317 var partialBoundaries = request.partialBoundaries;
5318 for (i = 0; i < partialBoundaries.length; i++) {
5319 var boundary$44 = partialBoundaries[i];
5320 a: {
5321 clientRenderedBoundaries = request;
5322 boundary = destination;
5323 var completedSegments = boundary$44.completedSegments;
5324 for (
5325 JSCompiler_inline_result = 0;
5326 JSCompiler_inline_result < completedSegments.length;
5327 JSCompiler_inline_result++
5328 )
5329 if (
5330 !flushPartiallyCompletedSegment(
5331 clientRenderedBoundaries,
5332 boundary,
5333 boundary$44,
5334 completedSegments[JSCompiler_inline_result]
5335 )
5336 ) {
5337 JSCompiler_inline_result++;
5338 completedSegments.splice(0, JSCompiler_inline_result);
5339 var JSCompiler_inline_result$jscomp$0 = !1;
5340 break a;
5341 }
5342 completedSegments.splice(0, JSCompiler_inline_result);
5343 JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
5344 boundary,
5345 boundary$44.contentState,
5346 clientRenderedBoundaries.renderState
5347 );
5348 }
5349 if (!JSCompiler_inline_result$jscomp$0) {
5350 request.destination = null;
5351 i++;
5352 partialBoundaries.splice(0, i);
5353 return;
5354 }
5355 }
5356 partialBoundaries.splice(0, i);
5357 var largeBoundaries = request.completedBoundaries;
5358 for (i = 0; i < largeBoundaries.length; i++)
5359 if (!flushCompletedBoundary(request, destination, largeBoundaries[i])) {
5360 request.destination = null;
5361 i++;
5362 largeBoundaries.splice(0, i);
5363 return;
5364 }
5365 largeBoundaries.splice(0, i);
5366 }
5367 } finally {
5368 0 === request.allPendingTasks &&
5369 0 === request.pingedTasks.length &&
5370 0 === request.clientRenderedBoundaries.length &&
5371 0 === request.completedBoundaries.length
5372 ? ((request.flushScheduled = !1),
5373 (i = request.resumableState),
5374 i.hasBody && writeChunk(destination, endChunkForTag("body")),
5375 i.hasHtml && writeChunk(destination, endChunkForTag("html")),
5376 completeWriting(destination),
5377 flushBuffered(destination),
5378 destination.end(),
5379 (request.destination = null))
5380 : (completeWriting(destination), flushBuffered(destination));
5381 }
5382}
5383function startWork(request) {
5384 request.flushScheduled = null !== request.destination;
5385 setImmediate(function () {
5386 return requestStorage.run(request, performWork, request);
5387 });
5388 null === request.trackedPostpones &&
5389 setImmediate(function () {
5390 return requestStorage.run(
5391 request,
5392 enqueueEarlyPreloadsAfterInitialWork,
5393 request
5394 );
5395 });
5396}
5397function enqueueEarlyPreloadsAfterInitialWork(request) {
5398 safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);
5399}
5400function enqueueFlush(request) {
5401 !1 === request.flushScheduled &&
5402 0 === request.pingedTasks.length &&
5403 null !== request.destination &&
5404 ((request.flushScheduled = !0),
5405 setImmediate(function () {
5406 var destination = request.destination;
5407 destination
5408 ? flushCompletedQueues(request, destination)
5409 : (request.flushScheduled = !1);
5410 }));
5411}
5412function startFlowing(request, destination) {
5413 if (1 === request.status)
5414 (request.status = 2), destination.destroy(request.fatalError);
5415 else if (2 !== request.status && null === request.destination) {
5416 request.destination = destination;
5417 try {
5418 flushCompletedQueues(request, destination);
5419 } catch (error) {
5420 logRecoverableError(request, error, {}), fatalError(request, error);
5421 }
5422 }
5423}
5424function abort(request, reason) {
5425 try {
5426 var abortableTasks = request.abortableTasks;
5427 if (0 < abortableTasks.size) {
5428 var error =
5429 void 0 === reason
5430 ? Error("The render was aborted by the server without a reason.")
5431 : reason;
5432 abortableTasks.forEach(function (task) {
5433 return abortTask(task, request, error);
5434 });
5435 abortableTasks.clear();
5436 }
5437 null !== request.destination &&
5438 flushCompletedQueues(request, request.destination);
5439 } catch (error$46) {
5440 logRecoverableError(request, error$46, {}), fatalError(request, error$46);
5441 }
5442}
5443function createDrainHandler(destination, request) {
5444 return function () {
5445 return startFlowing(request, destination);
5446 };
5447}
5448function createCancelHandler(request, reason) {
5449 return function () {
5450 request.destination = null;
5451 abort(request, Error(reason));
5452 };
5453}
5454function createRequestImpl(children, options) {
5455 var JSCompiler_inline_result = options ? options.identifierPrefix : void 0;
5456 JSCompiler_inline_result = {
5457 idPrefix:
5458 void 0 === JSCompiler_inline_result ? "" : JSCompiler_inline_result,
5459 nextFormID: 0,
5460 streamingFormat: 0,
5461 bootstrapScriptContent: options ? options.bootstrapScriptContent : void 0,
5462 bootstrapScripts: options ? options.bootstrapScripts : void 0,
5463 bootstrapModules: options ? options.bootstrapModules : void 0,
5464 instructions: 0,
5465 hasBody: !1,
5466 hasHtml: !1,
5467 unknownResources: {},
5468 dnsResources: {},
5469 connectResources: { default: {}, anonymous: {}, credentials: {} },
5470 imageResources: {},
5471 styleResources: {},
5472 scriptResources: {},
5473 moduleUnknownResources: {},
5474 moduleScriptResources: {}
5475 };
5476 var nonce = options ? options.nonce : void 0,
5477 importMap = options ? options.importMap : void 0,
5478 onHeaders = options ? options.onHeaders : void 0,
5479 maxHeadersLength = options ? options.maxHeadersLength : void 0,
5480 inlineScriptWithNonce =
5481 void 0 === nonce
5482 ? startInlineScript
5483 : stringToPrecomputedChunk(
5484 '<script nonce="' + escapeTextForBrowser(nonce) + '">'
5485 ),
5486 idPrefix = JSCompiler_inline_result.idPrefix,
5487 bootstrapChunks = [],
5488 bootstrapScriptContent = JSCompiler_inline_result.bootstrapScriptContent,
5489 bootstrapScripts = JSCompiler_inline_result.bootstrapScripts,
5490 bootstrapModules = JSCompiler_inline_result.bootstrapModules;
5491 void 0 !== bootstrapScriptContent &&
5492 bootstrapChunks.push(
5493 inlineScriptWithNonce,
5494 ("" + bootstrapScriptContent).replace(scriptRegex, scriptReplacer),
5495 endInlineScript
5496 );
5497 bootstrapScriptContent = [];
5498 void 0 !== importMap &&
5499 (bootstrapScriptContent.push(importMapScriptStart),
5500 bootstrapScriptContent.push(
5501 ("" + JSON.stringify(importMap)).replace(scriptRegex, scriptReplacer)
5502 ),
5503 bootstrapScriptContent.push(importMapScriptEnd));
5504 importMap = onHeaders
5505 ? {
5506 preconnects: "",
5507 fontPreloads: "",
5508 highImagePreloads: "",
5509 remainingCapacity:
5510 "number" === typeof maxHeadersLength ? maxHeadersLength : 2e3
5511 }
5512 : null;
5513 onHeaders = {
5514 placeholderPrefix: stringToPrecomputedChunk(idPrefix + "P:"),
5515 segmentPrefix: stringToPrecomputedChunk(idPrefix + "S:"),
5516 boundaryPrefix: stringToPrecomputedChunk(idPrefix + "B:"),
5517 startInlineScript: inlineScriptWithNonce,
5518 htmlChunks: null,
5519 headChunks: null,
5520 externalRuntimeScript: null,
5521 bootstrapChunks: bootstrapChunks,
5522 importMapChunks: bootstrapScriptContent,
5523 onHeaders: onHeaders,
5524 headers: importMap,
5525 resets: {
5526 font: {},
5527 dns: {},
5528 connect: { default: {}, anonymous: {}, credentials: {} },
5529 image: {},
5530 style: {}
5531 },
5532 charsetChunks: [],
5533 viewportChunks: [],
5534 hoistableChunks: [],
5535 preconnects: new Set(),
5536 fontPreloads: new Set(),
5537 highImagePreloads: new Set(),
5538 styles: new Map(),
5539 bootstrapScripts: new Set(),
5540 scripts: new Set(),
5541 bulkPreloads: new Set(),
5542 preloads: {
5543 images: new Map(),
5544 stylesheets: new Map(),
5545 scripts: new Map(),
5546 moduleScripts: new Map()
5547 },
5548 nonce: nonce,
5549 hoistableState: null,
5550 stylesToHoist: !1
5551 };
5552 if (void 0 !== bootstrapScripts)
5553 for (
5554 inlineScriptWithNonce = 0;
5555 inlineScriptWithNonce < bootstrapScripts.length;
5556 inlineScriptWithNonce++
5557 ) {
5558 var scriptConfig = bootstrapScripts[inlineScriptWithNonce];
5559 maxHeadersLength = importMap = void 0;
5560 bootstrapScriptContent = {
5561 rel: "preload",
5562 as: "script",
5563 fetchPriority: "low",
5564 nonce: nonce
5565 };
5566 "string" === typeof scriptConfig
5567 ? (bootstrapScriptContent.href = idPrefix = scriptConfig)
5568 : ((bootstrapScriptContent.href = idPrefix = scriptConfig.src),
5569 (bootstrapScriptContent.integrity = maxHeadersLength =
5570 "string" === typeof scriptConfig.integrity
5571 ? scriptConfig.integrity
5572 : void 0),
5573 (bootstrapScriptContent.crossOrigin = importMap =
5574 "string" === typeof scriptConfig || null == scriptConfig.crossOrigin
5575 ? void 0
5576 : "use-credentials" === scriptConfig.crossOrigin
5577 ? "use-credentials"
5578 : ""));
5579 scriptConfig = JSCompiler_inline_result;
5580 var href = idPrefix;
5581 scriptConfig.scriptResources[href] = null;
5582 scriptConfig.moduleScriptResources[href] = null;
5583 scriptConfig = [];
5584 pushLinkImpl(scriptConfig, bootstrapScriptContent);
5585 onHeaders.bootstrapScripts.add(scriptConfig);
5586 bootstrapChunks.push(startScriptSrc, escapeTextForBrowser(idPrefix));
5587 nonce && bootstrapChunks.push(scriptNonce, escapeTextForBrowser(nonce));
5588 "string" === typeof maxHeadersLength &&
5589 bootstrapChunks.push(
5590 scriptIntegirty,
5591 escapeTextForBrowser(maxHeadersLength)
5592 );
5593 "string" === typeof importMap &&
5594 bootstrapChunks.push(
5595 scriptCrossOrigin,
5596 escapeTextForBrowser(importMap)
5597 );
5598 bootstrapChunks.push(endAsyncScript);
5599 }
5600 if (void 0 !== bootstrapModules)
5601 for (
5602 bootstrapScripts = 0;
5603 bootstrapScripts < bootstrapModules.length;
5604 bootstrapScripts++
5605 )
5606 (bootstrapScriptContent = bootstrapModules[bootstrapScripts]),
5607 (importMap = idPrefix = void 0),
5608 (maxHeadersLength = {
5609 rel: "modulepreload",
5610 fetchPriority: "low",
5611 nonce: nonce
5612 }),
5613 "string" === typeof bootstrapScriptContent
5614 ? (maxHeadersLength.href = inlineScriptWithNonce =
5615 bootstrapScriptContent)
5616 : ((maxHeadersLength.href = inlineScriptWithNonce =
5617 bootstrapScriptContent.src),
5618 (maxHeadersLength.integrity = importMap =
5619 "string" === typeof bootstrapScriptContent.integrity
5620 ? bootstrapScriptContent.integrity
5621 : void 0),
5622 (maxHeadersLength.crossOrigin = idPrefix =
5623 "string" === typeof bootstrapScriptContent ||
5624 null == bootstrapScriptContent.crossOrigin
5625 ? void 0
5626 : "use-credentials" === bootstrapScriptContent.crossOrigin
5627 ? "use-credentials"
5628 : "")),
5629 (bootstrapScriptContent = JSCompiler_inline_result),
5630 (scriptConfig = inlineScriptWithNonce),
5631 (bootstrapScriptContent.scriptResources[scriptConfig] = null),
5632 (bootstrapScriptContent.moduleScriptResources[scriptConfig] = null),
5633 (bootstrapScriptContent = []),
5634 pushLinkImpl(bootstrapScriptContent, maxHeadersLength),
5635 onHeaders.bootstrapScripts.add(bootstrapScriptContent),
5636 bootstrapChunks.push(
5637 startModuleSrc,
5638 escapeTextForBrowser(inlineScriptWithNonce)
5639 ),
5640 nonce && bootstrapChunks.push(scriptNonce, escapeTextForBrowser(nonce)),
5641 "string" === typeof importMap &&
5642 bootstrapChunks.push(
5643 scriptIntegirty,
5644 escapeTextForBrowser(importMap)
5645 ),
5646 "string" === typeof idPrefix &&
5647 bootstrapChunks.push(
5648 scriptCrossOrigin,
5649 escapeTextForBrowser(idPrefix)
5650 ),
5651 bootstrapChunks.push(endAsyncScript);
5652 nonce = options ? options.namespaceURI : void 0;
5653 nonce = createFormatContext(
5654 "http://www.w3.org/2000/svg" === nonce
5655 ? 3
5656 : "http://www.w3.org/1998/Math/MathML" === nonce
5657 ? 4
5658 : 0,
5659 null,
5660 0
5661 );
5662 bootstrapModules = options ? options.progressiveChunkSize : void 0;
5663 bootstrapScripts = options ? options.onError : void 0;
5664 inlineScriptWithNonce = options ? options.onAllReady : void 0;
5665 idPrefix = options ? options.onShellReady : void 0;
5666 importMap = options ? options.onShellError : void 0;
5667 maxHeadersLength = options ? options.onPostpone : void 0;
5668 bootstrapScriptContent = options ? options.formState : void 0;
5669 options = [];
5670 bootstrapChunks = new Set();
5671 JSCompiler_inline_result = {
5672 destination: null,
5673 flushScheduled: !1,
5674 resumableState: JSCompiler_inline_result,
5675 renderState: onHeaders,
5676 rootFormatContext: nonce,
5677 progressiveChunkSize:
5678 void 0 === bootstrapModules ? 12800 : bootstrapModules,
5679 status: 0,
5680 fatalError: null,
5681 nextSegmentId: 0,
5682 allPendingTasks: 0,
5683 pendingRootTasks: 0,
5684 completedRootSegment: null,
5685 abortableTasks: bootstrapChunks,
5686 pingedTasks: options,
5687 clientRenderedBoundaries: [],
5688 completedBoundaries: [],
5689 partialBoundaries: [],
5690 trackedPostpones: null,
5691 onError:
5692 void 0 === bootstrapScripts ? defaultErrorHandler : bootstrapScripts,
5693 onPostpone: void 0 === maxHeadersLength ? noop : maxHeadersLength,
5694 onAllReady: void 0 === inlineScriptWithNonce ? noop : inlineScriptWithNonce,
5695 onShellReady: void 0 === idPrefix ? noop : idPrefix,
5696 onShellError: void 0 === importMap ? noop : importMap,
5697 onFatalError: noop,
5698 formState: void 0 === bootstrapScriptContent ? null : bootstrapScriptContent
5699 };
5700 onHeaders = createPendingSegment(
5701 JSCompiler_inline_result,
5702 0,
5703 null,
5704 nonce,
5705 !1,
5706 !1
5707 );
5708 onHeaders.parentFlushed = !0;
5709 children = createRenderTask(
5710 JSCompiler_inline_result,
5711 null,
5712 children,
5713 -1,
5714 null,
5715 onHeaders,
5716 null,
5717 bootstrapChunks,
5718 null,
5719 nonce,
5720 emptyContextObject,
5721 null,
5722 emptyTreeContext,
5723 null,
5724 !1
5725 );
5726 options.push(children);
5727 return JSCompiler_inline_result;
5728}
5729exports.renderToPipeableStream = function (children, options) {
5730 var request = createRequestImpl(children, options),
5731 hasStartedFlowing = !1;
5732 startWork(request);
5733 return {
5734 pipe: function (destination) {
5735 if (hasStartedFlowing)
5736 throw Error(
5737 "React currently only supports piping to one writable stream."
5738 );
5739 hasStartedFlowing = !0;
5740 safelyEmitEarlyPreloads(
5741 request,
5742 null === request.trackedPostpones
5743 ? 0 === request.pendingRootTasks
5744 : null === request.completedRootSegment
5745 ? 0 === request.pendingRootTasks
5746 : 5 !== request.completedRootSegment.status
5747 );
5748 startFlowing(request, destination);
5749 destination.on("drain", createDrainHandler(destination, request));
5750 destination.on(
5751 "error",
5752 createCancelHandler(
5753 request,
5754 "The destination stream errored while writing data."
5755 )
5756 );
5757 destination.on(
5758 "close",
5759 createCancelHandler(request, "The destination stream closed early.")
5760 );
5761 return destination;
5762 },
5763 abort: function (reason) {
5764 abort(request, reason);
5765 }
5766 };
5767};
5768exports.version = "19.0.0-beta-4508873393-20240430";