From 6cbfed5d1cb1d6fa96a57ad61a1013d87d854185 Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 8 Feb 2026 20:21:23 +0100 Subject: [PATCH] bugfix hash dup --- packages/meta-dup-core/src/DuplicateIndex.ts | 90 ++- packages/meta-dup-core/src/index.ts | 36 +- .../meta-dup-ui/dist/assets/index-GT6exvk4.js | 660 ++++++++++++++++++ .../dist/assets/index-GT6exvk4.js.map | 1 + packages/meta-dup-ui/dist/index.html | 13 + 5 files changed, 789 insertions(+), 11 deletions(-) create mode 100644 packages/meta-dup-ui/dist/assets/index-GT6exvk4.js create mode 100644 packages/meta-dup-ui/dist/assets/index-GT6exvk4.js.map create mode 100644 packages/meta-dup-ui/dist/index.html diff --git a/packages/meta-dup-core/src/DuplicateIndex.ts b/packages/meta-dup-core/src/DuplicateIndex.ts index dfc98c3..5458b89 100644 --- a/packages/meta-dup-core/src/DuplicateIndex.ts +++ b/packages/meta-dup-core/src/DuplicateIndex.ts @@ -63,6 +63,10 @@ export class DuplicateIndex { private byHash: Map> = new Map(); private byTitle: Map> = new Map(); + // Track paths by midhash256 (for hash duplicates from events) + // This detects duplicates directly from the event stream without Redis lookup + private pathsByMidHash: Map> = new Map(); + // File info storage: hashId -> FileInfo private fileInfo: Map = new Map(); @@ -73,6 +77,34 @@ export class DuplicateIndex { logger.info('DuplicateIndex initialized'); } + /** + * Add a path to the midhash tracking (for hash duplicates from events) + */ + addPath(midhash256: string, path: string): void { + const pathSet = this.pathsByMidHash.get(midhash256) ?? new Set(); + pathSet.add(path); + this.pathsByMidHash.set(midhash256, pathSet); + this.lastUpdated = new Date(); + + if (pathSet.size > 1) { + logger.info(`Hash duplicate detected: ${midhash256} has ${pathSet.size} paths`); + } + } + + /** + * Remove a path from the midhash tracking + */ + removePath(midhash256: string, path: string): void { + const pathSet = this.pathsByMidHash.get(midhash256); + if (pathSet) { + pathSet.delete(path); + if (pathSet.size === 0) { + this.pathsByMidHash.delete(midhash256); + } + this.lastUpdated = new Date(); + } + } + /** * Add or update a file in the index */ @@ -194,13 +226,57 @@ export class DuplicateIndex { } /** - * Get all hash-based duplicates (files with same SHA-256) + * Get path-based duplicates (files with same midhash256 from events) + * These are detected directly from the event stream without Redis lookup + */ + getPathDuplicates(): DuplicateGroup[] { + const groups: DuplicateGroup[] = []; + + for (const [midhash256, paths] of this.pathsByMidHash) { + if (paths.size > 1) { + // Create FileInfo objects with just the path (minimal info from events) + const files: FileInfo[] = Array.from(paths).map(path => ({ + hashId: midhash256, + filePath: path, + })); + groups.push({ + key: midhash256, + files: files.sort((a, b) => a.filePath.localeCompare(b.filePath)), + }); + } + } + + // Sort by number of duplicates (descending) + return groups.sort((a, b) => b.files.length - a.files.length); + } + + /** + * Get all hash-based duplicates (combines path-based midhash256 and SHA-256 duplicates) + * Path duplicates are detected from events, SHA-256 duplicates from fullhash plugin */ getHashDuplicates(): DuplicateGroup[] { const groups: DuplicateGroup[] = []; + const seenKeys = new Set(); + // First, add path-based duplicates (from events, using midhash256) + for (const [midhash256, paths] of this.pathsByMidHash) { + if (paths.size > 1) { + seenKeys.add(midhash256); + const files: FileInfo[] = Array.from(paths).map(path => ({ + hashId: midhash256, + filePath: path, + })); + groups.push({ + key: midhash256, + files: files.sort((a, b) => a.filePath.localeCompare(b.filePath)), + }); + } + } + + // Then, add SHA-256 duplicates (from fullhash plugin) + // Only add if not already covered by path duplicates for (const [hash, hashIds] of this.byHash) { - if (hashIds.size > 1) { + if (hashIds.size > 1 && !seenKeys.has(hash)) { const files = this.getFileInfos(hashIds); groups.push({ key: hash, @@ -253,13 +329,20 @@ export class DuplicateIndex { getStats(): DuplicateStats { const hashDuplicates = this.getHashDuplicates(); const titleDuplicates = this.getTitleDuplicates(); + const pathDuplicates = this.getPathDuplicates(); + + // Count unique paths tracked in pathsByMidHash + let pathsTracked = 0; + for (const paths of this.pathsByMidHash.values()) { + pathsTracked += paths.size; + } return { hashGroupCount: hashDuplicates.length, hashFileCount: hashDuplicates.reduce((sum, g) => sum + g.files.length, 0), titleGroupCount: titleDuplicates.length, titleFileCount: titleDuplicates.reduce((sum, g) => sum + g.files.length, 0), - totalFilesTracked: this.fileInfo.size, + totalFilesTracked: Math.max(this.fileInfo.size, pathsTracked), lastUpdated: this.lastUpdated.toISOString(), }; } @@ -282,6 +365,7 @@ export class DuplicateIndex { clear(): void { this.byHash.clear(); this.byTitle.clear(); + this.pathsByMidHash.clear(); this.fileInfo.clear(); this.lastUpdated = new Date(); logger.info('DuplicateIndex cleared'); diff --git a/packages/meta-dup-core/src/index.ts b/packages/meta-dup-core/src/index.ts index 7223e60..e1fff54 100644 --- a/packages/meta-dup-core/src/index.ts +++ b/packages/meta-dup-core/src/index.ts @@ -53,22 +53,42 @@ async function handleStreamMessage( // Direct file events from meta-core case 'add': case 'change': { - // File added or changed - look up by path and update index - // Note: We need to wait for meta-sort to process the file first - // For now, just log - the duplicate index is rebuilt on startup - logger.debug(`File ${message.type}: ${message.path}`); + // File added or changed - track by midhash256 for duplicate detection + if (message.midhash256 && message.path) { + duplicateIndex.addPath(message.midhash256, message.path); + logger.debug(`File ${message.type}: ${message.path} (midhash: ${message.midhash256.substring(0, 12)}...)`); + + // Groundwork for title duplicates - try to get metadata if already processed + const metadata = await redisClient.getFileByHashId(message.midhash256); + if (metadata) { + duplicateIndex.addFile(message.midhash256, metadata); + } + } else { + logger.debug(`File ${message.type}: ${message.path} (no midhash256)`); + } break; } case 'delete': { - // File deleted - would need to find by path and remove - logger.debug(`File deleted: ${message.path}`); + // File deleted - remove from path tracking + if (message.midhash256 && message.path) { + duplicateIndex.removePath(message.midhash256, message.path); + logger.debug(`File deleted: ${message.path} (midhash: ${message.midhash256.substring(0, 12)}...)`); + } else { + logger.debug(`File deleted: ${message.path} (no midhash256)`); + } break; } case 'rename': { - // File renamed - treated as delete + add - logger.debug(`File renamed: ${message.oldPath} -> ${message.path}`); + // File renamed - update path tracking + if (message.midhash256 && message.oldPath && message.path) { + duplicateIndex.removePath(message.midhash256, message.oldPath); + duplicateIndex.addPath(message.midhash256, message.path); + logger.debug(`File renamed: ${message.oldPath} -> ${message.path} (midhash: ${message.midhash256.substring(0, 12)}...)`); + } else { + logger.debug(`File renamed: ${message.oldPath} -> ${message.path} (no midhash256)`); + } break; } diff --git a/packages/meta-dup-ui/dist/assets/index-GT6exvk4.js b/packages/meta-dup-ui/dist/assets/index-GT6exvk4.js new file mode 100644 index 0000000..e294f20 --- /dev/null +++ b/packages/meta-dup-ui/dist/assets/index-GT6exvk4.js @@ -0,0 +1,660 @@ +(function(){const k=document.createElement("link").relList;if(k&&k.supports&&k.supports("modulepreload"))return;for(const Ee of document.querySelectorAll('link[rel="modulepreload"]'))Qe(Ee);new MutationObserver(Ee=>{for(const Oe of Ee)if(Oe.type==="childList")for(const d of Oe.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&Qe(d)}).observe(document,{childList:!0,subtree:!0});function _e(Ee){const Oe={};return Ee.integrity&&(Oe.integrity=Ee.integrity),Ee.referrerPolicy&&(Oe.referrerPolicy=Ee.referrerPolicy),Ee.crossOrigin==="use-credentials"?Oe.credentials="include":Ee.crossOrigin==="anonymous"?Oe.credentials="omit":Oe.credentials="same-origin",Oe}function Qe(Ee){if(Ee.ep)return;Ee.ep=!0;const Oe=_e(Ee);fetch(Ee.href,Oe)}})();function M_(w){return w&&w.__esModule&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w}var hS={exports:{}},rh={},mS={exports:{}},Qc={exports:{}};Qc.exports;(function(w,k){/** + * @license React + * react.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var _e="18.3.1",Qe=Symbol.for("react.element"),Ee=Symbol.for("react.portal"),Oe=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),Ue=Symbol.for("react.profiler"),K=Symbol.for("react.provider"),P=Symbol.for("react.context"),He=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),ve=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),rn=Symbol.for("react.offscreen"),Vn=Symbol.iterator,Lt="@@iterator";function ze(s){if(s===null||typeof s!="object")return null;var p=Vn&&s[Vn]||s[Lt];return typeof p=="function"?p:null}var Re={current:null},rt={transition:null},ae={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},Ge={current:null},he={},dt=null;function B(s){dt=s}he.setExtraStackFrame=function(s){dt=s},he.getCurrentStack=null,he.getStackAddendum=function(){var s="";dt&&(s+=dt);var p=he.getCurrentStack;return p&&(s+=p()||""),s};var Ve=!1,qe=!1,Ie=!1,se=!1,ot=!1,it={ReactCurrentDispatcher:Re,ReactCurrentBatchConfig:rt,ReactCurrentOwner:Ge};it.ReactDebugCurrentFrame=he,it.ReactCurrentActQueue=ae;function Ct(s){{for(var p=arguments.length,S=new Array(p>1?p-1:0),C=1;C1?p-1:0),C=1;C1){for(var Ke=Array(Be),Je=0;Je1){for(var be=Array(Je),lt=0;lt is not supported and will be removed in a future major release. Did you mean to render instead?")),p.Provider},set:function($){p.Provider=$}},_currentValue:{get:function(){return p._currentValue},set:function($){p._currentValue=$}},_currentValue2:{get:function(){return p._currentValue2},set:function($){p._currentValue2=$}},_threadCount:{get:function(){return p._threadCount},set:function($){p._threadCount=$}},Consumer:{get:function(){return S||(S=!0,me("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),p.Consumer}},displayName:{get:function(){return p.displayName},set:function($){O||(Ct("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",$),O=!0)}}}),p.Consumer=ee}return p._currentRenderer=null,p._currentRenderer2=null,p}var ha=-1,ta=0,Yn=1,La=2;function ti(s){if(s._status===ha){var p=s._result,S=p();if(S.then(function(ee){if(s._status===ta||s._status===ha){var $=s;$._status=Yn,$._result=ee}},function(ee){if(s._status===ta||s._status===ha){var $=s;$._status=La,$._result=ee}}),s._status===ha){var C=s;C._status=ta,C._result=S}}if(s._status===Yn){var O=s._result;return O===void 0&&me(`lazy: Expected the result of a dynamic import() call. Instead received: %s + +Your code should look like: + const MyComponent = lazy(() => import('./MyComponent')) + +Did you accidentally put curly braces around the import?`,O),"default"in O||me(`lazy: Expected the result of a dynamic import() call. Instead received: %s + +Your code should look like: + const MyComponent = lazy(() => import('./MyComponent'))`,O),O.default}else throw s._result}function v(s){var p={_status:ha,_result:s},S={$$typeof:ge,_payload:p,_init:ti};{var C,O;Object.defineProperties(S,{defaultProps:{configurable:!0,get:function(){return C},set:function(ee){me("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),C=ee,Object.defineProperty(S,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return O},set:function(ee){me("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),O=ee,Object.defineProperty(S,"propTypes",{enumerable:!0})}}})}return S}function N(s){s!=null&&s.$$typeof===G?me("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof s!="function"?me("forwardRef requires a render function but was given %s.",s===null?"null":typeof s):s.length!==0&&s.length!==2&&me("forwardRef render functions accept exactly two parameters: props and ref. %s",s.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),s!=null&&(s.defaultProps!=null||s.propTypes!=null)&&me("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var p={$$typeof:He,render:s};{var S;Object.defineProperty(p,"displayName",{enumerable:!1,configurable:!0,get:function(){return S},set:function(C){S=C,!s.name&&!s.displayName&&(s.displayName=C)}})}return p}var L;L=Symbol.for("react.module.reference");function X(s){return!!(typeof s=="string"||typeof s=="function"||s===Oe||s===Ue||ot||s===d||s===q||s===ve||se||s===rn||Ve||qe||Ie||typeof s=="object"&&s!==null&&(s.$$typeof===ge||s.$$typeof===G||s.$$typeof===K||s.$$typeof===P||s.$$typeof===He||s.$$typeof===L||s.getModuleId!==void 0))}function Ce(s,p){X(s)||me("memo: The first argument must be a component. Instead received: %s",s===null?"null":typeof s);var S={$$typeof:G,type:s,compare:p===void 0?null:p};{var C;Object.defineProperty(S,"displayName",{enumerable:!1,configurable:!0,get:function(){return C},set:function(O){C=O,!s.name&&!s.displayName&&(s.displayName=O)}})}return S}function re(){var s=Re.current;return s===null&&me(`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://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),s}function fe(s){var p=re();if(s._context!==void 0){var S=s._context;S.Consumer===s?me("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):S.Provider===s&&me("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return p.useContext(s)}function J(s){var p=re();return p.useState(s)}function Tt(s,p,S){var C=re();return C.useReducer(s,p,S)}function tt(s){var p=re();return p.useRef(s)}function nt(s,p){var S=re();return S.useEffect(s,p)}function sn(s,p){var S=re();return S.useInsertionEffect(s,p)}function Ua(s,p){var S=re();return S.useLayoutEffect(s,p)}function ma(s,p){var S=re();return S.useCallback(s,p)}function xt(s,p){var S=re();return S.useMemo(s,p)}function ni(s,p,S){var C=re();return C.useImperativeHandle(s,p,S)}function ya(s,p){{var S=re();return S.useDebugValue(s,p)}}function ye(){var s=re();return s.useTransition()}function ai(s){var p=re();return p.useDeferredValue(s)}function zo(){var s=re();return s.useId()}function jo(s,p,S){var C=re();return C.useSyncExternalStore(s,p,S)}var xr=0,Pu,$u,Gu,qu,Qu,Ho,Vo;function Bi(){}Bi.__reactDisabledLog=!0;function Wu(){{if(xr===0){Pu=console.log,$u=console.info,Gu=console.warn,qu=console.error,Qu=console.group,Ho=console.groupCollapsed,Vo=console.groupEnd;var s={configurable:!0,enumerable:!0,value:Bi,writable:!0};Object.defineProperties(console,{info:s,log:s,warn:s,error:s,group:s,groupCollapsed:s,groupEnd:s})}xr++}}function za(){{if(xr--,xr===0){var s={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ut({},s,{value:Pu}),info:Ut({},s,{value:$u}),warn:Ut({},s,{value:Gu}),error:Ut({},s,{value:qu}),group:Ut({},s,{value:Qu}),groupCollapsed:Ut({},s,{value:Ho}),groupEnd:Ut({},s,{value:Vo})})}xr<0&&me("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ri=it.ReactCurrentDispatcher,Dr;function Yi(s,p,S){{if(Dr===void 0)try{throw Error()}catch(O){var C=O.stack.trim().match(/\n( *(at )?)/);Dr=C&&C[1]||""}return` +`+Dr+s}}var ii=!1,Pi;{var Xu=typeof WeakMap=="function"?WeakMap:Map;Pi=new Xu}function Fo(s,p){if(!s||ii)return"";{var S=Pi.get(s);if(S!==void 0)return S}var C;ii=!0;var O=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ee;ee=ri.current,ri.current=null,Wu();try{if(p){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(gt){C=gt}Reflect.construct(s,[],$)}else{try{$.call()}catch(gt){C=gt}s.call($.prototype)}}else{try{throw Error()}catch(gt){C=gt}s()}}catch(gt){if(gt&&C&&typeof gt.stack=="string"){for(var le=gt.stack.split(` +`),Te=C.stack.split(` +`),Be=le.length-1,Ke=Te.length-1;Be>=1&&Ke>=0&&le[Be]!==Te[Ke];)Ke--;for(;Be>=1&&Ke>=0;Be--,Ke--)if(le[Be]!==Te[Ke]){if(Be!==1||Ke!==1)do if(Be--,Ke--,Ke<0||le[Be]!==Te[Ke]){var Je=` +`+le[Be].replace(" at new "," at ");return s.displayName&&Je.includes("")&&(Je=Je.replace("",s.displayName)),typeof s=="function"&&Pi.set(s,Je),Je}while(Be>=1&&Ke>=0);break}}}finally{ii=!1,ri.current=ee,za(),Error.prepareStackTrace=O}var be=s?s.displayName||s.name:"",lt=be?Yi(be):"";return typeof s=="function"&&Pi.set(s,lt),lt}function Iu(s,p,S){return Fo(s,!1)}function Wc(s){var p=s.prototype;return!!(p&&p.isReactComponent)}function ui(s,p,S){if(s==null)return"";if(typeof s=="function")return Fo(s,Wc(s));if(typeof s=="string")return Yi(s);switch(s){case q:return Yi("Suspense");case ve:return Yi("SuspenseList")}if(typeof s=="object")switch(s.$$typeof){case He:return Iu(s.render);case G:return ui(s.type,p,S);case ge:{var C=s,O=C._payload,ee=C._init;try{return ui(ee(O),p,S)}catch{}}}return""}var Bo={},Ku=it.ReactDebugCurrentFrame;function Ae(s){if(s){var p=s._owner,S=ui(s.type,s._source,p?p.type:null);Ku.setExtraStackFrame(S)}else Ku.setExtraStackFrame(null)}function Xc(s,p,S,C,O){{var ee=Function.call.bind(ln);for(var $ in s)if(ee(s,$)){var le=void 0;try{if(typeof s[$]!="function"){var Te=Error((C||"React class")+": "+S+" type `"+$+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[$]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Te.name="Invariant Violation",Te}le=s[$](p,$,C,S,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Be){le=Be}le&&!(le instanceof Error)&&(Ae(O),me("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",C||"React class",S,$,typeof le),Ae(null)),le instanceof Error&&!(le.message in Bo)&&(Bo[le.message]=!0,Ae(O),me("Failed %s type: %s",S,le.message),Ae(null))}}}function er(s){if(s){var p=s._owner,S=ui(s.type,s._source,p?p.type:null);B(S)}else B(null)}var ce;ce=!1;function Ju(){if(Ge.current){var s=kn(Ge.current.type);if(s)return` + +Check the render method of \``+s+"`."}return""}function En(s){if(s!==void 0){var p=s.fileName.replace(/^.*[\\\/]/,""),S=s.lineNumber;return` + +Check your code at `+p+":"+S+"."}return""}function li(s){return s!=null?En(s.__source):""}var Nr={};function Ic(s){var p=Ju();if(!p){var S=typeof s=="string"?s:s.displayName||s.name;S&&(p=` + +Check the top-level render call using <`+S+">.")}return p}function Vt(s,p){if(!(!s._store||s._store.validated||s.key!=null)){s._store.validated=!0;var S=Ic(p);if(!Nr[S]){Nr[S]=!0;var C="";s&&s._owner&&s._owner!==Ge.current&&(C=" It was passed a child from "+kn(s._owner.type)+"."),er(s),me('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',S,C),er(null)}}}function ut(s,p){if(typeof s=="object"){if(zt(s))for(var S=0;S",O=" Did you accidentally export a JSX literal instead of a component?"):$=typeof s,me("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$,O)}var le=pe.apply(this,arguments);if(le==null)return le;if(C)for(var Te=2;Te10&&Ct("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),C._updatedFibers.clear()}}}var el=!1,$i=null;function Jc(s){if($i===null)try{var p=("require"+Math.random()).slice(0,7),S=w&&w[p];$i=S.call(w,"timers").setImmediate}catch{$i=function(O){el===!1&&(el=!0,typeof MessageChannel>"u"&&me("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var ee=new MessageChannel;ee.port1.onmessage=O,ee.port2.postMessage(void 0)}}return $i(s)}var _r=0,oi=!1;function tl(s){{var p=_r;_r++,ae.current===null&&(ae.current=[]);var S=ae.isBatchingLegacy,C;try{if(ae.isBatchingLegacy=!0,C=s(),!S&&ae.didScheduleLegacyUpdate){var O=ae.current;O!==null&&(ae.didScheduleLegacyUpdate=!1,Qi(O))}}catch(be){throw tr(p),be}finally{ae.isBatchingLegacy=S}if(C!==null&&typeof C=="object"&&typeof C.then=="function"){var ee=C,$=!1,le={then:function(be,lt){$=!0,ee.then(function(gt){tr(p),_r===0?Gi(gt,be,lt):be(gt)},function(gt){tr(p),lt(gt)})}};return!oi&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){$||(oi=!0,me("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),le}else{var Te=C;if(tr(p),_r===0){var Be=ae.current;Be!==null&&(Qi(Be),ae.current=null);var Ke={then:function(be,lt){ae.current===null?(ae.current=[],Gi(Te,be,lt)):be(Te)}};return Ke}else{var Je={then:function(be,lt){be(Te)}};return Je}}}}function tr(s){s!==_r-1&&me("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),_r=s}function Gi(s,p,S){{var C=ae.current;if(C!==null)try{Qi(C),Jc(function(){C.length===0?(ae.current=null,p(s)):Gi(s,p,S)})}catch(O){S(O)}else p(s)}}var qi=!1;function Qi(s){if(!qi){qi=!0;var p=0;try{for(;p1?N-1:0),X=1;X=1&&nt>=0&&J[tt]!==Tt[nt];)nt--;for(;tt>=1&&nt>=0;tt--,nt--)if(J[tt]!==Tt[nt]){if(tt!==1||nt!==1)do if(tt--,nt--,nt<0||J[tt]!==Tt[nt]){var sn=` +`+J[tt].replace(" at new "," at ");return v.displayName&&sn.includes("")&&(sn=sn.replace("",v.displayName)),typeof v=="function"&&qt.set(v,sn),sn}while(tt>=1&&nt>=0);break}}}finally{Gt=!1,Aa.current=re,Ia(),Error.prepareStackTrace=Ce}var Ua=v?v.displayName||v.name:"",ma=Ua?Bn(Ua):"";return typeof v=="function"&&qt.set(v,ma),ma}function zt(v,N,L){return wn(v,!1)}function gn(v){var N=v.prototype;return!!(N&&N.isReactComponent)}function jt(v,N,L){if(v==null)return"";if(typeof v=="function")return wn(v,gn(v));if(typeof v=="string")return Bn(v);switch(v){case P:return Bn("Suspense");case He:return Bn("SuspenseList")}if(typeof v=="object")switch(v.$$typeof){case K:return zt(v.render);case q:return jt(v.type,N,L);case ve:{var X=v,Ce=X._payload,re=X._init;try{return jt(re(Ce),N,L)}catch{}}}return""}var Ht=Object.prototype.hasOwnProperty,Zn={},Ka=Lt.ReactDebugCurrentFrame;function da(v){if(v){var N=v._owner,L=jt(v.type,v._source,N?N.type:null);Ka.setExtraStackFrame(L)}else Ka.setExtraStackFrame(null)}function kn(v,N,L,X,Ce){{var re=Function.call.bind(Ht);for(var fe in v)if(re(v,fe)){var J=void 0;try{if(typeof v[fe]!="function"){var Tt=Error((X||"React class")+": "+L+" type `"+fe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof v[fe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Tt.name="Invariant Violation",Tt}J=v[fe](N,fe,X,L,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(tt){J=tt}J&&!(J instanceof Error)&&(da(Ce),ze("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",X||"React class",L,fe,typeof J),da(null)),J instanceof Error&&!(J.message in Zn)&&(Zn[J.message]=!0,da(Ce),ze("Failed %s type: %s",L,J.message),da(null))}}}var ln=Array.isArray;function Wt(v){return ln(v)}function bn(v){{var N=typeof Symbol=="function"&&Symbol.toStringTag,L=N&&v[Symbol.toStringTag]||v.constructor.name||"Object";return L}}function Ma(v){try{return Rt(v),!1}catch{return!0}}function Rt(v){return""+v}function Sn(v){if(Ma(v))return ze("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",bn(v)),Rt(v)}var An=Lt.ReactCurrentOwner,Tr={key:!0,ref:!0,__self:!0,__source:!0},Ja,M,W;W={};function pe(v){if(Ht.call(v,"ref")){var N=Object.getOwnPropertyDescriptor(v,"ref").get;if(N&&N.isReactWarning)return!1}return v.ref!==void 0}function Fe(v){if(Ht.call(v,"key")){var N=Object.getOwnPropertyDescriptor(v,"key").get;if(N&&N.isReactWarning)return!1}return v.key!==void 0}function et(v,N){if(typeof v.ref=="string"&&An.current&&N&&An.current.stateNode!==N){var L=se(An.current.type);W[L]||(ze('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',se(An.current.type),v.ref),W[L]=!0)}}function st(v,N){{var L=function(){Ja||(Ja=!0,ze("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",N))};L.isReactWarning=!0,Object.defineProperty(v,"key",{get:L,configurable:!0})}}function ct(v,N){{var L=function(){M||(M=!0,ze("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",N))};L.isReactWarning=!0,Object.defineProperty(v,"ref",{get:L,configurable:!0})}}var on=function(v,N,L,X,Ce,re,fe){var J={$$typeof:k,type:v,key:N,ref:L,props:fe,_owner:re};return J._store={},Object.defineProperty(J._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(J,"_self",{configurable:!1,enumerable:!1,writable:!1,value:X}),Object.defineProperty(J,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ce}),Object.freeze&&(Object.freeze(J.props),Object.freeze(J)),J};function pt(v,N,L,X,Ce){{var re,fe={},J=null,Tt=null;L!==void 0&&(Sn(L),J=""+L),Fe(N)&&(Sn(N.key),J=""+N.key),pe(N)&&(Tt=N.ref,et(N,Ce));for(re in N)Ht.call(N,re)&&!Tr.hasOwnProperty(re)&&(fe[re]=N[re]);if(v&&v.defaultProps){var tt=v.defaultProps;for(re in tt)fe[re]===void 0&&(fe[re]=tt[re])}if(J||Tt){var nt=typeof v=="function"?v.displayName||v.name||"Unknown":v;J&&st(fe,nt),Tt&&ct(fe,nt)}return on(v,J,Tt,Ce,X,An.current,fe)}}var We=Lt.ReactCurrentOwner,vt=Lt.ReactDebugCurrentFrame;function pa(v){if(v){var N=v._owner,L=jt(v.type,v._source,N?N.type:null);vt.setExtraStackFrame(L)}else vt.setExtraStackFrame(null)}var va;va=!1;function ea(v){return typeof v=="object"&&v!==null&&v.$$typeof===k}function Za(){{if(We.current){var v=se(We.current.type);if(v)return` + +Check the render method of \``+v+"`."}return""}}function Yu(v){{if(v!==void 0){var N=v.fileName.replace(/^.*[\\\/]/,""),L=v.lineNumber;return` + +Check your code at `+N+":"+L+"."}return""}}var Zr={};function Vi(v){{var N=Za();if(!N){var L=typeof v=="string"?v:v.displayName||v.name;L&&(N=` + +Check the top-level render call using <`+L+">.")}return N}}function Fi(v,N){{if(!v._store||v._store.validated||v.key!=null)return;v._store.validated=!0;var L=Vi(N);if(Zr[L])return;Zr[L]=!0;var X="";v&&v._owner&&v._owner!==We.current&&(X=" It was passed a child from "+se(v._owner.type)+"."),pa(v),ze('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',L,X),pa(null)}}function ei(v,N){{if(typeof v!="object")return;if(Wt(v))for(var L=0;L",J=" Did you accidentally export a JSX literal instead of a component?"):tt=typeof v,ze("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",tt,J)}var nt=pt(v,N,L,Ce,re);if(nt==null)return nt;if(fe){var sn=N.children;if(sn!==void 0)if(X)if(Wt(sn)){for(var Ua=0;Ua0?"{key: someKey, "+xt.join(": ..., ")+": ...}":"{key: someKey}";if(!Yn[ma+ni]){var ya=xt.length>0?"{"+xt.join(": ..., ")+": ...}":"{}";ze(`A props object containing a "key" prop is being spread into JSX: + let props = %s; + <%s {...props} /> +React keys must be passed directly to JSX without using spread: + let props = %s; + <%s key={someKey} {...props} />`,ni,ma,ya,ma),Yn[ma+ni]=!0}}return v===Qe?ta(nt):ha(nt),nt}}var ti=La;rh.Fragment=Qe,rh.jsxDEV=ti})();hS.exports=rh;var j=hS.exports,ih={},yS={exports:{}},Kn={},gS={exports:{}},bS={};(function(w){/** + * @license React + * scheduler.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var k=!1,_e=5;function Qe(M,W){var pe=M.length;M.push(W),d(M,W,pe)}function Ee(M){return M.length===0?null:M[0]}function Oe(M){if(M.length===0)return null;var W=M[0],pe=M.pop();return pe!==W&&(M[0]=pe,Ue(M,pe,0)),W}function d(M,W,pe){for(var Fe=pe;Fe>0;){var et=Fe-1>>>1,st=M[et];if(K(st,W)>0)M[et]=W,M[Fe]=st,Fe=et;else return}}function Ue(M,W,pe){for(var Fe=pe,et=M.length,st=et>>>1;Fepe&&(!M||Ka()));){var Fe=Ie.callback;if(typeof Fe=="function"){Ie.callback=null,se=Ie.priorityLevel;var et=Ie.expirationTime<=pe,st=Fe(et);pe=w.unstable_now(),typeof st=="function"?Ie.callback=st:Ie===Ee(B)&&Oe(B),Fn(pe)}else Oe(B);Ie=Ee(B)}if(Ie!==null)return!0;var ct=Ee(Ve);return ct!==null&&Sn(Jn,ct.startTime-pe),!1}function yn(M,W){switch(M){case P:case He:case q:case ve:case G:break;default:M=q}var pe=se;se=M;try{return W()}finally{se=pe}}function Ia(M){var W;switch(se){case P:case He:case q:W=q;break;default:W=se;break}var pe=se;se=W;try{return M()}finally{se=pe}}function Aa(M){var W=se;return function(){var pe=se;se=W;try{return M.apply(this,arguments)}finally{se=pe}}}function $t(M,W,pe){var Fe=w.unstable_now(),et;if(typeof pe=="object"&&pe!==null){var st=pe.delay;typeof st=="number"&&st>0?et=Fe+st:et=Fe}else et=Fe;var ct;switch(M){case P:ct=rt;break;case He:ct=ae;break;case G:ct=dt;break;case ve:ct=he;break;case q:default:ct=Ge;break}var on=et+ct,pt={id:qe++,callback:W,priorityLevel:M,startTime:et,expirationTime:on,sortIndex:-1};return et>Fe?(pt.sortIndex=et,Qe(Ve,pt),Ee(B)===null&&pt===Ee(Ve)&&(Ct?An():Ct=!0,Sn(Jn,et-Fe))):(pt.sortIndex=on,Qe(B,pt),!it&&!ot&&(it=!0,Rt(Ut))),pt}function Bn(){}function Gt(){!it&&!ot&&(it=!0,Rt(Ut))}function qt(){return Ee(B)}function Qt(M){M.callback=null}function wn(){return se}var zt=!1,gn=null,jt=-1,Ht=_e,Zn=-1;function Ka(){var M=w.unstable_now()-Zn;return!(M125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}M>0?Ht=Math.floor(1e3/M):Ht=_e}var ln=function(){if(gn!==null){var M=w.unstable_now();Zn=M;var W=!0,pe=!0;try{pe=gn(W,M)}finally{pe?Wt():(zt=!1,gn=null)}}else zt=!1},Wt;if(typeof ca=="function")Wt=function(){ca(ln)};else if(typeof MessageChannel<"u"){var bn=new MessageChannel,Ma=bn.port2;bn.port1.onmessage=ln,Wt=function(){Ma.postMessage(null)}}else Wt=function(){me(ln,0)};function Rt(M){gn=M,zt||(zt=!0,Wt())}function Sn(M,W){jt=me(function(){M(w.unstable_now())},W)}function An(){un(jt),jt=-1}var Tr=da,Ja=null;w.unstable_IdlePriority=G,w.unstable_ImmediatePriority=P,w.unstable_LowPriority=ve,w.unstable_NormalPriority=q,w.unstable_Profiling=Ja,w.unstable_UserBlockingPriority=He,w.unstable_cancelCallback=Qt,w.unstable_continueExecution=Gt,w.unstable_forceFrameRate=kn,w.unstable_getCurrentPriorityLevel=wn,w.unstable_getFirstCallbackNode=qt,w.unstable_next=Ia,w.unstable_pauseExecution=Bn,w.unstable_requestPaint=Tr,w.unstable_runWithPriority=yn,w.unstable_scheduleCallback=$t,w.unstable_shouldYield=Ka,w.unstable_wrapCallback=Aa,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(bS);gS.exports=bS;var z_=gS.exports;/** + * @license React + * react-dom.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var w=mn,k=z_,_e=w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Qe=!1;function Ee(e){Qe=e}function Oe(e){if(!Qe){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a1?t-1:0),a=1;a2&&(e[0]==="o"||e[0]==="O")&&(e[1]==="n"||e[1]==="N")}function ct(e,t,n,a){if(n!==null&&n.type===Wt)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":{if(a)return!1;if(n!==null)return!n.acceptsBooleans;var r=e.toLowerCase().slice(0,5);return r!=="data-"&&r!=="aria-"}default:return!1}}function on(e,t,n,a){if(t===null||typeof t>"u"||ct(e,t,n,a))return!0;if(a)return!1;if(n!==null)switch(n.type){case Rt:return!t;case Sn:return t===!1;case An:return isNaN(t);case Tr:return isNaN(t)||t<1}return!1}function pt(e){return vt.hasOwnProperty(e)?vt[e]:null}function We(e,t,n,a,r,i,u){this.acceptsBooleans=t===Ma||t===Rt||t===Sn,this.attributeName=a,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=u}var vt={},pa=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];pa.forEach(function(e){vt[e]=new We(e,Wt,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0],n=e[1];vt[t]=new We(t,bn,!1,n,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){vt[e]=new We(e,Ma,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){vt[e]=new We(e,Ma,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(e){vt[e]=new We(e,Rt,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){vt[e]=new We(e,Rt,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){vt[e]=new We(e,Sn,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){vt[e]=new We(e,Tr,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){vt[e]=new We(e,An,!1,e.toLowerCase(),null,!1,!1)});var va=/[\-\:]([a-z])/g,ea=function(e){return e[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(e){var t=e.replace(va,ea);vt[t]=new We(t,bn,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(va,ea);vt[t]=new We(t,bn,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(va,ea);vt[t]=new We(t,bn,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){vt[e]=new We(e,bn,!1,e.toLowerCase(),null,!1,!1)});var Za="xlinkHref";vt[Za]=new We("xlinkHref",bn,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){vt[e]=new We(e,bn,!1,e.toLowerCase(),null,!0,!0)});var Yu=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,Zr=!1;function Vi(e){!Zr&&Yu.test(e)&&(Zr=!0,d("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(e)))}function Fi(e,t,n,a){if(a.mustUseProperty){var r=a.propertyName;return e[r]}else{Ht(n,t),a.sanitizeURL&&Vi(""+n);var i=a.attributeName,u=null;if(a.type===Sn){if(e.hasAttribute(i)){var l=e.getAttribute(i);return l===""?!0:on(t,n,a,!1)?l:l===""+n?n:l}}else if(e.hasAttribute(i)){if(on(t,n,a,!1))return e.getAttribute(i);if(a.type===Rt)return n;u=e.getAttribute(i)}return on(t,n,a,!1)?u===null?n:u:u===""+n?n:u}}function ei(e,t,n,a){{if(!et(t))return;if(!e.hasAttribute(t))return n===void 0?void 0:null;var r=e.getAttribute(t);return Ht(n,t),r===""+n?n:r}}function ha(e,t,n,a){var r=pt(t);if(!st(t,r,a)){if(on(t,n,r,a)&&(n=null),a||r===null){if(et(t)){var i=t;n===null?e.removeAttribute(i):(Ht(n,t),e.setAttribute(i,""+n))}return}var u=r.mustUseProperty;if(u){var l=r.propertyName;if(n===null){var o=r.type;e[l]=o===Rt?!1:""}else e[l]=n;return}var c=r.attributeName,f=r.attributeNamespace;if(n===null)e.removeAttribute(c);else{var m=r.type,h;m===Rt||m===Sn&&n===!0?h="":(Ht(n,c),h=""+n,r.sanitizeURL&&Vi(h.toString())),f?e.setAttributeNS(f,c,h):e.setAttribute(c,h)}}}var ta=Symbol.for("react.element"),Yn=Symbol.for("react.portal"),La=Symbol.for("react.fragment"),ti=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),L=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),Ce=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),fe=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),Tt=Symbol.for("react.scope"),tt=Symbol.for("react.debug_trace_mode"),nt=Symbol.for("react.offscreen"),sn=Symbol.for("react.legacy_hidden"),Ua=Symbol.for("react.cache"),ma=Symbol.for("react.tracing_marker"),xt=Symbol.iterator,ni="@@iterator";function ya(e){if(e===null||typeof e!="object")return null;var t=xt&&e[xt]||e[ni];return typeof t=="function"?t:null}var ye=Object.assign,ai=0,zo,jo,xr,Pu,$u,Gu,qu;function Qu(){}Qu.__reactDisabledLog=!0;function Ho(){{if(ai===0){zo=console.log,jo=console.info,xr=console.warn,Pu=console.error,$u=console.group,Gu=console.groupCollapsed,qu=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Qu,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}ai++}}function Vo(){{if(ai--,ai===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ye({},e,{value:zo}),info:ye({},e,{value:jo}),warn:ye({},e,{value:xr}),error:ye({},e,{value:Pu}),group:ye({},e,{value:$u}),groupCollapsed:ye({},e,{value:Gu}),groupEnd:ye({},e,{value:qu})})}ai<0&&d("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Bi=_e.ReactCurrentDispatcher,Wu;function za(e,t,n){{if(Wu===void 0)try{throw Error()}catch(r){var a=r.stack.trim().match(/\n( *(at )?)/);Wu=a&&a[1]||""}return` +`+Wu+e}}var ri=!1,Dr;{var Yi=typeof WeakMap=="function"?WeakMap:Map;Dr=new Yi}function ii(e,t){if(!e||ri)return"";{var n=Dr.get(e);if(n!==void 0)return n}var a;ri=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var i;i=Bi.current,Bi.current=null,Ho();try{if(t){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(E){a=E}Reflect.construct(e,[],u)}else{try{u.call()}catch(E){a=E}e.call(u.prototype)}}else{try{throw Error()}catch(E){a=E}e()}}catch(E){if(E&&a&&typeof E.stack=="string"){for(var l=E.stack.split(` +`),o=a.stack.split(` +`),c=l.length-1,f=o.length-1;c>=1&&f>=0&&l[c]!==o[f];)f--;for(;c>=1&&f>=0;c--,f--)if(l[c]!==o[f]){if(c!==1||f!==1)do if(c--,f--,f<0||l[c]!==o[f]){var m=` +`+l[c].replace(" at new "," at ");return e.displayName&&m.includes("")&&(m=m.replace("",e.displayName)),typeof e=="function"&&Dr.set(e,m),m}while(c>=1&&f>=0);break}}}finally{ri=!1,Bi.current=i,Vo(),Error.prepareStackTrace=r}var h=e?e.displayName||e.name:"",b=h?za(h):"";return typeof e=="function"&&Dr.set(e,b),b}function Pi(e,t,n){return ii(e,!0)}function Xu(e,t,n){return ii(e,!1)}function Fo(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function Iu(e,t,n){if(e==null)return"";if(typeof e=="function")return ii(e,Fo(e));if(typeof e=="string")return za(e);switch(e){case Ce:return za("Suspense");case re:return za("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case X:return Xu(e.render);case fe:return Iu(e.type,t,n);case J:{var a=e,r=a._payload,i=a._init;try{return Iu(i(r),t,n)}catch{}}}return""}function Wc(e){switch(e._debugOwner&&e._debugOwner.type,e._debugSource,e.tag){case G:return za(e.type);case dt:return za("Lazy");case ae:return za("Suspense");case qe:return za("SuspenseList");case K:case He:case he:return Xu(e.type);case Re:return Xu(e.type.render);case P:return Pi(e.type);default:return""}}function ui(e){try{var t="",n=e;do t+=Wc(n),n=n.return;while(n);return t}catch(a){return` +Error generating stack: `+a.message+` +`+a.stack}}function Bo(e,t,n){var a=e.displayName;if(a)return a;var r=t.displayName||t.name||"";return r!==""?n+"("+r+")":n}function Ku(e){return e.displayName||"Context"}function Ae(e){if(e==null)return null;if(typeof e.tag=="number"&&d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case La:return"Fragment";case Yn:return"Portal";case v:return"Profiler";case ti:return"StrictMode";case Ce:return"Suspense";case re:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case L:var t=e;return Ku(t)+".Consumer";case N:var n=e;return Ku(n._context)+".Provider";case X:return Bo(e,e.render,"ForwardRef");case fe:var a=e.displayName||null;return a!==null?a:Ae(e.type)||"Memo";case J:{var r=e,i=r._payload,u=r._init;try{return Ae(u(i))}catch{return null}}}return null}function Xc(e,t,n){var a=t.displayName||t.name||"";return e.displayName||(a!==""?n+"("+a+")":n)}function er(e){return e.displayName||"Context"}function ce(e){var t=e.tag,n=e.type;switch(t){case it:return"Cache";case Lt:var a=n;return er(a)+".Consumer";case ze:var r=n;return er(r._context)+".Provider";case Ve:return"DehydratedFragment";case Re:return Xc(n,n.render,"ForwardRef");case rn:return"Fragment";case G:return n;case ve:return"Portal";case q:return"Root";case ge:return"Text";case dt:return Ae(n);case Vn:return n===ti?"StrictMode":"Mode";case se:return"Offscreen";case rt:return"Profiler";case Ie:return"Scope";case ae:return"Suspense";case qe:return"SuspenseList";case Ct:return"TracingMarker";case P:case K:case B:case He:case Ge:case he:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;break}return null}var Ju=_e.ReactDebugCurrentFrame,En=null,li=!1;function Nr(){{if(En===null)return null;var e=En._debugOwner;if(e!==null&&typeof e<"u")return ce(e)}return null}function Ic(){return En===null?"":ui(En)}function Vt(){Ju.getCurrentStack=null,En=null,li=!1}function ut(e){Ju.getCurrentStack=e===null?null:Ic,En=e,li=!1}function Yo(){return En}function na(e){li=e}function Cn(e){return""+e}function ga(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return ln(e),e;default:return""}}var Kc={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function Zu(e,t){Kc[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||d("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`."),t.onChange||t.readOnly||t.disabled||t.checked==null||d("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`.")}function Po(e){var t=e.type,n=e.nodeName;return n&&n.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function el(e){return e._valueTracker}function $i(e){e._valueTracker=null}function Jc(e){var t="";return e&&(Po(e)?t=e.checked?"true":"false":t=e.value),t}function _r(e){var t=Po(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);ln(e[t]);var a=""+e[t];if(!(e.hasOwnProperty(t)||typeof n>"u"||typeof n.get!="function"||typeof n.set!="function")){var r=n.get,i=n.set;Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(l){ln(l),a=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable});var u={getValue:function(){return a},setValue:function(l){ln(l),a=""+l},stopTracking:function(){$i(e),delete e[t]}};return u}}function oi(e){el(e)||(e._valueTracker=_r(e))}function tl(e){if(!e)return!1;var t=el(e);if(!t)return!0;var n=t.getValue(),a=Jc(e);return a!==n?(t.setValue(a),!0):!1}function tr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Gi=!1,qi=!1,Qi=!1,$o=!1;function Go(e){var t=e.type==="checkbox"||e.type==="radio";return t?e.checked!=null:e.value!=null}function nl(e,t){var n=e,a=t.checked,r=ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??n._wrapperState.initialChecked});return r}function qo(e,t){Zu("input",t),t.checked!==void 0&&t.defaultChecked!==void 0&&!qi&&(d("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",Nr()||"A component",t.type),qi=!0),t.value!==void 0&&t.defaultValue!==void 0&&!Gi&&(d("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",Nr()||"A component",t.type),Gi=!0);var n=e,a=t.defaultValue==null?"":t.defaultValue;n._wrapperState={initialChecked:t.checked!=null?t.checked:t.defaultChecked,initialValue:ga(t.value!=null?t.value:a),controlled:Go(t)}}function s(e,t){var n=e,a=t.checked;a!=null&&ha(n,"checked",a,!1)}function p(e,t){var n=e;{var a=Go(t);!n._wrapperState.controlled&&a&&!$o&&(d("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),$o=!0),n._wrapperState.controlled&&!a&&!Qi&&(d("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),Qi=!0)}s(e,t);var r=ga(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=Cn(r)):n.value!==Cn(r)&&(n.value=Cn(r));else if(i==="submit"||i==="reset"){n.removeAttribute("value");return}t.hasOwnProperty("value")?ee(n,t.type,r):t.hasOwnProperty("defaultValue")&&ee(n,t.type,ga(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(n.defaultChecked=!!t.defaultChecked)}function S(e,t,n){var a=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type,i=r==="submit"||r==="reset";if(i&&(t.value===void 0||t.value===null))return;var u=Cn(a._wrapperState.initialValue);n||u!==a.value&&(a.value=u),a.defaultValue=u}var l=a.name;l!==""&&(a.name=""),a.defaultChecked=!a.defaultChecked,a.defaultChecked=!!a._wrapperState.initialChecked,l!==""&&(a.name=l)}function C(e,t){var n=e;p(n,t),O(n,t)}function O(e,t){var n=t.name;if(t.type==="radio"&&n!=null){for(var a=e;a.parentNode;)a=a.parentNode;Ht(n,"name");for(var r=a.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),i=0;i.")))}):t.dangerouslySetInnerHTML!=null&&(Te||(Te=!0,d("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),t.selected!=null&&!$&&(d("Use the `defaultValue` or `value` props on must be a scalar value if `multiple` is false.%s",n,gt())}}}}function nr(e,t,n,a){var r=e.options;if(t){for(var i=n,u={},l=0;l.");var a=ye({},t,{value:void 0,defaultValue:void 0,children:Cn(n._wrapperState.initialValue)});return a}function lh(e,t){var n=e;Zu("textarea",t),t.value!==void 0&&t.defaultValue!==void 0&&!uh&&(d("%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://reactjs.org/link/controlled-components",Nr()||"A component"),uh=!0);var a=t.value;if(a==null){var r=t.children,i=t.defaultValue;if(r!=null){d("Use the `defaultValue` or `value` props instead of setting children on