137 lines
543 KiB
JavaScript
137 lines
543 KiB
JavaScript
|
import{_extends,_objectWithoutPropertiesLoose}from"./chunk-QPL63VNK.js";import{lightenColor,newStyled,scope}from"./chunk-SPUAGIB2.js";import{require_checkPropTypes,require_object_assign,require_react}from"./chunk-QMHPSTMR.js";import{require_memoizerific}from"./chunk-3J6GS6FI.js";import{__commonJS,__commonJS2,__toESM,__toESM2}from"./chunk-RKFFWI2D.js";var require_scheduler_development=__commonJS({"../../node_modules/scheduler/cjs/scheduler.development.js"(exports){"use strict";(function(){"use strict";var enableSchedulerDebugging=!1,enableProfiling=!0,requestHostCallback,requestHostTimeout,cancelHostTimeout,shouldYieldToHost,requestPaint;if(typeof window>"u"||typeof MessageChannel!="function"){var _callback=null,_timeoutID=null,_flushCallback=function(){if(_callback!==null)try{var currentTime=exports.unstable_now(),hasRemainingTime=!0;_callback(hasRemainingTime,currentTime),_callback=null}catch(e){throw setTimeout(_flushCallback,0),e}},initialTime=Date.now();exports.unstable_now=function(){return Date.now()-initialTime},requestHostCallback=function(cb){_callback!==null?setTimeout(requestHostCallback,0,cb):(_callback=cb,setTimeout(_flushCallback,0))},requestHostTimeout=function(cb,ms){_timeoutID=setTimeout(cb,ms)},cancelHostTimeout=function(){clearTimeout(_timeoutID)},shouldYieldToHost=function(){return!1},requestPaint=exports.unstable_forceFrameRate=function(){}}else{var performance2=window.performance,_Date=window.Date,_setTimeout=window.setTimeout,_clearTimeout=window.clearTimeout;if(typeof console<"u"){var requestAnimationFrame=window.requestAnimationFrame,cancelAnimationFrame=window.cancelAnimationFrame;typeof requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof cancelAnimationFrame!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if(typeof performance2=="object"&&typeof performance2.now=="function")exports.unstable_now=function(){return performance2.now()};else{var _initialTime=_Date.now();exports.unstable_now=function(){return _Date.now()-_initialTime}}var isMessageLoopRunning=!1,scheduledHostCallback=null,taskTimeoutID=-1,yieldInterval=5,deadline=0;shouldYieldToHost=function(){return exports.unstable_now()>=deadline},requestPaint=function(){},exports.unstable_forceFrameRate=function(fps){if(fps<0||fps>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported");return}fps>0?yieldInterval=Math.floor(1e3/fps):yieldInterval=5};var performWorkUntilDeadline=function(){if(scheduledHostCallback!==null){var currentTime=exports.unstable_now();deadline=currentTime+yieldInterval;var hasTimeRemaining=!0;try{var hasMoreWork=scheduledHostCallback(hasTimeRemaining,currentTime);hasMoreWork?port.postMessage(null):(isMessageLoopRunning=!1,scheduledHostCallback=null)}catch(error){throw port.postMessage(null),error}}else isMessageLoopRunning=!1},channel=new MessageChannel,port=channel.port2;channel.port1.onmessage=performWorkUntilDeadline,requestHostCallback=function(callback){scheduledHostCallback=callback,isMessageLoopRunning||(isMessageLoopRunning=!0,port.postMessage(null))},requestHostTimeout=function(callback,ms){taskTimeoutID=_setTimeout(function(){callback(exports.unstable_now())},ms)},cancelHostTimeout=function(){_clearTimeout(taskTimeoutID),taskTimeoutID=-1}}function push(heap,node){var index=heap.length;heap.push(node),siftUp(heap,node,index)}function peek(heap){var first=heap[0];return first===void 0?null:first}function pop(heap){var first=heap[0];if(first!==void 0){var last=heap.pop();return last!==first&&(heap[0]=last,siftDown(heap,last,0)),first}else return null}function siftUp(heap,node,i){for(var index=i;;){var parentIndex=index-1>>>1,parent=heap[parentIndex];if(parent!==void 0&&compare(parent,node)>0)heap[parentIndex]=node,heap[index]=parent,index=parentIndex;else return}}function siftDown(h
|
||
|
in`)===0;if(!hasExistingStack){var ReactDebugCurrentFrame2=ReactSharedInternals.ReactDebugCurrentFrame,stack=ReactDebugCurrentFrame2.getStackAddendum();stack!==""&&(format+="%s",args=args.concat([stack]))}var argsWithFormat=args.map(function(item){return""+item});argsWithFormat.unshift("Warning: "+format),Function.prototype.apply.call(console[level],console,argsWithFormat);try{var argIndex=0,message="Warning: "+format.replace(/%s/g,function(){return args[argIndex++]});throw new Error(message)}catch{}}}if(!React)throw Error("ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.");var invokeGuardedCallbackImpl=function(name,func,context,a,b,c,d,e,f){var funcArgs=Array.prototype.slice.call(arguments,3);try{func.apply(context,funcArgs)}catch(error2){this.onError(error2)}};if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var fakeNode=document.createElement("react"),invokeGuardedCallbackDev=function(name,func,context,a,b,c,d,e,f){if(!(typeof document<"u"))throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var evt=document.createEvent("Event"),didError=!0,windowEvent=window.event,windowEventDescriptor=Object.getOwnPropertyDescriptor(window,"event"),funcArgs=Array.prototype.slice.call(arguments,3);function callCallback2(){fakeNode.removeEventListener(evtType,callCallback2,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=windowEvent),func.apply(context,funcArgs),didError=!1}var error2,didSetError=!1,isCrossOriginError=!1;function handleWindowError(event){if(error2=event.error,didSetError=!0,error2===null&&event.colno===0&&event.lineno===0&&(isCrossOriginError=!0),event.defaultPrevented&&error2!=null&&typeof error2=="object")try{error2._suppressLogging=!0}catch{}}var evtType="react-"+(name||"invokeguardedcallback");window.addEventListener("error",handleWindowError),fakeNode.addEventListener(evtType,callCallback2,!1),evt.initEvent(evtType,!1,!1),fakeNode.dispatchEvent(evt),windowEventDescriptor&&Object.defineProperty(window,"event",windowEventDescriptor),didError&&(didSetError?isCrossOriginError&&(error2=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://fb.me/react-crossorigin-error for more information.")):error2=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(error2)),window.removeEventListener("error",handleWindowError)};invokeGuardedCallbackImpl=invokeGuardedCallbackDev}var invokeGuardedCallbackImpl$1=invokeGuardedCallbackImpl,hasError=!1,caughtError=null,hasRethrowError=!1,rethrowError=null,reporter={onError:function(error2){hasError=!0,caughtError=error2}};function invokeGuardedCallback(name,func,context,a,b,c,d,e,f){hasError=!1,caughtError=null,invokeGuardedCallbackImpl$1.apply(reporter,arguments)}function invokeGuardedCallbackAndCatchFirstError(name,func,context,a,b,c,d,e,f){if(invokeGuardedCallback.apply(this,arguments),hasError){var error2=clearCaughtError();hasRethrowError||(hasRethrowError=!0,rethrowError=error2)}}function rethrowCaughtError(){if(hasRethrowError){var error2=rethrowError;throw hasRethrowError=!1,rethrowError=null,error2}}function hasCaughtE
|
||
|
in `+(name||"Unknown")+sourceInfo}var hasSymbol=typeof Symbol=="function"&&Symbol.for,REACT_ELEMENT_TYPE=hasSymbol?Symbol.for("react.element"):60103,REACT_PORTAL_TYPE=hasSymbol?Symbol.for("react.portal"):60106,REACT_FRAGMENT_TYPE=hasSymbol?Symbol.for("react.fragment"):60107,REACT_STRICT_MODE_TYPE=hasSymbol?Symbol.for("react.strict_mode"):60108,REACT_PROFILER_TYPE=hasSymbol?Symbol.for("react.profiler"):60114,REACT_PROVIDER_TYPE=hasSymbol?Symbol.for("react.provider"):60109,REACT_CONTEXT_TYPE=hasSymbol?Symbol.for("react.context"):60110,REACT_CONCURRENT_MODE_TYPE=hasSymbol?Symbol.for("react.concurrent_mode"):60111,REACT_FORWARD_REF_TYPE=hasSymbol?Symbol.for("react.forward_ref"):60112,REACT_SUSPENSE_TYPE=hasSymbol?Symbol.for("react.suspense"):60113,REACT_SUSPENSE_LIST_TYPE=hasSymbol?Symbol.for("react.suspense_list"):60120,REACT_MEMO_TYPE=hasSymbol?Symbol.for("react.memo"):60115,REACT_LAZY_TYPE=hasSymbol?Symbol.for("react.lazy"):60116,REACT_BLOCK_TYPE=hasSymbol?Symbol.for("react.block"):60121,MAYBE_ITERATOR_SYMBOL=typeof Symbol=="function"&&Symbol.iterator,FAUX_ITERATOR_SYMBOL="@@iterator";function getIteratorFn(maybeIterable){if(maybeIterable===null||typeof maybeIterable!="object")return null;var maybeIterator=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||maybeIterable[FAUX_ITERATOR_SYMBOL];return typeof maybeIterator=="function"?maybeIterator:null}var Uninitialized=-1,Pending=0,Resolved=1,Rejected=2;function refineResolvedLazyComponent(lazyComponent){return lazyComponent._status===Resolved?lazyComponent._result:null}function initializeLazyComponentType(lazyComponent){if(lazyComponent._status===Uninitialized){lazyComponent._status=Pending;var ctor=lazyComponent._ctor,thenable=ctor();lazyComponent._result=thenable,thenable.then(function(moduleObject){if(lazyComponent._status===Pending){var defaultExport=moduleObject.default;defaultExport===void 0&&error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
||
|
|
||
|
Your code should look like:
|
||
|
const MyComponent = lazy(() => import('./MyComponent'))`,moduleObject),lazyComponent._status=Resolved,lazyComponent._result=defaultExport}},function(error2){lazyComponent._status===Pending&&(lazyComponent._status=Rejected,lazyComponent._result=error2)})}}function getWrappedName(outerType,innerType,wrapperName){var functionName=innerType.displayName||innerType.name||"";return outerType.displayName||(functionName!==""?wrapperName+"("+functionName+")":wrapperName)}function getComponentName(type){if(type==null)return null;if(typeof type.tag=="number"&&error("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof type=="function")return type.displayName||type.name||null;if(typeof type=="string")return type;switch(type){case REACT_FRAGMENT_TYPE:return"Fragment";case REACT_PORTAL_TYPE:return"Portal";case REACT_PROFILER_TYPE:return"Profiler";case REACT_STRICT_MODE_TYPE:return"StrictMode";case REACT_SUSPENSE_TYPE:return"Suspense";case REACT_SUSPENSE_LIST_TYPE:return"SuspenseList"}if(typeof type=="object")switch(type.$$typeof){case REACT_CONTEXT_TYPE:return"Context.Consumer";case REACT_PROVIDER_TYPE:return"Context.Provider";case REACT_FORWARD_REF_TYPE:return getWrappedName(type,type.render,"ForwardRef");case REACT_MEMO_TYPE:return getComponentName(type.type);case REACT_BLOCK_TYPE:return getComponentName(type.render);case REACT_LAZY_TYPE:{var thenable=type,resolvedThenable=refineResolvedLazyComponent(thenable);if(resolvedThenable)return getComponentName(resolvedThenable);break}}return null}var ReactDebugCurrentFrame$1=ReactSharedInternals.ReactDebugCurrentFrame;function describeFiber(fiber){switch(fiber.tag){case HostRoot:case HostPortal:case HostText:case Fragment:case ContextProvider:case ContextConsumer:return"";default:var owner=fiber._debugOwner,source=fiber._debugSource,name=getComponentName(fiber.type),ownerName=null;return owner&&(ownerName=getComponentName(owner.type)),describeComponentFrame(name,source,ownerName)}}function getStackByFiberInDevAndProd(workInProgress2){var info="",node=workInProgress2;do info+=describeFiber(node),node=node.return;while(node);return info}var current=null,isRendering=!1;function getCurrentFiberOwnerNameInDevOrNull(){{if(current===null)return null;var owner=current._debugOwner;if(owner!==null&&typeof owner<"u")return getComponentName(owner.type)}return null}function getCurrentFiberStackInDev(){return current===null?"":getStackByFiberInDevAndProd(current)}function resetCurrentFiber(){ReactDebugCurrentFrame$1.getCurrentStack=null,current=null,isRendering=!1}function setCurrentFiber(fiber){ReactDebugCurrentFrame$1.getCurrentStack=getCurrentFiberStackInDev,current=fiber,isRendering=!1}function setIsRendering(rendering){isRendering=rendering}function toString(value){return""+value}function getToStringValue(value){switch(typeof value){case"boolean":case"number":case"object":case"string":case"undefined":return value;default:return""}}var ReactDebugCurrentFrame$2=null,ReactControlledValuePropTypes={checkPropTypes:null};{ReactDebugCurrentFrame$2=ReactSharedInternals.ReactDebugCurrentFrame;var hasReadOnlyValue={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},propTypes={value:function(props,propName,componentName){return hasReadOnlyValue[props.type]||props.onChange||props.readOnly||props.disabled||props[propName]==null||enableDeprecatedFlareAPI?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(props,propName,componentName){return props.onChange||props.readOnly||props.disabled||props[propName]==null||enableDeprecatedFlareAPI?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}};ReactControlledValuePropTypes.checkPropTypes=function(tagName,props){checkPr
|
||
|
|
||
|
Check the render method of \``+ownerName+"`.":""}var valuePropNames=["value","defaultValue"];function checkSelectPropTypes(props){{ReactControlledValuePropTypes.checkPropTypes("select",props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]!=null){var isArray2=Array.isArray(props[propName]);props.multiple&&!isArray2?error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",propName,getDeclarationErrorAddendum()):!props.multiple&&isArray2&&error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",propName,getDeclarationErrorAddendum())}}}}function updateOptions(node,multiple,propValue,setDefaultSelected){var options=node.options;if(multiple){for(var selectedValues=propValue,selectedValue={},i=0;i<selectedValues.length;i++)selectedValue["$"+selectedValues[i]]=!0;for(var _i=0;_i<options.length;_i++){var selected=selectedValue.hasOwnProperty("$"+options[_i].value);options[_i].selected!==selected&&(options[_i].selected=selected),selected&&setDefaultSelected&&(options[_i].defaultSelected=!0)}}else{for(var _selectedValue=toString(getToStringValue(propValue)),defaultSelected=null,_i2=0;_i2<options.length;_i2++){if(options[_i2].value===_selectedValue){options[_i2].selected=!0,setDefaultSelected&&(options[_i2].defaultSelected=!0);return}defaultSelected===null&&!options[_i2].disabled&&(defaultSelected=options[_i2])}defaultSelected!==null&&(defaultSelected.selected=!0)}}function getHostProps$2(element,props){return _assign({},props,{value:void 0})}function initWrapperState$1(element,props){var node=element;checkSelectPropTypes(props),node._wrapperState={wasMultiple:!!props.multiple},props.value!==void 0&&props.defaultValue!==void 0&&!didWarnValueDefaultValue$1&&(error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://fb.me/react-controlled-components"),didWarnValueDefaultValue$1=!0)}function postMountWrapper$2(element,props){var node=element;node.multiple=!!props.multiple;var value=props.value;value!=null?updateOptions(node,!!props.multiple,value,!1):props.defaultValue!=null&&updateOptions(node,!!props.multiple,props.defaultValue,!0)}function postUpdateWrapper(element,props){var node=element,wasMultiple=node._wrapperState.wasMultiple;node._wrapperState.wasMultiple=!!props.multiple;var value=props.value;value!=null?updateOptions(node,!!props.multiple,value,!1):wasMultiple!==!!props.multiple&&(props.defaultValue!=null?updateOptions(node,!!props.multiple,props.defaultValue,!0):updateOptions(node,!!props.multiple,props.multiple?[]:"",!1))}function restoreControlledState$1(element,props){var node=element,value=props.value;value!=null&&updateOptions(node,!!props.multiple,value,!1)}var didWarnValDefaultVal=!1;function getHostProps$3(element,props){var node=element;if(props.dangerouslySetInnerHTML!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var hostProps=_assign({},props,{value:void 0,defaultValue:void 0,children:toString(node._wrapperState.initialValue)});return hostProps}function initWrapperState$2(element,props){var node=element;ReactControlledValuePropTypes.checkPropTypes("textarea",props),props.value!==void 0&&props.defaultValue!==void 0&&!didWarnValDefaultVal&&(error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://fb.me/react-controlled-components",getCurrentFiberOwnerNameInDevOrNull()||"A component"),didWarnValDefaultVal=!0);var initialValue=props.value;if(initialValue==null){var children=props.children,defaultValue=props.defaultValue;if(children!=null){error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(
|
||
|
`).replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX,"")},warnForTextDifference=function(serverText,clientText){if(!didWarnInvalidHydration){var normalizedClientText=normalizeMarkupForTextOrAttribute(clientText),normalizedServerText=normalizeMarkupForTextOrAttribute(serverText);normalizedServerText!==normalizedClientText&&(didWarnInvalidHydration=!0,error('Text content did not match. Server: "%s" Client: "%s"',normalizedServerText,normalizedClientText))}},warnForPropDifference=function(propName,serverValue,clientValue){if(!didWarnInvalidHydration){var normalizedClientValue=normalizeMarkupForTextOrAttribute(clientValue),normalizedServerValue=normalizeMarkupForTextOrAttribute(serverValue);normalizedServerValue!==normalizedClientValue&&(didWarnInvalidHydration=!0,error("Prop `%s` did not match. Server: %s Client: %s",propName,JSON.stringify(normalizedServerValue),JSON.stringify(normalizedClientValue)))}},warnForExtraAttributes=function(attributeNames){if(!didWarnInvalidHydration){didWarnInvalidHydration=!0;var names=[];attributeNames.forEach(function(name){names.push(name)}),error("Extra attributes from the server: %s",names)}},warnForInvalidEventListener=function(registrationName,listener){listener===!1?error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",registrationName,registrationName,registrationName):error("Expected `%s` listener to be a function, instead got a value of `%s` type.",registrationName,typeof listener)},normalizeHTML=function(parent,html){var testElement=parent.namespaceURI===HTML_NAMESPACE$1?parent.ownerDocument.createElement(parent.tagName):parent.ownerDocument.createElementNS(parent.namespaceURI,parent.tagName);return testElement.innerHTML=html,testElement.innerHTML}}function ensureListeningTo(rootContainerElement,registrationName){var isDocumentOrFragment=rootContainerElement.nodeType===DOCUMENT_NODE||rootContainerElement.nodeType===DOCUMENT_FRAGMENT_NODE,doc=isDocumentOrFragment?rootContainerElement:rootContainerElement.ownerDocument;legacyListenToEvent(registrationName,doc)}function getOwnerDocumentFromRootContainer(rootContainerElement){return rootContainerElement.nodeType===DOCUMENT_NODE?rootContainerElement:rootContainerElement.ownerDocument}function noop2(){}function trapClickOnNonInteractiveElement(node){node.onclick=noop2}function setInitialDOMProperties(tag,domElement,rootContainerElement,nextProps,isCustomComponentTag){for(var propKey in nextProps)if(nextProps.hasOwnProperty(propKey)){var nextProp=nextProps[propKey];if(propKey===STYLE)nextProp&&Object.freeze(nextProp),setValueForStyles(domElement,nextProp);else if(propKey===DANGEROUSLY_SET_INNER_HTML){var nextHtml=nextProp?nextProp[HTML$1]:void 0;nextHtml!=null&&setInnerHTML(domElement,nextHtml)}else if(propKey===CHILDREN)if(typeof nextProp=="string"){var canSetTextContent=tag!=="textarea"||nextProp!=="";canSetTextContent&&setTextContent(domElement,nextProp)}else typeof nextProp=="number"&&setTextContent(domElement,""+nextProp);else propKey===SUPPRESS_CONTENT_EDITABLE_WARNING||propKey===SUPPRESS_HYDRATION_WARNING||propKey===AUTOFOCUS||(registrationNameModules.hasOwnProperty(propKey)?nextProp!=null&&(typeof nextProp!="function"&&warnForInvalidEventListener(propKey,nextProp),ensureListeningTo(rootContainerElement,propKey)):nextProp!=null&&setValueForProperty(domElement,propKey,nextProp,isCustomComponentTag))}}function updateDOMProperties(domElement,updatePayload,wasCustomComponentTag,isCustomComponentTag){for(var i=0;i<updatePayload.length;i+=2){var propKey=updatePayload[i],propValue=updatePayload[i+1];propKey===STYLE?setValueForStyles(domElement,propValue):propKey===DANGEROUSLY_SET_INNER_HTML?setInnerHTML(domElement,propValue):propKey===CHILDREN?setTextContent(domElement,propValue):setValueForProperty(domElement,propKey,propValue,isCustomComponentTag)}}function createElement(type,props,rootContainerElement,parentNamespace){var isCustomComponentTag,ownerDocument=getOwnerDocumentFromRootContainer(rootContainerElem
|
||
|
|
||
|
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
||
|
|
||
|
Please update the following components: %s`,sortedNames)}if(UNSAFE_componentWillReceivePropsUniqueNames.size>0){var _sortedNames=setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.
|
||
|
|
||
|
* Move data fetching code or side effects to componentDidUpdate.
|
||
|
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
|
||
|
|
||
|
Please update the following components: %s`,_sortedNames)}if(UNSAFE_componentWillUpdateUniqueNames.size>0){var _sortedNames2=setToSortedString(UNSAFE_componentWillUpdateUniqueNames);error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.
|
||
|
|
||
|
* Move data fetching code or side effects to componentDidUpdate.
|
||
|
|
||
|
Please update the following components: %s`,_sortedNames2)}if(componentWillMountUniqueNames.size>0){var _sortedNames3=setToSortedString(componentWillMountUniqueNames);warn(`componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
|
||
|
|
||
|
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
||
|
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
||
|
|
||
|
Please update the following components: %s`,_sortedNames3)}if(componentWillReceivePropsUniqueNames.size>0){var _sortedNames4=setToSortedString(componentWillReceivePropsUniqueNames);warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
|
||
|
|
||
|
* Move data fetching code or side effects to componentDidUpdate.
|
||
|
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
|
||
|
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
||
|
|
||
|
Please update the following components: %s`,_sortedNames4)}if(componentWillUpdateUniqueNames.size>0){var _sortedNames5=setToSortedString(componentWillUpdateUniqueNames);warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
|
||
|
|
||
|
* Move data fetching code or side effects to componentDidUpdate.
|
||
|
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
||
|
|
||
|
Please update the following components: %s`,_sortedNames5)}};var pendingLegacyContextWarning=new Map,didWarnAboutLegacyContext=new Set;ReactStrictModeWarnings.recordLegacyContextWarning=function(fiber,instance){var strictRoot=findStrictRoot(fiber);if(strictRoot===null){error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!didWarnAboutLegacyContext.has(fiber.type)){var warningsForRoot=pendingLegacyContextWarning.get(strictRoot);(fiber.type.contextTypes!=null||fiber.type.childContextTypes!=null||instance!==null&&typeof instance.getChildContext=="function")&&(warningsForRoot===void 0&&(warningsForRoot=[],pendingLegacyContextWarning.set(strictRoot,warningsForRoot)),warningsForRoot.push(fiber))}},ReactStrictModeWarnings.flushLegacyContextWarning=function(){pendingLegacyContextWarning.forEach(function(fiberArray,strictRoot){if(fiberArray.length!==0){var firstFiber=fiberArray[0],uniqueNames=new Set;fiberArray.forEach(function(fiber){uniqueNames.add(getComponentName(fiber.type)||"Component"),didWarnAboutLegacyContext.add(fiber.type)});var sortedNames=setToSortedString(uniqueNames),firstComponentStack=getStackByFiberInDevAndProd(firstFiber);error(`Legacy context API has been detected within a strict-mode tree.
|
||
|
|
||
|
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
||
|
|
||
|
Please update the following components: %s
|
||
|
|
||
|
Learn more about this warning here: https://fb.me/react-legacy-context%s`,sortedNames,firstComponentStack)}})},ReactStrictModeWarnings.discardPendingWarnings=function(){pendingComponentWillMountWarnings=[],pendingUNSAFE_ComponentWillMountWarnings=[],pendingComponentWillReceivePropsWarnings=[],pendingUNSAFE_ComponentWillReceivePropsWarnings=[],pendingComponentWillUpdateWarnings=[],pendingUNSAFE_ComponentWillUpdateWarnings=[],pendingLegacyContextWarning=new Map}}var resolveFamily=null,failedBoundaries=null,setRefreshHandler=function(handler){resolveFamily=handler};function resolveFunctionForHotReloading(type){{if(resolveFamily===null)return type;var family=resolveFamily(type);return family===void 0?type:family.current}}function resolveClassForHotReloading(type){return resolveFunctionForHotReloading(type)}function resolveForwardRefForHotReloading(type){{if(resolveFamily===null)return type;var family=resolveFamily(type);if(family===void 0){if(type!=null&&typeof type.render=="function"){var currentRender=resolveFunctionForHotReloading(type.render);if(type.render!==currentRender){var syntheticType={$$typeof:REACT_FORWARD_REF_TYPE,render:currentRender};return type.displayName!==void 0&&(syntheticType.displayName=type.displayName),syntheticType}}return type}return family.current}}function isCompatibleFamilyForHotReloading(fiber,element){{if(resolveFamily===null)return!1;var prevType=fiber.elementType,nextType=element.type,needsCompareFamilies=!1,$$typeofNextType=typeof nextType=="object"&&nextType!==null?nextType.$$typeof:null;switch(fiber.tag){case ClassComponent:{typeof nextType=="function"&&(needsCompareFamilies=!0);break}case FunctionComponent:{(typeof nextType=="function"||$$typeofNextType===REACT_LAZY_TYPE)&&(needsCompareFamilies=!0);break}case ForwardRef:{($$typeofNextType===REACT_FORWARD_REF_TYPE||$$typeofNextType===REACT_LAZY_TYPE)&&(needsCompareFamilies=!0);break}case MemoComponent:case SimpleMemoComponent:{($$typeofNextType===REACT_MEMO_TYPE||$$typeofNextType===REACT_LAZY_TYPE)&&(needsCompareFamilies=!0);break}default:return!1}if(needsCompareFamilies){var prevFamily=resolveFamily(prevType);if(prevFamily!==void 0&&prevFamily===resolveFamily(nextType))return!0}return!1}}function markFailedErrorBoundaryForHotReloading(fiber){{if(resolveFamily===null||typeof WeakSet!="function")return;failedBoundaries===null&&(failedBoundaries=new WeakSet),failedBoundaries.add(fiber)}}var scheduleRefresh=function(root2,update){{if(resolveFamily===null)return;var staleFamilies=update.staleFamilies,updatedFamilies=update.updatedFamilies;flushPassiveEffects(),flushSync2(function(){scheduleFibersWithFamiliesRecursively(root2.current,updatedFamilies,staleFamilies)})}},scheduleRoot=function(root2,element){{if(root2.context!==emptyContextObject)return;flushPassiveEffects(),syncUpdates(function(){updateContainer(element,root2,null,null)})}};function scheduleFibersWithFamiliesRecursively(fiber,updatedFamilies,staleFamilies){{var alternate=fiber.alternate,child=fiber.child,sibling=fiber.sibling,tag=fiber.tag,type=fiber.type,candidateType=null;switch(tag){case FunctionComponent:case SimpleMemoComponent:case ClassComponent:candidateType=type;break;case ForwardRef:candidateType=type.render;break}if(resolveFamily===null)throw new Error("Expected resolveFamily to be set during hot reload.");var needsRender=!1,needsRemount=!1;if(candidateType!==null){var family=resolveFamily(candidateType);family!==void 0&&(staleFamilies.has(family)?needsRemount=!0:updatedFamilies.has(family)&&(tag===ClassComponent?needsRemount=!0:needsRender=!0))}failedBoundaries!==null&&(failedBoundaries.has(fiber)||alternate!==null&&failedBoundaries.has(alternate))&&(needsRemount=!0),needsRemount&&(fiber._debugNeedsRemount=!0),(needsRemount||needsRender)&&scheduleWork(fiber,Sync),child!==null&&!needsRemount&&scheduleFibersWithFamiliesRecursively(child,updatedFamilies,staleFamilies),sibling!==null&&scheduleFibersWithFamiliesRecursively(sibling,updatedFamilies,staleFamilies)}}var findHostInstancesForRefresh=function(root2,families){{var hostInstances=new Set,types=new Set(families.map(
|
||
|
|
||
|
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
||
|
|
||
|
The above lifecycles should be removed. Learn more about this warning here:
|
||
|
https://fb.me/react-unsafe-component-lifecycles`,_componentName,newApiName,foundWillMountName!==null?`
|
||
|
`+foundWillMountName:"",foundWillReceivePropsName!==null?`
|
||
|
`+foundWillReceivePropsName:"",foundWillUpdateName!==null?`
|
||
|
`+foundWillUpdateName:""))}}}return isLegacyContextConsumer&&cacheContext(workInProgress2,unmaskedContext,context),instance}function callComponentWillMount(workInProgress2,instance){startPhaseTimer(workInProgress2,"componentWillMount");var oldState=instance.state;typeof instance.componentWillMount=="function"&&instance.componentWillMount(),typeof instance.UNSAFE_componentWillMount=="function"&&instance.UNSAFE_componentWillMount(),stopPhaseTimer(),oldState!==instance.state&&(error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",getComponentName(workInProgress2.type)||"Component"),classComponentUpdater.enqueueReplaceState(instance,instance.state,null))}function callComponentWillReceiveProps(workInProgress2,instance,newProps,nextContext){var oldState=instance.state;if(startPhaseTimer(workInProgress2,"componentWillReceiveProps"),typeof instance.componentWillReceiveProps=="function"&&instance.componentWillReceiveProps(newProps,nextContext),typeof instance.UNSAFE_componentWillReceiveProps=="function"&&instance.UNSAFE_componentWillReceiveProps(newProps,nextContext),stopPhaseTimer(),instance.state!==oldState){{var componentName=getComponentName(workInProgress2.type)||"Component";didWarnAboutStateAssignmentForComponent.has(componentName)||(didWarnAboutStateAssignmentForComponent.add(componentName),error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",componentName))}classComponentUpdater.enqueueReplaceState(instance,instance.state,null)}}function mountClassInstance(workInProgress2,ctor,newProps,renderExpirationTime2){checkClassInstance(workInProgress2,ctor,newProps);var instance=workInProgress2.stateNode;instance.props=newProps,instance.state=workInProgress2.memoizedState,instance.refs=emptyRefsObject,initializeUpdateQueue(workInProgress2);var contextType=ctor.contextType;if(typeof contextType=="object"&&contextType!==null)instance.context=readContext(contextType);else{var unmaskedContext=getUnmaskedContext(workInProgress2,ctor,!0);instance.context=getMaskedContext(workInProgress2,unmaskedContext)}{if(instance.state===newProps){var componentName=getComponentName(ctor)||"Component";didWarnAboutDirectlyAssigningPropsToState.has(componentName)||(didWarnAboutDirectlyAssigningPropsToState.add(componentName),error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",componentName))}workInProgress2.mode&StrictMode&&ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress2,instance),ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress2,instance)}processUpdateQueue(workInProgress2,newProps,instance,renderExpirationTime2),instance.state=workInProgress2.memoizedState;var getDerivedStateFromProps=ctor.getDerivedStateFromProps;typeof getDerivedStateFromProps=="function"&&(applyDerivedStateFromProps(workInProgress2,ctor,getDerivedStateFromProps,newProps),instance.state=workInProgress2.memoizedState),typeof ctor.getDerivedStateFromProps!="function"&&typeof instance.getSnapshotBeforeUpdate!="function"&&(typeof instance.UNSAFE_componentWillMount=="function"||typeof instance.componentWillMount=="function")&&(callComponentWillMount(workInProgress2,instance),processUpdateQueue(workInProgress2,newProps,instance,renderExpirationTime2),instance.state=workInProgress2.memoizedState),typeof instance.componentDidMount=="function"&&(workInProgress2.effectTag|=Update)}function resumeMountClassInstance(workInProgress2,ctor,newProps,renderExpirationTime2){var instance=workInProgress2.stateNode,oldProps=workInProgress2.memoizedProps;instance.props=oldProps;var oldContext=instance.context,contextType=ctor.contextType,nextContext=emptyContextObject;if(typeof contextType=="object"&&contextType!==null)nextContext=readContext(contextType);else{var nextLegacyUnmaskedContext=getUnmaskedContext(workInProgress2,ctor,!0);nextContext=getMaskedCont
|
||
|
1. You may be adding a ref to a function component
|
||
|
2. You may be adding a ref to a component that was not created inside a component's render method
|
||
|
3. You have multiple copies of React loaded
|
||
|
See https://fb.me/react-refs-must-have-owner for more information.`)}}return mixedRef}function throwOnInvalidObjectType(returnFiber,newChild){if(returnFiber.type!=="textarea"){var addendum="";throw addendum=" If you meant to render a collection of children, use an array instead."+getCurrentFiberStackInDev(),Error("Objects are not valid as a React child (found: "+(Object.prototype.toString.call(newChild)==="[object Object]"?"object with keys {"+Object.keys(newChild).join(", ")+"}":newChild)+")."+addendum)}}function warnOnFunctionType(){{var currentComponentErrorInfo="Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it."+getCurrentFiberStackInDev();if(ownerHasFunctionTypeWarning[currentComponentErrorInfo])return;ownerHasFunctionTypeWarning[currentComponentErrorInfo]=!0,error("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 ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(shouldTrackSideEffects){var last=returnFiber.lastEffect;last!==null?(last.nextEffect=childToDelete,returnFiber.lastEffect=childToDelete):returnFiber.firstEffect=returnFiber.lastEffect=childToDelete,childToDelete.nextEffect=null,childToDelete.effectTag=Deletion}}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects)return null;for(var childToDelete=currentFirstChild;childToDelete!==null;)deleteChild(returnFiber,childToDelete),childToDelete=childToDelete.sibling;return null}function mapRemainingChildren(returnFiber,currentFirstChild){for(var existingChildren=new Map,existingChild=currentFirstChild;existingChild!==null;)existingChild.key!==null?existingChildren.set(existingChild.key,existingChild):existingChildren.set(existingChild.index,existingChild),existingChild=existingChild.sibling;return existingChildren}function useFiber(fiber,pendingProps){var clone=createWorkInProgress(fiber,pendingProps);return clone.index=0,clone.sibling=null,clone}function placeChild(newFiber,lastPlacedIndex,newIndex){if(newFiber.index=newIndex,!shouldTrackSideEffects)return lastPlacedIndex;var current2=newFiber.alternate;if(current2!==null){var oldIndex=current2.index;return oldIndex<lastPlacedIndex?(newFiber.effectTag=Placement,lastPlacedIndex):oldIndex}else return newFiber.effectTag=Placement,lastPlacedIndex}function placeSingleChild(newFiber){return shouldTrackSideEffects&&newFiber.alternate===null&&(newFiber.effectTag=Placement),newFiber}function updateTextNode(returnFiber,current2,textContent,expirationTime){if(current2===null||current2.tag!==HostText){var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);return created.return=returnFiber,created}else{var existing=useFiber(current2,textContent);return existing.return=returnFiber,existing}}function updateElement(returnFiber,current2,element,expirationTime){if(current2!==null&&(current2.elementType===element.type||isCompatibleFamilyForHotReloading(current2,element))){var existing=useFiber(current2,element.props);return existing.ref=coerceRef(returnFiber,current2,element),existing.return=returnFiber,existing._debugSource=element._source,existing._debugOwner=element._owner,existing}var created=createFiberFromElement(element,returnFiber.mode,expirationTime);return created.ref=coerceRef(returnFiber,current2,element),created.return=returnFiber,created}function updatePortal(returnFiber,current2,portal,expirationTime){if(current2===null||current2.tag!==HostPortal||current2.stateNode.containerInfo!==portal.containerInfo||current2.stateNode.implementation!==portal.implementation){var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);return created.return=returnFiber,created}else{var existing=useFiber(current2,portal.children||[]);return existing.return=returnFiber,existing}}function updateFragment2(returnFiber,current2,fragment,expirati
|
||
|
`,table+=row}error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks
|
||
|
|
||
|
Previous render Next render
|
||
|
------------------------------------------------------
|
||
|
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
`,componentName,table)}}}function throwInvalidHookError(){throw Error(`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:
|
||
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
||
|
2. You might be breaking the Rules of Hooks
|
||
|
3. You might have more than one copy of React in the same app
|
||
|
See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.`)}function areHookInputsEqual(nextDeps,prevDeps){if(ignorePreviousDependencies)return!1;if(prevDeps===null)return error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",currentHookNameInDev),!1;nextDeps.length!==prevDeps.length&&error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
||
|
|
||
|
Previous: %s
|
||
|
Incoming: %s`,currentHookNameInDev,"["+prevDeps.join(", ")+"]","["+nextDeps.join(", ")+"]");for(var i=0;i<prevDeps.length&&i<nextDeps.length;i++)if(!objectIs(nextDeps[i],prevDeps[i]))return!1;return!0}function renderWithHooks(current2,workInProgress2,Component,props,secondArg,nextRenderExpirationTime){renderExpirationTime=nextRenderExpirationTime,currentlyRenderingFiber$1=workInProgress2,hookTypesDev=current2!==null?current2._debugHookTypes:null,hookTypesUpdateIndexDev=-1,ignorePreviousDependencies=current2!==null&¤t2.type!==workInProgress2.type,workInProgress2.memoizedState=null,workInProgress2.updateQueue=null,workInProgress2.expirationTime=NoWork,current2!==null&¤t2.memoizedState!==null?ReactCurrentDispatcher.current=HooksDispatcherOnUpdateInDEV:hookTypesDev!==null?ReactCurrentDispatcher.current=HooksDispatcherOnMountWithHookTypesInDEV:ReactCurrentDispatcher.current=HooksDispatcherOnMountInDEV;var children=Component(props,secondArg);if(workInProgress2.expirationTime===renderExpirationTime){var numberOfReRenders=0;do{if(workInProgress2.expirationTime=NoWork,!(numberOfReRenders<RE_RENDER_LIMIT))throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");numberOfReRenders+=1,ignorePreviousDependencies=!1,currentHook=null,workInProgressHook=null,workInProgress2.updateQueue=null,hookTypesUpdateIndexDev=-1,ReactCurrentDispatcher.current=HooksDispatcherOnRerenderInDEV,children=Component(props,secondArg)}while(workInProgress2.expirationTime===renderExpirationTime)}ReactCurrentDispatcher.current=ContextOnlyDispatcher,workInProgress2._debugHookTypes=hookTypesDev;var didRenderTooFewHooks=currentHook!==null&¤tHook.next!==null;if(renderExpirationTime=NoWork,currentlyRenderingFiber$1=null,currentHook=null,workInProgressHook=null,currentHookNameInDev=null,hookTypesDev=null,hookTypesUpdateIndexDev=-1,didScheduleRenderPhaseUpdate=!1,didRenderTooFewHooks)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return children}function bailoutHooks(current2,workInProgress2,expirationTime){workInProgress2.updateQueue=current2.updateQueue,workInProgress2.effectTag&=~(Passive|Update),current2.expirationTime<=expirationTime&&(current2.expirationTime=NoWork)}function resetHooksAfterThrow(){if(ReactCurrentDispatcher.current=ContextOnlyDispatcher,didScheduleRenderPhaseUpdate)for(var hook=currentlyRenderingFiber$1.memoizedState;hook!==null;){var queue=hook.queue;queue!==null&&(queue.pending=null),hook=hook.next}renderExpirationTime=NoWork,currentlyRenderingFiber$1=null,currentHook=null,workInProgressHook=null,hookTypesDev=null,hookTypesUpdateIndexDev=-1,currentHookNameInDev=null,didScheduleRenderPhaseUpdate=!1}function mountWorkInProgressHook(){var hook={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return workInProgressHook===null?currentlyRenderingFiber$1.memoizedState=workInProgressHook=hook:workInProgressHook=workInProgressHook.next=hook,workInProgressHook}function updateWorkInProgressHook(){var nextCurrentHook;if(currentHook===null){var current2=currentlyRenderingFiber$1.alternate;current2!==null?nextCurrentHook=current2.memoizedState:nextCurrentHook=null}else nextCurrentHook=currentHook.next;var nextWorkInProgressHook;if(workInProgressHook===null?nextWorkInProgressHook=currentlyRenderingFiber$1.memoizedState:nextWorkInProgressHook=workInProgressHook.next,nextWorkInProgressHook!==null)workInProgressHook=nextWorkInProgressHook,nextWorkInProgressHook=workInProgressHook.next,currentHook=nextCurrentHook;else{if(nextCurrentHook===null)throw Error("Rendered more hooks than during the previous render.");currentHook=nextCurrentHook;var newHook={memoizedState:currentHook.memoizedState,baseState:currentHook.baseState,baseQueue:currentHook.baseQueue,queue:currentHook.queue,next:null};workInProgressHook===null?currentlyRenderingFiber$1.memoizedState=workInProgressHook=newHook:workInProgressHook=workInProgressHook.next=newHook}return workInProgressHook}function createFunctionComponentUpdateQueue(){return{lastEffect:n
|
||
|
|
||
|
Check the render method of \``+ownerName+"`.");var warningKey=ownerName||workInProgress2._debugID||"",debugSource=workInProgress2._debugSource;debugSource&&(warningKey=debugSource.fileName+":"+debugSource.lineNumber),didWarnAboutFunctionRefs[warningKey]||(didWarnAboutFunctionRefs[warningKey]=!0,error("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",info))}if(typeof Component.getDerivedStateFromProps=="function"){var _componentName2=getComponentName(Component)||"Unknown";didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]||(error("%s: Function components do not support getDerivedStateFromProps.",_componentName2),didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]=!0)}if(typeof Component.contextType=="object"&&Component.contextType!==null){var _componentName3=getComponentName(Component)||"Unknown";didWarnAboutContextTypeOnFunctionComponent[_componentName3]||(error("%s: Function components do not support contextType.",_componentName3),didWarnAboutContextTypeOnFunctionComponent[_componentName3]=!0)}}}var SUSPENDED_MARKER={dehydrated:null,retryTime:NoWork};function shouldRemainOnFallback(suspenseContext,current2,workInProgress2){return hasSuspenseContext(suspenseContext,ForceSuspenseFallback)&&(current2===null||current2.memoizedState!==null)}function updateSuspenseComponent(current2,workInProgress2,renderExpirationTime2){var mode=workInProgress2.mode,nextProps=workInProgress2.pendingProps;shouldSuspend(workInProgress2)&&(workInProgress2.effectTag|=DidCapture);var suspenseContext=suspenseStackCursor.current,nextDidTimeout=!1,didSuspend=(workInProgress2.effectTag&DidCapture)!==NoEffect;if(didSuspend||shouldRemainOnFallback(suspenseContext,current2)?(nextDidTimeout=!0,workInProgress2.effectTag&=~DidCapture):(current2===null||current2.memoizedState!==null)&&nextProps.fallback!==void 0&&nextProps.unstable_avoidThisFallback!==!0&&(suspenseContext=addSubtreeSuspenseContext(suspenseContext,InvisibleParentSuspenseContext)),suspenseContext=setDefaultShallowSuspenseContext(suspenseContext),pushSuspenseContext(workInProgress2,suspenseContext),current2===null)if(nextProps.fallback!==void 0&&tryToClaimNextHydratableInstance(workInProgress2),nextDidTimeout){var nextFallbackChildren=nextProps.fallback,primaryChildFragment=createFiberFromFragment(null,mode,NoWork,null);if(primaryChildFragment.return=workInProgress2,(workInProgress2.mode&BlockingMode)===NoMode){var progressedState=workInProgress2.memoizedState,progressedPrimaryChild=progressedState!==null?workInProgress2.child.child:workInProgress2.child;primaryChildFragment.child=progressedPrimaryChild;for(var progressedChild=progressedPrimaryChild;progressedChild!==null;)progressedChild.return=primaryChildFragment,progressedChild=progressedChild.sibling}var fallbackChildFragment=createFiberFromFragment(nextFallbackChildren,mode,renderExpirationTime2,null);return fallbackChildFragment.return=workInProgress2,primaryChildFragment.sibling=fallbackChildFragment,workInProgress2.memoizedState=SUSPENDED_MARKER,workInProgress2.child=primaryChildFragment,fallbackChildFragment}else{var nextPrimaryChildren=nextProps.children;return workInProgress2.memoizedState=null,workInProgress2.child=mountChildFibers(workInProgress2,null,nextPrimaryChildren,renderExpirationTime2)}else{var prevState=current2.memoizedState;if(prevState!==null){var currentPrimaryChildFragment=current2.child,currentFallbackChildFragment=currentPrimaryChildFragment.sibling;if(nextDidTimeout){var _nextFallbackChildren2=nextProps.fallback,_primaryChildFragment2=createWorkInProgress(currentPrimaryChildFragment,currentPrimaryChildFragment.pendingProps);if(_primaryChildFragment2.return=workInProgress2,(workInProgress2.mode&BlockingMode)===NoMode){var _progressedState=workInProgress2.memoizedState,_progressedPrimaryChild=_progressedState!==null?workInProgress2.child.child:workInProgress2.child;if(_progressedPrimaryChild!==currentPrimaryChildFragment.child){_primaryChildFragment2.child=_progressedPrimaryChild;for(var _progressedChild2=_progresse
|
||
|
Recreating the tree from scratch failed so React will unmount the tree.`:errorBoundaryMessage=`Consider adding an error boundary to your tree to customize error handling behavior.
|
||
|
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.`;var combinedMessage=""+componentNameMessage+componentStack+`
|
||
|
|
||
|
`+(""+errorBoundaryMessage);console.error(combinedMessage)}}var didWarnAboutUndefinedSnapshotBeforeUpdate=null;didWarnAboutUndefinedSnapshotBeforeUpdate=new Set;var PossiblyWeakSet=typeof WeakSet=="function"?WeakSet:Set;function logError(boundary,errorInfo){var source=errorInfo.source,stack=errorInfo.stack;stack===null&&source!==null&&(stack=getStackByFiberInDevAndProd(source));var capturedError={componentName:source!==null?getComponentName(source.type):null,componentStack:stack!==null?stack:"",error:errorInfo.value,errorBoundary:null,errorBoundaryName:null,errorBoundaryFound:!1,willRetry:!1};boundary!==null&&boundary.tag===ClassComponent&&(capturedError.errorBoundary=boundary.stateNode,capturedError.errorBoundaryName=getComponentName(boundary.type),capturedError.errorBoundaryFound=!0,capturedError.willRetry=!0);try{logCapturedError(capturedError)}catch(e){setTimeout(function(){throw e})}}var callComponentWillUnmountWithTimer=function(current2,instance){startPhaseTimer(current2,"componentWillUnmount"),instance.props=current2.memoizedProps,instance.state=current2.memoizedState,instance.componentWillUnmount(),stopPhaseTimer()};function safelyCallComponentWillUnmount(current2,instance){if(invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current2,instance),hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current2,unmountError)}}function safelyDetachRef(current2){var ref=current2.ref;if(ref!==null)if(typeof ref=="function"){if(invokeGuardedCallback(null,ref,null,null),hasCaughtError()){var refError=clearCaughtError();captureCommitPhaseError(current2,refError)}}else ref.current=null}function safelyCallDestroy(current2,destroy){if(invokeGuardedCallback(null,destroy,null),hasCaughtError()){var error2=clearCaughtError();captureCommitPhaseError(current2,error2)}}function commitBeforeMutationLifeCycles(current2,finishedWork){switch(finishedWork.tag){case FunctionComponent:case ForwardRef:case SimpleMemoComponent:case Block:return;case ClassComponent:{if(finishedWork.effectTag&Snapshot&¤t2!==null){var prevProps=current2.memoizedProps,prevState=current2.memoizedState;startPhaseTimer(finishedWork,"getSnapshotBeforeUpdate");var instance=finishedWork.stateNode;finishedWork.type===finishedWork.elementType&&!didWarnAboutReassigningProps&&(instance.props!==finishedWork.memoizedProps&&error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",getComponentName(finishedWork.type)||"instance"),instance.state!==finishedWork.memoizedState&&error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",getComponentName(finishedWork.type)||"instance"));var snapshot=instance.getSnapshotBeforeUpdate(finishedWork.elementType===finishedWork.type?prevProps:resolveDefaultProps(finishedWork.type,prevProps),prevState);{var didWarnSet=didWarnAboutUndefinedSnapshotBeforeUpdate;snapshot===void 0&&!didWarnSet.has(finishedWork.type)&&(didWarnSet.add(finishedWork.type),error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",getComponentName(finishedWork.type)))}instance.__reactInternalSnapshotBeforeUpdate=snapshot,stopPhaseTimer()}return}case HostRoot:case HostComponent:case HostText:case HostPortal:case IncompleteClassComponent:return}throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}function commitHookEffectListUnmount(tag,finishedWork){var updateQueue=finishedWork.updateQueue,lastEffect=updateQueue!==null?updateQueue.lastEffect:null;if(lastEffect!==null){var firstEffect=lastEffect.next,effect4=firstEffect;do{if((effect4.tag&tag)===tag){var destroy=effect4.destroy;effect4.destroy=void 0,destroy!==void 0&&destroy()}effect4=effect4.next}while(effect4!==firstEffect)}}function commitHo
|
||
|
|
||
|
It looks like you wrote useEffect(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
||
|
|
||
|
useEffect(() => {
|
||
|
async function fetchData() {
|
||
|
// You can await here
|
||
|
const response = await MyAPI.getData(someId);
|
||
|
// ...
|
||
|
}
|
||
|
fetchData();
|
||
|
}, [someId]); // Or [] if effect doesn't need props or state
|
||
|
|
||
|
Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching`:addendum=" You returned: "+destroy,error("An effect function must not return anything besides a function, which is used for clean-up.%s%s",addendum,getStackByFiberInDevAndProd(finishedWork))}}}effect4=effect4.next}while(effect4!==firstEffect)}}function commitPassiveHookEffects(finishedWork){if((finishedWork.effectTag&Passive)!==NoEffect)switch(finishedWork.tag){case FunctionComponent:case ForwardRef:case SimpleMemoComponent:case Block:{commitHookEffectListUnmount(Passive$1|HasEffect,finishedWork),commitHookEffectListMount(Passive$1|HasEffect,finishedWork);break}}}function commitLifeCycles(finishedRoot,current2,finishedWork,committedExpirationTime){switch(finishedWork.tag){case FunctionComponent:case ForwardRef:case SimpleMemoComponent:case Block:{commitHookEffectListMount(Layout|HasEffect,finishedWork);return}case ClassComponent:{var instance=finishedWork.stateNode;if(finishedWork.effectTag&Update)if(current2===null)startPhaseTimer(finishedWork,"componentDidMount"),finishedWork.type===finishedWork.elementType&&!didWarnAboutReassigningProps&&(instance.props!==finishedWork.memoizedProps&&error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",getComponentName(finishedWork.type)||"instance"),instance.state!==finishedWork.memoizedState&&error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",getComponentName(finishedWork.type)||"instance")),instance.componentDidMount(),stopPhaseTimer();else{var prevProps=finishedWork.elementType===finishedWork.type?current2.memoizedProps:resolveDefaultProps(finishedWork.type,current2.memoizedProps),prevState=current2.memoizedState;startPhaseTimer(finishedWork,"componentDidUpdate"),finishedWork.type===finishedWork.elementType&&!didWarnAboutReassigningProps&&(instance.props!==finishedWork.memoizedProps&&error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",getComponentName(finishedWork.type)||"instance"),instance.state!==finishedWork.memoizedState&&error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",getComponentName(finishedWork.type)||"instance")),instance.componentDidUpdate(prevProps,prevState,instance.__reactInternalSnapshotBeforeUpdate),stopPhaseTimer()}var updateQueue=finishedWork.updateQueue;updateQueue!==null&&(finishedWork.type===finishedWork.elementType&&!didWarnAboutReassigningProps&&(instance.props!==finishedWork.memoizedProps&&error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",getComponentName(finishedWork.type)||"instance"),instance.state!==finishedWork.memoizedState&&error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",getComponentName(finishedWork.type)||"instance")),commitUpdateQueue(finishedWork,updateQueue,instance));return}case HostRoot:{var _updateQueue=finishedWork.updateQueue;if(_updateQueue!==null){var _instance=null;if(finishedWork.child!==null)switch(finishedWork.child.tag){case HostComponent:_instance=finishedWork.child.stateNode;break;case ClassComponent:_instance=finishedWork.child.stateNode;break}commitUpdateQueue(finishedWork,_updateQueue,_instance)}return}case HostComponent:{var _instance2=finishedWork.stateNode;if(current2===null&&finishedWork.effectTag&Update){var type=finishedWork.type,pr
|
||
|
|
||
|
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`+getStackByFiberInDevAndProd(sourceFiber))}renderDidError(),value=createCapturedValue(value,sourceFiber);var workInProgress2=returnFiber;do{switch(workInProgress2.tag){case HostRoot:{var _errorInfo=value;workInProgress2.effectTag|=ShouldCapture,workInProgress2.expirationTime=renderExpirationTime2;var _update=createRootErrorUpdate(workInProgress2,_errorInfo,renderExpirationTime2);enqueueCapturedUpdate(workInProgress2,_update);return}case ClassComponent:var errorInfo=value,ctor=workInProgress2.type,instance=workInProgress2.stateNode;if((workInProgress2.effectTag&DidCapture)===NoEffect&&(typeof ctor.getDerivedStateFromError=="function"||instance!==null&&typeof instance.componentDidCatch=="function"&&!isAlreadyFailedLegacyErrorBoundary(instance))){workInProgress2.effectTag|=ShouldCapture,workInProgress2.expirationTime=renderExpirationTime2;var _update2=createClassErrorUpdate(workInProgress2,errorInfo,renderExpirationTime2);enqueueCapturedUpdate(workInProgress2,_update2);return}break}workInProgress2=workInProgress2.return}while(workInProgress2!==null)}var ceil=Math.ceil,ReactCurrentDispatcher$1=ReactSharedInternals.ReactCurrentDispatcher,ReactCurrentOwner$2=ReactSharedInternals.ReactCurrentOwner,IsSomeRendererActing=ReactSharedInternals.IsSomeRendererActing,NoContext=0,BatchedContext=1,EventContext=2,DiscreteEventContext=4,LegacyUnbatchedContext=8,RenderContext=16,CommitContext=32,RootIncomplete=0,RootFatalErrored=1,RootErrored=2,RootSuspended=3,RootSuspendedWithDelay=4,RootCompleted=5,executionContext=NoContext,workInProgressRoot=null,workInProgress=null,renderExpirationTime$1=NoWork,workInProgressRootExitStatus=RootIncomplete,workInProgressRootFatalError=null,workInProgressRootLatestProcessedExpirationTime=Sync,workInProgressRootLatestSuspenseTimeout=Sync,workInProgressRootCanSuspendUsingConfig=null,workInProgressRootNextUnprocessedUpdateTime=NoWork,workInProgressRootHasPendingPing=!1,globalMostRecentFallbackTime=0,FALLBACK_THROTTLE_MS=500,nextEffect=null,hasUncaughtError=!1,firstUncaughtError=null,legacyErrorBoundariesThatAlreadyFailed=null,rootDoesHavePassiveEffects=!1,rootWithPendingPassiveEffects=null,pendingPassiveEffectsRenderPriority=NoPriority,pendingPassiveEffectsExpirationTime=NoWork,rootsWithPendingDiscreteUpdates=null,NESTED_UPDATE_LIMIT=50,nestedUpdateCount=0,rootWithNestedUpdates=null,NESTED_PASSIVE_UPDATE_LIMIT=50,nestedPassiveUpdateCount=0,interruptedBy=null,spawnedWorkDuringRender=null,currentEventTime=NoWork;function requestCurrentTimeForUpdate(){return(executionContext&(RenderContext|CommitContext))!==NoContext?msToExpirationTime(now()):(currentEventTime!==NoWork||(currentEventTime=msToExpirationTime(now())),currentEventTime)}function getCurrentTime(){return msToExpirationTime(now())}function computeExpirationForFiber(currentTime,fiber,suspenseConfig){var mode=fiber.mode;if((mode&BlockingMode)===NoMode)return Sync;var priorityLevel=getCurrentPriorityLevel();if((mode&ConcurrentMode)===NoMode)return priorityLevel===ImmediatePriority?Sync:Batched;if((executionContext&RenderContext)!==NoContext)return renderExpirationTime$1;var expirationTime;if(suspenseConfig!==null)expirationTime=computeSuspenseExpiration(currentTime,suspenseConfig.timeoutMs|0||LOW_PRIORITY_EXPIRATION);else switch(priorityLevel){case ImmediatePriority:expirationTime=Sync;break;case UserBlockingPriority$1:expirationTime=computeInteractiveExpiration(currentTime);break;case NormalPriority:case LowPriority:expirationTime=computeAsyncExpiration(currentTime);break;case IdlePriority:expirationTime=Idle;break;default:throw Error("Expected a valid priority level")}return workInProgressRoot!==null&&expirationTime===renderExpirationTime$1&&(expirationTime-=1),expirationTime}function scheduleUpdateOnFiber(fiber,expirationTime){checkForNestedUpdates(),warnAboutRenderPhaseUpdatesInDEV(fiber);var root2=markUpdateTimeFromFiberToRoot(fiber,expirationTime);if(root2===null){warnAboutUpdateOnUnmountedFiberInDEV(fiber);return}checkForInterruptio
|
||
|
Be sure to use the matching version of act() corresponding to your renderer:
|
||
|
|
||
|
// for react-dom:
|
||
|
import {act} from 'react-dom/test-utils';
|
||
|
// ...
|
||
|
act(() => ...);
|
||
|
|
||
|
// for react-test-renderer:
|
||
|
import TestRenderer from 'react-test-renderer';
|
||
|
const {act} = TestRenderer;
|
||
|
// ...
|
||
|
act(() => ...);%s`,getStackByFiberInDevAndProd(fiber))}function warnIfNotCurrentlyActingEffectsInDEV(fiber){(fiber.mode&StrictMode)!==NoMode&&IsSomeRendererActing.current===!1&&IsThisRendererActing.current===!1&&error(`An update to %s ran an effect, but was not wrapped in act(...).
|
||
|
|
||
|
When testing, code that causes React state updates should be wrapped into act(...):
|
||
|
|
||
|
act(() => {
|
||
|
/* fire events that update state */
|
||
|
});
|
||
|
/* assert on the output */
|
||
|
|
||
|
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act%s`,getComponentName(fiber.type),getStackByFiberInDevAndProd(fiber))}function warnIfNotCurrentlyActingUpdatesInDEV(fiber){executionContext===NoContext&&IsSomeRendererActing.current===!1&&IsThisRendererActing.current===!1&&error(`An update to %s inside a test was not wrapped in act(...).
|
||
|
|
||
|
When testing, code that causes React state updates should be wrapped into act(...):
|
||
|
|
||
|
act(() => {
|
||
|
/* fire events that update state */
|
||
|
});
|
||
|
/* assert on the output */
|
||
|
|
||
|
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act%s`,getComponentName(fiber.type),getStackByFiberInDevAndProd(fiber))}var warnIfNotCurrentlyActingUpdatesInDev=warnIfNotCurrentlyActingUpdatesInDEV,didWarnAboutUnmockedScheduler=!1;function warnIfUnmockedScheduler(fiber){didWarnAboutUnmockedScheduler===!1&&Scheduler.unstable_flushAllWithoutAsserting===void 0&&(fiber.mode&BlockingMode||fiber.mode&ConcurrentMode)&&(didWarnAboutUnmockedScheduler=!0,error(`In Concurrent or Sync modes, the "scheduler" module needs to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest:
|
||
|
jest.mock('scheduler', () => require('scheduler/unstable_mock'));
|
||
|
|
||
|
For more info, visit https://fb.me/react-mock-scheduler`))}function computeThreadID(root2,expirationTime){return expirationTime*1e3+root2.interactionThreadID}function markSpawnedWork(expirationTime){spawnedWorkDuringRender===null?spawnedWorkDuringRender=[expirationTime]:spawnedWorkDuringRender.push(expirationTime)}function scheduleInteractions(root2,expirationTime,interactions){if(interactions.size>0){var pendingInteractionMap=root2.pendingInteractionMap,pendingInteractions=pendingInteractionMap.get(expirationTime);pendingInteractions!=null?interactions.forEach(function(interaction){pendingInteractions.has(interaction)||interaction.__count++,pendingInteractions.add(interaction)}):(pendingInteractionMap.set(expirationTime,new Set(interactions)),interactions.forEach(function(interaction){interaction.__count++}));var subscriber=tracing.__subscriberRef.current;if(subscriber!==null){var threadID=computeThreadID(root2,expirationTime);subscriber.onWorkScheduled(interactions,threadID)}}}function schedulePendingInteractions(root2,expirationTime){scheduleInteractions(root2,expirationTime,tracing.__interactionsRef.current)}function startWorkOnPendingInteractions(root2,expirationTime){var interactions=new Set;if(root2.pendingInteractionMap.forEach(function(scheduledInteractions,scheduledExpirationTime){scheduledExpirationTime>=expirationTime&&scheduledInteractions.forEach(function(interaction){return interactions.add(interaction)})}),root2.memoizedInteractions=interactions,interactions.size>0){var subscriber=tracing.__subscriberRef.current;if(subscriber!==null){var threadID=computeThreadID(root2,expirationTime);try{subscriber.onWorkStarted(interactions,threadID)}catch(error2){scheduleCallback(ImmediatePriority,function(){throw error2})}}}}function finishPendingInteractions(root2,committedExpirationTime){var earliestRemainingTimeAfterCommit=root2.firstPendingTime,subscriber;try{if(subscriber=tracing.__subscriberRef.current,subscriber!==null&&root2.memoizedInteractions.size>0){var threadID=computeThreadID(root2,committedExpirationTime);subscriber.onWorkStopped(root2.memoizedInteractions,threadID)}}catch(error2){scheduleCallback(ImmediatePriority,function(){throw error2})}finally{var pendingInteractionMap=root2.pendingInteractionMap;pendingInteractionMap.forEach(function(scheduledInteractions,scheduledExpirationTime){scheduledExpirationTime>earliestRemainingTimeAfterCommit&&(pendingInteractionMap.delete(scheduledExpirationTime),scheduledInteractions.forEach(function(interaction){if(interaction.__count--,subscriber!==null&&interaction.__count===0)try{subscriber.onInteractionScheduledWorkCompleted(interaction)}catch(error2){scheduleCallback(ImmediatePriority,function(){throw error2})}}))})}}var onScheduleFiberRoot=null,onCommitFiberRoot=null,onCommitFiberUnmount=null,hasLoggedError=!1,isDevToolsPresent=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function injectInternals(internals){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var hook=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(hook.isDisabled)return!0;if(!hook.supportsFiber)return error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://fb.me/react-devtools"),!0;try{var rendererID=hook.inject(internals);typeof hook.onScheduleFiberRoot=="function"&&(onScheduleFiberRoot=function(root2,children){try{hook.onScheduleFiberRoot(rendererID,root2,children)}catch(err){hasLoggedError||(hasLoggedError=!0,error("React instrumentation encountered an error: %s",err))}}),onCommitFiberRoot=function(root2,expirationTime){try{var didError=(root2.current.effectTag&DidCapture)===DidCapture;if(enableProfilerTimer){var currentTime=getCurrentTime(),priorityLevel=inferPriorityFromExpirationTime(currentTime,expirationTime);hook.onCommitFiberRoot(rendererID,root2,priorityLevel,didError)}else hook.onCommitFiberRoot(rendererID,root2,void 0,didError)}catch(err){hasLoggedError||(hasLoggedError=!0,error("React instrumentation encountered an error: %s",err))}},onCommitFiberUnmount=function(fiber){try{hook.onCommitFiberUnmount(rende
|
||
|
|
||
|
Check the render method of \``+ownerName+"`.")}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(type==null?type:typeof type)+"."+info)}}return fiber=createFiber(fiberTag,pendingProps,key,mode),fiber.elementType=type,fiber.type=resolvedType,fiber.expirationTime=expirationTime,fiber}function createFiberFromElement(element,mode,expirationTime){var owner=null;owner=element._owner;var type=element.type,key=element.key,pendingProps=element.props,fiber=createFiberFromTypeAndProps(type,key,pendingProps,owner,mode,expirationTime);return fiber._debugSource=element._source,fiber._debugOwner=element._owner,fiber}function createFiberFromFragment(elements,mode,expirationTime,key){var fiber=createFiber(Fragment,elements,key,mode);return fiber.expirationTime=expirationTime,fiber}function createFiberFromProfiler(pendingProps,mode,expirationTime,key){(typeof pendingProps.id!="string"||typeof pendingProps.onRender!="function")&&error('Profiler must specify an "id" string and "onRender" function as props');var fiber=createFiber(Profiler,pendingProps,key,mode|ProfileMode);return fiber.elementType=REACT_PROFILER_TYPE,fiber.type=REACT_PROFILER_TYPE,fiber.expirationTime=expirationTime,fiber}function createFiberFromSuspense(pendingProps,mode,expirationTime,key){var fiber=createFiber(SuspenseComponent,pendingProps,key,mode);return fiber.type=REACT_SUSPENSE_TYPE,fiber.elementType=REACT_SUSPENSE_TYPE,fiber.expirationTime=expirationTime,fiber}function createFiberFromSuspenseList(pendingProps,mode,expirationTime,key){var fiber=createFiber(SuspenseListComponent,pendingProps,key,mode);return fiber.type=REACT_SUSPENSE_LIST_TYPE,fiber.elementType=REACT_SUSPENSE_LIST_TYPE,fiber.expirationTime=expirationTime,fiber}function createFiberFromText(content,mode,expirationTime){var fiber=createFiber(HostText,content,null,mode);return fiber.expirationTime=expirationTime,fiber}function createFiberFromHostInstanceForDeletion(){var fiber=createFiber(HostComponent,null,null,NoMode);return fiber.elementType="DELETED",fiber.type="DELETED",fiber}function createFiberFromPortal(portal,mode,expirationTime){var pendingProps=portal.children!==null?portal.children:[],fiber=createFiber(HostPortal,pendingProps,portal.key,mode);return fiber.expirationTime=expirationTime,fiber.stateNode={containerInfo:portal.containerInfo,pendingChildren:null,implementation:portal.implementation},fiber}function assignFiberPropertiesInDEV(target,source){return target===null&&(target=createFiber(IndeterminateComponent,null,null,NoMode)),target.tag=source.tag,target.key=source.key,target.elementType=source.elementType,target.type=source.type,target.stateNode=source.stateNode,target.return=source.return,target.child=source.child,target.sibling=source.sibling,target.index=source.index,target.ref=source.ref,target.pendingProps=source.pendingProps,target.memoizedProps=source.memoizedProps,target.updateQueue=source.updateQueue,target.memoizedState=source.memoizedState,target.dependencies=source.dependencies,target.mode=source.mode,target.effectTag=source.effectTag,target.nextEffect=source.nextEffect,target.firstEffect=source.firstEffect,target.lastEffect=source.lastEffect,target.expirationTime=source.expirationTime,target.childExpirationTime=source.childExpirationTime,target.alternate=source.alternate,target.actualDuration=source.actualDuration,target.actualStartTime=source.actualStartTime,target.selfBaseDuration=source.selfBaseDuration,target.treeBaseDuration=source.treeBaseDuration,target._debugID=source._debugID,target._debugSource=source._debugSource,target._debugOwner=source._debugOwner,target._debugIsCurrentlyTiming=source._debugIsCurrentlyTiming,target._debugNeedsRemount=source._debugNeedsRemount,target._debugHookTypes=source._debugHookTypes,target}function FiberRootNode(containerInfo,tag,hydrate2){this.tag=tag,this.current=null,this.containerInfo=containerInfo,this.pendingChildren=null,this.pingCache=null,this.finishedExpirationTime=NoWork,this.finishedWork=null,this.timeoutHandle=noTimeout,this.context=nu
|
||
|
|
||
|
Check the render method of %s.`,getComponentName(current.type)||"Unknown"));var update=createUpdate(expirationTime,suspenseConfig);return update.payload={element},callback=callback===void 0?null:callback,callback!==null&&(typeof callback!="function"&&error("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",callback),update.callback=callback),enqueueUpdate(current$1,update),scheduleWork(current$1,expirationTime),expirationTime}function getPublicRootInstance(container){var containerFiber=container.current;if(!containerFiber.child)return null;switch(containerFiber.child.tag){case HostComponent:return containerFiber.child.stateNode;default:return containerFiber.child.stateNode}}function markRetryTimeImpl(fiber,retryTime){var suspenseState=fiber.memoizedState;suspenseState!==null&&suspenseState.dehydrated!==null&&suspenseState.retryTime<retryTime&&(suspenseState.retryTime=retryTime)}function markRetryTimeIfNotHydrated(fiber,retryTime){markRetryTimeImpl(fiber,retryTime);var alternate=fiber.alternate;alternate&&markRetryTimeImpl(alternate,retryTime)}function attemptUserBlockingHydration$1(fiber){if(fiber.tag===SuspenseComponent){var expTime=computeInteractiveExpiration(requestCurrentTimeForUpdate());scheduleWork(fiber,expTime),markRetryTimeIfNotHydrated(fiber,expTime)}}function attemptContinuousHydration$1(fiber){fiber.tag===SuspenseComponent&&(scheduleWork(fiber,ContinuousHydration),markRetryTimeIfNotHydrated(fiber,ContinuousHydration))}function attemptHydrationAtCurrentPriority$1(fiber){if(fiber.tag===SuspenseComponent){var currentTime=requestCurrentTimeForUpdate(),expTime=computeExpirationForFiber(currentTime,fiber,null);scheduleWork(fiber,expTime),markRetryTimeIfNotHydrated(fiber,expTime)}}function findHostInstanceWithNoPortals(fiber){var hostFiber=findCurrentHostFiberWithNoPortals(fiber);return hostFiber===null?null:hostFiber.tag===FundamentalComponent?hostFiber.stateNode.instance:hostFiber.stateNode}var shouldSuspendImpl=function(fiber){return!1};function shouldSuspend(fiber){return shouldSuspendImpl(fiber)}var overrideHookState=null,overrideProps=null,scheduleUpdate=null,setSuspenseHandler=null;{var copyWithSetImpl=function(obj,path,idx,value){if(idx>=path.length)return value;var key=path[idx],updated=Array.isArray(obj)?obj.slice():_assign({},obj);return updated[key]=copyWithSetImpl(obj[key],path,idx+1,value),updated},copyWithSet=function(obj,path,value){return copyWithSetImpl(obj,path,0,value)};overrideHookState=function(fiber,id,path,value){for(var currentHook2=fiber.memoizedState;currentHook2!==null&&id>0;)currentHook2=currentHook2.next,id--;if(currentHook2!==null){var newState=copyWithSet(currentHook2.memoizedState,path,value);currentHook2.memoizedState=newState,currentHook2.baseState=newState,fiber.memoizedProps=_assign({},fiber.memoizedProps),scheduleWork(fiber,Sync)}},overrideProps=function(fiber,path,value){fiber.pendingProps=copyWithSet(fiber.memoizedProps,path,value),fiber.alternate&&(fiber.alternate.pendingProps=fiber.pendingProps),scheduleWork(fiber,Sync)},scheduleUpdate=function(fiber){scheduleWork(fiber,Sync)},setSuspenseHandler=function(newShouldSuspendImpl){shouldSuspendImpl=newShouldSuspendImpl}}function injectIntoDevTools(devToolsConfig){var findFiberByHostInstance=devToolsConfig.findFiberByHostInstance,ReactCurrentDispatcher2=ReactSharedInternals.ReactCurrentDispatcher;return injectInternals(_assign({},devToolsConfig,{overrideHookState,overrideProps,setSuspenseHandler,scheduleUpdate,currentDispatcherRef:ReactCurrentDispatcher2,findHostInstanceByFiber:function(fiber){var hostFiber=findCurrentHostFiber(fiber);return hostFiber===null?null:hostFiber.stateNode},findFiberByHostInstance:function(instance){return findFiberByHostInstance?findFiberByHostInstance(instance):null},findHostInstancesForRefresh,scheduleRefresh,scheduleRoot,setRefreshHandler,getCurrentFiber:function(){return current}}))}var IsSomeRendererActing$1=ReactSharedInternals.IsSomeRendererActing;function ReactDOMRoot(container,options){this._internalRoot=createRootImpl(container,ConcurrentRoo
|
||
|
You might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq`:""),"font-weight:bold")}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Internals,exports.createPortal=createPortal$1,exports.findDOMNode=findDOMNode,exports.flushSync=flushSync2,exports.hydrate=hydrate,exports.render=render,exports.unmountComponentAtNode=unmountComponentAtNode,exports.unstable_batchedUpdates=batchedUpdates$1,exports.unstable_createPortal=unstable_createPortal,exports.unstable_renderSubtreeIntoContainer=renderSubtreeIntoContainer,exports.version=ReactVersion})()}});var require_react_dom=__commonJS({"../../node_modules/react-dom/index.js"(exports,module){"use strict";module.exports=require_react_dom_development()}});var React3=__toESM(require_react(),1),import_react=__toESM(require_react(),1),ReactDOM=__toESM(require_react_dom(),1),import_react_dom=__toESM(require_react_dom(),1);var import_memoizerific=__toESM(require_memoizerific(),1),require_react_fast_compare=__commonJS2({"../../node_modules/react-fast-compare/index.js"(exports,module){var hasElementType=typeof Element<"u",hasMap=typeof Map=="function",hasSet=typeof Set=="function",hasArrayBuffer=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function equal(a,b){if(a===b)return!0;if(a&&b&&typeof a=="object"&&typeof b=="object"){if(a.constructor!==b.constructor)return!1;var length,i,keys;if(Array.isArray(a)){if(length=a.length,length!=b.length)return!1;for(i=length;i--!==0;)if(!equal(a[i],b[i]))return!1;return!0}var it;if(hasMap&&a instanceof Map&&b instanceof Map){if(a.size!==b.size)return!1;for(it=a.entries();!(i=it.next()).done;)if(!b.has(i.value[0]))return!1;for(it=a.entries();!(i=it.next()).done;)if(!equal(i.value[1],b.get(i.value[0])))return!1;return!0}if(hasSet&&a instanceof Set&&b instanceof Set){if(a.size!==b.size)return!1;for(it=a.entries();!(i=it.next()).done;)if(!b.has(i.value[0]))return!1;return!0}if(hasArrayBuffer&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(b)){if(length=a.length,length!=b.length)return!1;for(i=length;i--!==0;)if(a[i]!==b[i])return!1;return!0}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf&&typeof a.valueOf=="function"&&typeof b.valueOf=="function")return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString&&typeof a.toString=="function"&&typeof b.toString=="function")return a.toString()===b.toString();if(keys=Object.keys(a),length=keys.length,length!==Object.keys(b).length)return!1;for(i=length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return!1;if(hasElementType&&a instanceof Element)return!1;for(i=length;i--!==0;)if(!((keys[i]==="_owner"||keys[i]==="__v"||keys[i]==="__o")&&a.$$typeof)&&!equal(a[keys[i]],b[keys[i]]))return!1;return!0}return a!==a&&b!==b}module.exports=function(a,b){try{return equal(a,b)}catch(error){if((error.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw error}}}}),fromEntries=function(entries){return entries.reduce(function(acc,_ref){var key=_ref[0],value=_ref[1];return acc[key]=value,acc},{})},useIsomorphicLayoutEffect=typeof window<"u"&&window.document&&window.document.createElement?React3.useLayoutEffect:React3.useEffect,top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(acc,placement){return acc.concat([placement+"-"+start,placement+"-"+end])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(acc,placement){return acc.concat([placement,placement+"-"+start,placement+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(element){return ele
|
||
|
drop-shadow(0px 5px 5px rgba(0,0,0,0.05))
|
||
|
drop-shadow(0 1px 3px rgba(0,0,0,0.1))
|
||
|
`,borderRadius:theme.appBorderRadius,fontSize:theme.typography.size.s1}:{}),Tooltip=import_react.default.forwardRef(({placement,hasChrome,children,arrowProps,tooltipRef,color,withArrows,...props},ref)=>import_react.default.createElement(Wrapper,{"data-testid":"tooltip",hasChrome,ref,...props,color},hasChrome&&withArrows&&import_react.default.createElement(Arrow,{placement,...arrowProps,color}),children));Tooltip.displayName="Tooltip";Tooltip.defaultProps={color:void 0,tooltipRef:void 0,hasChrome:!0,placement:"top",arrowProps:{}};var{document:document2}=scope,TargetContainer=newStyled.div`
|
||
|
display: inline-block;
|
||
|
cursor: ${props=>props.trigger==="hover"||props.trigger.includes("hover")?"default":"pointer"};
|
||
|
`,TargetSvgContainer=newStyled.g`
|
||
|
cursor: ${props=>props.trigger==="hover"||props.trigger.includes("hover")?"default":"pointer"};
|
||
|
`,WithTooltipPure=({svg,trigger,closeOnOutsideClick,placement,hasChrome,withArrows,offset:offset2,tooltip,children,closeOnTriggerHidden,mutationObserverOptions,closeOnClick,tooltipShown,onVisibilityChange,defaultVisible,delayHide,visible,interactive,delayShow,modifiers,strategy,followCursor,onVisibleChange,...props})=>{let Container=svg?TargetSvgContainer:TargetContainer,{getArrowProps,getTooltipProps,setTooltipRef,setTriggerRef,visible:isVisible,state}=usePopperTooltip({trigger,placement,defaultVisible:defaultVisible??tooltipShown,delayHide,interactive,closeOnOutsideClick:closeOnOutsideClick??closeOnClick,closeOnTriggerHidden,onVisibleChange:_isVisible=>{onVisibilityChange?.(_isVisible),onVisibleChange?.(_isVisible)},delayShow,followCursor,mutationObserverOptions,visible,offset:offset2},{modifiers,strategy}),tooltipComponent=import_react.default.createElement(Tooltip,{placement:state?.placement,ref:setTooltipRef,hasChrome,arrowProps:getArrowProps(),withArrows,...getTooltipProps()},typeof tooltip=="function"?tooltip({onHide:()=>onVisibleChange(!1)}):tooltip);return import_react.default.createElement(import_react.default.Fragment,null,import_react.default.createElement(Container,{trigger,ref:setTriggerRef,...props},children),isVisible&&import_react_dom.default.createPortal(tooltipComponent,document2.body))};WithTooltipPure.defaultProps={svg:!1,trigger:"click",closeOnOutsideClick:!1,placement:"top",modifiers:[{name:"preventOverflow",options:{padding:8}},{name:"offset",options:{offset:[8,8]}},{name:"arrow",options:{padding:8}}],hasChrome:!0,defaultVisible:!1};var WithToolTipState=({startOpen=!1,onVisibleChange:onChange,...rest})=>{let[tooltipShown,setTooltipShown]=(0,import_react.useState)(startOpen),onVisibilityChange=(0,import_react.useCallback)(visibility=>{onChange&&onChange(visibility)===!1||setTooltipShown(visibility)},[onChange]);return(0,import_react.useEffect)(()=>{let hide2=()=>onVisibilityChange(!1);document2.addEventListener("keydown",hide2,!1);let iframes=Array.from(document2.getElementsByTagName("iframe")),unbinders=[];return iframes.forEach(iframe=>{let bind=()=>{try{iframe.contentWindow.document&&(iframe.contentWindow.document.addEventListener("click",hide2),unbinders.push(()=>{try{iframe.contentWindow.document.removeEventListener("click",hide2)}catch{}}))}catch{}};bind(),iframe.addEventListener("load",bind),unbinders.push(()=>{iframe.removeEventListener("load",bind)})}),()=>{document2.removeEventListener("keydown",hide2),unbinders.forEach(unbind=>{unbind()})}}),import_react.default.createElement(WithTooltipPure,{...rest,visible:tooltipShown,onVisibleChange:onVisibilityChange})};export{require_react_dom,auto,WithTooltipPure,WithToolTipState};
|