1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- /**
- * @license React
- * react-server-dom-webpack-writer.browser.production.min.server.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- 'use strict';var e=require("react"),l=null,m=0;function n(a,c){if(0!==c.length)if(512<c.length)0<m&&(a.enqueue(new Uint8Array(l.buffer,0,m)),l=new Uint8Array(512),m=0),a.enqueue(c);else{var d=l.length-m;d<c.length&&(0===d?a.enqueue(l):(l.set(c.subarray(0,d),m),a.enqueue(l),c=c.subarray(d)),l=new Uint8Array(512),m=0);l.set(c,m);m+=c.length}return!0}var p=new TextEncoder;function q(a){return p.encode(a)}function u(a,c){"function"===typeof a.error?a.error(c):a.close()}
- var v=JSON.stringify,w=Symbol.for("react.module.reference"),x=Symbol.for("react.element"),aa=Symbol.for("react.fragment"),ba=Symbol.for("react.provider"),ca=Symbol.for("react.server_context"),da=Symbol.for("react.forward_ref"),ea=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),fa=Symbol.for("react.default_value");
- function A(a,c,d,b,f,g,h){this.acceptsBooleans=2===c||3===c||4===c;this.attributeName=b;this.attributeNamespace=f;this.mustUseProperty=d;this.propertyName=a;this.type=c;this.sanitizeURL=g;this.removeEmptyString=h}var ha="children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ");ha.push("innerText","textContent");ha.forEach(function(a){new A(a,0,!1,a,null,!1,!1)});
- [["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new A(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new A(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new A(a,2,!1,a,null,!1,!1)});
- "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){new A(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){new A(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){new A(a,4,!1,a,null,!1,!1)});
- ["cols","rows","size","span"].forEach(function(a){new A(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){new A(a,5,!1,a.toLowerCase(),null,!1,!1)});var B=/[\-:]([a-z])/g;function C(a){return a[1].toUpperCase()}
- "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var c=a.replace(B,
- C);new A(c,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var c=a.replace(B,C);new A(c,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var c=a.replace(B,C);new A(c,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){new A(a,1,!1,a.toLowerCase(),null,!1,!1)});
- new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){new A(a,1,!1,a.toLowerCase(),null,!0,!0)});
- var D={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,
- fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ia=["Webkit","ms","Moz","O"];Object.keys(D).forEach(function(a){ia.forEach(function(c){c=c+a.charAt(0).toUpperCase()+a.substring(1);D[c]=D[a]})});var ja=Array.isArray;q("<script>");q("\x3c/script>");q('<script src="');q('<script type="module" src="');q('" integrity="');q('" async="">\x3c/script>');q("\x3c!-- --\x3e");q(' style="');q(":");q(";");q(" ");q('="');q('"');
- q('=""');q(">");q("/>");q(' selected=""');q("\n");q("<!DOCTYPE html>");q("</");q(">");q('<template id="');q('"></template>');q("\x3c!--$--\x3e");q('\x3c!--$?--\x3e<template id="');q('"></template>');q("\x3c!--$!--\x3e");q("\x3c!--/$--\x3e");q("<template");q('"');q(' data-dgst="');q(' data-msg="');q(' data-stck="');q("></template>");q('<div hidden id="');q('">');q("</div>");q('<svg aria-hidden="true" style="display:none" id="');q('">');q("</svg>");q('<math aria-hidden="true" style="display:none" id="');
- q('">');q("</math>");q('<table hidden id="');q('">');q("</table>");q('<table hidden><tbody id="');q('">');q("</tbody></table>");q('<table hidden><tr id="');q('">');q("</tr></table>");q('<table hidden><colgroup id="');q('">');q("</colgroup></table>");q('function $RS(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("');q('$RS("');q('","');q('")\x3c/script>');q('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("');
- q('$RC("');q('","');q('")\x3c/script>');q('function $RX(b,c,d,e){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),b._reactRetry&&b._reactRetry())};$RX("');q('$RX("');q('"');q(")\x3c/script>");q(",");var E=null;
- function F(a,c){if(a!==c){a.context._currentValue=a.parentValue;a=a.parent;var d=c.parent;if(null===a){if(null!==d)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===d)throw Error("The stacks must reach the root at the same time. This is a bug in React.");F(a,d);c.context._currentValue=c.value}}}function ka(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&ka(a)}
- function la(a){var c=a.parent;null!==c&&la(c);a.context._currentValue=a.value}function ma(a,c){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?F(a,c):ma(a,c)}
- function na(a,c){var d=c.parent;if(null===d)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===d.depth?F(a,d):na(a,d);c.context._currentValue=c.value}function G(a){var c=E;c!==a&&(null===c?la(a):null===a?ka(c):c.depth===a.depth?F(c,a):c.depth>a.depth?ma(c,a):na(c,a),E=a)}function oa(a,c){var d=a._currentValue;a._currentValue=c;var b=E;return E=a={parent:b,depth:null===b?0:b.depth+1,context:a,parentValue:d,value:c}}
- function pa(a){switch(a.status){case "fulfilled":case "rejected":break;default:"string"!==typeof a.status&&(a.status="pending",a.then(function(c){"pending"===a.status&&(a.status="fulfilled",a.value=c)},function(c){"pending"===a.status&&(a.status="rejected",a.reason=c)}))}}var H=null,I=0,J=null;function qa(){var a=J;J=null;return a}function ra(a){return a._currentValue}
- var wa={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:K,useTransition:K,getCacheForType:function(a){if(!L)throw Error("Reading the cache is only supported while rendering.");var c=L.get(a);void 0===c&&(c=a(),L.set(a,c));return c},readContext:ra,useContext:ra,useReducer:K,useRef:K,useState:K,useInsertionEffect:K,useLayoutEffect:K,useImperativeHandle:K,useEffect:K,useId:ta,useMutableSource:K,useSyncExternalStore:K,useCacheRefresh:function(){return ua},
- useMemoCache:function(a){return Array(a)},use:va};function K(){throw Error("This Hook is not supported in Server Components.");}function ua(){if(!L)throw Error("Refreshing the cache is not supported in Server Components.");}var L=null;function ta(){if(null===H)throw Error("useId can only be used while React is rendering");var a=H.identifierCount++;return":"+H.identifierPrefix+"S"+a.toString(32)+":"}
- function va(a){if(null!==a&&"object"===typeof a)if("function"===typeof a.then){var c=I;I+=1;switch(a.status){case "fulfilled":return a.value;case "rejected":throw a.reason;default:a:{if(null!==J){var d=J[c];if(void 0!==d)break a}d=null}if(null!==d)switch(d.status){case "fulfilled":return d.value;case "rejected":throw d.reason;default:throw d;}else throw null===J&&(J=[]),J[c]=a,a;}}else if(a.$$typeof===ca)return a._currentValue;throw Error("An unsupported type was passed to use(): "+String(a));}
- var xa=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,M=xa.ContextRegistry,N=xa.ReactCurrentDispatcher;function ya(a){console.error(a)}
- function za(a,c,d,b,f){var g=new Set,h=[],k={status:0,fatalError:null,destination:null,bundlerConfig:c,cache:new Map,nextChunkId:0,pendingChunks:0,abortableTasks:g,pingedTasks:h,completedModuleChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenModules:new Map,writtenProviders:new Map,identifierPrefix:f||"",identifierCount:1,onError:void 0===d?ya:d,toJSON:function(a,b){return Aa(k,this,a,b)}};k.pendingChunks++;c=Ba(b);a=Ca(k,a,c,g);h.push(a);return k}var Da={};
- function O(a,c,d,b,f){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in server components, nor passed to client components.");if("function"===typeof a){if(a.$$typeof===w)return[x,a,c,b];I=0;J=f;return a(b)}if("string"===typeof a)return[x,a,c,b];if("symbol"===typeof a)return a===aa?b.children:[x,a,c,b];if(null!=a&&"object"===typeof a){if(a.$$typeof===w)return[x,a,c,b];switch(a.$$typeof){case y:var g=a._init;a=g(a._payload);return O(a,c,d,b,f);case da:return c=a.render,I=0,J=f,c(b,void 0);
- case ea:return O(a.type,c,d,b,f);case ba:return oa(a._context,b.value),[x,a,c,{value:b.value,children:b.children,__pop:Da}]}}throw Error("Unsupported server component type: "+P(a));}function Ca(a,c,d,b){var f={id:a.nextChunkId++,status:0,model:c,context:d,ping:function(){var b=a.pingedTasks;b.push(f);1===b.length&&Ea(a)},thenableState:null};b.add(f);return f}
- function Fa(a,c,d,b){var f=b.filepath+"#"+b.name+(b.async?"#async":""),g=a.writtenModules,h=g.get(f);if(void 0!==h)return c[0]===x&&"1"===d?"@"+h.toString(16):"$"+h.toString(16);try{var k=a.bundlerConfig[b.filepath][b.name];var r=b.async?{id:k.id,chunks:k.chunks,name:k.name,async:!0}:k;a.pendingChunks++;var z=a.nextChunkId++,S=v(r),T="M"+z.toString(16)+":"+S+"\n";var U=p.encode(T);a.completedModuleChunks.push(U);g.set(f,z);return c[0]===x&&"1"===d?"@"+z.toString(16):"$"+z.toString(16)}catch(V){return a.pendingChunks++,
- c=a.nextChunkId++,Q(a,c,V),"$"+c.toString(16)}}function Ga(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,d){return d})}function R(a){var c=JSON.stringify(a);return'"'+a+'"'===c?a:c}function P(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(ja(a))return"[...]";a=Ga(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}}
- function W(a,c){if(ja(a)){for(var d="[",b=0;b<a.length;b++){0<b&&(d+=", ");if(6<b){d+="...";break}var f=a[b];d=""+b===c&&"object"===typeof f&&null!==f?d+W(f):d+P(f)}return d+"]"}d="{";b=Object.keys(a);for(f=0;f<b.length;f++){0<f&&(d+=", ");if(6<f){d+="...";break}var g=b[f];d+=R(g)+": ";var h=a[g];d=g===c&&"object"===typeof h&&null!==h?d+W(h):d+P(h)}return d+"}"}
- function Aa(a,c,d,b){switch(b){case x:return"$"}for(;"object"===typeof b&&null!==b&&(b.$$typeof===x||b.$$typeof===y);)try{switch(b.$$typeof){case x:var f=b;b=O(f.type,f.key,f.ref,f.props,null);break;case y:var g=b._init;b=g(b._payload)}}catch(h){if("object"===typeof h&&null!==h&&"function"===typeof h.then)return a.pendingChunks++,a=Ca(a,b,E,a.abortableTasks),b=a.ping,h.then(b,b),pa(h),a.thenableState=qa(),"@"+a.id.toString(16);X(a,h);a.pendingChunks++;b=a.nextChunkId++;Q(a,b,h);return"@"+b.toString(16)}if(null===
- b)return null;if("object"===typeof b){if(b.$$typeof===w)return Fa(a,c,d,b);if(b.$$typeof===ba)return f=b._context._globalName,c=a.writtenProviders,b=c.get(d),void 0===b&&(a.pendingChunks++,b=a.nextChunkId++,c.set(f,b),d="P"+b.toString(16)+":"+f+"\n",d=p.encode(d),a.completedJSONChunks.push(d)),"$"+b.toString(16);if(b===Da){a=E;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");b=a.parentValue;a.context._currentValue=b===fa?a.context._defaultValue:b;E=
- a.parent;return}return b}if("string"===typeof b)return a="$"===b[0]||"@"===b[0]?"$"+b:b,a;if("boolean"===typeof b||"number"===typeof b||"undefined"===typeof b)return b;if("function"===typeof b){if(b.$$typeof===w)return Fa(a,c,d,b);if(/^on[A-Z]/.test(d))throw Error("Event handlers cannot be passed to client component props. Remove "+(R(d)+" from these props if possible: "+W(c)+"\nIf you need interactivity, consider converting part of this to a client component."));throw Error("Functions cannot be passed directly to client components because they're not serializable. Remove "+
- (R(d)+" ("+(b.displayName||b.name||"function")+") from this object, or avoid the entire object: "+W(c)));}if("symbol"===typeof b){f=a.writtenSymbols;g=f.get(b);if(void 0!==g)return"$"+g.toString(16);g=b.description;if(Symbol.for(g)!==b)throw Error("Only global symbols received from Symbol.for(...) can be passed to client components. The symbol Symbol.for("+(b.description+") cannot be found among global symbols. Remove ")+(R(d)+" from this object, or avoid the entire object: "+W(c)));a.pendingChunks++;
- d=a.nextChunkId++;c=v(g);c="S"+d.toString(16)+":"+c+"\n";c=p.encode(c);a.completedModuleChunks.push(c);f.set(b,d);return"$"+d.toString(16)}if("bigint"===typeof b)throw Error("BigInt ("+b+") is not yet supported in client component props. Remove "+(R(d)+" from this object or use a plain number instead: "+W(c)));throw Error("Type "+typeof b+" is not supported in client component props. Remove "+(R(d)+" from this object, or avoid the entire object: "+W(c)));}function X(a,c){a=a.onError;a(c)}
- function Y(a,c){null!==a.destination?(a.status=2,u(a.destination,c)):(a.status=1,a.fatalError=c)}function Q(a,c,d){var b="";try{if(d instanceof Error){var f=String(d.message);b=String(d.stack)}else f="Error: "+d}catch(g){f="An error occurred but serializing the error message failed."}d={message:f,stack:b};c="E"+c.toString(16)+":"+v(d)+"\n";c=p.encode(c);a.completedErrorChunks.push(c)}
- function Ea(a){var c=N.current,d=L;N.current=wa;L=a.cache;H=a;try{var b=a.pingedTasks;a.pingedTasks=[];for(var f=0;f<b.length;f++){var g=b[f];var h=a;if(0===g.status){G(g.context);try{var k=g.model;if("object"===typeof k&&null!==k&&k.$$typeof===x){var r=k,z=g.thenableState;g.model=k;k=O(r.type,r.key,r.ref,r.props,z);for(g.thenableState=null;"object"===typeof k&&null!==k&&k.$$typeof===x;)r=k,g.model=k,k=O(r.type,r.key,r.ref,r.props,null)}var S=g.id,T=v(k,h.toJSON),U="J"+S.toString(16)+":"+T+"\n";var V=
- p.encode(U);h.completedJSONChunks.push(V);h.abortableTasks.delete(g);g.status=1}catch(t){if("object"===typeof t&&null!==t&&"function"===typeof t.then){var sa=g.ping;t.then(sa,sa);pa(t);g.thenableState=qa()}else h.abortableTasks.delete(g),g.status=4,X(h,t),Q(h,g.id,t)}}}null!==a.destination&&Z(a,a.destination)}catch(t){X(a,t),Y(a,t)}finally{N.current=c,L=d,H=null}}
- function Z(a,c){l=new Uint8Array(512);m=0;try{for(var d=a.completedModuleChunks,b=0;b<d.length;b++)if(a.pendingChunks--,!n(c,d[b])){a.destination=null;b++;break}d.splice(0,b);var f=a.completedJSONChunks;for(b=0;b<f.length;b++)if(a.pendingChunks--,!n(c,f[b])){a.destination=null;b++;break}f.splice(0,b);var g=a.completedErrorChunks;for(b=0;b<g.length;b++)if(a.pendingChunks--,!n(c,g[b])){a.destination=null;b++;break}g.splice(0,b)}finally{l&&0<m&&(c.enqueue(new Uint8Array(l.buffer,0,m)),l=null,m=0)}0===
- a.pendingChunks&&c.close()}function Ha(a,c){try{var d=a.abortableTasks;if(0<d.size){var b=void 0===c?Error("The render was aborted by the server without a reason."):c;X(a,b);a.pendingChunks++;var f=a.nextChunkId++;Q(a,f,b);d.forEach(function(b){b.status=3;var c="$"+f.toString(16);b=b.id;c=v(c);c="J"+b.toString(16)+":"+c+"\n";c=p.encode(c);a.completedErrorChunks.push(c)});d.clear()}null!==a.destination&&Z(a,a.destination)}catch(g){X(a,g),Y(a,g)}}
- function Ba(a){if(a){var c=E;G(null);for(var d=0;d<a.length;d++){var b=a[d],f=b[0];b=b[1];M[f]||(M[f]=e.createServerContext(f,fa));oa(M[f],b)}a=E;G(c);return a}return null}
- exports.renderToReadableStream=function(a,c,d){var b=za(a,c,d?d.onError:void 0,d?d.context:void 0,d?d.identifierPrefix:void 0);if(d&&d.signal){var f=d.signal;if(f.aborted)Ha(b,f.reason);else{var g=function(){Ha(b,f.reason);f.removeEventListener("abort",g)};f.addEventListener("abort",g)}}return new ReadableStream({type:"bytes",start:function(){Ea(b)},pull:function(a){if(1===b.status)b.status=2,u(a,b.fatalError);else if(2!==b.status&&null===b.destination){b.destination=a;try{Z(b,a)}catch(k){X(b,k),
- Y(b,k)}}},cancel:function(){}},{highWaterMark:0})};
|