@cronocode/react-box 1.8.8 → 1.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/button.d.ts +1 -1
- package/components/checkbox.d.ts +1 -1
- package/components/radioButton.d.ts +1 -1
- package/components/textarea.d.ts +1 -1
- package/components/textbox.d.ts +1 -1
- package/core/boxStyles.d.ts +5 -2
- package/core.cjs +15 -15
- package/core.mjs +331 -331
- package/package.json +1 -1
- package/ssg.cjs +1 -1
- package/ssg.mjs +1 -2
- package/ssg.test.d.ts +1 -0
package/package.json
CHANGED
package/ssg.cjs
CHANGED
|
@@ -102,4 +102,4 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
102
102
|
Previous: %s
|
|
103
103
|
Incoming: %s`,En,"["+r.join(", ")+"]","["+e.join(", ")+"]");for(var t=0;t<e.length&&t<r.length;t++)if(!ee(r[t],e[t]))return!1;return!0}function Xa(){if(zt>0)throw new Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function io(){return Y===null?Xn===null?(Tn=!1,Xn=Y=Xa()):(Tn=!0,Y=Xn):Y.next===null?(Tn=!1,Y=Y.next=Xa()):(Tn=!0,Y=Y.next),Y}function kl(r,e){Je=e,Pr=r,xt=!1,Qe=0}function Cl(r,e,t,n){for(;ia;)ia=!1,Qe=0,zt+=1,Y=null,t=r(e,n);return Za(),t}function la(){var r=Qe!==0;return r}function Za(){xt=!1,Je=null,Pr=null,ia=!1,Xn=null,zt=0,Ke=null,Y=null}function Ii(r){return xt&&h("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),Rr(r)}function Pi(r){return En="useContext",Zn(),Rr(r)}function Ja(r,e){return typeof e=="function"?e(r):e}function Tl(r){return En="useState",Fi(Ja,r)}function Fi(r,e,t){if(r!==Ja&&(En="useReducer"),Je=Zn(),Y=io(),Tn){var n=Y.queue,o=n.dispatch;if(Ke!==null){var l=Ke.get(n);if(l!==void 0){Ke.delete(n);var c=Y.memoizedState,d=l;do{var m=d.action;xt=!0,c=r(c,m),xt=!1,d=d.next}while(d!==null);return Y.memoizedState=c,[c,o]}}return[Y.memoizedState,o]}else{xt=!0;var S;r===Ja?S=typeof e=="function"?e():e:S=t!==void 0?t(e):e,xt=!1,Y.memoizedState=S;var R=Y.queue={last:null,dispatch:null},I=R.dispatch=Il.bind(null,Je,R);return[Y.memoizedState,I]}}function Di(r,e){Je=Zn(),Y=io();var t=e===void 0?null:e;if(Y!==null){var n=Y.memoizedState;if(n!==null&&t!==null){var o=n[1];if(xl(t,o))return n[0]}}xt=!0;var l=r();return xt=!1,Y.memoizedState=[l,t],l}function El(r){Je=Zn(),Y=io();var e=Y.memoizedState;if(e===null){var t={current:r};return Object.seal(t),Y.memoizedState=t,t}else return e}function Rl(r,e){En="useLayoutEffect",h("useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.")}function Il(r,e,t){if(zt>=wl)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(r===Je){ia=!0;var n={action:t,next:null};Ke===null&&(Ke=new Map);var o=Ke.get(e);if(o===void 0)Ke.set(e,n);else{for(var l=o;l.next!==null;)l=l.next;l.next=n}}}function Pl(r,e){return Di(function(){return r},e)}function Fl(r,e,t){return Zn(),e(r._source)}function Dl(r,e,t){if(t===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");return t()}function sa(r){return Zn(),r}function Ai(){throw new Error("startTransition cannot be called during server rendering.")}function Qa(){return Zn(),[!1,Ai]}function Mi(){var r=Pr,e=ml(r.treeContext),t=lo;if(t===null)throw new Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");var n=Qe++;return dt(t,e,n)}function ua(){}var ca={readContext:Ii,useContext:Pi,useMemo:Di,useReducer:Fi,useRef:El,useState:Tl,useInsertionEffect:ua,useLayoutEffect:Rl,useCallback:Pl,useImperativeHandle:ua,useEffect:ua,useDebugValue:ua,useDeferredValue:sa,useTransition:Qa,useId:Mi,useMutableSource:Fl,useSyncExternalStore:Dl},lo=null;function fa(r){lo=r}function Fr(r){try{var e="",t=r;do{switch(t.tag){case 0:e+=Vn(t.type,null,null);break;case 1:e+=za(t.type,null,null);break;case 2:e+=yi(t.type,null,null);break}t=t.parent}while(t);return e}catch(n){return`
|
|
104
104
|
Error generating stack: `+n.message+`
|
|
105
|
-
`+n.stack}}var da=W.ReactCurrentDispatcher,pa=W.ReactDebugCurrentFrame,ha=0,Dr=1,Ka=2,Jn=3,_i=4,Al=0,Ar=1,Mr=2,Ml=12800;function _l(r){return console.error(r),null}function Qn(){}function va(r,e,t,n,o,l,c,d,m){var S=[],R=new Set,I={destination:null,responseState:e,progressiveChunkSize:n===void 0?Ml:n,status:Al,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:R,pingedTasks:S,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:o===void 0?_l:o,onAllReady:l===void 0?Qn:l,onShellReady:c===void 0?Qn:c,onShellError:d===void 0?Qn:d,onFatalError:m===void 0?Qn:m},_=so(I,0,null,t,!1,!1);_.parentFlushed=!0;var z=Kn(I,r,null,_,R,Xo,Zo,gl);return S.push(z),I}function tn(r,e){var t=r.pingedTasks;t.push(e),t.length===1&&et(function(){return si(r)})}function qa(r,e){return{id:mn,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:e,errorDigest:null}}function Kn(r,e,t,n,o,l,c,d){r.allPendingTasks++,t===null?r.pendingRootTasks++:t.pendingTasks++;var m={node:e,ping:function(){return tn(r,m)},blockedBoundary:t,blockedSegment:n,abortSet:o,legacyContext:l,context:c,treeContext:d};return m.componentStack=null,o.add(m),m}function so(r,e,t,n,o,l){return{status:ha,id:-1,index:e,parentFlushed:!1,chunks:[],children:[],formatContext:n,boundary:t,lastPushedText:o,textEmbedded:l}}var nn=null;function Wt(){return nn===null||nn.componentStack===null?"":Fr(nn.componentStack)}function rn(r,e){r.componentStack={tag:0,parent:r.componentStack,type:e}}function ga(r,e){r.componentStack={tag:1,parent:r.componentStack,type:e}}function uo(r,e){r.componentStack={tag:2,parent:r.componentStack,type:e}}function kt(r){r.componentStack===null?h("Unexpectedly popped too many stack frames. This is a bug in React."):r.componentStack=r.componentStack.parent}var co=null;function ei(r,e){{var t;typeof e=="string"?t=e:e&&typeof e.message=="string"?t=e.message:t=String(e);var n=co||Wt();co=null,r.errorMessage=t,r.errorComponentStack=n}}function fo(r,e){var t=r.onError(e);if(t!=null&&typeof t!="string")throw new Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof t+'" instead');return t}function po(r,e){var t=r.onShellError;t(e);var n=r.onFatalError;n(e),r.destination!==null?(r.status=Mr,ge(r.destination,e)):(r.status=Ar,r.fatalError=e)}function Oi(r,e,t){rn(e,"Suspense");var n=e.blockedBoundary,o=e.blockedSegment,l=t.fallback,c=t.children,d=new Set,m=qa(r,d),S=o.chunks.length,R=so(r,S,m,o.formatContext,!1,!1);o.children.push(R),o.lastPushedText=!1;var I=so(r,0,null,o.formatContext,!1,!1);I.parentFlushed=!0,e.blockedBoundary=m,e.blockedSegment=I;try{if(_r(r,e,c),Le(I.chunks,r.responseState,I.lastPushedText,I.textEmbedded),I.status=Dr,qn(m,I),m.pendingTasks===0){kt(e);return}}catch(z){I.status=_i,m.forceClientRender=!0,m.errorDigest=fo(r,z),ei(m,z)}finally{e.blockedBoundary=n,e.blockedSegment=o}var _=Kn(r,l,n,R,d,e.legacyContext,e.context,e.treeContext);_.componentStack=e.componentStack,r.pingedTasks.push(_),kt(e)}function Ol(r,e,t,n){rn(e,t);var o=e.blockedSegment,l=Wn(o.chunks,t,n,r.responseState,o.formatContext);o.lastPushedText=!1;var c=o.formatContext;o.formatContext=Zt(c,t,n),_r(r,e,l),o.formatContext=c,ko(o.chunks,t),o.lastPushedText=!1,kt(e)}function Li(r){return r.prototype&&r.prototype.isReactComponent}function ho(r,e,t,n,o){var l={};kl(e,l);var c=t(n,o);return Cl(t,n,c,o)}function ti(r,e,t,n,o){var l=t.render();t.props!==o&&(Ui||h("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",oe(n)||"a component"),Ui=!0);{var c=n.childContextTypes;if(c!=null){var d=e.legacyContext,m=Wa(t,n,d,c);e.legacyContext=m,He(r,e,l),e.legacyContext=d;return}}He(r,e,l)}function Bi(r,e,t,n){uo(e,t);var o=xn(t,e.legacyContext),l=Ri(t,n,o);ao(l,t,n,o),ti(r,e,l,t,n),kt(e)}var ni={},vo={},ri={},oi={},Ui=!1,Hi=!1,ai=!1,zi=!1;function Ll(r,e,t,n){var o;if(o=xn(t,e.legacyContext),ga(e,t),t.prototype&&typeof t.prototype.render=="function"){var l=oe(t)||"Unknown";ni[l]||(h("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",l,l),ni[l]=!0)}var c=ho(r,e,t,n,o),d=la();if(typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0){var m=oe(t)||"Unknown";vo[m]||(h("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",m,m,m),vo[m]=!0)}if(typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0){{var S=oe(t)||"Unknown";vo[S]||(h("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",S,S,S),vo[S]=!0)}ao(c,t,n,o),ti(r,e,c,t,n)}else if(Bl(t),d){var R=e.treeContext,I=1,_=0;e.treeContext=Ya(R,I,_);try{He(r,e,c)}finally{e.treeContext=R}}else He(r,e,c);kt(e)}function Bl(r){{if(r&&r.childContextTypes&&h("%s(...): childContextTypes cannot be defined on a function component.",r.displayName||r.name||"Component"),typeof r.getDerivedStateFromProps=="function"){var e=oe(r)||"Unknown";oi[e]||(h("%s: Function components do not support getDerivedStateFromProps.",e),oi[e]=!0)}if(typeof r.contextType=="object"&&r.contextType!==null){var t=oe(r)||"Unknown";ri[t]||(h("%s: Function components do not support contextType.",t),ri[t]=!0)}}}function Wi(r,e){if(r&&r.defaultProps){var t=Ze({},e),n=r.defaultProps;for(var o in n)t[o]===void 0&&(t[o]=n[o]);return t}return e}function Ul(r,e,t,n,o){ga(e,t.render);var l=ho(r,e,t.render,n,o),c=la();if(c){var d=e.treeContext,m=1,S=0;e.treeContext=Ya(d,m,S);try{He(r,e,l)}finally{e.treeContext=d}}else He(r,e,l);kt(e)}function ii(r,e,t,n,o){var l=t.type,c=Wi(l,n);ma(r,e,l,c,o)}function Hl(r,e,t,n){t._context===void 0?t!==t.Consumer&&(zi||(zi=!0,h("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):t=t._context;var o=n.children;typeof o!="function"&&h("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");var l=Rr(t),c=o(l);He(r,e,c)}function qe(r,e,t,n){var o=t._context,l=n.value,c=n.children,d;d=e.context,e.context=ja(o,l),He(r,e,c),e.context=dl(o),d!==e.context&&h("Popping the context provider did not return back to the original snapshot. This is a bug in React.")}function zl(r,e,t,n,o){rn(e,"Lazy");var l=t._payload,c=t._init,d=c(l),m=Wi(d,n);ma(r,e,d,m,o),kt(e)}function ma(r,e,t,n,o){if(typeof t=="function")if(Li(t)){Bi(r,e,t,n);return}else{Ll(r,e,t,n);return}if(typeof t=="string"){Ol(r,e,t,n);return}switch(t){case ul:case sl:case zo:case Wo:case Ho:{He(r,e,n.children);return}case Pa:{rn(e,"SuspenseList"),He(r,e,n.children),kt(e);return}case hi:throw new Error("ReactDOMServer does not yet support scope components.");case Ia:{Oi(r,e,n);return}}if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Cr:{Ul(r,e,t,n,o);return}case Fa:{ii(r,e,t,n,o);return}case Vr:{qe(r,e,t,n);return}case Yr:{Hl(r,e,t,n);return}case jo:{zl(r,e,t,n);return}}var l="";throw(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(l+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(t==null?t:typeof t)+"."+l))}function Wl(r,e){typeof Symbol=="function"&&r[Symbol.toStringTag]==="Generator"&&(Hi||h("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Hi=!0),r.entries===e&&(ai||h("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ai=!0)}function He(r,e,t){try{return jl(r,e,t)}catch(n){throw typeof n=="object"&&n!==null&&typeof n.then=="function"||(co=co!==null?co:Wt()),n}}function jl(r,e,t){if(e.node=t,typeof t=="object"&&t!==null){switch(t.$$typeof){case pi:{var n=t,o=n.type,l=n.props,c=n.ref;ma(r,e,o,l,c);return}case Uo:throw new Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case jo:{var d=t,m=d._payload,S=d._init,R;try{R=S(m)}catch(on){throw typeof on=="object"&&on!==null&&typeof on.then=="function"&&rn(e,"Lazy"),on}He(r,e,R);return}}if(_e(t)){ji(r,e,t);return}var I=Gr(t);if(I){Wl(t,I);var _=I.call(t);if(_){var z=_.next();if(!z.done){var G=[];do G.push(z.value),z=_.next();while(!z.done);ji(r,e,G);return}return}}var Ce=Object.prototype.toString.call(t);throw new Error("Objects are not valid as a React child (found: "+(Ce==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":Ce)+"). If you meant to render a collection of children, use an array instead.")}if(typeof t=="string"){var er=e.blockedSegment;er.lastPushedText=Se(e.blockedSegment.chunks,t,r.responseState,er.lastPushedText);return}if(typeof t=="number"){var tr=e.blockedSegment;tr.lastPushedText=Se(e.blockedSegment.chunks,""+t,r.responseState,tr.lastPushedText);return}typeof t=="function"&&h("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}function ji(r,e,t){for(var n=t.length,o=0;o<n;o++){var l=e.treeContext;e.treeContext=Ya(l,n,o);try{_r(r,e,t[o])}finally{e.treeContext=l}}}function Ni(r,e,t){var n=e.blockedSegment,o=n.chunks.length,l=so(r,o,null,n.formatContext,n.lastPushedText,!0);n.children.push(l),n.lastPushedText=!1;var c=Kn(r,e.node,e.blockedBoundary,l,e.abortSet,e.legacyContext,e.context,e.treeContext);e.componentStack!==null&&(c.componentStack=e.componentStack.parent);var d=c.ping;t.then(d,d)}function _r(r,e,t){var n=e.blockedSegment.formatContext,o=e.legacyContext,l=e.context,c=null;c=e.componentStack;try{return He(r,e,t)}catch(d){if(Za(),typeof d=="object"&&d!==null&&typeof d.then=="function"){Ni(r,e,d),e.blockedSegment.formatContext=n,e.legacyContext=o,e.context=l,Cn(l),e.componentStack=c;return}else throw e.blockedSegment.formatContext=n,e.legacyContext=o,e.context=l,Cn(l),e.componentStack=c,d}}function $i(r,e,t,n){var o=fo(r,n);if(e===null?po(r,n):(e.pendingTasks--,e.forceClientRender||(e.forceClientRender=!0,e.errorDigest=o,ei(e,n),e.parentFlushed&&r.clientRenderedBoundaries.push(e))),r.allPendingTasks--,r.allPendingTasks===0){var l=r.onAllReady;l()}}function Nl(r){var e=this,t=r.blockedBoundary,n=r.blockedSegment;n.status=Jn,go(e,t,n)}function li(r,e,t){var n=r.blockedBoundary,o=r.blockedSegment;if(o.status=Jn,n===null)e.allPendingTasks--,e.status!==Mr&&(e.status=Mr,e.destination!==null&&ue(e.destination));else{if(n.pendingTasks--,!n.forceClientRender){n.forceClientRender=!0;var l=t===void 0?new Error("The render was aborted by the server without a reason."):t;n.errorDigest=e.onError(l);{var c="The server did not finish this Suspense boundary: ";l&&typeof l.message=="string"?l=c+l.message:l=c+String(l);var d=nn;nn=r;try{ei(n,l)}finally{nn=d}}n.parentFlushed&&e.clientRenderedBoundaries.push(n)}if(n.fallbackAbortableTasks.forEach(function(S){return li(S,e,t)}),n.fallbackAbortableTasks.clear(),e.allPendingTasks--,e.allPendingTasks===0){var m=e.onAllReady;m()}}}function qn(r,e){if(e.chunks.length===0&&e.children.length===1&&e.children[0].boundary===null){var t=e.children[0];t.id=e.id,t.parentFlushed=!0,t.status===Dr&&qn(r,t)}else{var n=r.completedSegments;n.push(e)}}function go(r,e,t){if(e===null){if(t.parentFlushed){if(r.completedRootSegment!==null)throw new Error("There can only be one root segment. This is a bug in React.");r.completedRootSegment=t}if(r.pendingRootTasks--,r.pendingRootTasks===0){r.onShellError=Qn;var n=r.onShellReady;n()}}else if(e.pendingTasks--,!e.forceClientRender){if(e.pendingTasks===0)t.parentFlushed&&t.status===Dr&&qn(e,t),e.parentFlushed&&r.completedBoundaries.push(e),e.fallbackAbortableTasks.forEach(Nl,r),e.fallbackAbortableTasks.clear();else if(t.parentFlushed&&t.status===Dr){qn(e,t);var o=e.completedSegments;o.length===1&&e.parentFlushed&&r.partialBoundaries.push(e)}}if(r.allPendingTasks--,r.allPendingTasks===0){var l=r.onAllReady;l()}}function $l(r,e){var t=e.blockedSegment;if(t.status===ha){Cn(e.context);var n=null;n=nn,nn=e;try{He(r,e,e.node),Le(t.chunks,r.responseState,t.lastPushedText,t.textEmbedded),e.abortSet.delete(e),t.status=Dr,go(r,e.blockedBoundary,t)}catch(l){if(Za(),typeof l=="object"&&l!==null&&typeof l.then=="function"){var o=e.ping;l.then(o,o)}else e.abortSet.delete(e),t.status=_i,$i(r,e.blockedBoundary,t,l)}finally{nn=n}}}function si(r){if(r.status!==Mr){var e=ki(),t=da.current;da.current=ca;var n;n=pa.getCurrentStack,pa.getCurrentStack=Wt;var o=lo;fa(r.responseState);try{var l=r.pingedTasks,c;for(c=0;c<l.length;c++){var d=l[c];$l(r,d)}l.splice(0,c),r.destination!==null&&ui(r,r.destination)}catch(m){fo(r,m),po(r,m)}finally{fa(o),da.current=t,pa.getCurrentStack=n,t===ca&&Cn(e)}}}function mo(r,e,t){switch(t.parentFlushed=!0,t.status){case ha:{var n=t.id=r.nextSegmentId++;return t.lastPushedText=!1,t.textEmbedded=!1,Co(e,r.responseState,n)}case Dr:{t.status=Ka;for(var o=!0,l=t.chunks,c=0,d=t.children,m=0;m<d.length;m++){for(var S=d[m];c<S.index;c++)A(e,l[c]);o=ya(r,e,S)}for(;c<l.length-1;c++)A(e,l[c]);return c<l.length&&(o=J(e,l[c])),o}default:throw new Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.")}}function ya(r,e,t){var n=t.boundary;if(n===null)return mo(r,e,t);if(n.parentFlushed=!0,n.forceClientRender)return Be(e,r.responseState,n.errorDigest,n.errorMessage,n.errorComponentStack),mo(r,e,t),Ea(e,r.responseState);if(n.pendingTasks>0){n.rootSegmentID=r.nextSegmentId++,n.completedSegments.length>0&&r.partialBoundaries.push(n);var o=n.id=ze(r.responseState);return yr(e,r.responseState,o),mo(r,e,t),Sr(e,r.responseState)}else{if(n.byteSize>r.progressiveChunkSize)return n.rootSegmentID=r.nextSegmentId++,r.completedBoundaries.push(n),yr(e,r.responseState,n.id),mo(r,e,t),Sr(e,r.responseState);Ro(e,r.responseState);var l=n.completedSegments;if(l.length!==1)throw new Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");var c=l[0];return ya(r,e,c),Io(e,r.responseState)}}function Vi(r,e,t){return ll(e,r.responseState,t.id,t.errorDigest,t.errorMessage,t.errorComponentStack)}function Sa(r,e,t){return j(e,r.responseState,t.formatContext,t.id),ya(r,e,t),q(e,t.formatContext)}function Yi(r,e,t){for(var n=t.completedSegments,o=0;o<n.length;o++){var l=n[o];Gi(r,e,t,l)}return n.length=0,fi(e,r.responseState,t.id,t.rootSegmentID)}function Vl(r,e,t){for(var n=t.completedSegments,o=0;o<n.length;o++){var l=n[o];if(!Gi(r,e,t,l))return o++,n.splice(0,o),!1}return n.splice(0,o),!0}function Gi(r,e,t,n){if(n.status===Ka)return!0;var o=n.id;if(o===-1){var l=n.id=t.rootSegmentID;if(l===-1)throw new Error("A root segment ID must have been assigned by now. This is a bug in React.");return Sa(r,e,n)}else return Sa(r,e,n),el(e,r.responseState,o)}function ui(r,e){an();try{var t=r.completedRootSegment;t!==null&&r.pendingRootTasks===0&&(ya(r,e,t),r.completedRootSegment=null,ka(e,r.responseState));var n=r.clientRenderedBoundaries,o;for(o=0;o<n.length;o++){var l=n[o];Vi(r,e,l)}n.splice(0,o);var c=r.completedBoundaries;for(o=0;o<c.length;o++){var d=c[o];Yi(r,e,d)}c.splice(0,o),nr(e),an(e);var m=r.partialBoundaries;for(o=0;o<m.length;o++){var S=m[o];if(!Vl(r,e,S)){r.destination=null,o++,m.splice(0,o);return}}m.splice(0,o);var R=r.completedBoundaries;for(o=0;o<R.length;o++){var I=R[o];Yi(r,e,I)}R.splice(0,o)}finally{nr(e),r.allPendingTasks===0&&r.pingedTasks.length===0&&r.clientRenderedBoundaries.length===0&&r.completedBoundaries.length===0&&(r.abortableTasks.size!==0&&h("There was still abortable task at the root when we closed. This is a bug in React."),ue(e))}}function Xi(r){et(function(){return si(r)})}function Yl(r,e){if(r.status===Ar){r.status=Mr,ge(e,r.fatalError);return}if(r.status!==Mr&&r.destination===null){r.destination=e;try{ui(r,e)}catch(t){fo(r,t),po(r,t)}}}function Zi(r,e){try{var t=r.abortableTasks;t.forEach(function(n){return li(n,r,e)}),t.clear(),r.destination!==null&&ui(r,r.destination)}catch(n){fo(r,n),po(r,n)}}function Gl(r,e){return new Promise(function(t,n){var o,l,c=new Promise(function(_,z){l=_,o=z});function d(){var _=new ReadableStream({type:"bytes",pull:function(z){Yl(S,z)},cancel:function(z){Zi(S)}},{highWaterMark:0});_.allReady=c,t(_)}function m(_){c.catch(function(){}),n(_)}var S=va(r,cr(e?e.identifierPrefix:void 0,e?e.nonce:void 0,e?e.bootstrapScriptContent:void 0,e?e.bootstrapScripts:void 0,e?e.bootstrapModules:void 0),Ot(e?e.namespaceURI:void 0),e?e.progressiveChunkSize:void 0,e?e.onError:void 0,l,d,m,o);if(e&&e.signal){var R=e.signal,I=function(){Zi(S,R.reason),R.removeEventListener("abort",I)};R.addEventListener("abort",I)}Xi(S)})}Qi.renderToReadableStream=Gl,Qi.version=M}()),Qi}var bo,Zl;process.env.NODE_ENV==="production"?(bo=rs(),Zl=os()):(bo=as(),Zl=is());wo.version=bo.version;wo.renderToString=bo.renderToString;wo.renderToStaticMarkup=bo.renderToStaticMarkup;wo.renderToNodeStream=bo.renderToNodeStream;wo.renderToStaticNodeStream=bo.renderToStaticNodeStream;wo.renderToReadableStream=Zl.renderToReadableStream;const Jl={innerHTML:""},ls={head:{insertBefore(){}},getElementById(){return Jl},createElement(){return{setAttribute(){}}}};global.document=ls;function ss(vt,M=!0){Ql.StylesContext.clear();let W=wo.renderToStaticMarkup(vt);if(Ql.StylesContext.flush(),M){const ve="<head>",h=W.indexOf(ve);if(h>-1){const $=`<style id="crono-styles">${Jl.innerHTML}</style>`,et=h+ve.length;W=W.substring(0,et)+$+W.substring(et)}}return{html:W,styles:Jl.innerHTML}}exports.renderToStaticMarkup=ss;
|
|
105
|
+
`+n.stack}}var da=W.ReactCurrentDispatcher,pa=W.ReactDebugCurrentFrame,ha=0,Dr=1,Ka=2,Jn=3,_i=4,Al=0,Ar=1,Mr=2,Ml=12800;function _l(r){return console.error(r),null}function Qn(){}function va(r,e,t,n,o,l,c,d,m){var S=[],R=new Set,I={destination:null,responseState:e,progressiveChunkSize:n===void 0?Ml:n,status:Al,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:R,pingedTasks:S,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:o===void 0?_l:o,onAllReady:l===void 0?Qn:l,onShellReady:c===void 0?Qn:c,onShellError:d===void 0?Qn:d,onFatalError:m===void 0?Qn:m},_=so(I,0,null,t,!1,!1);_.parentFlushed=!0;var z=Kn(I,r,null,_,R,Xo,Zo,gl);return S.push(z),I}function tn(r,e){var t=r.pingedTasks;t.push(e),t.length===1&&et(function(){return si(r)})}function qa(r,e){return{id:mn,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:e,errorDigest:null}}function Kn(r,e,t,n,o,l,c,d){r.allPendingTasks++,t===null?r.pendingRootTasks++:t.pendingTasks++;var m={node:e,ping:function(){return tn(r,m)},blockedBoundary:t,blockedSegment:n,abortSet:o,legacyContext:l,context:c,treeContext:d};return m.componentStack=null,o.add(m),m}function so(r,e,t,n,o,l){return{status:ha,id:-1,index:e,parentFlushed:!1,chunks:[],children:[],formatContext:n,boundary:t,lastPushedText:o,textEmbedded:l}}var nn=null;function Wt(){return nn===null||nn.componentStack===null?"":Fr(nn.componentStack)}function rn(r,e){r.componentStack={tag:0,parent:r.componentStack,type:e}}function ga(r,e){r.componentStack={tag:1,parent:r.componentStack,type:e}}function uo(r,e){r.componentStack={tag:2,parent:r.componentStack,type:e}}function kt(r){r.componentStack===null?h("Unexpectedly popped too many stack frames. This is a bug in React."):r.componentStack=r.componentStack.parent}var co=null;function ei(r,e){{var t;typeof e=="string"?t=e:e&&typeof e.message=="string"?t=e.message:t=String(e);var n=co||Wt();co=null,r.errorMessage=t,r.errorComponentStack=n}}function fo(r,e){var t=r.onError(e);if(t!=null&&typeof t!="string")throw new Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof t+'" instead');return t}function po(r,e){var t=r.onShellError;t(e);var n=r.onFatalError;n(e),r.destination!==null?(r.status=Mr,ge(r.destination,e)):(r.status=Ar,r.fatalError=e)}function Oi(r,e,t){rn(e,"Suspense");var n=e.blockedBoundary,o=e.blockedSegment,l=t.fallback,c=t.children,d=new Set,m=qa(r,d),S=o.chunks.length,R=so(r,S,m,o.formatContext,!1,!1);o.children.push(R),o.lastPushedText=!1;var I=so(r,0,null,o.formatContext,!1,!1);I.parentFlushed=!0,e.blockedBoundary=m,e.blockedSegment=I;try{if(_r(r,e,c),Le(I.chunks,r.responseState,I.lastPushedText,I.textEmbedded),I.status=Dr,qn(m,I),m.pendingTasks===0){kt(e);return}}catch(z){I.status=_i,m.forceClientRender=!0,m.errorDigest=fo(r,z),ei(m,z)}finally{e.blockedBoundary=n,e.blockedSegment=o}var _=Kn(r,l,n,R,d,e.legacyContext,e.context,e.treeContext);_.componentStack=e.componentStack,r.pingedTasks.push(_),kt(e)}function Ol(r,e,t,n){rn(e,t);var o=e.blockedSegment,l=Wn(o.chunks,t,n,r.responseState,o.formatContext);o.lastPushedText=!1;var c=o.formatContext;o.formatContext=Zt(c,t,n),_r(r,e,l),o.formatContext=c,ko(o.chunks,t),o.lastPushedText=!1,kt(e)}function Li(r){return r.prototype&&r.prototype.isReactComponent}function ho(r,e,t,n,o){var l={};kl(e,l);var c=t(n,o);return Cl(t,n,c,o)}function ti(r,e,t,n,o){var l=t.render();t.props!==o&&(Ui||h("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",oe(n)||"a component"),Ui=!0);{var c=n.childContextTypes;if(c!=null){var d=e.legacyContext,m=Wa(t,n,d,c);e.legacyContext=m,He(r,e,l),e.legacyContext=d;return}}He(r,e,l)}function Bi(r,e,t,n){uo(e,t);var o=xn(t,e.legacyContext),l=Ri(t,n,o);ao(l,t,n,o),ti(r,e,l,t,n),kt(e)}var ni={},vo={},ri={},oi={},Ui=!1,Hi=!1,ai=!1,zi=!1;function Ll(r,e,t,n){var o;if(o=xn(t,e.legacyContext),ga(e,t),t.prototype&&typeof t.prototype.render=="function"){var l=oe(t)||"Unknown";ni[l]||(h("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",l,l),ni[l]=!0)}var c=ho(r,e,t,n,o),d=la();if(typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0){var m=oe(t)||"Unknown";vo[m]||(h("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",m,m,m),vo[m]=!0)}if(typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0){{var S=oe(t)||"Unknown";vo[S]||(h("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",S,S,S),vo[S]=!0)}ao(c,t,n,o),ti(r,e,c,t,n)}else if(Bl(t),d){var R=e.treeContext,I=1,_=0;e.treeContext=Ya(R,I,_);try{He(r,e,c)}finally{e.treeContext=R}}else He(r,e,c);kt(e)}function Bl(r){{if(r&&r.childContextTypes&&h("%s(...): childContextTypes cannot be defined on a function component.",r.displayName||r.name||"Component"),typeof r.getDerivedStateFromProps=="function"){var e=oe(r)||"Unknown";oi[e]||(h("%s: Function components do not support getDerivedStateFromProps.",e),oi[e]=!0)}if(typeof r.contextType=="object"&&r.contextType!==null){var t=oe(r)||"Unknown";ri[t]||(h("%s: Function components do not support contextType.",t),ri[t]=!0)}}}function Wi(r,e){if(r&&r.defaultProps){var t=Ze({},e),n=r.defaultProps;for(var o in n)t[o]===void 0&&(t[o]=n[o]);return t}return e}function Ul(r,e,t,n,o){ga(e,t.render);var l=ho(r,e,t.render,n,o),c=la();if(c){var d=e.treeContext,m=1,S=0;e.treeContext=Ya(d,m,S);try{He(r,e,l)}finally{e.treeContext=d}}else He(r,e,l);kt(e)}function ii(r,e,t,n,o){var l=t.type,c=Wi(l,n);ma(r,e,l,c,o)}function Hl(r,e,t,n){t._context===void 0?t!==t.Consumer&&(zi||(zi=!0,h("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):t=t._context;var o=n.children;typeof o!="function"&&h("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");var l=Rr(t),c=o(l);He(r,e,c)}function qe(r,e,t,n){var o=t._context,l=n.value,c=n.children,d;d=e.context,e.context=ja(o,l),He(r,e,c),e.context=dl(o),d!==e.context&&h("Popping the context provider did not return back to the original snapshot. This is a bug in React.")}function zl(r,e,t,n,o){rn(e,"Lazy");var l=t._payload,c=t._init,d=c(l),m=Wi(d,n);ma(r,e,d,m,o),kt(e)}function ma(r,e,t,n,o){if(typeof t=="function")if(Li(t)){Bi(r,e,t,n);return}else{Ll(r,e,t,n);return}if(typeof t=="string"){Ol(r,e,t,n);return}switch(t){case ul:case sl:case zo:case Wo:case Ho:{He(r,e,n.children);return}case Pa:{rn(e,"SuspenseList"),He(r,e,n.children),kt(e);return}case hi:throw new Error("ReactDOMServer does not yet support scope components.");case Ia:{Oi(r,e,n);return}}if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Cr:{Ul(r,e,t,n,o);return}case Fa:{ii(r,e,t,n,o);return}case Vr:{qe(r,e,t,n);return}case Yr:{Hl(r,e,t,n);return}case jo:{zl(r,e,t,n);return}}var l="";throw(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(l+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(t==null?t:typeof t)+"."+l))}function Wl(r,e){typeof Symbol=="function"&&r[Symbol.toStringTag]==="Generator"&&(Hi||h("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Hi=!0),r.entries===e&&(ai||h("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ai=!0)}function He(r,e,t){try{return jl(r,e,t)}catch(n){throw typeof n=="object"&&n!==null&&typeof n.then=="function"||(co=co!==null?co:Wt()),n}}function jl(r,e,t){if(e.node=t,typeof t=="object"&&t!==null){switch(t.$$typeof){case pi:{var n=t,o=n.type,l=n.props,c=n.ref;ma(r,e,o,l,c);return}case Uo:throw new Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case jo:{var d=t,m=d._payload,S=d._init,R;try{R=S(m)}catch(on){throw typeof on=="object"&&on!==null&&typeof on.then=="function"&&rn(e,"Lazy"),on}He(r,e,R);return}}if(_e(t)){ji(r,e,t);return}var I=Gr(t);if(I){Wl(t,I);var _=I.call(t);if(_){var z=_.next();if(!z.done){var G=[];do G.push(z.value),z=_.next();while(!z.done);ji(r,e,G);return}return}}var Ce=Object.prototype.toString.call(t);throw new Error("Objects are not valid as a React child (found: "+(Ce==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":Ce)+"). If you meant to render a collection of children, use an array instead.")}if(typeof t=="string"){var er=e.blockedSegment;er.lastPushedText=Se(e.blockedSegment.chunks,t,r.responseState,er.lastPushedText);return}if(typeof t=="number"){var tr=e.blockedSegment;tr.lastPushedText=Se(e.blockedSegment.chunks,""+t,r.responseState,tr.lastPushedText);return}typeof t=="function"&&h("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}function ji(r,e,t){for(var n=t.length,o=0;o<n;o++){var l=e.treeContext;e.treeContext=Ya(l,n,o);try{_r(r,e,t[o])}finally{e.treeContext=l}}}function Ni(r,e,t){var n=e.blockedSegment,o=n.chunks.length,l=so(r,o,null,n.formatContext,n.lastPushedText,!0);n.children.push(l),n.lastPushedText=!1;var c=Kn(r,e.node,e.blockedBoundary,l,e.abortSet,e.legacyContext,e.context,e.treeContext);e.componentStack!==null&&(c.componentStack=e.componentStack.parent);var d=c.ping;t.then(d,d)}function _r(r,e,t){var n=e.blockedSegment.formatContext,o=e.legacyContext,l=e.context,c=null;c=e.componentStack;try{return He(r,e,t)}catch(d){if(Za(),typeof d=="object"&&d!==null&&typeof d.then=="function"){Ni(r,e,d),e.blockedSegment.formatContext=n,e.legacyContext=o,e.context=l,Cn(l),e.componentStack=c;return}else throw e.blockedSegment.formatContext=n,e.legacyContext=o,e.context=l,Cn(l),e.componentStack=c,d}}function $i(r,e,t,n){var o=fo(r,n);if(e===null?po(r,n):(e.pendingTasks--,e.forceClientRender||(e.forceClientRender=!0,e.errorDigest=o,ei(e,n),e.parentFlushed&&r.clientRenderedBoundaries.push(e))),r.allPendingTasks--,r.allPendingTasks===0){var l=r.onAllReady;l()}}function Nl(r){var e=this,t=r.blockedBoundary,n=r.blockedSegment;n.status=Jn,go(e,t,n)}function li(r,e,t){var n=r.blockedBoundary,o=r.blockedSegment;if(o.status=Jn,n===null)e.allPendingTasks--,e.status!==Mr&&(e.status=Mr,e.destination!==null&&ue(e.destination));else{if(n.pendingTasks--,!n.forceClientRender){n.forceClientRender=!0;var l=t===void 0?new Error("The render was aborted by the server without a reason."):t;n.errorDigest=e.onError(l);{var c="The server did not finish this Suspense boundary: ";l&&typeof l.message=="string"?l=c+l.message:l=c+String(l);var d=nn;nn=r;try{ei(n,l)}finally{nn=d}}n.parentFlushed&&e.clientRenderedBoundaries.push(n)}if(n.fallbackAbortableTasks.forEach(function(S){return li(S,e,t)}),n.fallbackAbortableTasks.clear(),e.allPendingTasks--,e.allPendingTasks===0){var m=e.onAllReady;m()}}}function qn(r,e){if(e.chunks.length===0&&e.children.length===1&&e.children[0].boundary===null){var t=e.children[0];t.id=e.id,t.parentFlushed=!0,t.status===Dr&&qn(r,t)}else{var n=r.completedSegments;n.push(e)}}function go(r,e,t){if(e===null){if(t.parentFlushed){if(r.completedRootSegment!==null)throw new Error("There can only be one root segment. This is a bug in React.");r.completedRootSegment=t}if(r.pendingRootTasks--,r.pendingRootTasks===0){r.onShellError=Qn;var n=r.onShellReady;n()}}else if(e.pendingTasks--,!e.forceClientRender){if(e.pendingTasks===0)t.parentFlushed&&t.status===Dr&&qn(e,t),e.parentFlushed&&r.completedBoundaries.push(e),e.fallbackAbortableTasks.forEach(Nl,r),e.fallbackAbortableTasks.clear();else if(t.parentFlushed&&t.status===Dr){qn(e,t);var o=e.completedSegments;o.length===1&&e.parentFlushed&&r.partialBoundaries.push(e)}}if(r.allPendingTasks--,r.allPendingTasks===0){var l=r.onAllReady;l()}}function $l(r,e){var t=e.blockedSegment;if(t.status===ha){Cn(e.context);var n=null;n=nn,nn=e;try{He(r,e,e.node),Le(t.chunks,r.responseState,t.lastPushedText,t.textEmbedded),e.abortSet.delete(e),t.status=Dr,go(r,e.blockedBoundary,t)}catch(l){if(Za(),typeof l=="object"&&l!==null&&typeof l.then=="function"){var o=e.ping;l.then(o,o)}else e.abortSet.delete(e),t.status=_i,$i(r,e.blockedBoundary,t,l)}finally{nn=n}}}function si(r){if(r.status!==Mr){var e=ki(),t=da.current;da.current=ca;var n;n=pa.getCurrentStack,pa.getCurrentStack=Wt;var o=lo;fa(r.responseState);try{var l=r.pingedTasks,c;for(c=0;c<l.length;c++){var d=l[c];$l(r,d)}l.splice(0,c),r.destination!==null&&ui(r,r.destination)}catch(m){fo(r,m),po(r,m)}finally{fa(o),da.current=t,pa.getCurrentStack=n,t===ca&&Cn(e)}}}function mo(r,e,t){switch(t.parentFlushed=!0,t.status){case ha:{var n=t.id=r.nextSegmentId++;return t.lastPushedText=!1,t.textEmbedded=!1,Co(e,r.responseState,n)}case Dr:{t.status=Ka;for(var o=!0,l=t.chunks,c=0,d=t.children,m=0;m<d.length;m++){for(var S=d[m];c<S.index;c++)A(e,l[c]);o=ya(r,e,S)}for(;c<l.length-1;c++)A(e,l[c]);return c<l.length&&(o=J(e,l[c])),o}default:throw new Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.")}}function ya(r,e,t){var n=t.boundary;if(n===null)return mo(r,e,t);if(n.parentFlushed=!0,n.forceClientRender)return Be(e,r.responseState,n.errorDigest,n.errorMessage,n.errorComponentStack),mo(r,e,t),Ea(e,r.responseState);if(n.pendingTasks>0){n.rootSegmentID=r.nextSegmentId++,n.completedSegments.length>0&&r.partialBoundaries.push(n);var o=n.id=ze(r.responseState);return yr(e,r.responseState,o),mo(r,e,t),Sr(e,r.responseState)}else{if(n.byteSize>r.progressiveChunkSize)return n.rootSegmentID=r.nextSegmentId++,r.completedBoundaries.push(n),yr(e,r.responseState,n.id),mo(r,e,t),Sr(e,r.responseState);Ro(e,r.responseState);var l=n.completedSegments;if(l.length!==1)throw new Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");var c=l[0];return ya(r,e,c),Io(e,r.responseState)}}function Vi(r,e,t){return ll(e,r.responseState,t.id,t.errorDigest,t.errorMessage,t.errorComponentStack)}function Sa(r,e,t){return j(e,r.responseState,t.formatContext,t.id),ya(r,e,t),q(e,t.formatContext)}function Yi(r,e,t){for(var n=t.completedSegments,o=0;o<n.length;o++){var l=n[o];Gi(r,e,t,l)}return n.length=0,fi(e,r.responseState,t.id,t.rootSegmentID)}function Vl(r,e,t){for(var n=t.completedSegments,o=0;o<n.length;o++){var l=n[o];if(!Gi(r,e,t,l))return o++,n.splice(0,o),!1}return n.splice(0,o),!0}function Gi(r,e,t,n){if(n.status===Ka)return!0;var o=n.id;if(o===-1){var l=n.id=t.rootSegmentID;if(l===-1)throw new Error("A root segment ID must have been assigned by now. This is a bug in React.");return Sa(r,e,n)}else return Sa(r,e,n),el(e,r.responseState,o)}function ui(r,e){an();try{var t=r.completedRootSegment;t!==null&&r.pendingRootTasks===0&&(ya(r,e,t),r.completedRootSegment=null,ka(e,r.responseState));var n=r.clientRenderedBoundaries,o;for(o=0;o<n.length;o++){var l=n[o];Vi(r,e,l)}n.splice(0,o);var c=r.completedBoundaries;for(o=0;o<c.length;o++){var d=c[o];Yi(r,e,d)}c.splice(0,o),nr(e),an(e);var m=r.partialBoundaries;for(o=0;o<m.length;o++){var S=m[o];if(!Vl(r,e,S)){r.destination=null,o++,m.splice(0,o);return}}m.splice(0,o);var R=r.completedBoundaries;for(o=0;o<R.length;o++){var I=R[o];Yi(r,e,I)}R.splice(0,o)}finally{nr(e),r.allPendingTasks===0&&r.pingedTasks.length===0&&r.clientRenderedBoundaries.length===0&&r.completedBoundaries.length===0&&(r.abortableTasks.size!==0&&h("There was still abortable task at the root when we closed. This is a bug in React."),ue(e))}}function Xi(r){et(function(){return si(r)})}function Yl(r,e){if(r.status===Ar){r.status=Mr,ge(e,r.fatalError);return}if(r.status!==Mr&&r.destination===null){r.destination=e;try{ui(r,e)}catch(t){fo(r,t),po(r,t)}}}function Zi(r,e){try{var t=r.abortableTasks;t.forEach(function(n){return li(n,r,e)}),t.clear(),r.destination!==null&&ui(r,r.destination)}catch(n){fo(r,n),po(r,n)}}function Gl(r,e){return new Promise(function(t,n){var o,l,c=new Promise(function(_,z){l=_,o=z});function d(){var _=new ReadableStream({type:"bytes",pull:function(z){Yl(S,z)},cancel:function(z){Zi(S)}},{highWaterMark:0});_.allReady=c,t(_)}function m(_){c.catch(function(){}),n(_)}var S=va(r,cr(e?e.identifierPrefix:void 0,e?e.nonce:void 0,e?e.bootstrapScriptContent:void 0,e?e.bootstrapScripts:void 0,e?e.bootstrapModules:void 0),Ot(e?e.namespaceURI:void 0),e?e.progressiveChunkSize:void 0,e?e.onError:void 0,l,d,m,o);if(e&&e.signal){var R=e.signal,I=function(){Zi(S,R.reason),R.removeEventListener("abort",I)};R.addEventListener("abort",I)}Xi(S)})}Qi.renderToReadableStream=Gl,Qi.version=M}()),Qi}var bo,Zl;process.env.NODE_ENV==="production"?(bo=rs(),Zl=os()):(bo=as(),Zl=is());wo.version=bo.version;wo.renderToString=bo.renderToString;wo.renderToStaticMarkup=bo.renderToStaticMarkup;wo.renderToNodeStream=bo.renderToNodeStream;wo.renderToStaticNodeStream=bo.renderToStaticNodeStream;wo.renderToReadableStream=Zl.renderToReadableStream;const Jl={innerHTML:""},ls={head:{insertBefore(){}},getElementById(){return Jl},createElement(){return{setAttribute(){}}}};global.document=ls;function ss(vt,M=!0){let W=wo.renderToStaticMarkup(vt);if(Ql.StylesContext.flush(),M){const ve="<head>",h=W.indexOf(ve);if(h>-1){const $=`<style id="crono-styles">${Jl.innerHTML}</style>`,et=h+ve.length;W=W.substring(0,et)+$+W.substring(et)}}return Ql.StylesContext.clear(),{html:W,styles:Jl.innerHTML}}exports.renderToStaticMarkup=ss;
|
package/ssg.mjs
CHANGED
|
@@ -9837,7 +9837,6 @@ const Jl = {
|
|
|
9837
9837
|
};
|
|
9838
9838
|
global.document = ls;
|
|
9839
9839
|
function cs(vt, M = !0) {
|
|
9840
|
-
Ql.clear();
|
|
9841
9840
|
let W = wo.renderToStaticMarkup(vt);
|
|
9842
9841
|
if (Ql.flush(), M) {
|
|
9843
9842
|
const ve = "<head>", h = W.indexOf(ve);
|
|
@@ -9846,7 +9845,7 @@ function cs(vt, M = !0) {
|
|
|
9846
9845
|
W = W.substring(0, et) + $ + W.substring(et);
|
|
9847
9846
|
}
|
|
9848
9847
|
}
|
|
9849
|
-
return {
|
|
9848
|
+
return Ql.clear(), {
|
|
9850
9849
|
html: W,
|
|
9851
9850
|
styles: Jl.innerHTML
|
|
9852
9851
|
};
|
package/ssg.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|