@robthepcguy/rag-vault 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/README.md +441 -421
  2. package/dist/errors/index.d.ts +2 -6
  3. package/dist/errors/index.d.ts.map +1 -1
  4. package/dist/errors/index.js +8 -16
  5. package/dist/errors/index.js.map +1 -1
  6. package/dist/explainability/index.d.ts +2 -0
  7. package/dist/explainability/index.d.ts.map +1 -0
  8. package/dist/explainability/index.js +8 -0
  9. package/dist/explainability/index.js.map +1 -0
  10. package/dist/explainability/keywords.d.ts +18 -0
  11. package/dist/explainability/keywords.d.ts.map +1 -0
  12. package/dist/explainability/keywords.js +237 -0
  13. package/dist/explainability/keywords.js.map +1 -0
  14. package/dist/flywheel/feedback.d.ts +105 -0
  15. package/dist/flywheel/feedback.d.ts.map +1 -0
  16. package/dist/flywheel/feedback.js +219 -0
  17. package/dist/flywheel/feedback.js.map +1 -0
  18. package/dist/flywheel/index.d.ts +2 -0
  19. package/dist/flywheel/index.d.ts.map +1 -0
  20. package/dist/flywheel/index.js +9 -0
  21. package/dist/flywheel/index.js.map +1 -0
  22. package/dist/index.js +1 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/server/index.d.ts +40 -0
  25. package/dist/server/index.d.ts.map +1 -1
  26. package/dist/server/index.js +113 -0
  27. package/dist/server/index.js.map +1 -1
  28. package/dist/server/raw-data-utils.d.ts.map +1 -1
  29. package/dist/server/raw-data-utils.js.map +1 -1
  30. package/dist/utils/config.d.ts +15 -0
  31. package/dist/utils/config.d.ts.map +1 -1
  32. package/dist/utils/config.js +84 -0
  33. package/dist/utils/config.js.map +1 -1
  34. package/dist/utils/math.d.ts +0 -7
  35. package/dist/utils/math.d.ts.map +1 -1
  36. package/dist/utils/math.js +0 -14
  37. package/dist/utils/math.js.map +1 -1
  38. package/dist/vectordb/index.d.ts +57 -2
  39. package/dist/vectordb/index.d.ts.map +1 -1
  40. package/dist/vectordb/index.js +255 -33
  41. package/dist/vectordb/index.js.map +1 -1
  42. package/dist/web/api-routes.d.ts.map +1 -1
  43. package/dist/web/api-routes.js +120 -7
  44. package/dist/web/api-routes.js.map +1 -1
  45. package/dist/web/config-routes.d.ts.map +1 -1
  46. package/dist/web/config-routes.js +84 -2
  47. package/dist/web/config-routes.js.map +1 -1
  48. package/dist/web/database-manager.d.ts +119 -1
  49. package/dist/web/database-manager.d.ts.map +1 -1
  50. package/dist/web/database-manager.js +339 -51
  51. package/dist/web/database-manager.js.map +1 -1
  52. package/dist/web/http-server.d.ts.map +1 -1
  53. package/dist/web/http-server.js +12 -2
  54. package/dist/web/http-server.js.map +1 -1
  55. package/dist/web/index.js +4 -1
  56. package/dist/web/index.js.map +1 -1
  57. package/dist/web/middleware/error-handler.d.ts +0 -16
  58. package/dist/web/middleware/error-handler.d.ts.map +1 -1
  59. package/dist/web/middleware/error-handler.js +0 -18
  60. package/dist/web/middleware/error-handler.js.map +1 -1
  61. package/dist/web/middleware/request-logger.d.ts +2 -1
  62. package/dist/web/middleware/request-logger.d.ts.map +1 -1
  63. package/package.json +129 -136
  64. package/skills/rag-vault/SKILL.md +111 -111
  65. package/web-ui/dist/assets/index-BcRp9-z9.js +120 -0
  66. package/web-ui/dist/assets/index-ej8i4PGl.css +1 -0
  67. package/web-ui/dist/index.html +2 -2
  68. package/dist/utils/logger.d.ts +0 -36
  69. package/dist/utils/logger.d.ts.map +0 -1
  70. package/dist/utils/logger.js +0 -64
  71. package/dist/utils/logger.js.map +0 -1
  72. package/web-ui/dist/assets/index-0kBxUnZc.css +0 -1
  73. package/web-ui/dist/assets/index-CaUT0xZD.js +0 -59
@@ -1,59 +0,0 @@
1
- var dv=Object.defineProperty;var jp=r=>{throw TypeError(r)};var pv=(r,i,o)=>i in r?dv(r,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[i]=o;var Ep=(r,i,o)=>pv(r,typeof i!="symbol"?i+"":i,o),Ws=(r,i,o)=>i.has(r)||jp("Cannot "+o);var g=(r,i,o)=>(Ws(r,i,"read from private field"),o?o.call(r):i.get(r)),Z=(r,i,o)=>i.has(r)?jp("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(r):i.set(r,o),W=(r,i,o,s)=>(Ws(r,i,"write to private field"),s?s.call(r,o):i.set(r,o),o),de=(r,i,o)=>(Ws(r,i,"access private method"),o);var $o=(r,i,o,s)=>({set _(c){W(r,i,c,o)},get _(){return g(r,i,s)}});(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const p of c)if(p.type==="childList")for(const m of p.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&s(m)}).observe(document,{childList:!0,subtree:!0});function o(c){const p={};return c.integrity&&(p.integrity=c.integrity),c.referrerPolicy&&(p.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?p.credentials="include":c.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function s(c){if(c.ep)return;c.ep=!0;const p=o(c);fetch(c.href,p)}})();function Cu(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Hs={exports:{}},va={},qs={exports:{}},fe={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var bp;function fv(){if(bp)return fe;bp=1;var r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),m=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),C=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),S=Symbol.iterator;function R(j){return j===null||typeof j!="object"?null:(j=S&&j[S]||j["@@iterator"],typeof j=="function"?j:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,T={};function _(j,O,se){this.props=j,this.context=O,this.refs=T,this.updater=se||D}_.prototype.isReactComponent={},_.prototype.setState=function(j,O){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,O,"setState")},_.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function $(){}$.prototype=_.prototype;function H(j,O,se){this.props=j,this.context=O,this.refs=T,this.updater=se||D}var M=H.prototype=new $;M.constructor=H,L(M,_.prototype),M.isPureReactComponent=!0;var U=Array.isArray,ee=Object.prototype.hasOwnProperty,le={current:null},pe={key:!0,ref:!0,__self:!0,__source:!0};function ie(j,O,se){var oe,he={},ce=null,Se=null;if(O!=null)for(oe in O.ref!==void 0&&(Se=O.ref),O.key!==void 0&&(ce=""+O.key),O)ee.call(O,oe)&&!pe.hasOwnProperty(oe)&&(he[oe]=O[oe]);var xe=arguments.length-2;if(xe===1)he.children=se;else if(1<xe){for(var be=Array(xe),Ge=0;Ge<xe;Ge++)be[Ge]=arguments[Ge+2];he.children=be}if(j&&j.defaultProps)for(oe in xe=j.defaultProps,xe)he[oe]===void 0&&(he[oe]=xe[oe]);return{$$typeof:r,type:j,key:ce,ref:Se,props:he,_owner:le.current}}function ue(j,O){return{$$typeof:r,type:j.type,key:O,ref:j.ref,props:j.props,_owner:j._owner}}function me(j){return typeof j=="object"&&j!==null&&j.$$typeof===r}function We(j){var O={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(se){return O[se]})}var He=/\/+/g;function Ue(j,O){return typeof j=="object"&&j!==null&&j.key!=null?We(""+j.key):O.toString(36)}function ye(j,O,se,oe,he){var ce=typeof j;(ce==="undefined"||ce==="boolean")&&(j=null);var Se=!1;if(j===null)Se=!0;else switch(ce){case"string":case"number":Se=!0;break;case"object":switch(j.$$typeof){case r:case i:Se=!0}}if(Se)return Se=j,he=he(Se),j=oe===""?"."+Ue(Se,0):oe,U(he)?(se="",j!=null&&(se=j.replace(He,"$&/")+"/"),ye(he,O,se,"",function(Ge){return Ge})):he!=null&&(me(he)&&(he=ue(he,se+(!he.key||Se&&Se.key===he.key?"":(""+he.key).replace(He,"$&/")+"/")+j)),O.push(he)),1;if(Se=0,oe=oe===""?".":oe+":",U(j))for(var xe=0;xe<j.length;xe++){ce=j[xe];var be=oe+Ue(ce,xe);Se+=ye(ce,O,se,be,he)}else if(be=R(j),typeof be=="function")for(j=be.call(j),xe=0;!(ce=j.next()).done;)ce=ce.value,be=oe+Ue(ce,xe++),Se+=ye(ce,O,se,be,he);else if(ce==="object")throw O=String(j),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.");return Se}function Ee(j,O,se){if(j==null)return j;var oe=[],he=0;return ye(j,oe,"","",function(ce){return O.call(se,ce,he++)}),oe}function rt(j){if(j._status===-1){var O=j._result;O=O(),O.then(function(se){(j._status===0||j._status===-1)&&(j._status=1,j._result=se)},function(se){(j._status===0||j._status===-1)&&(j._status=2,j._result=se)}),j._status===-1&&(j._status=0,j._result=O)}if(j._status===1)return j._result.default;throw j._result}var Pe={current:null},B={transition:null},Y={ReactCurrentDispatcher:Pe,ReactCurrentBatchConfig:B,ReactCurrentOwner:le};function V(){throw Error("act(...) is not supported in production builds of React.")}return fe.Children={map:Ee,forEach:function(j,O,se){Ee(j,function(){O.apply(this,arguments)},se)},count:function(j){var O=0;return Ee(j,function(){O++}),O},toArray:function(j){return Ee(j,function(O){return O})||[]},only:function(j){if(!me(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},fe.Component=_,fe.Fragment=o,fe.Profiler=c,fe.PureComponent=H,fe.StrictMode=s,fe.Suspense=y,fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,fe.act=V,fe.cloneElement=function(j,O,se){if(j==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+j+".");var oe=L({},j.props),he=j.key,ce=j.ref,Se=j._owner;if(O!=null){if(O.ref!==void 0&&(ce=O.ref,Se=le.current),O.key!==void 0&&(he=""+O.key),j.type&&j.type.defaultProps)var xe=j.type.defaultProps;for(be in O)ee.call(O,be)&&!pe.hasOwnProperty(be)&&(oe[be]=O[be]===void 0&&xe!==void 0?xe[be]:O[be])}var be=arguments.length-2;if(be===1)oe.children=se;else if(1<be){xe=Array(be);for(var Ge=0;Ge<be;Ge++)xe[Ge]=arguments[Ge+2];oe.children=xe}return{$$typeof:r,type:j.type,key:he,ref:ce,props:oe,_owner:Se}},fe.createContext=function(j){return j={$$typeof:m,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},j.Provider={$$typeof:p,_context:j},j.Consumer=j},fe.createElement=ie,fe.createFactory=function(j){var O=ie.bind(null,j);return O.type=j,O},fe.createRef=function(){return{current:null}},fe.forwardRef=function(j){return{$$typeof:h,render:j}},fe.isValidElement=me,fe.lazy=function(j){return{$$typeof:E,_payload:{_status:-1,_result:j},_init:rt}},fe.memo=function(j,O){return{$$typeof:C,type:j,compare:O===void 0?null:O}},fe.startTransition=function(j){var O=B.transition;B.transition={};try{j()}finally{B.transition=O}},fe.unstable_act=V,fe.useCallback=function(j,O){return Pe.current.useCallback(j,O)},fe.useContext=function(j){return Pe.current.useContext(j)},fe.useDebugValue=function(){},fe.useDeferredValue=function(j){return Pe.current.useDeferredValue(j)},fe.useEffect=function(j,O){return Pe.current.useEffect(j,O)},fe.useId=function(){return Pe.current.useId()},fe.useImperativeHandle=function(j,O,se){return Pe.current.useImperativeHandle(j,O,se)},fe.useInsertionEffect=function(j,O){return Pe.current.useInsertionEffect(j,O)},fe.useLayoutEffect=function(j,O){return Pe.current.useLayoutEffect(j,O)},fe.useMemo=function(j,O){return Pe.current.useMemo(j,O)},fe.useReducer=function(j,O,se){return Pe.current.useReducer(j,O,se)},fe.useRef=function(j){return Pe.current.useRef(j)},fe.useState=function(j){return Pe.current.useState(j)},fe.useSyncExternalStore=function(j,O,se){return Pe.current.useSyncExternalStore(j,O,se)},fe.useTransition=function(){return Pe.current.useTransition()},fe.version="18.3.1",fe}var Cp;function Nu(){return Cp||(Cp=1,qs.exports=fv()),qs.exports}/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Np;function mv(){if(Np)return va;Np=1;var r=Nu(),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function m(h,y,C){var E,S={},R=null,D=null;C!==void 0&&(R=""+C),y.key!==void 0&&(R=""+y.key),y.ref!==void 0&&(D=y.ref);for(E in y)s.call(y,E)&&!p.hasOwnProperty(E)&&(S[E]=y[E]);if(h&&h.defaultProps)for(E in y=h.defaultProps,y)S[E]===void 0&&(S[E]=y[E]);return{$$typeof:i,type:h,key:R,ref:D,props:S,_owner:c.current}}return va.Fragment=o,va.jsx=m,va.jsxs=m,va}var Pp;function hv(){return Pp||(Pp=1,Hs.exports=mv()),Hs.exports}var d=hv(),Ei=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vv={setTimeout:(r,i)=>setTimeout(r,i),clearTimeout:r=>clearTimeout(r),setInterval:(r,i)=>setInterval(r,i),clearInterval:r=>clearInterval(r)},qn,bu,mf,gv=(mf=class{constructor(){Z(this,qn,vv);Z(this,bu,!1)}setTimeoutProvider(r){W(this,qn,r)}setTimeout(r,i){return g(this,qn).setTimeout(r,i)}clearTimeout(r){g(this,qn).clearTimeout(r)}setInterval(r,i){return g(this,qn).setInterval(r,i)}clearInterval(r){g(this,qn).clearInterval(r)}},qn=new WeakMap,bu=new WeakMap,mf),Sr=new gv;function yv(r){setTimeout(r,0)}var Tr=typeof window>"u"||"Deno"in globalThis;function pt(){}function xv(r,i){return typeof r=="function"?r(i):r}function iu(r){return typeof r=="number"&&r>=0&&r!==1/0}function bf(r,i){return Math.max(r+(i||0)-Date.now(),0)}function tr(r,i){return typeof r=="function"?r(i):r}function Ot(r,i){return typeof r=="function"?r(i):r}function Rp(r,i){const{type:o="all",exact:s,fetchStatus:c,predicate:p,queryKey:m,stale:h}=r;if(m){if(s){if(i.queryHash!==Pu(m,i.options))return!1}else if(!xa(i.queryKey,m))return!1}if(o!=="all"){const y=i.isActive();if(o==="active"&&!y||o==="inactive"&&y)return!1}return!(typeof h=="boolean"&&i.isStale()!==h||c&&c!==i.state.fetchStatus||p&&!p(i))}function _p(r,i){const{exact:o,status:s,predicate:c,mutationKey:p}=r;if(p){if(!i.options.mutationKey)return!1;if(o){if(Or(i.options.mutationKey)!==Or(p))return!1}else if(!xa(i.options.mutationKey,p))return!1}return!(s&&i.state.status!==s||c&&!c(i))}function Pu(r,i){return((i==null?void 0:i.queryKeyHashFn)||Or)(r)}function Or(r){return JSON.stringify(r,(i,o)=>au(o)?Object.keys(o).sort().reduce((s,c)=>(s[c]=o[c],s),{}):o)}function xa(r,i){return r===i?!0:typeof r!=typeof i?!1:r&&i&&typeof r=="object"&&typeof i=="object"?Object.keys(i).every(o=>xa(r[o],i[o])):!1}var wv=Object.prototype.hasOwnProperty;function Cf(r,i,o=0){if(r===i)return r;if(o>500)return i;const s=Dp(r)&&Dp(i);if(!s&&!(au(r)&&au(i)))return i;const p=(s?r:Object.keys(r)).length,m=s?i:Object.keys(i),h=m.length,y=s?new Array(h):{};let C=0;for(let E=0;E<h;E++){const S=s?E:m[E],R=r[S],D=i[S];if(R===D){y[S]=R,(s?E<p:wv.call(r,S))&&C++;continue}if(R===null||D===null||typeof R!="object"||typeof D!="object"){y[S]=D;continue}const L=Cf(R,D,o+1);y[S]=L,L===R&&C++}return p===h&&C===p?r:y}function Yo(r,i){if(!i||Object.keys(r).length!==Object.keys(i).length)return!1;for(const o in r)if(r[o]!==i[o])return!1;return!0}function Dp(r){return Array.isArray(r)&&r.length===Object.keys(r).length}function au(r){if(!Tp(r))return!1;const i=r.constructor;if(i===void 0)return!0;const o=i.prototype;return!(!Tp(o)||!o.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(r)!==Object.prototype)}function Tp(r){return Object.prototype.toString.call(r)==="[object Object]"}function kv(r){return new Promise(i=>{Sr.setTimeout(i,r)})}function ou(r,i,o){return typeof o.structuralSharing=="function"?o.structuralSharing(r,i):o.structuralSharing!==!1?Cf(r,i):i}function Sv(r,i,o=0){const s=[...r,i];return o&&s.length>o?s.slice(1):s}function jv(r,i,o=0){const s=[i,...r];return o&&s.length>o?s.slice(0,-1):s}var Ru=Symbol();function Nf(r,i){return!r.queryFn&&(i!=null&&i.initialPromise)?()=>i.initialPromise:!r.queryFn||r.queryFn===Ru?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}function _u(r,i){return typeof r=="function"?r(...i):!!r}function Ev(r,i,o){let s=!1,c;return Object.defineProperty(r,"signal",{enumerable:!0,get:()=>(c??(c=i()),s||(s=!0,c.aborted?o():c.addEventListener("abort",o,{once:!0})),c)}),r}var jr,Vn,di,hf,bv=(hf=class extends Ei{constructor(){super();Z(this,jr);Z(this,Vn);Z(this,di);W(this,di,i=>{if(!Tr&&window.addEventListener){const o=()=>i();return window.addEventListener("visibilitychange",o,!1),()=>{window.removeEventListener("visibilitychange",o)}}})}onSubscribe(){g(this,Vn)||this.setEventListener(g(this,di))}onUnsubscribe(){var i;this.hasListeners()||((i=g(this,Vn))==null||i.call(this),W(this,Vn,void 0))}setEventListener(i){var o;W(this,di,i),(o=g(this,Vn))==null||o.call(this),W(this,Vn,i(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(i){g(this,jr)!==i&&(W(this,jr,i),this.onFocus())}onFocus(){const i=this.isFocused();this.listeners.forEach(o=>{o(i)})}isFocused(){var i;return typeof g(this,jr)=="boolean"?g(this,jr):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},jr=new WeakMap,Vn=new WeakMap,di=new WeakMap,hf),Du=new bv;function lu(){let r,i;const o=new Promise((c,p)=>{r=c,i=p});o.status="pending",o.catch(()=>{});function s(c){Object.assign(o,c),delete o.resolve,delete o.reject}return o.resolve=c=>{s({status:"fulfilled",value:c}),r(c)},o.reject=c=>{s({status:"rejected",reason:c}),i(c)},o}var Cv=yv;function Nv(){let r=[],i=0,o=h=>{h()},s=h=>{h()},c=Cv;const p=h=>{i?r.push(h):c(()=>{o(h)})},m=()=>{const h=r;r=[],h.length&&c(()=>{s(()=>{h.forEach(y=>{o(y)})})})};return{batch:h=>{let y;i++;try{y=h()}finally{i--,i||m()}return y},batchCalls:h=>(...y)=>{p(()=>{h(...y)})},schedule:p,setNotifyFunction:h=>{o=h},setBatchNotifyFunction:h=>{s=h},setScheduler:h=>{c=h}}}var Ke=Nv(),pi,Kn,fi,vf,Pv=(vf=class extends Ei{constructor(){super();Z(this,pi,!0);Z(this,Kn);Z(this,fi);W(this,fi,i=>{if(!Tr&&window.addEventListener){const o=()=>i(!0),s=()=>i(!1);return window.addEventListener("online",o,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",s)}}})}onSubscribe(){g(this,Kn)||this.setEventListener(g(this,fi))}onUnsubscribe(){var i;this.hasListeners()||((i=g(this,Kn))==null||i.call(this),W(this,Kn,void 0))}setEventListener(i){var o;W(this,fi,i),(o=g(this,Kn))==null||o.call(this),W(this,Kn,i(this.setOnline.bind(this)))}setOnline(i){g(this,pi)!==i&&(W(this,pi,i),this.listeners.forEach(s=>{s(i)}))}isOnline(){return g(this,pi)}},pi=new WeakMap,Kn=new WeakMap,fi=new WeakMap,vf),Xo=new Pv;function Rv(r){return Math.min(1e3*2**r,3e4)}function Pf(r){return(r??"online")==="online"?Xo.isOnline():!0}var su=class extends Error{constructor(r){super("CancelledError"),this.revert=r==null?void 0:r.revert,this.silent=r==null?void 0:r.silent}};function Rf(r){let i=!1,o=0,s;const c=lu(),p=()=>c.status!=="pending",m=T=>{var _;if(!p()){const $=new su(T);R($),(_=r.onCancel)==null||_.call(r,$)}},h=()=>{i=!0},y=()=>{i=!1},C=()=>Du.isFocused()&&(r.networkMode==="always"||Xo.isOnline())&&r.canRun(),E=()=>Pf(r.networkMode)&&r.canRun(),S=T=>{p()||(s==null||s(),c.resolve(T))},R=T=>{p()||(s==null||s(),c.reject(T))},D=()=>new Promise(T=>{var _;s=$=>{(p()||C())&&T($)},(_=r.onPause)==null||_.call(r)}).then(()=>{var T;s=void 0,p()||(T=r.onContinue)==null||T.call(r)}),L=()=>{if(p())return;let T;const _=o===0?r.initialPromise:void 0;try{T=_??r.fn()}catch($){T=Promise.reject($)}Promise.resolve(T).then(S).catch($=>{var le;if(p())return;const H=r.retry??(Tr?0:3),M=r.retryDelay??Rv,U=typeof M=="function"?M(o,$):M,ee=H===!0||typeof H=="number"&&o<H||typeof H=="function"&&H(o,$);if(i||!ee){R($);return}o++,(le=r.onFail)==null||le.call(r,o,$),kv(U).then(()=>C()?void 0:D()).then(()=>{i?R($):L()})})};return{promise:c,status:()=>c.status,cancel:m,continue:()=>(s==null||s(),c),cancelRetry:h,continueRetry:y,canStart:E,start:()=>(E()?L():D().then(L),c)}}var Er,gf,_f=(gf=class{constructor(){Z(this,Er)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),iu(this.gcTime)&&W(this,Er,Sr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(Tr?1/0:300*1e3))}clearGcTimeout(){g(this,Er)&&(Sr.clearTimeout(g(this,Er)),W(this,Er,void 0))}},Er=new WeakMap,gf),br,mi,Tt,Cr,et,Sa,Nr,Bt,mn,yf,_v=(yf=class extends _f{constructor(i){super();Z(this,Bt);Z(this,br);Z(this,mi);Z(this,Tt);Z(this,Cr);Z(this,et);Z(this,Sa);Z(this,Nr);W(this,Nr,!1),W(this,Sa,i.defaultOptions),this.setOptions(i.options),this.observers=[],W(this,Cr,i.client),W(this,Tt,g(this,Cr).getQueryCache()),this.queryKey=i.queryKey,this.queryHash=i.queryHash,W(this,br,Lp(this.options)),this.state=i.state??g(this,br),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var i;return(i=g(this,et))==null?void 0:i.promise}setOptions(i){if(this.options={...g(this,Sa),...i},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const o=Lp(this.options);o.data!==void 0&&(this.setState(Op(o.data,o.dataUpdatedAt)),W(this,br,o))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&g(this,Tt).remove(this)}setData(i,o){const s=ou(this.state.data,i,this.options);return de(this,Bt,mn).call(this,{data:s,type:"success",dataUpdatedAt:o==null?void 0:o.updatedAt,manual:o==null?void 0:o.manual}),s}setState(i,o){de(this,Bt,mn).call(this,{type:"setState",state:i,setStateOptions:o})}cancel(i){var s,c;const o=(s=g(this,et))==null?void 0:s.promise;return(c=g(this,et))==null||c.cancel(i),o?o.then(pt).catch(pt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(g(this,br))}isActive(){return this.observers.some(i=>Ot(i.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ru||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(i=>tr(i.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(i=>i.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(i=0){return this.state.data===void 0?!0:i==="static"?!1:this.state.isInvalidated?!0:!bf(this.state.dataUpdatedAt,i)}onFocus(){var o;const i=this.observers.find(s=>s.shouldFetchOnWindowFocus());i==null||i.refetch({cancelRefetch:!1}),(o=g(this,et))==null||o.continue()}onOnline(){var o;const i=this.observers.find(s=>s.shouldFetchOnReconnect());i==null||i.refetch({cancelRefetch:!1}),(o=g(this,et))==null||o.continue()}addObserver(i){this.observers.includes(i)||(this.observers.push(i),this.clearGcTimeout(),g(this,Tt).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){this.observers.includes(i)&&(this.observers=this.observers.filter(o=>o!==i),this.observers.length||(g(this,et)&&(g(this,Nr)?g(this,et).cancel({revert:!0}):g(this,et).cancelRetry()),this.scheduleGc()),g(this,Tt).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||de(this,Bt,mn).call(this,{type:"invalidate"})}async fetch(i,o){var y,C,E,S,R,D,L,T,_,$,H,M;if(this.state.fetchStatus!=="idle"&&((y=g(this,et))==null?void 0:y.status())!=="rejected"){if(this.state.data!==void 0&&(o!=null&&o.cancelRefetch))this.cancel({silent:!0});else if(g(this,et))return g(this,et).continueRetry(),g(this,et).promise}if(i&&this.setOptions(i),!this.options.queryFn){const U=this.observers.find(ee=>ee.options.queryFn);U&&this.setOptions(U.options)}const s=new AbortController,c=U=>{Object.defineProperty(U,"signal",{enumerable:!0,get:()=>(W(this,Nr,!0),s.signal)})},p=()=>{const U=Nf(this.options,o),le=(()=>{const pe={client:g(this,Cr),queryKey:this.queryKey,meta:this.meta};return c(pe),pe})();return W(this,Nr,!1),this.options.persister?this.options.persister(U,le,this):U(le)},h=(()=>{const U={fetchOptions:o,options:this.options,queryKey:this.queryKey,client:g(this,Cr),state:this.state,fetchFn:p};return c(U),U})();(C=this.options.behavior)==null||C.onFetch(h,this),W(this,mi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((E=h.fetchOptions)==null?void 0:E.meta))&&de(this,Bt,mn).call(this,{type:"fetch",meta:(S=h.fetchOptions)==null?void 0:S.meta}),W(this,et,Rf({initialPromise:o==null?void 0:o.initialPromise,fn:h.fetchFn,onCancel:U=>{U instanceof su&&U.revert&&this.setState({...g(this,mi),fetchStatus:"idle"}),s.abort()},onFail:(U,ee)=>{de(this,Bt,mn).call(this,{type:"failed",failureCount:U,error:ee})},onPause:()=>{de(this,Bt,mn).call(this,{type:"pause"})},onContinue:()=>{de(this,Bt,mn).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const U=await g(this,et).start();if(U===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(U),(D=(R=g(this,Tt).config).onSuccess)==null||D.call(R,U,this),(T=(L=g(this,Tt).config).onSettled)==null||T.call(L,U,this.state.error,this),U}catch(U){if(U instanceof su){if(U.silent)return g(this,et).promise;if(U.revert){if(this.state.data===void 0)throw U;return this.state.data}}throw de(this,Bt,mn).call(this,{type:"error",error:U}),($=(_=g(this,Tt).config).onError)==null||$.call(_,U,this),(M=(H=g(this,Tt).config).onSettled)==null||M.call(H,this.state.data,U,this),U}finally{this.scheduleGc()}}},br=new WeakMap,mi=new WeakMap,Tt=new WeakMap,Cr=new WeakMap,et=new WeakMap,Sa=new WeakMap,Nr=new WeakMap,Bt=new WeakSet,mn=function(i){const o=s=>{switch(i.type){case"failed":return{...s,fetchFailureCount:i.failureCount,fetchFailureReason:i.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Df(s.data,this.options),fetchMeta:i.meta??null};case"success":const c={...s,...Op(i.data,i.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!i.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return W(this,mi,i.manual?c:void 0),c;case"error":const p=i.error;return{...s,error:p,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:p,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...i.state}}};this.state=o(this.state),Ke.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),g(this,Tt).notify({query:this,type:"updated",action:i})})},yf);function Df(r,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Pf(i.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function Op(r,i){return{data:r,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Lp(r){const i=typeof r.initialData=="function"?r.initialData():r.initialData,o=i!==void 0,s=o?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:o?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:o?"success":"pending",fetchStatus:"idle"}}var xt,ve,ja,dt,Pr,hi,hn,Gn,Ea,vi,gi,Rr,_r,Yn,yi,ke,ya,uu,cu,du,pu,fu,mu,hu,Tf,xf,Dv=(xf=class extends Ei{constructor(i,o){super();Z(this,ke);Z(this,xt);Z(this,ve);Z(this,ja);Z(this,dt);Z(this,Pr);Z(this,hi);Z(this,hn);Z(this,Gn);Z(this,Ea);Z(this,vi);Z(this,gi);Z(this,Rr);Z(this,_r);Z(this,Yn);Z(this,yi,new Set);this.options=o,W(this,xt,i),W(this,Gn,null),W(this,hn,lu()),this.bindMethods(),this.setOptions(o)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(g(this,ve).addObserver(this),Fp(g(this,ve),this.options)?de(this,ke,ya).call(this):this.updateResult(),de(this,ke,pu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return vu(g(this,ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return vu(g(this,ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,de(this,ke,fu).call(this),de(this,ke,mu).call(this),g(this,ve).removeObserver(this)}setOptions(i){const o=this.options,s=g(this,ve);if(this.options=g(this,xt).defaultQueryOptions(i),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ot(this.options.enabled,g(this,ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");de(this,ke,hu).call(this),g(this,ve).setOptions(this.options),o._defaulted&&!Yo(this.options,o)&&g(this,xt).getQueryCache().notify({type:"observerOptionsUpdated",query:g(this,ve),observer:this});const c=this.hasListeners();c&&zp(g(this,ve),s,this.options,o)&&de(this,ke,ya).call(this),this.updateResult(),c&&(g(this,ve)!==s||Ot(this.options.enabled,g(this,ve))!==Ot(o.enabled,g(this,ve))||tr(this.options.staleTime,g(this,ve))!==tr(o.staleTime,g(this,ve)))&&de(this,ke,uu).call(this);const p=de(this,ke,cu).call(this);c&&(g(this,ve)!==s||Ot(this.options.enabled,g(this,ve))!==Ot(o.enabled,g(this,ve))||p!==g(this,Yn))&&de(this,ke,du).call(this,p)}getOptimisticResult(i){const o=g(this,xt).getQueryCache().build(g(this,xt),i),s=this.createResult(o,i);return Ov(this,s)&&(W(this,dt,s),W(this,hi,this.options),W(this,Pr,g(this,ve).state)),s}getCurrentResult(){return g(this,dt)}trackResult(i,o){return new Proxy(i,{get:(s,c)=>(this.trackProp(c),o==null||o(c),c==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&g(this,hn).status==="pending"&&g(this,hn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,c))})}trackProp(i){g(this,yi).add(i)}getCurrentQuery(){return g(this,ve)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const o=g(this,xt).defaultQueryOptions(i),s=g(this,xt).getQueryCache().build(g(this,xt),o);return s.fetch().then(()=>this.createResult(s,o))}fetch(i){return de(this,ke,ya).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),g(this,dt)))}createResult(i,o){var ue;const s=g(this,ve),c=this.options,p=g(this,dt),m=g(this,Pr),h=g(this,hi),C=i!==s?i.state:g(this,ja),{state:E}=i;let S={...E},R=!1,D;if(o._optimisticResults){const me=this.hasListeners(),We=!me&&Fp(i,o),He=me&&zp(i,s,o,c);(We||He)&&(S={...S,...Df(E.data,i.options)}),o._optimisticResults==="isRestoring"&&(S.fetchStatus="idle")}let{error:L,errorUpdatedAt:T,status:_}=S;D=S.data;let $=!1;if(o.placeholderData!==void 0&&D===void 0&&_==="pending"){let me;p!=null&&p.isPlaceholderData&&o.placeholderData===(h==null?void 0:h.placeholderData)?(me=p.data,$=!0):me=typeof o.placeholderData=="function"?o.placeholderData((ue=g(this,gi))==null?void 0:ue.state.data,g(this,gi)):o.placeholderData,me!==void 0&&(_="success",D=ou(p==null?void 0:p.data,me,o),R=!0)}if(o.select&&D!==void 0&&!$)if(p&&D===(m==null?void 0:m.data)&&o.select===g(this,Ea))D=g(this,vi);else try{W(this,Ea,o.select),D=o.select(D),D=ou(p==null?void 0:p.data,D,o),W(this,vi,D),W(this,Gn,null)}catch(me){W(this,Gn,me)}g(this,Gn)&&(L=g(this,Gn),D=g(this,vi),T=Date.now(),_="error");const H=S.fetchStatus==="fetching",M=_==="pending",U=_==="error",ee=M&&H,le=D!==void 0,ie={status:_,fetchStatus:S.fetchStatus,isPending:M,isSuccess:_==="success",isError:U,isInitialLoading:ee,isLoading:ee,data:D,dataUpdatedAt:S.dataUpdatedAt,error:L,errorUpdatedAt:T,failureCount:S.fetchFailureCount,failureReason:S.fetchFailureReason,errorUpdateCount:S.errorUpdateCount,isFetched:S.dataUpdateCount>0||S.errorUpdateCount>0,isFetchedAfterMount:S.dataUpdateCount>C.dataUpdateCount||S.errorUpdateCount>C.errorUpdateCount,isFetching:H,isRefetching:H&&!M,isLoadingError:U&&!le,isPaused:S.fetchStatus==="paused",isPlaceholderData:R,isRefetchError:U&&le,isStale:Tu(i,o),refetch:this.refetch,promise:g(this,hn),isEnabled:Ot(o.enabled,i)!==!1};if(this.options.experimental_prefetchInRender){const me=ie.data!==void 0,We=ie.status==="error"&&!me,He=Ee=>{We?Ee.reject(ie.error):me&&Ee.resolve(ie.data)},Ue=()=>{const Ee=W(this,hn,ie.promise=lu());He(Ee)},ye=g(this,hn);switch(ye.status){case"pending":i.queryHash===s.queryHash&&He(ye);break;case"fulfilled":(We||ie.data!==ye.value)&&Ue();break;case"rejected":(!We||ie.error!==ye.reason)&&Ue();break}}return ie}updateResult(){const i=g(this,dt),o=this.createResult(g(this,ve),this.options);if(W(this,Pr,g(this,ve).state),W(this,hi,this.options),g(this,Pr).data!==void 0&&W(this,gi,g(this,ve)),Yo(o,i))return;W(this,dt,o);const s=()=>{if(!i)return!0;const{notifyOnChangeProps:c}=this.options,p=typeof c=="function"?c():c;if(p==="all"||!p&&!g(this,yi).size)return!0;const m=new Set(p??g(this,yi));return this.options.throwOnError&&m.add("error"),Object.keys(g(this,dt)).some(h=>{const y=h;return g(this,dt)[y]!==i[y]&&m.has(y)})};de(this,ke,Tf).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&de(this,ke,pu).call(this)}},xt=new WeakMap,ve=new WeakMap,ja=new WeakMap,dt=new WeakMap,Pr=new WeakMap,hi=new WeakMap,hn=new WeakMap,Gn=new WeakMap,Ea=new WeakMap,vi=new WeakMap,gi=new WeakMap,Rr=new WeakMap,_r=new WeakMap,Yn=new WeakMap,yi=new WeakMap,ke=new WeakSet,ya=function(i){de(this,ke,hu).call(this);let o=g(this,ve).fetch(this.options,i);return i!=null&&i.throwOnError||(o=o.catch(pt)),o},uu=function(){de(this,ke,fu).call(this);const i=tr(this.options.staleTime,g(this,ve));if(Tr||g(this,dt).isStale||!iu(i))return;const s=bf(g(this,dt).dataUpdatedAt,i)+1;W(this,Rr,Sr.setTimeout(()=>{g(this,dt).isStale||this.updateResult()},s))},cu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(g(this,ve)):this.options.refetchInterval)??!1},du=function(i){de(this,ke,mu).call(this),W(this,Yn,i),!(Tr||Ot(this.options.enabled,g(this,ve))===!1||!iu(g(this,Yn))||g(this,Yn)===0)&&W(this,_r,Sr.setInterval(()=>{(this.options.refetchIntervalInBackground||Du.isFocused())&&de(this,ke,ya).call(this)},g(this,Yn)))},pu=function(){de(this,ke,uu).call(this),de(this,ke,du).call(this,de(this,ke,cu).call(this))},fu=function(){g(this,Rr)&&(Sr.clearTimeout(g(this,Rr)),W(this,Rr,void 0))},mu=function(){g(this,_r)&&(Sr.clearInterval(g(this,_r)),W(this,_r,void 0))},hu=function(){const i=g(this,xt).getQueryCache().build(g(this,xt),this.options);if(i===g(this,ve))return;const o=g(this,ve);W(this,ve,i),W(this,ja,i.state),this.hasListeners()&&(o==null||o.removeObserver(this),i.addObserver(this))},Tf=function(i){Ke.batch(()=>{i.listeners&&this.listeners.forEach(o=>{o(g(this,dt))}),g(this,xt).getQueryCache().notify({query:g(this,ve),type:"observerResultsUpdated"})})},xf);function Tv(r,i){return Ot(i.enabled,r)!==!1&&r.state.data===void 0&&!(r.state.status==="error"&&i.retryOnMount===!1)}function Fp(r,i){return Tv(r,i)||r.state.data!==void 0&&vu(r,i,i.refetchOnMount)}function vu(r,i,o){if(Ot(i.enabled,r)!==!1&&tr(i.staleTime,r)!=="static"){const s=typeof o=="function"?o(r):o;return s==="always"||s!==!1&&Tu(r,i)}return!1}function zp(r,i,o,s){return(r!==i||Ot(s.enabled,r)===!1)&&(!o.suspense||r.state.status!=="error")&&Tu(r,o)}function Tu(r,i){return Ot(i.enabled,r)!==!1&&r.isStaleByTime(tr(i.staleTime,r))}function Ov(r,i){return!Yo(r.getCurrentResult(),i)}function Mp(r){return{onFetch:(i,o)=>{var E,S,R,D,L;const s=i.options,c=(R=(S=(E=i.fetchOptions)==null?void 0:E.meta)==null?void 0:S.fetchMore)==null?void 0:R.direction,p=((D=i.state.data)==null?void 0:D.pages)||[],m=((L=i.state.data)==null?void 0:L.pageParams)||[];let h={pages:[],pageParams:[]},y=0;const C=async()=>{let T=!1;const _=M=>{Ev(M,()=>i.signal,()=>T=!0)},$=Nf(i.options,i.fetchOptions),H=async(M,U,ee)=>{if(T)return Promise.reject();if(U==null&&M.pages.length)return Promise.resolve(M);const pe=(()=>{const We={client:i.client,queryKey:i.queryKey,pageParam:U,direction:ee?"backward":"forward",meta:i.options.meta};return _(We),We})(),ie=await $(pe),{maxPages:ue}=i.options,me=ee?jv:Sv;return{pages:me(M.pages,ie,ue),pageParams:me(M.pageParams,U,ue)}};if(c&&p.length){const M=c==="backward",U=M?Lv:Ip,ee={pages:p,pageParams:m},le=U(s,ee);h=await H(ee,le,M)}else{const M=r??p.length;do{const U=y===0?m[0]??s.initialPageParam:Ip(s,h);if(y>0&&U==null)break;h=await H(h,U),y++}while(y<M)}return h};i.options.persister?i.fetchFn=()=>{var T,_;return(_=(T=i.options).persister)==null?void 0:_.call(T,C,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},o)}:i.fetchFn=C}}}function Ip(r,{pages:i,pageParams:o}){const s=i.length-1;return i.length>0?r.getNextPageParam(i[s],i,o[s],o):void 0}function Lv(r,{pages:i,pageParams:o}){var s;return i.length>0?(s=r.getPreviousPageParam)==null?void 0:s.call(r,i[0],i,o[0],o):void 0}var ba,Jt,st,Dr,Zt,Hn,wf,Fv=(wf=class extends _f{constructor(i){super();Z(this,Zt);Z(this,ba);Z(this,Jt);Z(this,st);Z(this,Dr);W(this,ba,i.client),this.mutationId=i.mutationId,W(this,st,i.mutationCache),W(this,Jt,[]),this.state=i.state||Of(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options=i,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){g(this,Jt).includes(i)||(g(this,Jt).push(i),this.clearGcTimeout(),g(this,st).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){W(this,Jt,g(this,Jt).filter(o=>o!==i)),this.scheduleGc(),g(this,st).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){g(this,Jt).length||(this.state.status==="pending"?this.scheduleGc():g(this,st).remove(this))}continue(){var i;return((i=g(this,Dr))==null?void 0:i.continue())??this.execute(this.state.variables)}async execute(i){var m,h,y,C,E,S,R,D,L,T,_,$,H,M,U,ee,le,pe;const o=()=>{de(this,Zt,Hn).call(this,{type:"continue"})},s={client:g(this,ba),meta:this.options.meta,mutationKey:this.options.mutationKey};W(this,Dr,Rf({fn:()=>this.options.mutationFn?this.options.mutationFn(i,s):Promise.reject(new Error("No mutationFn found")),onFail:(ie,ue)=>{de(this,Zt,Hn).call(this,{type:"failed",failureCount:ie,error:ue})},onPause:()=>{de(this,Zt,Hn).call(this,{type:"pause"})},onContinue:o,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>g(this,st).canRun(this)}));const c=this.state.status==="pending",p=!g(this,Dr).canStart();try{if(c)o();else{de(this,Zt,Hn).call(this,{type:"pending",variables:i,isPaused:p}),g(this,st).config.onMutate&&await g(this,st).config.onMutate(i,this,s);const ue=await((h=(m=this.options).onMutate)==null?void 0:h.call(m,i,s));ue!==this.state.context&&de(this,Zt,Hn).call(this,{type:"pending",context:ue,variables:i,isPaused:p})}const ie=await g(this,Dr).start();return await((C=(y=g(this,st).config).onSuccess)==null?void 0:C.call(y,ie,i,this.state.context,this,s)),await((S=(E=this.options).onSuccess)==null?void 0:S.call(E,ie,i,this.state.context,s)),await((D=(R=g(this,st).config).onSettled)==null?void 0:D.call(R,ie,null,this.state.variables,this.state.context,this,s)),await((T=(L=this.options).onSettled)==null?void 0:T.call(L,ie,null,i,this.state.context,s)),de(this,Zt,Hn).call(this,{type:"success",data:ie}),ie}catch(ie){try{await(($=(_=g(this,st).config).onError)==null?void 0:$.call(_,ie,i,this.state.context,this,s))}catch(ue){Promise.reject(ue)}try{await((M=(H=this.options).onError)==null?void 0:M.call(H,ie,i,this.state.context,s))}catch(ue){Promise.reject(ue)}try{await((ee=(U=g(this,st).config).onSettled)==null?void 0:ee.call(U,void 0,ie,this.state.variables,this.state.context,this,s))}catch(ue){Promise.reject(ue)}try{await((pe=(le=this.options).onSettled)==null?void 0:pe.call(le,void 0,ie,i,this.state.context,s))}catch(ue){Promise.reject(ue)}throw de(this,Zt,Hn).call(this,{type:"error",error:ie}),ie}finally{g(this,st).runNext(this)}}},ba=new WeakMap,Jt=new WeakMap,st=new WeakMap,Dr=new WeakMap,Zt=new WeakSet,Hn=function(i){const o=s=>{switch(i.type){case"failed":return{...s,failureCount:i.failureCount,failureReason:i.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:i.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:i.isPaused,status:"pending",variables:i.variables,submittedAt:Date.now()};case"success":return{...s,data:i.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:i.error,failureCount:s.failureCount+1,failureReason:i.error,isPaused:!1,status:"error"}}};this.state=o(this.state),Ke.batch(()=>{g(this,Jt).forEach(s=>{s.onMutationUpdate(i)}),g(this,st).notify({mutation:this,type:"updated",action:i})})},wf);function Of(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vn,Qt,Ca,kf,zv=(kf=class extends Ei{constructor(i={}){super();Z(this,vn);Z(this,Qt);Z(this,Ca);this.config=i,W(this,vn,new Set),W(this,Qt,new Map),W(this,Ca,0)}build(i,o,s){const c=new Fv({client:i,mutationCache:this,mutationId:++$o(this,Ca)._,options:i.defaultMutationOptions(o),state:s});return this.add(c),c}add(i){g(this,vn).add(i);const o=Bo(i);if(typeof o=="string"){const s=g(this,Qt).get(o);s?s.push(i):g(this,Qt).set(o,[i])}this.notify({type:"added",mutation:i})}remove(i){if(g(this,vn).delete(i)){const o=Bo(i);if(typeof o=="string"){const s=g(this,Qt).get(o);if(s)if(s.length>1){const c=s.indexOf(i);c!==-1&&s.splice(c,1)}else s[0]===i&&g(this,Qt).delete(o)}}this.notify({type:"removed",mutation:i})}canRun(i){const o=Bo(i);if(typeof o=="string"){const s=g(this,Qt).get(o),c=s==null?void 0:s.find(p=>p.state.status==="pending");return!c||c===i}else return!0}runNext(i){var s;const o=Bo(i);if(typeof o=="string"){const c=(s=g(this,Qt).get(o))==null?void 0:s.find(p=>p!==i&&p.state.isPaused);return(c==null?void 0:c.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ke.batch(()=>{g(this,vn).forEach(i=>{this.notify({type:"removed",mutation:i})}),g(this,vn).clear(),g(this,Qt).clear()})}getAll(){return Array.from(g(this,vn))}find(i){const o={exact:!0,...i};return this.getAll().find(s=>_p(o,s))}findAll(i={}){return this.getAll().filter(o=>_p(i,o))}notify(i){Ke.batch(()=>{this.listeners.forEach(o=>{o(i)})})}resumePausedMutations(){const i=this.getAll().filter(o=>o.state.isPaused);return Ke.batch(()=>Promise.all(i.map(o=>o.continue().catch(pt))))}},vn=new WeakMap,Qt=new WeakMap,Ca=new WeakMap,kf);function Bo(r){var i;return(i=r.options.scope)==null?void 0:i.id}var gn,Xn,wt,yn,wn,Vo,gu,Sf,Mv=(Sf=class extends Ei{constructor(o,s){super();Z(this,wn);Z(this,gn);Z(this,Xn);Z(this,wt);Z(this,yn);W(this,gn,o),this.setOptions(s),this.bindMethods(),de(this,wn,Vo).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(o){var c;const s=this.options;this.options=g(this,gn).defaultMutationOptions(o),Yo(this.options,s)||g(this,gn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:g(this,wt),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&Or(s.mutationKey)!==Or(this.options.mutationKey)?this.reset():((c=g(this,wt))==null?void 0:c.state.status)==="pending"&&g(this,wt).setOptions(this.options)}onUnsubscribe(){var o;this.hasListeners()||(o=g(this,wt))==null||o.removeObserver(this)}onMutationUpdate(o){de(this,wn,Vo).call(this),de(this,wn,gu).call(this,o)}getCurrentResult(){return g(this,Xn)}reset(){var o;(o=g(this,wt))==null||o.removeObserver(this),W(this,wt,void 0),de(this,wn,Vo).call(this),de(this,wn,gu).call(this)}mutate(o,s){var c;return W(this,yn,s),(c=g(this,wt))==null||c.removeObserver(this),W(this,wt,g(this,gn).getMutationCache().build(g(this,gn),this.options)),g(this,wt).addObserver(this),g(this,wt).execute(o)}},gn=new WeakMap,Xn=new WeakMap,wt=new WeakMap,yn=new WeakMap,wn=new WeakSet,Vo=function(){var s;const o=((s=g(this,wt))==null?void 0:s.state)??Of();W(this,Xn,{...o,isPending:o.status==="pending",isSuccess:o.status==="success",isError:o.status==="error",isIdle:o.status==="idle",mutate:this.mutate,reset:this.reset})},gu=function(o){Ke.batch(()=>{var s,c,p,m,h,y,C,E;if(g(this,yn)&&this.hasListeners()){const S=g(this,Xn).variables,R=g(this,Xn).context,D={client:g(this,gn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((o==null?void 0:o.type)==="success"){try{(c=(s=g(this,yn)).onSuccess)==null||c.call(s,o.data,S,R,D)}catch(L){Promise.reject(L)}try{(m=(p=g(this,yn)).onSettled)==null||m.call(p,o.data,null,S,R,D)}catch(L){Promise.reject(L)}}else if((o==null?void 0:o.type)==="error"){try{(y=(h=g(this,yn)).onError)==null||y.call(h,o.error,S,R,D)}catch(L){Promise.reject(L)}try{(E=(C=g(this,yn)).onSettled)==null||E.call(C,void 0,o.error,S,R,D)}catch(L){Promise.reject(L)}}}this.listeners.forEach(S=>{S(g(this,Xn))})})},Sf),en,jf,Iv=(jf=class extends Ei{constructor(i={}){super();Z(this,en);this.config=i,W(this,en,new Map)}build(i,o,s){const c=o.queryKey,p=o.queryHash??Pu(c,o);let m=this.get(p);return m||(m=new _v({client:i,queryKey:c,queryHash:p,options:i.defaultQueryOptions(o),state:s,defaultOptions:i.getQueryDefaults(c)}),this.add(m)),m}add(i){g(this,en).has(i.queryHash)||(g(this,en).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){const o=g(this,en).get(i.queryHash);o&&(i.destroy(),o===i&&g(this,en).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){Ke.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return g(this,en).get(i)}getAll(){return[...g(this,en).values()]}find(i){const o={exact:!0,...i};return this.getAll().find(s=>Rp(o,s))}findAll(i={}){const o=this.getAll();return Object.keys(i).length>0?o.filter(s=>Rp(i,s)):o}notify(i){Ke.batch(()=>{this.listeners.forEach(o=>{o(i)})})}onFocus(){Ke.batch(()=>{this.getAll().forEach(i=>{i.onFocus()})})}onOnline(){Ke.batch(()=>{this.getAll().forEach(i=>{i.onOnline()})})}},en=new WeakMap,jf),Ae,Jn,Zn,xi,wi,er,ki,Si,Ef,Av=(Ef=class{constructor(r={}){Z(this,Ae);Z(this,Jn);Z(this,Zn);Z(this,xi);Z(this,wi);Z(this,er);Z(this,ki);Z(this,Si);W(this,Ae,r.queryCache||new Iv),W(this,Jn,r.mutationCache||new zv),W(this,Zn,r.defaultOptions||{}),W(this,xi,new Map),W(this,wi,new Map),W(this,er,0)}mount(){$o(this,er)._++,g(this,er)===1&&(W(this,ki,Du.subscribe(async r=>{r&&(await this.resumePausedMutations(),g(this,Ae).onFocus())})),W(this,Si,Xo.subscribe(async r=>{r&&(await this.resumePausedMutations(),g(this,Ae).onOnline())})))}unmount(){var r,i;$o(this,er)._--,g(this,er)===0&&((r=g(this,ki))==null||r.call(this),W(this,ki,void 0),(i=g(this,Si))==null||i.call(this),W(this,Si,void 0))}isFetching(r){return g(this,Ae).findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return g(this,Jn).findAll({...r,status:"pending"}).length}getQueryData(r){var o;const i=this.defaultQueryOptions({queryKey:r});return(o=g(this,Ae).get(i.queryHash))==null?void 0:o.state.data}ensureQueryData(r){const i=this.defaultQueryOptions(r),o=g(this,Ae).build(this,i),s=o.state.data;return s===void 0?this.fetchQuery(r):(r.revalidateIfStale&&o.isStaleByTime(tr(i.staleTime,o))&&this.prefetchQuery(i),Promise.resolve(s))}getQueriesData(r){return g(this,Ae).findAll(r).map(({queryKey:i,state:o})=>{const s=o.data;return[i,s]})}setQueryData(r,i,o){const s=this.defaultQueryOptions({queryKey:r}),c=g(this,Ae).get(s.queryHash),p=c==null?void 0:c.state.data,m=xv(i,p);if(m!==void 0)return g(this,Ae).build(this,s).setData(m,{...o,manual:!0})}setQueriesData(r,i,o){return Ke.batch(()=>g(this,Ae).findAll(r).map(({queryKey:s})=>[s,this.setQueryData(s,i,o)]))}getQueryState(r){var o;const i=this.defaultQueryOptions({queryKey:r});return(o=g(this,Ae).get(i.queryHash))==null?void 0:o.state}removeQueries(r){const i=g(this,Ae);Ke.batch(()=>{i.findAll(r).forEach(o=>{i.remove(o)})})}resetQueries(r,i){const o=g(this,Ae);return Ke.batch(()=>(o.findAll(r).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...r},i)))}cancelQueries(r,i={}){const o={revert:!0,...i},s=Ke.batch(()=>g(this,Ae).findAll(r).map(c=>c.cancel(o)));return Promise.all(s).then(pt).catch(pt)}invalidateQueries(r,i={}){return Ke.batch(()=>(g(this,Ae).findAll(r).forEach(o=>{o.invalidate()}),(r==null?void 0:r.refetchType)==="none"?Promise.resolve():this.refetchQueries({...r,type:(r==null?void 0:r.refetchType)??(r==null?void 0:r.type)??"active"},i)))}refetchQueries(r,i={}){const o={...i,cancelRefetch:i.cancelRefetch??!0},s=Ke.batch(()=>g(this,Ae).findAll(r).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let p=c.fetch(void 0,o);return o.throwOnError||(p=p.catch(pt)),c.state.fetchStatus==="paused"?Promise.resolve():p}));return Promise.all(s).then(pt)}fetchQuery(r){const i=this.defaultQueryOptions(r);i.retry===void 0&&(i.retry=!1);const o=g(this,Ae).build(this,i);return o.isStaleByTime(tr(i.staleTime,o))?o.fetch(i):Promise.resolve(o.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(pt).catch(pt)}fetchInfiniteQuery(r){return r.behavior=Mp(r.pages),this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(pt).catch(pt)}ensureInfiniteQueryData(r){return r.behavior=Mp(r.pages),this.ensureQueryData(r)}resumePausedMutations(){return Xo.isOnline()?g(this,Jn).resumePausedMutations():Promise.resolve()}getQueryCache(){return g(this,Ae)}getMutationCache(){return g(this,Jn)}getDefaultOptions(){return g(this,Zn)}setDefaultOptions(r){W(this,Zn,r)}setQueryDefaults(r,i){g(this,xi).set(Or(r),{queryKey:r,defaultOptions:i})}getQueryDefaults(r){const i=[...g(this,xi).values()],o={};return i.forEach(s=>{xa(r,s.queryKey)&&Object.assign(o,s.defaultOptions)}),o}setMutationDefaults(r,i){g(this,wi).set(Or(r),{mutationKey:r,defaultOptions:i})}getMutationDefaults(r){const i=[...g(this,wi).values()],o={};return i.forEach(s=>{xa(r,s.mutationKey)&&Object.assign(o,s.defaultOptions)}),o}defaultQueryOptions(r){if(r._defaulted)return r;const i={...g(this,Zn).queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return i.queryHash||(i.queryHash=Pu(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===Ru&&(i.enabled=!1),i}defaultMutationOptions(r){return r!=null&&r._defaulted?r:{...g(this,Zn).mutations,...(r==null?void 0:r.mutationKey)&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){g(this,Ae).clear(),g(this,Jn).clear()}},Ae=new WeakMap,Jn=new WeakMap,Zn=new WeakMap,xi=new WeakMap,wi=new WeakMap,er=new WeakMap,ki=new WeakMap,Si=new WeakMap,Ef),k=Nu();const Uv=Cu(k);var Lf=k.createContext(void 0),bi=r=>{const i=k.useContext(Lf);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},$v=({client:r,children:i})=>(k.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),d.jsx(Lf.Provider,{value:r,children:i})),Ff=k.createContext(!1),Bv=()=>k.useContext(Ff);Ff.Provider;function Qv(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}var Wv=k.createContext(Qv()),Hv=()=>k.useContext(Wv),qv=(r,i,o)=>{const s=o!=null&&o.state.error&&typeof r.throwOnError=="function"?_u(r.throwOnError,[o.state.error,o]):r.throwOnError;(r.suspense||r.experimental_prefetchInRender||s)&&(i.isReset()||(r.retryOnMount=!1))},Vv=r=>{k.useEffect(()=>{r.clearReset()},[r])},Kv=({result:r,errorResetBoundary:i,throwOnError:o,query:s,suspense:c})=>r.isError&&!i.isReset()&&!r.isFetching&&s&&(c&&r.data===void 0||_u(o,[r.error,s])),Gv=r=>{if(r.suspense){const o=c=>c==="static"?c:Math.max(c??1e3,1e3),s=r.staleTime;r.staleTime=typeof s=="function"?(...c)=>o(s(...c)):o(s),typeof r.gcTime=="number"&&(r.gcTime=Math.max(r.gcTime,1e3))}},Yv=(r,i)=>r.isLoading&&r.isFetching&&!i,Xv=(r,i)=>(r==null?void 0:r.suspense)&&i.isPending,Ap=(r,i,o)=>i.fetchOptimistic(r).catch(()=>{o.clearReset()});function Jv(r,i,o){var R,D,L,T;const s=Bv(),c=Hv(),p=bi(),m=p.defaultQueryOptions(r);(D=(R=p.getDefaultOptions().queries)==null?void 0:R._experimental_beforeQuery)==null||D.call(R,m);const h=p.getQueryCache().get(m.queryHash);m._optimisticResults=s?"isRestoring":"optimistic",Gv(m),qv(m,c,h),Vv(c);const y=!p.getQueryCache().get(m.queryHash),[C]=k.useState(()=>new i(p,m)),E=C.getOptimisticResult(m),S=!s&&r.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(_=>{const $=S?C.subscribe(Ke.batchCalls(_)):pt;return C.updateResult(),$},[C,S]),()=>C.getCurrentResult(),()=>C.getCurrentResult()),k.useEffect(()=>{C.setOptions(m)},[m,C]),Xv(m,E))throw Ap(m,C,c);if(Kv({result:E,errorResetBoundary:c,throwOnError:m.throwOnError,query:h,suspense:m.suspense}))throw E.error;if((T=(L=p.getDefaultOptions().queries)==null?void 0:L._experimental_afterQuery)==null||T.call(L,m,E),m.experimental_prefetchInRender&&!Tr&&Yv(E,s)){const _=y?Ap(m,C,c):h==null?void 0:h.promise;_==null||_.catch(pt).finally(()=>{C.updateResult()})}return m.notifyOnChangeProps?E:C.trackResult(E)}function nl(r,i){return Jv(r,Dv)}function Lr(r,i){const o=bi(),[s]=k.useState(()=>new Mv(o,r));k.useEffect(()=>{s.setOptions(r)},[s,r]);const c=k.useSyncExternalStore(k.useCallback(m=>s.subscribe(Ke.batchCalls(m)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),p=k.useCallback((m,h)=>{s.mutate(m,h).catch(pt)},[s]);if(c.error&&_u(s.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:p,mutateAsync:c.mutate}}var Qo={},Vs={exports:{}},yt={},Ks={exports:{}},Gs={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var Up;function Zv(){return Up||(Up=1,(function(r){function i(B,Y){var V=B.length;B.push(Y);e:for(;0<V;){var j=V-1>>>1,O=B[j];if(0<c(O,Y))B[j]=Y,B[V]=O,V=j;else break e}}function o(B){return B.length===0?null:B[0]}function s(B){if(B.length===0)return null;var Y=B[0],V=B.pop();if(V!==Y){B[0]=V;e:for(var j=0,O=B.length,se=O>>>1;j<se;){var oe=2*(j+1)-1,he=B[oe],ce=oe+1,Se=B[ce];if(0>c(he,V))ce<O&&0>c(Se,he)?(B[j]=Se,B[ce]=V,j=ce):(B[j]=he,B[oe]=V,j=oe);else if(ce<O&&0>c(Se,V))B[j]=Se,B[ce]=V,j=ce;else break e}}return Y}function c(B,Y){var V=B.sortIndex-Y.sortIndex;return V!==0?V:B.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var p=performance;r.unstable_now=function(){return p.now()}}else{var m=Date,h=m.now();r.unstable_now=function(){return m.now()-h}}var y=[],C=[],E=1,S=null,R=3,D=!1,L=!1,T=!1,_=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(B){for(var Y=o(C);Y!==null;){if(Y.callback===null)s(C);else if(Y.startTime<=B)s(C),Y.sortIndex=Y.expirationTime,i(y,Y);else break;Y=o(C)}}function U(B){if(T=!1,M(B),!L)if(o(y)!==null)L=!0,rt(ee);else{var Y=o(C);Y!==null&&Pe(U,Y.startTime-B)}}function ee(B,Y){L=!1,T&&(T=!1,$(ie),ie=-1),D=!0;var V=R;try{for(M(Y),S=o(y);S!==null&&(!(S.expirationTime>Y)||B&&!We());){var j=S.callback;if(typeof j=="function"){S.callback=null,R=S.priorityLevel;var O=j(S.expirationTime<=Y);Y=r.unstable_now(),typeof O=="function"?S.callback=O:S===o(y)&&s(y),M(Y)}else s(y);S=o(y)}if(S!==null)var se=!0;else{var oe=o(C);oe!==null&&Pe(U,oe.startTime-Y),se=!1}return se}finally{S=null,R=V,D=!1}}var le=!1,pe=null,ie=-1,ue=5,me=-1;function We(){return!(r.unstable_now()-me<ue)}function He(){if(pe!==null){var B=r.unstable_now();me=B;var Y=!0;try{Y=pe(!0,B)}finally{Y?Ue():(le=!1,pe=null)}}else le=!1}var Ue;if(typeof H=="function")Ue=function(){H(He)};else if(typeof MessageChannel<"u"){var ye=new MessageChannel,Ee=ye.port2;ye.port1.onmessage=He,Ue=function(){Ee.postMessage(null)}}else Ue=function(){_(He,0)};function rt(B){pe=B,le||(le=!0,Ue())}function Pe(B,Y){ie=_(function(){B(r.unstable_now())},Y)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(B){B.callback=null},r.unstable_continueExecution=function(){L||D||(L=!0,rt(ee))},r.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<B?Math.floor(1e3/B):5},r.unstable_getCurrentPriorityLevel=function(){return R},r.unstable_getFirstCallbackNode=function(){return o(y)},r.unstable_next=function(B){switch(R){case 1:case 2:case 3:var Y=3;break;default:Y=R}var V=R;R=Y;try{return B()}finally{R=V}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(B,Y){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var V=R;R=B;try{return Y()}finally{R=V}},r.unstable_scheduleCallback=function(B,Y,V){var j=r.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?j+V:j):V=j,B){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=V+O,B={id:E++,callback:Y,priorityLevel:B,startTime:V,expirationTime:O,sortIndex:-1},V>j?(B.sortIndex=V,i(C,B),o(y)===null&&B===o(C)&&(T?($(ie),ie=-1):T=!0,Pe(U,V-j))):(B.sortIndex=O,i(y,B),L||D||(L=!0,rt(ee))),B},r.unstable_shouldYield=We,r.unstable_wrapCallback=function(B){var Y=R;return function(){var V=R;R=Y;try{return B.apply(this,arguments)}finally{R=V}}}})(Gs)),Gs}var $p;function eg(){return $p||($p=1,Ks.exports=Zv()),Ks.exports}/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var Bp;function tg(){if(Bp)return yt;Bp=1;var r=Nu(),i=eg();function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,c={};function p(e,t){m(e,t),m(e+"Capture",t)}function m(e,t){for(c[e]=t,e=0;e<t.length;e++)s.add(t[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y=Object.prototype.hasOwnProperty,C=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,E={},S={};function R(e){return y.call(S,e)?!0:y.call(E,e)?!1:C.test(e)?S[e]=!0:(E[e]=!0,!1)}function D(e,t,n,a){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return a?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function L(e,t,n,a){if(t===null||typeof t>"u"||D(e,t,n,a))return!0;if(a)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function T(e,t,n,a,l,u,f){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=a,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=f}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_[e]=new T(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_[t]=new T(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){_[e]=new T(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_[e]=new T(e,2,!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".split(" ").forEach(function(e){_[e]=new T(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){_[e]=new T(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){_[e]=new T(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){_[e]=new T(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){_[e]=new T(e,5,!1,e.toLowerCase(),null,!1,!1)});var $=/[\-:]([a-z])/g;function H(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".split(" ").forEach(function(e){var t=e.replace($,H);_[t]=new T(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($,H);_[t]=new T(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($,H);_[t]=new T(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){_[e]=new T(e,1,!1,e.toLowerCase(),null,!1,!1)}),_.xlinkHref=new T("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){_[e]=new T(e,1,!1,e.toLowerCase(),null,!0,!0)});function M(e,t,n,a){var l=_.hasOwnProperty(t)?_[t]:null;(l!==null?l.type!==0:a||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(L(t,n,l,a)&&(n=null),a||l===null?R(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,a=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,a?e.setAttributeNS(a,t,n):e.setAttribute(t,n))))}var U=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ee=Symbol.for("react.element"),le=Symbol.for("react.portal"),pe=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),ue=Symbol.for("react.profiler"),me=Symbol.for("react.provider"),We=Symbol.for("react.context"),He=Symbol.for("react.forward_ref"),Ue=Symbol.for("react.suspense"),ye=Symbol.for("react.suspense_list"),Ee=Symbol.for("react.memo"),rt=Symbol.for("react.lazy"),Pe=Symbol.for("react.offscreen"),B=Symbol.iterator;function Y(e){return e===null||typeof e!="object"?null:(e=B&&e[B]||e["@@iterator"],typeof e=="function"?e:null)}var V=Object.assign,j;function O(e){if(j===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);j=t&&t[1]||""}return`
34
- `+j+e}var se=!1;function oe(e,t){if(!e||se)return"";se=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(P){var a=P}Reflect.construct(e,[],t)}else{try{t.call()}catch(P){a=P}e.call(t.prototype)}else{try{throw Error()}catch(P){a=P}e()}}catch(P){if(P&&a&&typeof P.stack=="string"){for(var l=P.stack.split(`
35
- `),u=a.stack.split(`
36
- `),f=l.length-1,v=u.length-1;1<=f&&0<=v&&l[f]!==u[v];)v--;for(;1<=f&&0<=v;f--,v--)if(l[f]!==u[v]){if(f!==1||v!==1)do if(f--,v--,0>v||l[f]!==u[v]){var x=`
37
- `+l[f].replace(" at new "," at ");return e.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",e.displayName)),x}while(1<=f&&0<=v);break}}}finally{se=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?O(e):""}function he(e){switch(e.tag){case 5:return O(e.type);case 16:return O("Lazy");case 13:return O("Suspense");case 19:return O("SuspenseList");case 0:case 2:case 15:return e=oe(e.type,!1),e;case 11:return e=oe(e.type.render,!1),e;case 1:return e=oe(e.type,!0),e;default:return""}}function ce(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case pe:return"Fragment";case le:return"Portal";case ue:return"Profiler";case ie:return"StrictMode";case Ue:return"Suspense";case ye:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case We:return(e.displayName||"Context")+".Consumer";case me:return(e._context.displayName||"Context")+".Provider";case He:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ee:return t=e.displayName||null,t!==null?t:ce(e.type)||"Memo";case rt:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}function Se(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(t);case 8:return t===ie?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function xe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ge(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(f){a=""+f,u.call(this,f)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(f){a=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nn(e){e._valueTracker||(e._valueTracker=Ge(e))}function rn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=be(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function rr(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}}function Mr(e,t){var n=t.checked;return V({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Pi(e,t){var n=t.defaultValue==null?"":t.defaultValue,a=t.checked!=null?t.checked:t.defaultChecked;n=xe(t.value!=null?t.value:n),e._wrapperState={initialChecked:a,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ri(e,t){t=t.checked,t!=null&&M(e,"checked",t,!1)}function Wt(e,t){Ri(e,t);var n=xe(t.value),a=t.type;if(n!=null)a==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?jn(e,t.type,n):t.hasOwnProperty("defaultValue")&&jn(e,t.type,xe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ir(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var a=t.type;if(!(a!=="submit"&&a!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function jn(e,t,n){(t!=="number"||rr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ht=Array.isArray;function En(e,t,n,a){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&a&&(e[n].defaultSelected=!0)}else{for(n=""+xe(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function _i(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(o(91));return V({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ta(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(o(92));if(Ht(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:xe(n)}}function Q(e,t){var n=xe(t.value),a=xe(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),a!=null&&(e.defaultValue=""+a)}function re(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Te(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Me(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Te(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ye,bn=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,a,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,a,l)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ye=Ye||document.createElement("div"),Ye.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ye.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function bt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var an={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Di=["Webkit","ms","Moz","O"];Object.keys(an).forEach(function(e){Di.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),an[t]=an[e]})});function Ar(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||an.hasOwnProperty(e)&&an[e]?(""+t).trim():t+"px"}function ir(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var a=n.indexOf("--")===0,l=Ar(n,t[n],a);n==="float"&&(n="cssFloat"),a?e.setProperty(n,l):e[n]=l}}var Ti=V({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ar(e,t){if(t){if(Ti[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(o(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(o(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(t.style!=null&&typeof t.style!="object")throw Error(o(62))}}function or(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lr=null;function Oi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ol=null,Ur=null,$r=null;function Uu(e){if(e=ta(e)){if(typeof ol!="function")throw Error(o(280));var t=e.stateNode;t&&(t=to(t),ol(e.stateNode,e.type,t))}}function $u(e){Ur?$r?$r.push(e):$r=[e]:Ur=e}function Bu(){if(Ur){var e=Ur,t=$r;if($r=Ur=null,Uu(e),t)for(e=0;e<t.length;e++)Uu(t[e])}}function Qu(e,t){return e(t)}function Wu(){}var ll=!1;function Hu(e,t,n){if(ll)return e(t,n);ll=!0;try{return Qu(e,t,n)}finally{ll=!1,(Ur!==null||$r!==null)&&(Wu(),Bu())}}function Li(e,t){var n=e.stateNode;if(n===null)return null;var a=to(n);if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(o(231,t,typeof n));return n}var sl=!1;if(h)try{var Fi={};Object.defineProperty(Fi,"passive",{get:function(){sl=!0}}),window.addEventListener("test",Fi,Fi),window.removeEventListener("test",Fi,Fi)}catch{sl=!1}function gm(e,t,n,a,l,u,f,v,x){var P=Array.prototype.slice.call(arguments,3);try{t.apply(n,P)}catch(z){this.onError(z)}}var zi=!1,Oa=null,La=!1,ul=null,ym={onError:function(e){zi=!0,Oa=e}};function xm(e,t,n,a,l,u,f,v,x){zi=!1,Oa=null,gm.apply(ym,arguments)}function wm(e,t,n,a,l,u,f,v,x){if(xm.apply(this,arguments),zi){if(zi){var P=Oa;zi=!1,Oa=null}else throw Error(o(198));La||(La=!0,ul=P)}}function sr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function qu(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Vu(e){if(sr(e)!==e)throw Error(o(188))}function km(e){var t=e.alternate;if(!t){if(t=sr(e),t===null)throw Error(o(188));return t!==e?null:e}for(var n=e,a=t;;){var l=n.return;if(l===null)break;var u=l.alternate;if(u===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===u.child){for(u=l.child;u;){if(u===n)return Vu(l),e;if(u===a)return Vu(l),t;u=u.sibling}throw Error(o(188))}if(n.return!==a.return)n=l,a=u;else{for(var f=!1,v=l.child;v;){if(v===n){f=!0,n=l,a=u;break}if(v===a){f=!0,a=l,n=u;break}v=v.sibling}if(!f){for(v=u.child;v;){if(v===n){f=!0,n=u,a=l;break}if(v===a){f=!0,a=u,n=l;break}v=v.sibling}if(!f)throw Error(o(189))}}if(n.alternate!==a)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function Ku(e){return e=km(e),e!==null?Gu(e):null}function Gu(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Gu(e);if(t!==null)return t;e=e.sibling}return null}var Yu=i.unstable_scheduleCallback,Xu=i.unstable_cancelCallback,Sm=i.unstable_shouldYield,jm=i.unstable_requestPaint,$e=i.unstable_now,Em=i.unstable_getCurrentPriorityLevel,cl=i.unstable_ImmediatePriority,Ju=i.unstable_UserBlockingPriority,Fa=i.unstable_NormalPriority,bm=i.unstable_LowPriority,Zu=i.unstable_IdlePriority,za=null,qt=null;function Cm(e){if(qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(za,e,void 0,(e.current.flags&128)===128)}catch{}}var Ft=Math.clz32?Math.clz32:Rm,Nm=Math.log,Pm=Math.LN2;function Rm(e){return e>>>=0,e===0?32:31-(Nm(e)/Pm|0)|0}var Ma=64,Ia=4194304;function Mi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Aa(e,t){var n=e.pendingLanes;if(n===0)return 0;var a=0,l=e.suspendedLanes,u=e.pingedLanes,f=n&268435455;if(f!==0){var v=f&~l;v!==0?a=Mi(v):(u&=f,u!==0&&(a=Mi(u)))}else f=n&~l,f!==0?a=Mi(f):u!==0&&(a=Mi(u));if(a===0)return 0;if(t!==0&&t!==a&&(t&l)===0&&(l=a&-a,u=t&-t,l>=u||l===16&&(u&4194240)!==0))return t;if((a&4)!==0&&(a|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=a;0<t;)n=31-Ft(t),l=1<<n,a|=e[n],t&=~l;return a}function _m(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Dm(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,u=e.pendingLanes;0<u;){var f=31-Ft(u),v=1<<f,x=l[f];x===-1?((v&n)===0||(v&a)!==0)&&(l[f]=_m(v,t)):x<=t&&(e.expiredLanes|=v),u&=~v}}function dl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ec(){var e=Ma;return Ma<<=1,(Ma&4194240)===0&&(Ma=64),e}function pl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ii(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ft(t),e[t]=n}function Tm(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var a=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-Ft(n),u=1<<l;t[l]=0,a[l]=-1,e[l]=-1,n&=~u}}function fl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Ft(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}var je=0;function tc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var nc,ml,rc,ic,ac,hl=!1,Ua=[],Cn=null,Nn=null,Pn=null,Ai=new Map,Ui=new Map,Rn=[],Om="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function oc(e,t){switch(e){case"focusin":case"focusout":Cn=null;break;case"dragenter":case"dragleave":Nn=null;break;case"mouseover":case"mouseout":Pn=null;break;case"pointerover":case"pointerout":Ai.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ui.delete(t.pointerId)}}function $i(e,t,n,a,l,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:u,targetContainers:[l]},t!==null&&(t=ta(t),t!==null&&ml(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Lm(e,t,n,a,l){switch(t){case"focusin":return Cn=$i(Cn,e,t,n,a,l),!0;case"dragenter":return Nn=$i(Nn,e,t,n,a,l),!0;case"mouseover":return Pn=$i(Pn,e,t,n,a,l),!0;case"pointerover":var u=l.pointerId;return Ai.set(u,$i(Ai.get(u)||null,e,t,n,a,l)),!0;case"gotpointercapture":return u=l.pointerId,Ui.set(u,$i(Ui.get(u)||null,e,t,n,a,l)),!0}return!1}function lc(e){var t=ur(e.target);if(t!==null){var n=sr(t);if(n!==null){if(t=n.tag,t===13){if(t=qu(n),t!==null){e.blockedOn=t,ac(e.priority,function(){rc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function $a(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=gl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);lr=a,n.target.dispatchEvent(a),lr=null}else return t=ta(n),t!==null&&ml(t),e.blockedOn=n,!1;t.shift()}return!0}function sc(e,t,n){$a(e)&&n.delete(t)}function Fm(){hl=!1,Cn!==null&&$a(Cn)&&(Cn=null),Nn!==null&&$a(Nn)&&(Nn=null),Pn!==null&&$a(Pn)&&(Pn=null),Ai.forEach(sc),Ui.forEach(sc)}function Bi(e,t){e.blockedOn===t&&(e.blockedOn=null,hl||(hl=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Fm)))}function Qi(e){function t(l){return Bi(l,e)}if(0<Ua.length){Bi(Ua[0],e);for(var n=1;n<Ua.length;n++){var a=Ua[n];a.blockedOn===e&&(a.blockedOn=null)}}for(Cn!==null&&Bi(Cn,e),Nn!==null&&Bi(Nn,e),Pn!==null&&Bi(Pn,e),Ai.forEach(t),Ui.forEach(t),n=0;n<Rn.length;n++)a=Rn[n],a.blockedOn===e&&(a.blockedOn=null);for(;0<Rn.length&&(n=Rn[0],n.blockedOn===null);)lc(n),n.blockedOn===null&&Rn.shift()}var Br=U.ReactCurrentBatchConfig,Ba=!0;function zm(e,t,n,a){var l=je,u=Br.transition;Br.transition=null;try{je=1,vl(e,t,n,a)}finally{je=l,Br.transition=u}}function Mm(e,t,n,a){var l=je,u=Br.transition;Br.transition=null;try{je=4,vl(e,t,n,a)}finally{je=l,Br.transition=u}}function vl(e,t,n,a){if(Ba){var l=gl(e,t,n,a);if(l===null)Ll(e,t,a,Qa,n),oc(e,a);else if(Lm(l,e,t,n,a))a.stopPropagation();else if(oc(e,a),t&4&&-1<Om.indexOf(e)){for(;l!==null;){var u=ta(l);if(u!==null&&nc(u),u=gl(e,t,n,a),u===null&&Ll(e,t,a,Qa,n),u===l)break;l=u}l!==null&&a.stopPropagation()}else Ll(e,t,a,null,n)}}var Qa=null;function gl(e,t,n,a){if(Qa=null,e=Oi(a),e=ur(e),e!==null)if(t=sr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=qu(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Qa=e,null}function uc(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Em()){case cl:return 1;case Ju:return 4;case Fa:case bm:return 16;case Zu:return 536870912;default:return 16}default:return 16}}var _n=null,yl=null,Wa=null;function cc(){if(Wa)return Wa;var e,t=yl,n=t.length,a,l="value"in _n?_n.value:_n.textContent,u=l.length;for(e=0;e<n&&t[e]===l[e];e++);var f=n-e;for(a=1;a<=f&&t[n-a]===l[u-a];a++);return Wa=l.slice(e,1<a?1-a:void 0)}function Ha(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function qa(){return!0}function dc(){return!1}function kt(e){function t(n,a,l,u,f){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=u,this.target=f,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(n=e[v],this[v]=n?n(u):u[v]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?qa:dc,this.isPropagationStopped=dc,this}return V(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=qa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=qa)},persist:function(){},isPersistent:qa}),t}var Qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xl=kt(Qr),Wi=V({},Qr,{view:0,detail:0}),Im=kt(Wi),wl,kl,Hi,Va=V({},Wi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jl,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Hi&&(Hi&&e.type==="mousemove"?(wl=e.screenX-Hi.screenX,kl=e.screenY-Hi.screenY):kl=wl=0,Hi=e),wl)},movementY:function(e){return"movementY"in e?e.movementY:kl}}),pc=kt(Va),Am=V({},Va,{dataTransfer:0}),Um=kt(Am),$m=V({},Wi,{relatedTarget:0}),Sl=kt($m),Bm=V({},Qr,{animationName:0,elapsedTime:0,pseudoElement:0}),Qm=kt(Bm),Wm=V({},Qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Hm=kt(Wm),qm=V({},Qr,{data:0}),fc=kt(qm),Vm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Km={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Gm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ym(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Gm[e])?!!t[e]:!1}function jl(){return Ym}var Xm=V({},Wi,{key:function(e){if(e.key){var t=Vm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ha(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Km[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jl,charCode:function(e){return e.type==="keypress"?Ha(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ha(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Jm=kt(Xm),Zm=V({},Va,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mc=kt(Zm),eh=V({},Wi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jl}),th=kt(eh),nh=V({},Qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),rh=kt(nh),ih=V({},Va,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ah=kt(ih),oh=[9,13,27,32],El=h&&"CompositionEvent"in window,qi=null;h&&"documentMode"in document&&(qi=document.documentMode);var lh=h&&"TextEvent"in window&&!qi,hc=h&&(!El||qi&&8<qi&&11>=qi),vc=" ",gc=!1;function yc(e,t){switch(e){case"keyup":return oh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wr=!1;function sh(e,t){switch(e){case"compositionend":return xc(t);case"keypress":return t.which!==32?null:(gc=!0,vc);case"textInput":return e=t.data,e===vc&&gc?null:e;default:return null}}function uh(e,t){if(Wr)return e==="compositionend"||!El&&yc(e,t)?(e=cc(),Wa=yl=_n=null,Wr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return hc&&t.locale!=="ko"?null:t.data;default:return null}}var ch={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function wc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ch[e.type]:t==="textarea"}function kc(e,t,n,a){$u(a),t=Ja(t,"onChange"),0<t.length&&(n=new xl("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Vi=null,Ki=null;function dh(e){Ac(e,0)}function Ka(e){var t=Gr(e);if(rn(t))return e}function ph(e,t){if(e==="change")return t}var Sc=!1;if(h){var bl;if(h){var Cl="oninput"in document;if(!Cl){var jc=document.createElement("div");jc.setAttribute("oninput","return;"),Cl=typeof jc.oninput=="function"}bl=Cl}else bl=!1;Sc=bl&&(!document.documentMode||9<document.documentMode)}function Ec(){Vi&&(Vi.detachEvent("onpropertychange",bc),Ki=Vi=null)}function bc(e){if(e.propertyName==="value"&&Ka(Ki)){var t=[];kc(t,Ki,e,Oi(e)),Hu(dh,t)}}function fh(e,t,n){e==="focusin"?(Ec(),Vi=t,Ki=n,Vi.attachEvent("onpropertychange",bc)):e==="focusout"&&Ec()}function mh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ka(Ki)}function hh(e,t){if(e==="click")return Ka(t)}function vh(e,t){if(e==="input"||e==="change")return Ka(t)}function gh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zt=typeof Object.is=="function"?Object.is:gh;function Gi(e,t){if(zt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var l=n[a];if(!y.call(t,l)||!zt(e[l],t[l]))return!1}return!0}function Cc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nc(e,t){var n=Cc(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Cc(n)}}function Pc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rc(){for(var e=window,t=rr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=rr(e.document)}return t}function Nl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function yh(e){var t=Rc(),n=e.focusedElem,a=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Pc(n.ownerDocument.documentElement,n)){if(a!==null&&Nl(n)){if(t=a.start,e=a.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,u=Math.min(a.start,l);a=a.end===void 0?u:Math.min(a.end,l),!e.extend&&u>a&&(l=a,a=u,u=l),l=Nc(n,u);var f=Nc(n,a);l&&f&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==f.node||e.focusOffset!==f.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),u>a?(e.addRange(t),e.extend(f.node,f.offset)):(t.setEnd(f.node,f.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var xh=h&&"documentMode"in document&&11>=document.documentMode,Hr=null,Pl=null,Yi=null,Rl=!1;function _c(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rl||Hr==null||Hr!==rr(a)||(a=Hr,"selectionStart"in a&&Nl(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Yi&&Gi(Yi,a)||(Yi=a,a=Ja(Pl,"onSelect"),0<a.length&&(t=new xl("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Hr)))}function Ga(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var qr={animationend:Ga("Animation","AnimationEnd"),animationiteration:Ga("Animation","AnimationIteration"),animationstart:Ga("Animation","AnimationStart"),transitionend:Ga("Transition","TransitionEnd")},_l={},Dc={};h&&(Dc=document.createElement("div").style,"AnimationEvent"in window||(delete qr.animationend.animation,delete qr.animationiteration.animation,delete qr.animationstart.animation),"TransitionEvent"in window||delete qr.transitionend.transition);function Ya(e){if(_l[e])return _l[e];if(!qr[e])return e;var t=qr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Dc)return _l[e]=t[n];return e}var Tc=Ya("animationend"),Oc=Ya("animationiteration"),Lc=Ya("animationstart"),Fc=Ya("transitionend"),zc=new Map,Mc="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Dn(e,t){zc.set(e,t),p(t,[e])}for(var Dl=0;Dl<Mc.length;Dl++){var Tl=Mc[Dl],wh=Tl.toLowerCase(),kh=Tl[0].toUpperCase()+Tl.slice(1);Dn(wh,"on"+kh)}Dn(Tc,"onAnimationEnd"),Dn(Oc,"onAnimationIteration"),Dn(Lc,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(Fc,"onTransitionEnd"),m("onMouseEnter",["mouseout","mouseover"]),m("onMouseLeave",["mouseout","mouseover"]),m("onPointerEnter",["pointerout","pointerover"]),m("onPointerLeave",["pointerout","pointerover"]),p("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),p("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),p("onBeforeInput",["compositionend","keypress","textInput","paste"]),p("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),p("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),p("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Sh=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xi));function Ic(e,t,n){var a=e.type||"unknown-event";e.currentTarget=n,wm(a,t,void 0,e),e.currentTarget=null}function Ac(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],l=a.event;a=a.listeners;e:{var u=void 0;if(t)for(var f=a.length-1;0<=f;f--){var v=a[f],x=v.instance,P=v.currentTarget;if(v=v.listener,x!==u&&l.isPropagationStopped())break e;Ic(l,v,P),u=x}else for(f=0;f<a.length;f++){if(v=a[f],x=v.instance,P=v.currentTarget,v=v.listener,x!==u&&l.isPropagationStopped())break e;Ic(l,v,P),u=x}}}if(La)throw e=ul,La=!1,ul=null,e}function Re(e,t){var n=t[Ul];n===void 0&&(n=t[Ul]=new Set);var a=e+"__bubble";n.has(a)||(Uc(t,e,2,!1),n.add(a))}function Ol(e,t,n){var a=0;t&&(a|=4),Uc(n,e,a,t)}var Xa="_reactListening"+Math.random().toString(36).slice(2);function Ji(e){if(!e[Xa]){e[Xa]=!0,s.forEach(function(n){n!=="selectionchange"&&(Sh.has(n)||Ol(n,!1,e),Ol(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xa]||(t[Xa]=!0,Ol("selectionchange",!1,t))}}function Uc(e,t,n,a){switch(uc(t)){case 1:var l=zm;break;case 4:l=Mm;break;default:l=vl}n=l.bind(null,t,n,e),l=void 0,!sl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Ll(e,t,n,a,l){var u=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var f=a.tag;if(f===3||f===4){var v=a.stateNode.containerInfo;if(v===l||v.nodeType===8&&v.parentNode===l)break;if(f===4)for(f=a.return;f!==null;){var x=f.tag;if((x===3||x===4)&&(x=f.stateNode.containerInfo,x===l||x.nodeType===8&&x.parentNode===l))return;f=f.return}for(;v!==null;){if(f=ur(v),f===null)return;if(x=f.tag,x===5||x===6){a=u=f;continue e}v=v.parentNode}}a=a.return}Hu(function(){var P=u,z=Oi(n),I=[];e:{var F=zc.get(e);if(F!==void 0){var q=xl,G=e;switch(e){case"keypress":if(Ha(n)===0)break e;case"keydown":case"keyup":q=Jm;break;case"focusin":G="focus",q=Sl;break;case"focusout":G="blur",q=Sl;break;case"beforeblur":case"afterblur":q=Sl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=pc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Um;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=th;break;case Tc:case Oc:case Lc:q=Qm;break;case Fc:q=rh;break;case"scroll":q=Im;break;case"wheel":q=ah;break;case"copy":case"cut":case"paste":q=Hm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=mc}var X=(t&4)!==0,Be=!X&&e==="scroll",b=X?F!==null?F+"Capture":null:F;X=[];for(var w=P,N;w!==null;){N=w;var A=N.stateNode;if(N.tag===5&&A!==null&&(N=A,b!==null&&(A=Li(w,b),A!=null&&X.push(Zi(w,A,N)))),Be)break;w=w.return}0<X.length&&(F=new q(F,G,null,n,z),I.push({event:F,listeners:X}))}}if((t&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",F&&n!==lr&&(G=n.relatedTarget||n.fromElement)&&(ur(G)||G[on]))break e;if((q||F)&&(F=z.window===z?z:(F=z.ownerDocument)?F.defaultView||F.parentWindow:window,q?(G=n.relatedTarget||n.toElement,q=P,G=G?ur(G):null,G!==null&&(Be=sr(G),G!==Be||G.tag!==5&&G.tag!==6)&&(G=null)):(q=null,G=P),q!==G)){if(X=pc,A="onMouseLeave",b="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(X=mc,A="onPointerLeave",b="onPointerEnter",w="pointer"),Be=q==null?F:Gr(q),N=G==null?F:Gr(G),F=new X(A,w+"leave",q,n,z),F.target=Be,F.relatedTarget=N,A=null,ur(z)===P&&(X=new X(b,w+"enter",G,n,z),X.target=N,X.relatedTarget=Be,A=X),Be=A,q&&G)t:{for(X=q,b=G,w=0,N=X;N;N=Vr(N))w++;for(N=0,A=b;A;A=Vr(A))N++;for(;0<w-N;)X=Vr(X),w--;for(;0<N-w;)b=Vr(b),N--;for(;w--;){if(X===b||b!==null&&X===b.alternate)break t;X=Vr(X),b=Vr(b)}X=null}else X=null;q!==null&&$c(I,F,q,X,!1),G!==null&&Be!==null&&$c(I,Be,G,X,!0)}}e:{if(F=P?Gr(P):window,q=F.nodeName&&F.nodeName.toLowerCase(),q==="select"||q==="input"&&F.type==="file")var J=ph;else if(wc(F))if(Sc)J=vh;else{J=mh;var te=fh}else(q=F.nodeName)&&q.toLowerCase()==="input"&&(F.type==="checkbox"||F.type==="radio")&&(J=hh);if(J&&(J=J(e,P))){kc(I,J,n,z);break e}te&&te(e,F,P),e==="focusout"&&(te=F._wrapperState)&&te.controlled&&F.type==="number"&&jn(F,"number",F.value)}switch(te=P?Gr(P):window,e){case"focusin":(wc(te)||te.contentEditable==="true")&&(Hr=te,Pl=P,Yi=null);break;case"focusout":Yi=Pl=Hr=null;break;case"mousedown":Rl=!0;break;case"contextmenu":case"mouseup":case"dragend":Rl=!1,_c(I,n,z);break;case"selectionchange":if(xh)break;case"keydown":case"keyup":_c(I,n,z)}var ne;if(El)e:{switch(e){case"compositionstart":var ae="onCompositionStart";break e;case"compositionend":ae="onCompositionEnd";break e;case"compositionupdate":ae="onCompositionUpdate";break e}ae=void 0}else Wr?yc(e,n)&&(ae="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ae="onCompositionStart");ae&&(hc&&n.locale!=="ko"&&(Wr||ae!=="onCompositionStart"?ae==="onCompositionEnd"&&Wr&&(ne=cc()):(_n=z,yl="value"in _n?_n.value:_n.textContent,Wr=!0)),te=Ja(P,ae),0<te.length&&(ae=new fc(ae,e,null,n,z),I.push({event:ae,listeners:te}),ne?ae.data=ne:(ne=xc(n),ne!==null&&(ae.data=ne)))),(ne=lh?sh(e,n):uh(e,n))&&(P=Ja(P,"onBeforeInput"),0<P.length&&(z=new fc("onBeforeInput","beforeinput",null,n,z),I.push({event:z,listeners:P}),z.data=ne))}Ac(I,t)})}function Zi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ja(e,t){for(var n=t+"Capture",a=[];e!==null;){var l=e,u=l.stateNode;l.tag===5&&u!==null&&(l=u,u=Li(e,n),u!=null&&a.unshift(Zi(e,u,l)),u=Li(e,t),u!=null&&a.push(Zi(e,u,l))),e=e.return}return a}function Vr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function $c(e,t,n,a,l){for(var u=t._reactName,f=[];n!==null&&n!==a;){var v=n,x=v.alternate,P=v.stateNode;if(x!==null&&x===a)break;v.tag===5&&P!==null&&(v=P,l?(x=Li(n,u),x!=null&&f.unshift(Zi(n,x,v))):l||(x=Li(n,u),x!=null&&f.push(Zi(n,x,v)))),n=n.return}f.length!==0&&e.push({event:t,listeners:f})}var jh=/\r\n?/g,Eh=/\u0000|\uFFFD/g;function Bc(e){return(typeof e=="string"?e:""+e).replace(jh,`
38
- `).replace(Eh,"")}function Za(e,t,n){if(t=Bc(t),Bc(e)!==t&&n)throw Error(o(425))}function eo(){}var Fl=null,zl=null;function Ml(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Il=typeof setTimeout=="function"?setTimeout:void 0,bh=typeof clearTimeout=="function"?clearTimeout:void 0,Qc=typeof Promise=="function"?Promise:void 0,Ch=typeof queueMicrotask=="function"?queueMicrotask:typeof Qc<"u"?function(e){return Qc.resolve(null).then(e).catch(Nh)}:Il;function Nh(e){setTimeout(function(){throw e})}function Al(e,t){var n=t,a=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(a===0){e.removeChild(l),Qi(t);return}a--}else n!=="$"&&n!=="$?"&&n!=="$!"||a++;n=l}while(n);Qi(t)}function Tn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Wc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Kr=Math.random().toString(36).slice(2),Vt="__reactFiber$"+Kr,ea="__reactProps$"+Kr,on="__reactContainer$"+Kr,Ul="__reactEvents$"+Kr,Ph="__reactListeners$"+Kr,Rh="__reactHandles$"+Kr;function ur(e){var t=e[Vt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[on]||n[Vt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Wc(e);e!==null;){if(n=e[Vt])return n;e=Wc(e)}return t}e=n,n=e.parentNode}return null}function ta(e){return e=e[Vt]||e[on],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Gr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(o(33))}function to(e){return e[ea]||null}var $l=[],Yr=-1;function On(e){return{current:e}}function _e(e){0>Yr||(e.current=$l[Yr],$l[Yr]=null,Yr--)}function Ne(e,t){Yr++,$l[Yr]=e.current,e.current=t}var Ln={},it=On(Ln),ft=On(!1),cr=Ln;function Xr(e,t){var n=e.type.contextTypes;if(!n)return Ln;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===t)return a.__reactInternalMemoizedMaskedChildContext;var l={},u;for(u in n)l[u]=t[u];return a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function mt(e){return e=e.childContextTypes,e!=null}function no(){_e(ft),_e(it)}function Hc(e,t,n){if(it.current!==Ln)throw Error(o(168));Ne(it,t),Ne(ft,n)}function qc(e,t,n){var a=e.stateNode;if(t=t.childContextTypes,typeof a.getChildContext!="function")return n;a=a.getChildContext();for(var l in a)if(!(l in t))throw Error(o(108,Se(e)||"Unknown",l));return V({},n,a)}function ro(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ln,cr=it.current,Ne(it,e),Ne(ft,ft.current),!0}function Vc(e,t,n){var a=e.stateNode;if(!a)throw Error(o(169));n?(e=qc(e,t,cr),a.__reactInternalMemoizedMergedChildContext=e,_e(ft),_e(it),Ne(it,e)):_e(ft),Ne(ft,n)}var ln=null,io=!1,Bl=!1;function Kc(e){ln===null?ln=[e]:ln.push(e)}function _h(e){io=!0,Kc(e)}function Fn(){if(!Bl&&ln!==null){Bl=!0;var e=0,t=je;try{var n=ln;for(je=1;e<n.length;e++){var a=n[e];do a=a(!0);while(a!==null)}ln=null,io=!1}catch(l){throw ln!==null&&(ln=ln.slice(e+1)),Yu(cl,Fn),l}finally{je=t,Bl=!1}}return null}var Jr=[],Zr=0,ao=null,oo=0,Ct=[],Nt=0,dr=null,sn=1,un="";function pr(e,t){Jr[Zr++]=oo,Jr[Zr++]=ao,ao=e,oo=t}function Gc(e,t,n){Ct[Nt++]=sn,Ct[Nt++]=un,Ct[Nt++]=dr,dr=e;var a=sn;e=un;var l=32-Ft(a)-1;a&=~(1<<l),n+=1;var u=32-Ft(t)+l;if(30<u){var f=l-l%5;u=(a&(1<<f)-1).toString(32),a>>=f,l-=f,sn=1<<32-Ft(t)+l|n<<l|a,un=u+e}else sn=1<<u|n<<l|a,un=e}function Ql(e){e.return!==null&&(pr(e,1),Gc(e,1,0))}function Wl(e){for(;e===ao;)ao=Jr[--Zr],Jr[Zr]=null,oo=Jr[--Zr],Jr[Zr]=null;for(;e===dr;)dr=Ct[--Nt],Ct[Nt]=null,un=Ct[--Nt],Ct[Nt]=null,sn=Ct[--Nt],Ct[Nt]=null}var St=null,jt=null,De=!1,Mt=null;function Yc(e,t){var n=Dt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Xc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,St=e,jt=Tn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,St=e,jt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=dr!==null?{id:sn,overflow:un}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Dt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,St=e,jt=null,!0):!1;default:return!1}}function Hl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ql(e){if(De){var t=jt;if(t){var n=t;if(!Xc(e,t)){if(Hl(e))throw Error(o(418));t=Tn(n.nextSibling);var a=St;t&&Xc(e,t)?Yc(a,n):(e.flags=e.flags&-4097|2,De=!1,St=e)}}else{if(Hl(e))throw Error(o(418));e.flags=e.flags&-4097|2,De=!1,St=e}}}function Jc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;St=e}function lo(e){if(e!==St)return!1;if(!De)return Jc(e),De=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ml(e.type,e.memoizedProps)),t&&(t=jt)){if(Hl(e))throw Zc(),Error(o(418));for(;t;)Yc(e,t),t=Tn(t.nextSibling)}if(Jc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){jt=Tn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}jt=null}}else jt=St?Tn(e.stateNode.nextSibling):null;return!0}function Zc(){for(var e=jt;e;)e=Tn(e.nextSibling)}function ei(){jt=St=null,De=!1}function Vl(e){Mt===null?Mt=[e]:Mt.push(e)}var Dh=U.ReactCurrentBatchConfig;function na(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(o(309));var a=n.stateNode}if(!a)throw Error(o(147,e));var l=a,u=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===u?t.ref:(t=function(f){var v=l.refs;f===null?delete v[u]:v[u]=f},t._stringRef=u,t)}if(typeof e!="string")throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function so(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ed(e){var t=e._init;return t(e._payload)}function td(e){function t(b,w){if(e){var N=b.deletions;N===null?(b.deletions=[w],b.flags|=16):N.push(w)}}function n(b,w){if(!e)return null;for(;w!==null;)t(b,w),w=w.sibling;return null}function a(b,w){for(b=new Map;w!==null;)w.key!==null?b.set(w.key,w):b.set(w.index,w),w=w.sibling;return b}function l(b,w){return b=Qn(b,w),b.index=0,b.sibling=null,b}function u(b,w,N){return b.index=N,e?(N=b.alternate,N!==null?(N=N.index,N<w?(b.flags|=2,w):N):(b.flags|=2,w)):(b.flags|=1048576,w)}function f(b){return e&&b.alternate===null&&(b.flags|=2),b}function v(b,w,N,A){return w===null||w.tag!==6?(w=Is(N,b.mode,A),w.return=b,w):(w=l(w,N),w.return=b,w)}function x(b,w,N,A){var J=N.type;return J===pe?z(b,w,N.props.children,A,N.key):w!==null&&(w.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===rt&&ed(J)===w.type)?(A=l(w,N.props),A.ref=na(b,w,N),A.return=b,A):(A=Oo(N.type,N.key,N.props,null,b.mode,A),A.ref=na(b,w,N),A.return=b,A)}function P(b,w,N,A){return w===null||w.tag!==4||w.stateNode.containerInfo!==N.containerInfo||w.stateNode.implementation!==N.implementation?(w=As(N,b.mode,A),w.return=b,w):(w=l(w,N.children||[]),w.return=b,w)}function z(b,w,N,A,J){return w===null||w.tag!==7?(w=wr(N,b.mode,A,J),w.return=b,w):(w=l(w,N),w.return=b,w)}function I(b,w,N){if(typeof w=="string"&&w!==""||typeof w=="number")return w=Is(""+w,b.mode,N),w.return=b,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ee:return N=Oo(w.type,w.key,w.props,null,b.mode,N),N.ref=na(b,null,w),N.return=b,N;case le:return w=As(w,b.mode,N),w.return=b,w;case rt:var A=w._init;return I(b,A(w._payload),N)}if(Ht(w)||Y(w))return w=wr(w,b.mode,N,null),w.return=b,w;so(b,w)}return null}function F(b,w,N,A){var J=w!==null?w.key:null;if(typeof N=="string"&&N!==""||typeof N=="number")return J!==null?null:v(b,w,""+N,A);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case ee:return N.key===J?x(b,w,N,A):null;case le:return N.key===J?P(b,w,N,A):null;case rt:return J=N._init,F(b,w,J(N._payload),A)}if(Ht(N)||Y(N))return J!==null?null:z(b,w,N,A,null);so(b,N)}return null}function q(b,w,N,A,J){if(typeof A=="string"&&A!==""||typeof A=="number")return b=b.get(N)||null,v(w,b,""+A,J);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case ee:return b=b.get(A.key===null?N:A.key)||null,x(w,b,A,J);case le:return b=b.get(A.key===null?N:A.key)||null,P(w,b,A,J);case rt:var te=A._init;return q(b,w,N,te(A._payload),J)}if(Ht(A)||Y(A))return b=b.get(N)||null,z(w,b,A,J,null);so(w,A)}return null}function G(b,w,N,A){for(var J=null,te=null,ne=w,ae=w=0,Ze=null;ne!==null&&ae<N.length;ae++){ne.index>ae?(Ze=ne,ne=null):Ze=ne.sibling;var we=F(b,ne,N[ae],A);if(we===null){ne===null&&(ne=Ze);break}e&&ne&&we.alternate===null&&t(b,ne),w=u(we,w,ae),te===null?J=we:te.sibling=we,te=we,ne=Ze}if(ae===N.length)return n(b,ne),De&&pr(b,ae),J;if(ne===null){for(;ae<N.length;ae++)ne=I(b,N[ae],A),ne!==null&&(w=u(ne,w,ae),te===null?J=ne:te.sibling=ne,te=ne);return De&&pr(b,ae),J}for(ne=a(b,ne);ae<N.length;ae++)Ze=q(ne,b,ae,N[ae],A),Ze!==null&&(e&&Ze.alternate!==null&&ne.delete(Ze.key===null?ae:Ze.key),w=u(Ze,w,ae),te===null?J=Ze:te.sibling=Ze,te=Ze);return e&&ne.forEach(function(Wn){return t(b,Wn)}),De&&pr(b,ae),J}function X(b,w,N,A){var J=Y(N);if(typeof J!="function")throw Error(o(150));if(N=J.call(N),N==null)throw Error(o(151));for(var te=J=null,ne=w,ae=w=0,Ze=null,we=N.next();ne!==null&&!we.done;ae++,we=N.next()){ne.index>ae?(Ze=ne,ne=null):Ze=ne.sibling;var Wn=F(b,ne,we.value,A);if(Wn===null){ne===null&&(ne=Ze);break}e&&ne&&Wn.alternate===null&&t(b,ne),w=u(Wn,w,ae),te===null?J=Wn:te.sibling=Wn,te=Wn,ne=Ze}if(we.done)return n(b,ne),De&&pr(b,ae),J;if(ne===null){for(;!we.done;ae++,we=N.next())we=I(b,we.value,A),we!==null&&(w=u(we,w,ae),te===null?J=we:te.sibling=we,te=we);return De&&pr(b,ae),J}for(ne=a(b,ne);!we.done;ae++,we=N.next())we=q(ne,b,ae,we.value,A),we!==null&&(e&&we.alternate!==null&&ne.delete(we.key===null?ae:we.key),w=u(we,w,ae),te===null?J=we:te.sibling=we,te=we);return e&&ne.forEach(function(cv){return t(b,cv)}),De&&pr(b,ae),J}function Be(b,w,N,A){if(typeof N=="object"&&N!==null&&N.type===pe&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case ee:e:{for(var J=N.key,te=w;te!==null;){if(te.key===J){if(J=N.type,J===pe){if(te.tag===7){n(b,te.sibling),w=l(te,N.props.children),w.return=b,b=w;break e}}else if(te.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===rt&&ed(J)===te.type){n(b,te.sibling),w=l(te,N.props),w.ref=na(b,te,N),w.return=b,b=w;break e}n(b,te);break}else t(b,te);te=te.sibling}N.type===pe?(w=wr(N.props.children,b.mode,A,N.key),w.return=b,b=w):(A=Oo(N.type,N.key,N.props,null,b.mode,A),A.ref=na(b,w,N),A.return=b,b=A)}return f(b);case le:e:{for(te=N.key;w!==null;){if(w.key===te)if(w.tag===4&&w.stateNode.containerInfo===N.containerInfo&&w.stateNode.implementation===N.implementation){n(b,w.sibling),w=l(w,N.children||[]),w.return=b,b=w;break e}else{n(b,w);break}else t(b,w);w=w.sibling}w=As(N,b.mode,A),w.return=b,b=w}return f(b);case rt:return te=N._init,Be(b,w,te(N._payload),A)}if(Ht(N))return G(b,w,N,A);if(Y(N))return X(b,w,N,A);so(b,N)}return typeof N=="string"&&N!==""||typeof N=="number"?(N=""+N,w!==null&&w.tag===6?(n(b,w.sibling),w=l(w,N),w.return=b,b=w):(n(b,w),w=Is(N,b.mode,A),w.return=b,b=w),f(b)):n(b,w)}return Be}var ti=td(!0),nd=td(!1),uo=On(null),co=null,ni=null,Kl=null;function Gl(){Kl=ni=co=null}function Yl(e){var t=uo.current;_e(uo),e._currentValue=t}function Xl(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function ri(e,t){co=e,Kl=ni=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(ht=!0),e.firstContext=null)}function Pt(e){var t=e._currentValue;if(Kl!==e)if(e={context:e,memoizedValue:t,next:null},ni===null){if(co===null)throw Error(o(308));ni=e,co.dependencies={lanes:0,firstContext:e}}else ni=ni.next=e;return t}var fr=null;function Jl(e){fr===null?fr=[e]:fr.push(e)}function rd(e,t,n,a){var l=t.interleaved;return l===null?(n.next=n,Jl(t)):(n.next=l.next,l.next=n),t.interleaved=n,cn(e,a)}function cn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var zn=!1;function Zl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function id(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function dn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Mn(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(ge&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,cn(e,n)}return l=a.interleaved,l===null?(t.next=t,Jl(a)):(t.next=l.next,l.next=t),a.interleaved=t,cn(e,n)}function po(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,fl(e,n)}}function ad(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var f={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?l=u=f:u=u.next=f,n=n.next}while(n!==null);u===null?l=u=t:u=u.next=t}else l=u=t;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:u,shared:a.shared,effects:a.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function fo(e,t,n,a){var l=e.updateQueue;zn=!1;var u=l.firstBaseUpdate,f=l.lastBaseUpdate,v=l.shared.pending;if(v!==null){l.shared.pending=null;var x=v,P=x.next;x.next=null,f===null?u=P:f.next=P,f=x;var z=e.alternate;z!==null&&(z=z.updateQueue,v=z.lastBaseUpdate,v!==f&&(v===null?z.firstBaseUpdate=P:v.next=P,z.lastBaseUpdate=x))}if(u!==null){var I=l.baseState;f=0,z=P=x=null,v=u;do{var F=v.lane,q=v.eventTime;if((a&F)===F){z!==null&&(z=z.next={eventTime:q,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var G=e,X=v;switch(F=t,q=n,X.tag){case 1:if(G=X.payload,typeof G=="function"){I=G.call(q,I,F);break e}I=G;break e;case 3:G.flags=G.flags&-65537|128;case 0:if(G=X.payload,F=typeof G=="function"?G.call(q,I,F):G,F==null)break e;I=V({},I,F);break e;case 2:zn=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,F=l.effects,F===null?l.effects=[v]:F.push(v))}else q={eventTime:q,lane:F,tag:v.tag,payload:v.payload,callback:v.callback,next:null},z===null?(P=z=q,x=I):z=z.next=q,f|=F;if(v=v.next,v===null){if(v=l.shared.pending,v===null)break;F=v,v=F.next,F.next=null,l.lastBaseUpdate=F,l.shared.pending=null}}while(!0);if(z===null&&(x=I),l.baseState=x,l.firstBaseUpdate=P,l.lastBaseUpdate=z,t=l.shared.interleaved,t!==null){l=t;do f|=l.lane,l=l.next;while(l!==t)}else u===null&&(l.shared.lanes=0);vr|=f,e.lanes=f,e.memoizedState=I}}function od(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var a=e[t],l=a.callback;if(l!==null){if(a.callback=null,a=n,typeof l!="function")throw Error(o(191,l));l.call(a)}}}var ra={},Kt=On(ra),ia=On(ra),aa=On(ra);function mr(e){if(e===ra)throw Error(o(174));return e}function es(e,t){switch(Ne(aa,t),Ne(ia,e),Ne(Kt,ra),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Me(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Me(t,e)}_e(Kt),Ne(Kt,t)}function ii(){_e(Kt),_e(ia),_e(aa)}function ld(e){mr(aa.current);var t=mr(Kt.current),n=Me(t,e.type);t!==n&&(Ne(ia,e),Ne(Kt,n))}function ts(e){ia.current===e&&(_e(Kt),_e(ia))}var Oe=On(0);function mo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ns=[];function rs(){for(var e=0;e<ns.length;e++)ns[e]._workInProgressVersionPrimary=null;ns.length=0}var ho=U.ReactCurrentDispatcher,is=U.ReactCurrentBatchConfig,hr=0,Le=null,qe=null,Xe=null,vo=!1,oa=!1,la=0,Th=0;function at(){throw Error(o(321))}function as(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!zt(e[n],t[n]))return!1;return!0}function os(e,t,n,a,l,u){if(hr=u,Le=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ho.current=e===null||e.memoizedState===null?zh:Mh,e=n(a,l),oa){u=0;do{if(oa=!1,la=0,25<=u)throw Error(o(301));u+=1,Xe=qe=null,t.updateQueue=null,ho.current=Ih,e=n(a,l)}while(oa)}if(ho.current=xo,t=qe!==null&&qe.next!==null,hr=0,Xe=qe=Le=null,vo=!1,t)throw Error(o(300));return e}function ls(){var e=la!==0;return la=0,e}function Gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?Le.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function Rt(){if(qe===null){var e=Le.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=Xe===null?Le.memoizedState:Xe.next;if(t!==null)Xe=t,qe=e;else{if(e===null)throw Error(o(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},Xe===null?Le.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function sa(e,t){return typeof t=="function"?t(e):t}function ss(e){var t=Rt(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var a=qe,l=a.baseQueue,u=n.pending;if(u!==null){if(l!==null){var f=l.next;l.next=u.next,u.next=f}a.baseQueue=l=u,n.pending=null}if(l!==null){u=l.next,a=a.baseState;var v=f=null,x=null,P=u;do{var z=P.lane;if((hr&z)===z)x!==null&&(x=x.next={lane:0,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),a=P.hasEagerState?P.eagerState:e(a,P.action);else{var I={lane:z,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null};x===null?(v=x=I,f=a):x=x.next=I,Le.lanes|=z,vr|=z}P=P.next}while(P!==null&&P!==u);x===null?f=a:x.next=v,zt(a,t.memoizedState)||(ht=!0),t.memoizedState=a,t.baseState=f,t.baseQueue=x,n.lastRenderedState=a}if(e=n.interleaved,e!==null){l=e;do u=l.lane,Le.lanes|=u,vr|=u,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function us(e){var t=Rt(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,u=t.memoizedState;if(l!==null){n.pending=null;var f=l=l.next;do u=e(u,f.action),f=f.next;while(f!==l);zt(u,t.memoizedState)||(ht=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,a]}function sd(){}function ud(e,t){var n=Le,a=Rt(),l=t(),u=!zt(a.memoizedState,l);if(u&&(a.memoizedState=l,ht=!0),a=a.queue,cs(pd.bind(null,n,a,e),[e]),a.getSnapshot!==t||u||Xe!==null&&Xe.memoizedState.tag&1){if(n.flags|=2048,ua(9,dd.bind(null,n,a,l,t),void 0,null),Je===null)throw Error(o(349));(hr&30)!==0||cd(n,t,l)}return l}function cd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Le.updateQueue,t===null?(t={lastEffect:null,stores:null},Le.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function dd(e,t,n,a){t.value=n,t.getSnapshot=a,fd(t)&&md(e)}function pd(e,t,n){return n(function(){fd(t)&&md(e)})}function fd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!zt(e,n)}catch{return!0}}function md(e){var t=cn(e,1);t!==null&&$t(t,e,1,-1)}function hd(e){var t=Gt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:e},t.queue=e,e=e.dispatch=Fh.bind(null,Le,e),[t.memoizedState,e]}function ua(e,t,n,a){return e={tag:e,create:t,destroy:n,deps:a,next:null},t=Le.updateQueue,t===null?(t={lastEffect:null,stores:null},Le.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e)),e}function vd(){return Rt().memoizedState}function go(e,t,n,a){var l=Gt();Le.flags|=e,l.memoizedState=ua(1|t,n,void 0,a===void 0?null:a)}function yo(e,t,n,a){var l=Rt();a=a===void 0?null:a;var u=void 0;if(qe!==null){var f=qe.memoizedState;if(u=f.destroy,a!==null&&as(a,f.deps)){l.memoizedState=ua(t,n,u,a);return}}Le.flags|=e,l.memoizedState=ua(1|t,n,u,a)}function gd(e,t){return go(8390656,8,e,t)}function cs(e,t){return yo(2048,8,e,t)}function yd(e,t){return yo(4,2,e,t)}function xd(e,t){return yo(4,4,e,t)}function wd(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function kd(e,t,n){return n=n!=null?n.concat([e]):null,yo(4,4,wd.bind(null,t,e),n)}function ds(){}function Sd(e,t){var n=Rt();t=t===void 0?null:t;var a=n.memoizedState;return a!==null&&t!==null&&as(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function jd(e,t){var n=Rt();t=t===void 0?null:t;var a=n.memoizedState;return a!==null&&t!==null&&as(t,a[1])?a[0]:(e=e(),n.memoizedState=[e,t],e)}function Ed(e,t,n){return(hr&21)===0?(e.baseState&&(e.baseState=!1,ht=!0),e.memoizedState=n):(zt(n,t)||(n=ec(),Le.lanes|=n,vr|=n,e.baseState=!0),t)}function Oh(e,t){var n=je;je=n!==0&&4>n?n:4,e(!0);var a=is.transition;is.transition={};try{e(!1),t()}finally{je=n,is.transition=a}}function bd(){return Rt().memoizedState}function Lh(e,t,n){var a=$n(e);if(n={lane:a,action:n,hasEagerState:!1,eagerState:null,next:null},Cd(e))Nd(t,n);else if(n=rd(e,t,n,a),n!==null){var l=ct();$t(n,e,a,l),Pd(n,t,a)}}function Fh(e,t,n){var a=$n(e),l={lane:a,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cd(e))Nd(t,l);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var f=t.lastRenderedState,v=u(f,n);if(l.hasEagerState=!0,l.eagerState=v,zt(v,f)){var x=t.interleaved;x===null?(l.next=l,Jl(t)):(l.next=x.next,x.next=l),t.interleaved=l;return}}catch{}finally{}n=rd(e,t,l,a),n!==null&&(l=ct(),$t(n,e,a,l),Pd(n,t,a))}}function Cd(e){var t=e.alternate;return e===Le||t!==null&&t===Le}function Nd(e,t){oa=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Pd(e,t,n){if((n&4194240)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,fl(e,n)}}var xo={readContext:Pt,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useInsertionEffect:at,useLayoutEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useMutableSource:at,useSyncExternalStore:at,useId:at,unstable_isNewReconciler:!1},zh={readContext:Pt,useCallback:function(e,t){return Gt().memoizedState=[e,t===void 0?null:t],e},useContext:Pt,useEffect:gd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,go(4194308,4,wd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return go(4194308,4,e,t)},useInsertionEffect:function(e,t){return go(4,2,e,t)},useMemo:function(e,t){var n=Gt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var a=Gt();return t=n!==void 0?n(t):t,a.memoizedState=a.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},a.queue=e,e=e.dispatch=Lh.bind(null,Le,e),[a.memoizedState,e]},useRef:function(e){var t=Gt();return e={current:e},t.memoizedState=e},useState:hd,useDebugValue:ds,useDeferredValue:function(e){return Gt().memoizedState=e},useTransition:function(){var e=hd(!1),t=e[0];return e=Oh.bind(null,e[1]),Gt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var a=Le,l=Gt();if(De){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),Je===null)throw Error(o(349));(hr&30)!==0||cd(a,t,n)}l.memoizedState=n;var u={value:n,getSnapshot:t};return l.queue=u,gd(pd.bind(null,a,u,e),[e]),a.flags|=2048,ua(9,dd.bind(null,a,u,n,t),void 0,null),n},useId:function(){var e=Gt(),t=Je.identifierPrefix;if(De){var n=un,a=sn;n=(a&~(1<<32-Ft(a)-1)).toString(32)+n,t=":"+t+"R"+n,n=la++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Th++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Mh={readContext:Pt,useCallback:Sd,useContext:Pt,useEffect:cs,useImperativeHandle:kd,useInsertionEffect:yd,useLayoutEffect:xd,useMemo:jd,useReducer:ss,useRef:vd,useState:function(){return ss(sa)},useDebugValue:ds,useDeferredValue:function(e){var t=Rt();return Ed(t,qe.memoizedState,e)},useTransition:function(){var e=ss(sa)[0],t=Rt().memoizedState;return[e,t]},useMutableSource:sd,useSyncExternalStore:ud,useId:bd,unstable_isNewReconciler:!1},Ih={readContext:Pt,useCallback:Sd,useContext:Pt,useEffect:cs,useImperativeHandle:kd,useInsertionEffect:yd,useLayoutEffect:xd,useMemo:jd,useReducer:us,useRef:vd,useState:function(){return us(sa)},useDebugValue:ds,useDeferredValue:function(e){var t=Rt();return qe===null?t.memoizedState=e:Ed(t,qe.memoizedState,e)},useTransition:function(){var e=us(sa)[0],t=Rt().memoizedState;return[e,t]},useMutableSource:sd,useSyncExternalStore:ud,useId:bd,unstable_isNewReconciler:!1};function It(e,t){if(e&&e.defaultProps){t=V({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ps(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:V({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wo={isMounted:function(e){return(e=e._reactInternals)?sr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var a=ct(),l=$n(e),u=dn(a,l);u.payload=t,n!=null&&(u.callback=n),t=Mn(e,u,l),t!==null&&($t(t,e,l,a),po(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=ct(),l=$n(e),u=dn(a,l);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=Mn(e,u,l),t!==null&&($t(t,e,l,a),po(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ct(),a=$n(e),l=dn(n,a);l.tag=2,t!=null&&(l.callback=t),t=Mn(e,l,a),t!==null&&($t(t,e,a,n),po(t,e,a))}};function Rd(e,t,n,a,l,u,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,f):t.prototype&&t.prototype.isPureReactComponent?!Gi(n,a)||!Gi(l,u):!0}function _d(e,t,n){var a=!1,l=Ln,u=t.contextType;return typeof u=="object"&&u!==null?u=Pt(u):(l=mt(t)?cr:it.current,a=t.contextTypes,u=(a=a!=null)?Xr(e,l):Ln),t=new t(n,u),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=wo,e.stateNode=t,t._reactInternals=e,a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=u),t}function Dd(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&wo.enqueueReplaceState(t,t.state,null)}function fs(e,t,n,a){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Zl(e);var u=t.contextType;typeof u=="object"&&u!==null?l.context=Pt(u):(u=mt(t)?cr:it.current,l.context=Xr(e,u)),l.state=e.memoizedState,u=t.getDerivedStateFromProps,typeof u=="function"&&(ps(e,t,u,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&wo.enqueueReplaceState(l,l.state,null),fo(e,n,l,a),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function ai(e,t){try{var n="",a=t;do n+=he(a),a=a.return;while(a);var l=n}catch(u){l=`
39
- Error generating stack: `+u.message+`
40
- `+u.stack}return{value:e,source:t,stack:l,digest:null}}function ms(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function hs(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Ah=typeof WeakMap=="function"?WeakMap:Map;function Td(e,t,n){n=dn(-1,n),n.tag=3,n.payload={element:null};var a=t.value;return n.callback=function(){No||(No=!0,_s=a),hs(e,t)},n}function Od(e,t,n){n=dn(-1,n),n.tag=3;var a=e.type.getDerivedStateFromError;if(typeof a=="function"){var l=t.value;n.payload=function(){return a(l)},n.callback=function(){hs(e,t)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(n.callback=function(){hs(e,t),typeof a!="function"&&(An===null?An=new Set([this]):An.add(this));var f=t.stack;this.componentDidCatch(t.value,{componentStack:f!==null?f:""})}),n}function Ld(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new Ah;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(n)||(l.add(n),e=Zh.bind(null,e,t,n),t.then(e,e))}function Fd(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function zd(e,t,n,a,l){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=dn(-1,1),t.tag=2,Mn(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var Uh=U.ReactCurrentOwner,ht=!1;function ut(e,t,n,a){t.child=e===null?nd(t,null,n,a):ti(t,e.child,n,a)}function Md(e,t,n,a,l){n=n.render;var u=t.ref;return ri(t,l),a=os(e,t,n,a,u,l),n=ls(),e!==null&&!ht?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,pn(e,t,l)):(De&&n&&Ql(t),t.flags|=1,ut(e,t,a,l),t.child)}function Id(e,t,n,a,l){if(e===null){var u=n.type;return typeof u=="function"&&!Ms(u)&&u.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=u,Ad(e,t,u,a,l)):(e=Oo(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,(e.lanes&l)===0){var f=u.memoizedProps;if(n=n.compare,n=n!==null?n:Gi,n(f,a)&&e.ref===t.ref)return pn(e,t,l)}return t.flags|=1,e=Qn(u,a),e.ref=t.ref,e.return=t,t.child=e}function Ad(e,t,n,a,l){if(e!==null){var u=e.memoizedProps;if(Gi(u,a)&&e.ref===t.ref)if(ht=!1,t.pendingProps=a=u,(e.lanes&l)!==0)(e.flags&131072)!==0&&(ht=!0);else return t.lanes=e.lanes,pn(e,t,l)}return vs(e,t,n,a,l)}function Ud(e,t,n){var a=t.pendingProps,l=a.children,u=e!==null?e.memoizedState:null;if(a.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ne(li,Et),Et|=n;else{if((n&1073741824)===0)return e=u!==null?u.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ne(li,Et),Et|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=u!==null?u.baseLanes:n,Ne(li,Et),Et|=a}else u!==null?(a=u.baseLanes|n,t.memoizedState=null):a=n,Ne(li,Et),Et|=a;return ut(e,t,l,n),t.child}function $d(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function vs(e,t,n,a,l){var u=mt(n)?cr:it.current;return u=Xr(t,u),ri(t,l),n=os(e,t,n,a,u,l),a=ls(),e!==null&&!ht?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,pn(e,t,l)):(De&&a&&Ql(t),t.flags|=1,ut(e,t,n,l),t.child)}function Bd(e,t,n,a,l){if(mt(n)){var u=!0;ro(t)}else u=!1;if(ri(t,l),t.stateNode===null)So(e,t),_d(t,n,a),fs(t,n,a,l),a=!0;else if(e===null){var f=t.stateNode,v=t.memoizedProps;f.props=v;var x=f.context,P=n.contextType;typeof P=="object"&&P!==null?P=Pt(P):(P=mt(n)?cr:it.current,P=Xr(t,P));var z=n.getDerivedStateFromProps,I=typeof z=="function"||typeof f.getSnapshotBeforeUpdate=="function";I||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==a||x!==P)&&Dd(t,f,a,P),zn=!1;var F=t.memoizedState;f.state=F,fo(t,a,f,l),x=t.memoizedState,v!==a||F!==x||ft.current||zn?(typeof z=="function"&&(ps(t,n,z,a),x=t.memoizedState),(v=zn||Rd(t,n,v,a,F,x,P))?(I||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=x),f.props=a,f.state=x,f.context=P,a=v):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{f=t.stateNode,id(e,t),v=t.memoizedProps,P=t.type===t.elementType?v:It(t.type,v),f.props=P,I=t.pendingProps,F=f.context,x=n.contextType,typeof x=="object"&&x!==null?x=Pt(x):(x=mt(n)?cr:it.current,x=Xr(t,x));var q=n.getDerivedStateFromProps;(z=typeof q=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==I||F!==x)&&Dd(t,f,a,x),zn=!1,F=t.memoizedState,f.state=F,fo(t,a,f,l);var G=t.memoizedState;v!==I||F!==G||ft.current||zn?(typeof q=="function"&&(ps(t,n,q,a),G=t.memoizedState),(P=zn||Rd(t,n,P,a,F,G,x)||!1)?(z||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(a,G,x),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(a,G,x)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=G),f.props=a,f.state=G,f.context=x,a=P):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),a=!1)}return gs(e,t,n,a,u,l)}function gs(e,t,n,a,l,u){$d(e,t);var f=(t.flags&128)!==0;if(!a&&!f)return l&&Vc(t,n,!1),pn(e,t,u);a=t.stateNode,Uh.current=t;var v=f&&typeof n.getDerivedStateFromError!="function"?null:a.render();return t.flags|=1,e!==null&&f?(t.child=ti(t,e.child,null,u),t.child=ti(t,null,v,u)):ut(e,t,v,u),t.memoizedState=a.state,l&&Vc(t,n,!0),t.child}function Qd(e){var t=e.stateNode;t.pendingContext?Hc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Hc(e,t.context,!1),es(e,t.containerInfo)}function Wd(e,t,n,a,l){return ei(),Vl(l),t.flags|=256,ut(e,t,n,a),t.child}var ys={dehydrated:null,treeContext:null,retryLane:0};function xs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Hd(e,t,n){var a=t.pendingProps,l=Oe.current,u=!1,f=(t.flags&128)!==0,v;if((v=f)||(v=e!==null&&e.memoizedState===null?!1:(l&2)!==0),v?(u=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),Ne(Oe,l&1),e===null)return ql(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(f=a.children,e=a.fallback,u?(a=t.mode,u=t.child,f={mode:"hidden",children:f},(a&1)===0&&u!==null?(u.childLanes=0,u.pendingProps=f):u=Lo(f,a,0,null),e=wr(e,a,n,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=xs(n),t.memoizedState=ys,e):ws(t,f));if(l=e.memoizedState,l!==null&&(v=l.dehydrated,v!==null))return $h(e,t,f,a,v,l,n);if(u){u=a.fallback,f=t.mode,l=e.child,v=l.sibling;var x={mode:"hidden",children:a.children};return(f&1)===0&&t.child!==l?(a=t.child,a.childLanes=0,a.pendingProps=x,t.deletions=null):(a=Qn(l,x),a.subtreeFlags=l.subtreeFlags&14680064),v!==null?u=Qn(v,u):(u=wr(u,f,n,null),u.flags|=2),u.return=t,a.return=t,a.sibling=u,t.child=a,a=u,u=t.child,f=e.child.memoizedState,f=f===null?xs(n):{baseLanes:f.baseLanes|n,cachePool:null,transitions:f.transitions},u.memoizedState=f,u.childLanes=e.childLanes&~n,t.memoizedState=ys,a}return u=e.child,e=u.sibling,a=Qn(u,{mode:"visible",children:a.children}),(t.mode&1)===0&&(a.lanes=n),a.return=t,a.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=a,t.memoizedState=null,a}function ws(e,t){return t=Lo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ko(e,t,n,a){return a!==null&&Vl(a),ti(t,e.child,null,n),e=ws(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $h(e,t,n,a,l,u,f){if(n)return t.flags&256?(t.flags&=-257,a=ms(Error(o(422))),ko(e,t,f,a)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(u=a.fallback,l=t.mode,a=Lo({mode:"visible",children:a.children},l,0,null),u=wr(u,l,f,null),u.flags|=2,a.return=t,u.return=t,a.sibling=u,t.child=a,(t.mode&1)!==0&&ti(t,e.child,null,f),t.child.memoizedState=xs(f),t.memoizedState=ys,u);if((t.mode&1)===0)return ko(e,t,f,null);if(l.data==="$!"){if(a=l.nextSibling&&l.nextSibling.dataset,a)var v=a.dgst;return a=v,u=Error(o(419)),a=ms(u,a,void 0),ko(e,t,f,a)}if(v=(f&e.childLanes)!==0,ht||v){if(a=Je,a!==null){switch(f&-f){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(a.suspendedLanes|f))!==0?0:l,l!==0&&l!==u.retryLane&&(u.retryLane=l,cn(e,l),$t(a,e,l,-1))}return zs(),a=ms(Error(o(421))),ko(e,t,f,a)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=ev.bind(null,e),l._reactRetry=t,null):(e=u.treeContext,jt=Tn(l.nextSibling),St=t,De=!0,Mt=null,e!==null&&(Ct[Nt++]=sn,Ct[Nt++]=un,Ct[Nt++]=dr,sn=e.id,un=e.overflow,dr=t),t=ws(t,a.children),t.flags|=4096,t)}function qd(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Xl(e.return,t,n)}function ks(e,t,n,a,l){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=n,u.tailMode=l)}function Vd(e,t,n){var a=t.pendingProps,l=a.revealOrder,u=a.tail;if(ut(e,t,a.children,n),a=Oe.current,(a&2)!==0)a=a&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&qd(e,n,t);else if(e.tag===19)qd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}if(Ne(Oe,a),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&mo(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ks(t,!1,l,n,u);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&mo(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ks(t,!0,n,null,u);break;case"together":ks(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function So(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function pn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),vr|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=Qn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Bh(e,t,n){switch(t.tag){case 3:Qd(t),ei();break;case 5:ld(t);break;case 1:mt(t.type)&&ro(t);break;case 4:es(t,t.stateNode.containerInfo);break;case 10:var a=t.type._context,l=t.memoizedProps.value;Ne(uo,a._currentValue),a._currentValue=l;break;case 13:if(a=t.memoizedState,a!==null)return a.dehydrated!==null?(Ne(Oe,Oe.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Hd(e,t,n):(Ne(Oe,Oe.current&1),e=pn(e,t,n),e!==null?e.sibling:null);Ne(Oe,Oe.current&1);break;case 19:if(a=(n&t.childLanes)!==0,(e.flags&128)!==0){if(a)return Vd(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),Ne(Oe,Oe.current),a)break;return null;case 22:case 23:return t.lanes=0,Ud(e,t,n)}return pn(e,t,n)}var Kd,Ss,Gd,Yd;Kd=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ss=function(){},Gd=function(e,t,n,a){var l=e.memoizedProps;if(l!==a){e=t.stateNode,mr(Kt.current);var u=null;switch(n){case"input":l=Mr(e,l),a=Mr(e,a),u=[];break;case"select":l=V({},l,{value:void 0}),a=V({},a,{value:void 0}),u=[];break;case"textarea":l=_i(e,l),a=_i(e,a),u=[];break;default:typeof l.onClick!="function"&&typeof a.onClick=="function"&&(e.onclick=eo)}ar(n,a);var f;n=null;for(P in l)if(!a.hasOwnProperty(P)&&l.hasOwnProperty(P)&&l[P]!=null)if(P==="style"){var v=l[P];for(f in v)v.hasOwnProperty(f)&&(n||(n={}),n[f]="")}else P!=="dangerouslySetInnerHTML"&&P!=="children"&&P!=="suppressContentEditableWarning"&&P!=="suppressHydrationWarning"&&P!=="autoFocus"&&(c.hasOwnProperty(P)?u||(u=[]):(u=u||[]).push(P,null));for(P in a){var x=a[P];if(v=l!=null?l[P]:void 0,a.hasOwnProperty(P)&&x!==v&&(x!=null||v!=null))if(P==="style")if(v){for(f in v)!v.hasOwnProperty(f)||x&&x.hasOwnProperty(f)||(n||(n={}),n[f]="");for(f in x)x.hasOwnProperty(f)&&v[f]!==x[f]&&(n||(n={}),n[f]=x[f])}else n||(u||(u=[]),u.push(P,n)),n=x;else P==="dangerouslySetInnerHTML"?(x=x?x.__html:void 0,v=v?v.__html:void 0,x!=null&&v!==x&&(u=u||[]).push(P,x)):P==="children"?typeof x!="string"&&typeof x!="number"||(u=u||[]).push(P,""+x):P!=="suppressContentEditableWarning"&&P!=="suppressHydrationWarning"&&(c.hasOwnProperty(P)?(x!=null&&P==="onScroll"&&Re("scroll",e),u||v===x||(u=[])):(u=u||[]).push(P,x))}n&&(u=u||[]).push("style",n);var P=u;(t.updateQueue=P)&&(t.flags|=4)}},Yd=function(e,t,n,a){n!==a&&(t.flags|=4)};function ca(e,t){if(!De)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function ot(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags&14680064,a|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags,a|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function Qh(e,t,n){var a=t.pendingProps;switch(Wl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(t),null;case 1:return mt(t.type)&&no(),ot(t),null;case 3:return a=t.stateNode,ii(),_e(ft),_e(it),rs(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(lo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Mt!==null&&(Os(Mt),Mt=null))),Ss(e,t),ot(t),null;case 5:ts(t);var l=mr(aa.current);if(n=t.type,e!==null&&t.stateNode!=null)Gd(e,t,n,a,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!a){if(t.stateNode===null)throw Error(o(166));return ot(t),null}if(e=mr(Kt.current),lo(t)){a=t.stateNode,n=t.type;var u=t.memoizedProps;switch(a[Vt]=t,a[ea]=u,e=(t.mode&1)!==0,n){case"dialog":Re("cancel",a),Re("close",a);break;case"iframe":case"object":case"embed":Re("load",a);break;case"video":case"audio":for(l=0;l<Xi.length;l++)Re(Xi[l],a);break;case"source":Re("error",a);break;case"img":case"image":case"link":Re("error",a),Re("load",a);break;case"details":Re("toggle",a);break;case"input":Pi(a,u),Re("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!u.multiple},Re("invalid",a);break;case"textarea":Ta(a,u),Re("invalid",a)}ar(n,u),l=null;for(var f in u)if(u.hasOwnProperty(f)){var v=u[f];f==="children"?typeof v=="string"?a.textContent!==v&&(u.suppressHydrationWarning!==!0&&Za(a.textContent,v,e),l=["children",v]):typeof v=="number"&&a.textContent!==""+v&&(u.suppressHydrationWarning!==!0&&Za(a.textContent,v,e),l=["children",""+v]):c.hasOwnProperty(f)&&v!=null&&f==="onScroll"&&Re("scroll",a)}switch(n){case"input":nn(a),Ir(a,u,!0);break;case"textarea":nn(a),re(a);break;case"select":case"option":break;default:typeof u.onClick=="function"&&(a.onclick=eo)}a=l,t.updateQueue=a,a!==null&&(t.flags|=4)}else{f=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Te(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=f.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=f.createElement(n,{is:a.is}):(e=f.createElement(n),n==="select"&&(f=e,a.multiple?f.multiple=!0:a.size&&(f.size=a.size))):e=f.createElementNS(e,n),e[Vt]=t,e[ea]=a,Kd(e,t,!1,!1),t.stateNode=e;e:{switch(f=or(n,a),n){case"dialog":Re("cancel",e),Re("close",e),l=a;break;case"iframe":case"object":case"embed":Re("load",e),l=a;break;case"video":case"audio":for(l=0;l<Xi.length;l++)Re(Xi[l],e);l=a;break;case"source":Re("error",e),l=a;break;case"img":case"image":case"link":Re("error",e),Re("load",e),l=a;break;case"details":Re("toggle",e),l=a;break;case"input":Pi(e,a),l=Mr(e,a),Re("invalid",e);break;case"option":l=a;break;case"select":e._wrapperState={wasMultiple:!!a.multiple},l=V({},a,{value:void 0}),Re("invalid",e);break;case"textarea":Ta(e,a),l=_i(e,a),Re("invalid",e);break;default:l=a}ar(n,l),v=l;for(u in v)if(v.hasOwnProperty(u)){var x=v[u];u==="style"?ir(e,x):u==="dangerouslySetInnerHTML"?(x=x?x.__html:void 0,x!=null&&bn(e,x)):u==="children"?typeof x=="string"?(n!=="textarea"||x!=="")&&bt(e,x):typeof x=="number"&&bt(e,""+x):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(c.hasOwnProperty(u)?x!=null&&u==="onScroll"&&Re("scroll",e):x!=null&&M(e,u,x,f))}switch(n){case"input":nn(e),Ir(e,a,!1);break;case"textarea":nn(e),re(e);break;case"option":a.value!=null&&e.setAttribute("value",""+xe(a.value));break;case"select":e.multiple=!!a.multiple,u=a.value,u!=null?En(e,!!a.multiple,u,!1):a.defaultValue!=null&&En(e,!!a.multiple,a.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=eo)}switch(n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}}a&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ot(t),null;case 6:if(e&&t.stateNode!=null)Yd(e,t,e.memoizedProps,a);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(n=mr(aa.current),mr(Kt.current),lo(t)){if(a=t.stateNode,n=t.memoizedProps,a[Vt]=t,(u=a.nodeValue!==n)&&(e=St,e!==null))switch(e.tag){case 3:Za(a.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Za(a.nodeValue,n,(e.mode&1)!==0)}u&&(t.flags|=4)}else a=(n.nodeType===9?n:n.ownerDocument).createTextNode(a),a[Vt]=t,t.stateNode=a}return ot(t),null;case 13:if(_e(Oe),a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(De&&jt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Zc(),ei(),t.flags|=98560,u=!1;else if(u=lo(t),a!==null&&a.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[Vt]=t}else ei(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ot(t),u=!1}else Mt!==null&&(Os(Mt),Mt=null),u=!0;if(!u)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(a=a!==null,a!==(e!==null&&e.memoizedState!==null)&&a&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Oe.current&1)!==0?Ve===0&&(Ve=3):zs())),t.updateQueue!==null&&(t.flags|=4),ot(t),null);case 4:return ii(),Ss(e,t),e===null&&Ji(t.stateNode.containerInfo),ot(t),null;case 10:return Yl(t.type._context),ot(t),null;case 17:return mt(t.type)&&no(),ot(t),null;case 19:if(_e(Oe),u=t.memoizedState,u===null)return ot(t),null;if(a=(t.flags&128)!==0,f=u.rendering,f===null)if(a)ca(u,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=mo(e),f!==null){for(t.flags|=128,ca(u,!1),a=f.updateQueue,a!==null&&(t.updateQueue=a,t.flags|=4),t.subtreeFlags=0,a=n,n=t.child;n!==null;)u=n,e=a,u.flags&=14680066,f=u.alternate,f===null?(u.childLanes=0,u.lanes=e,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=f.childLanes,u.lanes=f.lanes,u.child=f.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=f.memoizedProps,u.memoizedState=f.memoizedState,u.updateQueue=f.updateQueue,u.type=f.type,e=f.dependencies,u.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ne(Oe,Oe.current&1|2),t.child}e=e.sibling}u.tail!==null&&$e()>si&&(t.flags|=128,a=!0,ca(u,!1),t.lanes=4194304)}else{if(!a)if(e=mo(f),e!==null){if(t.flags|=128,a=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ca(u,!0),u.tail===null&&u.tailMode==="hidden"&&!f.alternate&&!De)return ot(t),null}else 2*$e()-u.renderingStartTime>si&&n!==1073741824&&(t.flags|=128,a=!0,ca(u,!1),t.lanes=4194304);u.isBackwards?(f.sibling=t.child,t.child=f):(n=u.last,n!==null?n.sibling=f:t.child=f,u.last=f)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=$e(),t.sibling=null,n=Oe.current,Ne(Oe,a?n&1|2:n&1),t):(ot(t),null);case 22:case 23:return Fs(),a=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==a&&(t.flags|=8192),a&&(t.mode&1)!==0?(Et&1073741824)!==0&&(ot(t),t.subtreeFlags&6&&(t.flags|=8192)):ot(t),null;case 24:return null;case 25:return null}throw Error(o(156,t.tag))}function Wh(e,t){switch(Wl(t),t.tag){case 1:return mt(t.type)&&no(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ii(),_e(ft),_e(it),rs(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ts(t),null;case 13:if(_e(Oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ei()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(Oe),null;case 4:return ii(),null;case 10:return Yl(t.type._context),null;case 22:case 23:return Fs(),null;case 24:return null;default:return null}}var jo=!1,lt=!1,Hh=typeof WeakSet=="function"?WeakSet:Set,K=null;function oi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(a){Ie(e,t,a)}else n.current=null}function js(e,t,n){try{n()}catch(a){Ie(e,t,a)}}var Xd=!1;function qh(e,t){if(Fl=Ba,e=Rc(),Nl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var l=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var f=0,v=-1,x=-1,P=0,z=0,I=e,F=null;t:for(;;){for(var q;I!==n||l!==0&&I.nodeType!==3||(v=f+l),I!==u||a!==0&&I.nodeType!==3||(x=f+a),I.nodeType===3&&(f+=I.nodeValue.length),(q=I.firstChild)!==null;)F=I,I=q;for(;;){if(I===e)break t;if(F===n&&++P===l&&(v=f),F===u&&++z===a&&(x=f),(q=I.nextSibling)!==null)break;I=F,F=I.parentNode}I=q}n=v===-1||x===-1?null:{start:v,end:x}}else n=null}n=n||{start:0,end:0}}else n=null;for(zl={focusedElem:e,selectionRange:n},Ba=!1,K=t;K!==null;)if(t=K,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var G=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(G!==null){var X=G.memoizedProps,Be=G.memoizedState,b=t.stateNode,w=b.getSnapshotBeforeUpdate(t.elementType===t.type?X:It(t.type,X),Be);b.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var N=t.stateNode.containerInfo;N.nodeType===1?N.textContent="":N.nodeType===9&&N.documentElement&&N.removeChild(N.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(A){Ie(t,t.return,A)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return G=Xd,Xd=!1,G}function da(e,t,n){var a=t.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var l=a=a.next;do{if((l.tag&e)===e){var u=l.destroy;l.destroy=void 0,u!==void 0&&js(t,n,u)}l=l.next}while(l!==a)}}function Eo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var a=n.create;n.destroy=a()}n=n.next}while(n!==t)}}function Es(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Jd(e){var t=e.alternate;t!==null&&(e.alternate=null,Jd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vt],delete t[ea],delete t[Ul],delete t[Ph],delete t[Rh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Zd(e){return e.tag===5||e.tag===3||e.tag===4}function ep(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bs(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=eo));else if(a!==4&&(e=e.child,e!==null))for(bs(e,t,n),e=e.sibling;e!==null;)bs(e,t,n),e=e.sibling}function Cs(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(Cs(e,t,n),e=e.sibling;e!==null;)Cs(e,t,n),e=e.sibling}var tt=null,At=!1;function In(e,t,n){for(n=n.child;n!==null;)tp(e,t,n),n=n.sibling}function tp(e,t,n){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(za,n)}catch{}switch(n.tag){case 5:lt||oi(n,t);case 6:var a=tt,l=At;tt=null,In(e,t,n),tt=a,At=l,tt!==null&&(At?(e=tt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tt.removeChild(n.stateNode));break;case 18:tt!==null&&(At?(e=tt,n=n.stateNode,e.nodeType===8?Al(e.parentNode,n):e.nodeType===1&&Al(e,n),Qi(e)):Al(tt,n.stateNode));break;case 4:a=tt,l=At,tt=n.stateNode.containerInfo,At=!0,In(e,t,n),tt=a,At=l;break;case 0:case 11:case 14:case 15:if(!lt&&(a=n.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){l=a=a.next;do{var u=l,f=u.destroy;u=u.tag,f!==void 0&&((u&2)!==0||(u&4)!==0)&&js(n,t,f),l=l.next}while(l!==a)}In(e,t,n);break;case 1:if(!lt&&(oi(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=n.memoizedProps,a.state=n.memoizedState,a.componentWillUnmount()}catch(v){Ie(n,t,v)}In(e,t,n);break;case 21:In(e,t,n);break;case 22:n.mode&1?(lt=(a=lt)||n.memoizedState!==null,In(e,t,n),lt=a):In(e,t,n);break;default:In(e,t,n)}}function np(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Hh),t.forEach(function(a){var l=tv.bind(null,e,a);n.has(a)||(n.add(a),a.then(l,l))})}}function Ut(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];try{var u=e,f=t,v=f;e:for(;v!==null;){switch(v.tag){case 5:tt=v.stateNode,At=!1;break e;case 3:tt=v.stateNode.containerInfo,At=!0;break e;case 4:tt=v.stateNode.containerInfo,At=!0;break e}v=v.return}if(tt===null)throw Error(o(160));tp(u,f,l),tt=null,At=!1;var x=l.alternate;x!==null&&(x.return=null),l.return=null}catch(P){Ie(l,t,P)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)rp(t,e),t=t.sibling}function rp(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ut(t,e),Yt(e),a&4){try{da(3,e,e.return),Eo(3,e)}catch(X){Ie(e,e.return,X)}try{da(5,e,e.return)}catch(X){Ie(e,e.return,X)}}break;case 1:Ut(t,e),Yt(e),a&512&&n!==null&&oi(n,n.return);break;case 5:if(Ut(t,e),Yt(e),a&512&&n!==null&&oi(n,n.return),e.flags&32){var l=e.stateNode;try{bt(l,"")}catch(X){Ie(e,e.return,X)}}if(a&4&&(l=e.stateNode,l!=null)){var u=e.memoizedProps,f=n!==null?n.memoizedProps:u,v=e.type,x=e.updateQueue;if(e.updateQueue=null,x!==null)try{v==="input"&&u.type==="radio"&&u.name!=null&&Ri(l,u),or(v,f);var P=or(v,u);for(f=0;f<x.length;f+=2){var z=x[f],I=x[f+1];z==="style"?ir(l,I):z==="dangerouslySetInnerHTML"?bn(l,I):z==="children"?bt(l,I):M(l,z,I,P)}switch(v){case"input":Wt(l,u);break;case"textarea":Q(l,u);break;case"select":var F=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!u.multiple;var q=u.value;q!=null?En(l,!!u.multiple,q,!1):F!==!!u.multiple&&(u.defaultValue!=null?En(l,!!u.multiple,u.defaultValue,!0):En(l,!!u.multiple,u.multiple?[]:"",!1))}l[ea]=u}catch(X){Ie(e,e.return,X)}}break;case 6:if(Ut(t,e),Yt(e),a&4){if(e.stateNode===null)throw Error(o(162));l=e.stateNode,u=e.memoizedProps;try{l.nodeValue=u}catch(X){Ie(e,e.return,X)}}break;case 3:if(Ut(t,e),Yt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Qi(t.containerInfo)}catch(X){Ie(e,e.return,X)}break;case 4:Ut(t,e),Yt(e);break;case 13:Ut(t,e),Yt(e),l=e.child,l.flags&8192&&(u=l.memoizedState!==null,l.stateNode.isHidden=u,!u||l.alternate!==null&&l.alternate.memoizedState!==null||(Rs=$e())),a&4&&np(e);break;case 22:if(z=n!==null&&n.memoizedState!==null,e.mode&1?(lt=(P=lt)||z,Ut(t,e),lt=P):Ut(t,e),Yt(e),a&8192){if(P=e.memoizedState!==null,(e.stateNode.isHidden=P)&&!z&&(e.mode&1)!==0)for(K=e,z=e.child;z!==null;){for(I=K=z;K!==null;){switch(F=K,q=F.child,F.tag){case 0:case 11:case 14:case 15:da(4,F,F.return);break;case 1:oi(F,F.return);var G=F.stateNode;if(typeof G.componentWillUnmount=="function"){a=F,n=F.return;try{t=a,G.props=t.memoizedProps,G.state=t.memoizedState,G.componentWillUnmount()}catch(X){Ie(a,n,X)}}break;case 5:oi(F,F.return);break;case 22:if(F.memoizedState!==null){op(I);continue}}q!==null?(q.return=F,K=q):op(I)}z=z.sibling}e:for(z=null,I=e;;){if(I.tag===5){if(z===null){z=I;try{l=I.stateNode,P?(u=l.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"):(v=I.stateNode,x=I.memoizedProps.style,f=x!=null&&x.hasOwnProperty("display")?x.display:null,v.style.display=Ar("display",f))}catch(X){Ie(e,e.return,X)}}}else if(I.tag===6){if(z===null)try{I.stateNode.nodeValue=P?"":I.memoizedProps}catch(X){Ie(e,e.return,X)}}else if((I.tag!==22&&I.tag!==23||I.memoizedState===null||I===e)&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===e)break e;for(;I.sibling===null;){if(I.return===null||I.return===e)break e;z===I&&(z=null),I=I.return}z===I&&(z=null),I.sibling.return=I.return,I=I.sibling}}break;case 19:Ut(t,e),Yt(e),a&4&&np(e);break;case 21:break;default:Ut(t,e),Yt(e)}}function Yt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Zd(n)){var a=n;break e}n=n.return}throw Error(o(160))}switch(a.tag){case 5:var l=a.stateNode;a.flags&32&&(bt(l,""),a.flags&=-33);var u=ep(e);Cs(e,u,l);break;case 3:case 4:var f=a.stateNode.containerInfo,v=ep(e);bs(e,v,f);break;default:throw Error(o(161))}}catch(x){Ie(e,e.return,x)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vh(e,t,n){K=e,ip(e)}function ip(e,t,n){for(var a=(e.mode&1)!==0;K!==null;){var l=K,u=l.child;if(l.tag===22&&a){var f=l.memoizedState!==null||jo;if(!f){var v=l.alternate,x=v!==null&&v.memoizedState!==null||lt;v=jo;var P=lt;if(jo=f,(lt=x)&&!P)for(K=l;K!==null;)f=K,x=f.child,f.tag===22&&f.memoizedState!==null?lp(l):x!==null?(x.return=f,K=x):lp(l);for(;u!==null;)K=u,ip(u),u=u.sibling;K=l,jo=v,lt=P}ap(e)}else(l.subtreeFlags&8772)!==0&&u!==null?(u.return=l,K=u):ap(e)}}function ap(e){for(;K!==null;){var t=K;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:lt||Eo(5,t);break;case 1:var a=t.stateNode;if(t.flags&4&&!lt)if(n===null)a.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:It(t.type,n.memoizedProps);a.componentDidUpdate(l,n.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var u=t.updateQueue;u!==null&&od(t,u,a);break;case 3:var f=t.updateQueue;if(f!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}od(t,f,n)}break;case 5:var v=t.stateNode;if(n===null&&t.flags&4){n=v;var x=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":x.autoFocus&&n.focus();break;case"img":x.src&&(n.src=x.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var P=t.alternate;if(P!==null){var z=P.memoizedState;if(z!==null){var I=z.dehydrated;I!==null&&Qi(I)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}lt||t.flags&512&&Es(t)}catch(F){Ie(t,t.return,F)}}if(t===e){K=null;break}if(n=t.sibling,n!==null){n.return=t.return,K=n;break}K=t.return}}function op(e){for(;K!==null;){var t=K;if(t===e){K=null;break}var n=t.sibling;if(n!==null){n.return=t.return,K=n;break}K=t.return}}function lp(e){for(;K!==null;){var t=K;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Eo(4,t)}catch(x){Ie(t,n,x)}break;case 1:var a=t.stateNode;if(typeof a.componentDidMount=="function"){var l=t.return;try{a.componentDidMount()}catch(x){Ie(t,l,x)}}var u=t.return;try{Es(t)}catch(x){Ie(t,u,x)}break;case 5:var f=t.return;try{Es(t)}catch(x){Ie(t,f,x)}}}catch(x){Ie(t,t.return,x)}if(t===e){K=null;break}var v=t.sibling;if(v!==null){v.return=t.return,K=v;break}K=t.return}}var Kh=Math.ceil,bo=U.ReactCurrentDispatcher,Ns=U.ReactCurrentOwner,_t=U.ReactCurrentBatchConfig,ge=0,Je=null,Qe=null,nt=0,Et=0,li=On(0),Ve=0,pa=null,vr=0,Co=0,Ps=0,fa=null,vt=null,Rs=0,si=1/0,fn=null,No=!1,_s=null,An=null,Po=!1,Un=null,Ro=0,ma=0,Ds=null,_o=-1,Do=0;function ct(){return(ge&6)!==0?$e():_o!==-1?_o:_o=$e()}function $n(e){return(e.mode&1)===0?1:(ge&2)!==0&&nt!==0?nt&-nt:Dh.transition!==null?(Do===0&&(Do=ec()),Do):(e=je,e!==0||(e=window.event,e=e===void 0?16:uc(e.type)),e)}function $t(e,t,n,a){if(50<ma)throw ma=0,Ds=null,Error(o(185));Ii(e,n,a),((ge&2)===0||e!==Je)&&(e===Je&&((ge&2)===0&&(Co|=n),Ve===4&&Bn(e,nt)),gt(e,a),n===1&&ge===0&&(t.mode&1)===0&&(si=$e()+500,io&&Fn()))}function gt(e,t){var n=e.callbackNode;Dm(e,t);var a=Aa(e,e===Je?nt:0);if(a===0)n!==null&&Xu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=a&-a,e.callbackPriority!==t){if(n!=null&&Xu(n),t===1)e.tag===0?_h(up.bind(null,e)):Kc(up.bind(null,e)),Ch(function(){(ge&6)===0&&Fn()}),n=null;else{switch(tc(a)){case 1:n=cl;break;case 4:n=Ju;break;case 16:n=Fa;break;case 536870912:n=Zu;break;default:n=Fa}n=gp(n,sp.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function sp(e,t){if(_o=-1,Do=0,(ge&6)!==0)throw Error(o(327));var n=e.callbackNode;if(ui()&&e.callbackNode!==n)return null;var a=Aa(e,e===Je?nt:0);if(a===0)return null;if((a&30)!==0||(a&e.expiredLanes)!==0||t)t=To(e,a);else{t=a;var l=ge;ge|=2;var u=dp();(Je!==e||nt!==t)&&(fn=null,si=$e()+500,yr(e,t));do try{Xh();break}catch(v){cp(e,v)}while(!0);Gl(),bo.current=u,ge=l,Qe!==null?t=0:(Je=null,nt=0,t=Ve)}if(t!==0){if(t===2&&(l=dl(e),l!==0&&(a=l,t=Ts(e,l))),t===1)throw n=pa,yr(e,0),Bn(e,a),gt(e,$e()),n;if(t===6)Bn(e,a);else{if(l=e.current.alternate,(a&30)===0&&!Gh(l)&&(t=To(e,a),t===2&&(u=dl(e),u!==0&&(a=u,t=Ts(e,u))),t===1))throw n=pa,yr(e,0),Bn(e,a),gt(e,$e()),n;switch(e.finishedWork=l,e.finishedLanes=a,t){case 0:case 1:throw Error(o(345));case 2:xr(e,vt,fn);break;case 3:if(Bn(e,a),(a&130023424)===a&&(t=Rs+500-$e(),10<t)){if(Aa(e,0)!==0)break;if(l=e.suspendedLanes,(l&a)!==a){ct(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Il(xr.bind(null,e,vt,fn),t);break}xr(e,vt,fn);break;case 4:if(Bn(e,a),(a&4194240)===a)break;for(t=e.eventTimes,l=-1;0<a;){var f=31-Ft(a);u=1<<f,f=t[f],f>l&&(l=f),a&=~u}if(a=l,a=$e()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*Kh(a/1960))-a,10<a){e.timeoutHandle=Il(xr.bind(null,e,vt,fn),a);break}xr(e,vt,fn);break;case 5:xr(e,vt,fn);break;default:throw Error(o(329))}}}return gt(e,$e()),e.callbackNode===n?sp.bind(null,e):null}function Ts(e,t){var n=fa;return e.current.memoizedState.isDehydrated&&(yr(e,t).flags|=256),e=To(e,t),e!==2&&(t=vt,vt=n,t!==null&&Os(t)),e}function Os(e){vt===null?vt=e:vt.push.apply(vt,e)}function Gh(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var a=0;a<n.length;a++){var l=n[a],u=l.getSnapshot;l=l.value;try{if(!zt(u(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Bn(e,t){for(t&=~Ps,t&=~Co,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ft(t),a=1<<n;e[n]=-1,t&=~a}}function up(e){if((ge&6)!==0)throw Error(o(327));ui();var t=Aa(e,0);if((t&1)===0)return gt(e,$e()),null;var n=To(e,t);if(e.tag!==0&&n===2){var a=dl(e);a!==0&&(t=a,n=Ts(e,a))}if(n===1)throw n=pa,yr(e,0),Bn(e,t),gt(e,$e()),n;if(n===6)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xr(e,vt,fn),gt(e,$e()),null}function Ls(e,t){var n=ge;ge|=1;try{return e(t)}finally{ge=n,ge===0&&(si=$e()+500,io&&Fn())}}function gr(e){Un!==null&&Un.tag===0&&(ge&6)===0&&ui();var t=ge;ge|=1;var n=_t.transition,a=je;try{if(_t.transition=null,je=1,e)return e()}finally{je=a,_t.transition=n,ge=t,(ge&6)===0&&Fn()}}function Fs(){Et=li.current,_e(li)}function yr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,bh(n)),Qe!==null)for(n=Qe.return;n!==null;){var a=n;switch(Wl(a),a.tag){case 1:a=a.type.childContextTypes,a!=null&&no();break;case 3:ii(),_e(ft),_e(it),rs();break;case 5:ts(a);break;case 4:ii();break;case 13:_e(Oe);break;case 19:_e(Oe);break;case 10:Yl(a.type._context);break;case 22:case 23:Fs()}n=n.return}if(Je=e,Qe=e=Qn(e.current,null),nt=Et=t,Ve=0,pa=null,Ps=Co=vr=0,vt=fa=null,fr!==null){for(t=0;t<fr.length;t++)if(n=fr[t],a=n.interleaved,a!==null){n.interleaved=null;var l=a.next,u=n.pending;if(u!==null){var f=u.next;u.next=l,a.next=f}n.pending=a}fr=null}return e}function cp(e,t){do{var n=Qe;try{if(Gl(),ho.current=xo,vo){for(var a=Le.memoizedState;a!==null;){var l=a.queue;l!==null&&(l.pending=null),a=a.next}vo=!1}if(hr=0,Xe=qe=Le=null,oa=!1,la=0,Ns.current=null,n===null||n.return===null){Ve=1,pa=t,Qe=null;break}e:{var u=e,f=n.return,v=n,x=t;if(t=nt,v.flags|=32768,x!==null&&typeof x=="object"&&typeof x.then=="function"){var P=x,z=v,I=z.tag;if((z.mode&1)===0&&(I===0||I===11||I===15)){var F=z.alternate;F?(z.updateQueue=F.updateQueue,z.memoizedState=F.memoizedState,z.lanes=F.lanes):(z.updateQueue=null,z.memoizedState=null)}var q=Fd(f);if(q!==null){q.flags&=-257,zd(q,f,v,u,t),q.mode&1&&Ld(u,P,t),t=q,x=P;var G=t.updateQueue;if(G===null){var X=new Set;X.add(x),t.updateQueue=X}else G.add(x);break e}else{if((t&1)===0){Ld(u,P,t),zs();break e}x=Error(o(426))}}else if(De&&v.mode&1){var Be=Fd(f);if(Be!==null){(Be.flags&65536)===0&&(Be.flags|=256),zd(Be,f,v,u,t),Vl(ai(x,v));break e}}u=x=ai(x,v),Ve!==4&&(Ve=2),fa===null?fa=[u]:fa.push(u),u=f;do{switch(u.tag){case 3:u.flags|=65536,t&=-t,u.lanes|=t;var b=Td(u,x,t);ad(u,b);break e;case 1:v=x;var w=u.type,N=u.stateNode;if((u.flags&128)===0&&(typeof w.getDerivedStateFromError=="function"||N!==null&&typeof N.componentDidCatch=="function"&&(An===null||!An.has(N)))){u.flags|=65536,t&=-t,u.lanes|=t;var A=Od(u,v,t);ad(u,A);break e}}u=u.return}while(u!==null)}fp(n)}catch(J){t=J,Qe===n&&n!==null&&(Qe=n=n.return);continue}break}while(!0)}function dp(){var e=bo.current;return bo.current=xo,e===null?xo:e}function zs(){(Ve===0||Ve===3||Ve===2)&&(Ve=4),Je===null||(vr&268435455)===0&&(Co&268435455)===0||Bn(Je,nt)}function To(e,t){var n=ge;ge|=2;var a=dp();(Je!==e||nt!==t)&&(fn=null,yr(e,t));do try{Yh();break}catch(l){cp(e,l)}while(!0);if(Gl(),ge=n,bo.current=a,Qe!==null)throw Error(o(261));return Je=null,nt=0,Ve}function Yh(){for(;Qe!==null;)pp(Qe)}function Xh(){for(;Qe!==null&&!Sm();)pp(Qe)}function pp(e){var t=vp(e.alternate,e,Et);e.memoizedProps=e.pendingProps,t===null?fp(e):Qe=t,Ns.current=null}function fp(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Qh(n,t,Et),n!==null){Qe=n;return}}else{if(n=Wh(n,t),n!==null){n.flags&=32767,Qe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ve=6,Qe=null;return}}if(t=t.sibling,t!==null){Qe=t;return}Qe=t=e}while(t!==null);Ve===0&&(Ve=5)}function xr(e,t,n){var a=je,l=_t.transition;try{_t.transition=null,je=1,Jh(e,t,n,a)}finally{_t.transition=l,je=a}return null}function Jh(e,t,n,a){do ui();while(Un!==null);if((ge&6)!==0)throw Error(o(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var u=n.lanes|n.childLanes;if(Tm(e,u),e===Je&&(Qe=Je=null,nt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Po||(Po=!0,gp(Fa,function(){return ui(),null})),u=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||u){u=_t.transition,_t.transition=null;var f=je;je=1;var v=ge;ge|=4,Ns.current=null,qh(e,n),rp(n,e),yh(zl),Ba=!!Fl,zl=Fl=null,e.current=n,Vh(n),jm(),ge=v,je=f,_t.transition=u}else e.current=n;if(Po&&(Po=!1,Un=e,Ro=l),u=e.pendingLanes,u===0&&(An=null),Cm(n.stateNode),gt(e,$e()),t!==null)for(a=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],a(l.value,{componentStack:l.stack,digest:l.digest});if(No)throw No=!1,e=_s,_s=null,e;return(Ro&1)!==0&&e.tag!==0&&ui(),u=e.pendingLanes,(u&1)!==0?e===Ds?ma++:(ma=0,Ds=e):ma=0,Fn(),null}function ui(){if(Un!==null){var e=tc(Ro),t=_t.transition,n=je;try{if(_t.transition=null,je=16>e?16:e,Un===null)var a=!1;else{if(e=Un,Un=null,Ro=0,(ge&6)!==0)throw Error(o(331));var l=ge;for(ge|=4,K=e.current;K!==null;){var u=K,f=u.child;if((K.flags&16)!==0){var v=u.deletions;if(v!==null){for(var x=0;x<v.length;x++){var P=v[x];for(K=P;K!==null;){var z=K;switch(z.tag){case 0:case 11:case 15:da(8,z,u)}var I=z.child;if(I!==null)I.return=z,K=I;else for(;K!==null;){z=K;var F=z.sibling,q=z.return;if(Jd(z),z===P){K=null;break}if(F!==null){F.return=q,K=F;break}K=q}}}var G=u.alternate;if(G!==null){var X=G.child;if(X!==null){G.child=null;do{var Be=X.sibling;X.sibling=null,X=Be}while(X!==null)}}K=u}}if((u.subtreeFlags&2064)!==0&&f!==null)f.return=u,K=f;else e:for(;K!==null;){if(u=K,(u.flags&2048)!==0)switch(u.tag){case 0:case 11:case 15:da(9,u,u.return)}var b=u.sibling;if(b!==null){b.return=u.return,K=b;break e}K=u.return}}var w=e.current;for(K=w;K!==null;){f=K;var N=f.child;if((f.subtreeFlags&2064)!==0&&N!==null)N.return=f,K=N;else e:for(f=w;K!==null;){if(v=K,(v.flags&2048)!==0)try{switch(v.tag){case 0:case 11:case 15:Eo(9,v)}}catch(J){Ie(v,v.return,J)}if(v===f){K=null;break e}var A=v.sibling;if(A!==null){A.return=v.return,K=A;break e}K=v.return}}if(ge=l,Fn(),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(za,e)}catch{}a=!0}return a}finally{je=n,_t.transition=t}}return!1}function mp(e,t,n){t=ai(n,t),t=Td(e,t,1),e=Mn(e,t,1),t=ct(),e!==null&&(Ii(e,1,t),gt(e,t))}function Ie(e,t,n){if(e.tag===3)mp(e,e,n);else for(;t!==null;){if(t.tag===3){mp(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(An===null||!An.has(a))){e=ai(n,e),e=Od(t,e,1),t=Mn(t,e,1),e=ct(),t!==null&&(Ii(t,1,e),gt(t,e));break}}t=t.return}}function Zh(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),t=ct(),e.pingedLanes|=e.suspendedLanes&n,Je===e&&(nt&n)===n&&(Ve===4||Ve===3&&(nt&130023424)===nt&&500>$e()-Rs?yr(e,0):Ps|=n),gt(e,t)}function hp(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ia,Ia<<=1,(Ia&130023424)===0&&(Ia=4194304)));var n=ct();e=cn(e,t),e!==null&&(Ii(e,t,n),gt(e,n))}function ev(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hp(e,n)}function tv(e,t){var n=0;switch(e.tag){case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(o(314))}a!==null&&a.delete(t),hp(e,n)}var vp;vp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ft.current)ht=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return ht=!1,Bh(e,t,n);ht=(e.flags&131072)!==0}else ht=!1,De&&(t.flags&1048576)!==0&&Gc(t,oo,t.index);switch(t.lanes=0,t.tag){case 2:var a=t.type;So(e,t),e=t.pendingProps;var l=Xr(t,it.current);ri(t,n),l=os(null,t,a,e,l,n);var u=ls();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,mt(a)?(u=!0,ro(t)):u=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Zl(t),l.updater=wo,t.stateNode=l,l._reactInternals=t,fs(t,a,e,n),t=gs(null,t,a,!0,u,n)):(t.tag=0,De&&u&&Ql(t),ut(null,t,l,n),t=t.child),t;case 16:a=t.elementType;e:{switch(So(e,t),e=t.pendingProps,l=a._init,a=l(a._payload),t.type=a,l=t.tag=rv(a),e=It(a,e),l){case 0:t=vs(null,t,a,e,n);break e;case 1:t=Bd(null,t,a,e,n);break e;case 11:t=Md(null,t,a,e,n);break e;case 14:t=Id(null,t,a,It(a.type,e),n);break e}throw Error(o(306,a,""))}return t;case 0:return a=t.type,l=t.pendingProps,l=t.elementType===a?l:It(a,l),vs(e,t,a,l,n);case 1:return a=t.type,l=t.pendingProps,l=t.elementType===a?l:It(a,l),Bd(e,t,a,l,n);case 3:e:{if(Qd(t),e===null)throw Error(o(387));a=t.pendingProps,u=t.memoizedState,l=u.element,id(e,t),fo(t,a,null,n);var f=t.memoizedState;if(a=f.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:f.cache,pendingSuspenseBoundaries:f.pendingSuspenseBoundaries,transitions:f.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){l=ai(Error(o(423)),t),t=Wd(e,t,a,n,l);break e}else if(a!==l){l=ai(Error(o(424)),t),t=Wd(e,t,a,n,l);break e}else for(jt=Tn(t.stateNode.containerInfo.firstChild),St=t,De=!0,Mt=null,n=nd(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ei(),a===l){t=pn(e,t,n);break e}ut(e,t,a,n)}t=t.child}return t;case 5:return ld(t),e===null&&ql(t),a=t.type,l=t.pendingProps,u=e!==null?e.memoizedProps:null,f=l.children,Ml(a,l)?f=null:u!==null&&Ml(a,u)&&(t.flags|=32),$d(e,t),ut(e,t,f,n),t.child;case 6:return e===null&&ql(t),null;case 13:return Hd(e,t,n);case 4:return es(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ti(t,null,a,n):ut(e,t,a,n),t.child;case 11:return a=t.type,l=t.pendingProps,l=t.elementType===a?l:It(a,l),Md(e,t,a,l,n);case 7:return ut(e,t,t.pendingProps,n),t.child;case 8:return ut(e,t,t.pendingProps.children,n),t.child;case 12:return ut(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(a=t.type._context,l=t.pendingProps,u=t.memoizedProps,f=l.value,Ne(uo,a._currentValue),a._currentValue=f,u!==null)if(zt(u.value,f)){if(u.children===l.children&&!ft.current){t=pn(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var v=u.dependencies;if(v!==null){f=u.child;for(var x=v.firstContext;x!==null;){if(x.context===a){if(u.tag===1){x=dn(-1,n&-n),x.tag=2;var P=u.updateQueue;if(P!==null){P=P.shared;var z=P.pending;z===null?x.next=x:(x.next=z.next,z.next=x),P.pending=x}}u.lanes|=n,x=u.alternate,x!==null&&(x.lanes|=n),Xl(u.return,n,t),v.lanes|=n;break}x=x.next}}else if(u.tag===10)f=u.type===t.type?null:u.child;else if(u.tag===18){if(f=u.return,f===null)throw Error(o(341));f.lanes|=n,v=f.alternate,v!==null&&(v.lanes|=n),Xl(f,n,t),f=u.sibling}else f=u.child;if(f!==null)f.return=u;else for(f=u;f!==null;){if(f===t){f=null;break}if(u=f.sibling,u!==null){u.return=f.return,f=u;break}f=f.return}u=f}ut(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,a=t.pendingProps.children,ri(t,n),l=Pt(l),a=a(l),t.flags|=1,ut(e,t,a,n),t.child;case 14:return a=t.type,l=It(a,t.pendingProps),l=It(a.type,l),Id(e,t,a,l,n);case 15:return Ad(e,t,t.type,t.pendingProps,n);case 17:return a=t.type,l=t.pendingProps,l=t.elementType===a?l:It(a,l),So(e,t),t.tag=1,mt(a)?(e=!0,ro(t)):e=!1,ri(t,n),_d(t,a,l),fs(t,a,l,n),gs(null,t,a,!0,e,n);case 19:return Vd(e,t,n);case 22:return Ud(e,t,n)}throw Error(o(156,t.tag))};function gp(e,t){return Yu(e,t)}function nv(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dt(e,t,n,a){return new nv(e,t,n,a)}function Ms(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rv(e){if(typeof e=="function")return Ms(e)?1:0;if(e!=null){if(e=e.$$typeof,e===He)return 11;if(e===Ee)return 14}return 2}function Qn(e,t){var n=e.alternate;return n===null?(n=Dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Oo(e,t,n,a,l,u){var f=2;if(a=e,typeof e=="function")Ms(e)&&(f=1);else if(typeof e=="string")f=5;else e:switch(e){case pe:return wr(n.children,l,u,t);case ie:f=8,l|=8;break;case ue:return e=Dt(12,n,t,l|2),e.elementType=ue,e.lanes=u,e;case Ue:return e=Dt(13,n,t,l),e.elementType=Ue,e.lanes=u,e;case ye:return e=Dt(19,n,t,l),e.elementType=ye,e.lanes=u,e;case Pe:return Lo(n,l,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case me:f=10;break e;case We:f=9;break e;case He:f=11;break e;case Ee:f=14;break e;case rt:f=16,a=null;break e}throw Error(o(130,e==null?e:typeof e,""))}return t=Dt(f,n,t,l),t.elementType=e,t.type=a,t.lanes=u,t}function wr(e,t,n,a){return e=Dt(7,e,a,t),e.lanes=n,e}function Lo(e,t,n,a){return e=Dt(22,e,a,t),e.elementType=Pe,e.lanes=n,e.stateNode={isHidden:!1},e}function Is(e,t,n){return e=Dt(6,e,null,t),e.lanes=n,e}function As(e,t,n){return t=Dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function iv(e,t,n,a,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pl(0),this.expirationTimes=pl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pl(0),this.identifierPrefix=a,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Us(e,t,n,a,l,u,f,v,x){return e=new iv(e,t,n,v,x),t===1?(t=1,u===!0&&(t|=8)):t=0,u=Dt(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:a,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zl(u),e}function av(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:le,key:a==null?null:""+a,children:e,containerInfo:t,implementation:n}}function yp(e){if(!e)return Ln;e=e._reactInternals;e:{if(sr(e)!==e||e.tag!==1)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(mt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(o(171))}if(e.tag===1){var n=e.type;if(mt(n))return qc(e,n,t)}return t}function xp(e,t,n,a,l,u,f,v,x){return e=Us(n,a,!0,e,l,u,f,v,x),e.context=yp(null),n=e.current,a=ct(),l=$n(n),u=dn(a,l),u.callback=t??null,Mn(n,u,l),e.current.lanes=l,Ii(e,l,a),gt(e,a),e}function Fo(e,t,n,a){var l=t.current,u=ct(),f=$n(l);return n=yp(n),t.context===null?t.context=n:t.pendingContext=n,t=dn(u,f),t.payload={element:e},a=a===void 0?null:a,a!==null&&(t.callback=a),e=Mn(l,t,f),e!==null&&($t(e,l,f,u),po(e,l,f)),f}function zo(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function wp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function $s(e,t){wp(e,t),(e=e.alternate)&&wp(e,t)}function ov(){return null}var kp=typeof reportError=="function"?reportError:function(e){console.error(e)};function Bs(e){this._internalRoot=e}Mo.prototype.render=Bs.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));Fo(e,t,null,null)},Mo.prototype.unmount=Bs.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gr(function(){Fo(null,e,null,null)}),t[on]=null}};function Mo(e){this._internalRoot=e}Mo.prototype.unstable_scheduleHydration=function(e){if(e){var t=ic();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rn.length&&t!==0&&t<Rn[n].priority;n++);Rn.splice(n,0,e),n===0&&lc(e)}};function Qs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Io(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Sp(){}function lv(e,t,n,a,l){if(l){if(typeof a=="function"){var u=a;a=function(){var P=zo(f);u.call(P)}}var f=xp(t,a,e,0,null,!1,!1,"",Sp);return e._reactRootContainer=f,e[on]=f.current,Ji(e.nodeType===8?e.parentNode:e),gr(),f}for(;l=e.lastChild;)e.removeChild(l);if(typeof a=="function"){var v=a;a=function(){var P=zo(x);v.call(P)}}var x=Us(e,0,!1,null,null,!1,!1,"",Sp);return e._reactRootContainer=x,e[on]=x.current,Ji(e.nodeType===8?e.parentNode:e),gr(function(){Fo(t,x,n,a)}),x}function Ao(e,t,n,a,l){var u=n._reactRootContainer;if(u){var f=u;if(typeof l=="function"){var v=l;l=function(){var x=zo(f);v.call(x)}}Fo(t,f,e,l)}else f=lv(n,t,e,l,a);return zo(f)}nc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Mi(t.pendingLanes);n!==0&&(fl(t,n|1),gt(t,$e()),(ge&6)===0&&(si=$e()+500,Fn()))}break;case 13:gr(function(){var a=cn(e,1);if(a!==null){var l=ct();$t(a,e,1,l)}}),$s(e,1)}},ml=function(e){if(e.tag===13){var t=cn(e,134217728);if(t!==null){var n=ct();$t(t,e,134217728,n)}$s(e,134217728)}},rc=function(e){if(e.tag===13){var t=$n(e),n=cn(e,t);if(n!==null){var a=ct();$t(n,e,t,a)}$s(e,t)}},ic=function(){return je},ac=function(e,t){var n=je;try{return je=e,t()}finally{je=n}},ol=function(e,t,n){switch(t){case"input":if(Wt(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=to(a);if(!l)throw Error(o(90));rn(a),Wt(a,l)}}}break;case"textarea":Q(e,n);break;case"select":t=n.value,t!=null&&En(e,!!n.multiple,t,!1)}},Qu=Ls,Wu=gr;var sv={usingClientEntryPoint:!1,Events:[ta,Gr,to,$u,Bu,Ls]},ha={findFiberByHostInstance:ur,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},uv={bundleType:ha.bundleType,version:ha.version,rendererPackageName:ha.rendererPackageName,rendererConfig:ha.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ku(e),e===null?null:e.stateNode},findFiberByHostInstance:ha.findFiberByHostInstance||ov,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Uo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Uo.isDisabled&&Uo.supportsFiber)try{za=Uo.inject(uv),qt=Uo}catch{}}return yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sv,yt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Qs(t))throw Error(o(200));return av(e,t,null,n)},yt.createRoot=function(e,t){if(!Qs(e))throw Error(o(299));var n=!1,a="",l=kp;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Us(e,1,!1,null,null,n,!1,a,l),e[on]=t.current,Ji(e.nodeType===8?e.parentNode:e),new Bs(t)},yt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=Ku(t),e=e===null?null:e.stateNode,e},yt.flushSync=function(e){return gr(e)},yt.hydrate=function(e,t,n){if(!Io(t))throw Error(o(200));return Ao(null,e,t,!0,n)},yt.hydrateRoot=function(e,t,n){if(!Qs(e))throw Error(o(405));var a=n!=null&&n.hydratedSources||null,l=!1,u="",f=kp;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onRecoverableError!==void 0&&(f=n.onRecoverableError)),t=xp(t,null,e,1,n??null,l,!1,u,f),e[on]=t.current,Ji(e),a)for(e=0;e<a.length;e++)n=a[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Mo(t)},yt.render=function(e,t,n){if(!Io(t))throw Error(o(200));return Ao(null,e,t,!1,n)},yt.unmountComponentAtNode=function(e){if(!Io(e))throw Error(o(40));return e._reactRootContainer?(gr(function(){Ao(null,null,e,!1,function(){e._reactRootContainer=null,e[on]=null})}),!0):!1},yt.unstable_batchedUpdates=Ls,yt.unstable_renderSubtreeIntoContainer=function(e,t,n,a){if(!Io(n))throw Error(o(200));if(e==null||e._reactInternals===void 0)throw Error(o(38));return Ao(e,t,n,!1,a)},yt.version="18.3.1-next-f1338f8080-20240426",yt}var Qp;function ng(){if(Qp)return Vs.exports;Qp=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(i){console.error(i)}}return r(),Vs.exports=tg(),Vs.exports}var Wp;function rg(){if(Wp)return Qo;Wp=1;var r=ng();return Qo.createRoot=r.createRoot,Qo.hydrateRoot=r.hydrateRoot,Qo}var ig=rg();/**
41
- * react-router v7.13.0
42
- *
43
- * Copyright (c) Remix Software Inc.
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE.md file in the root directory of this source tree.
47
- *
48
- * @license MIT
49
- */var Hp="popstate";function ag(r={}){function i(s,c){let{pathname:p,search:m,hash:h}=s.location;return yu("",{pathname:p,search:m,hash:h},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function o(s,c){return typeof c=="string"?c:wa(c)}return lg(i,o,null,r)}function ze(r,i){if(r===!1||r===null||typeof r>"u")throw new Error(i)}function tn(r,i){if(!r){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function og(){return Math.random().toString(36).substring(2,10)}function qp(r,i){return{usr:r.state,key:r.key,idx:i}}function yu(r,i,o=null,s){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof i=="string"?Ci(i):i,state:o,key:i&&i.key||s||og()}}function wa({pathname:r="/",search:i="",hash:o=""}){return i&&i!=="?"&&(r+=i.charAt(0)==="?"?i:"?"+i),o&&o!=="#"&&(r+=o.charAt(0)==="#"?o:"#"+o),r}function Ci(r){let i={};if(r){let o=r.indexOf("#");o>=0&&(i.hash=r.substring(o),r=r.substring(0,o));let s=r.indexOf("?");s>=0&&(i.search=r.substring(s),r=r.substring(0,s)),r&&(i.pathname=r)}return i}function lg(r,i,o,s={}){let{window:c=document.defaultView,v5Compat:p=!1}=s,m=c.history,h="POP",y=null,C=E();C==null&&(C=0,m.replaceState({...m.state,idx:C},""));function E(){return(m.state||{idx:null}).idx}function S(){h="POP";let _=E(),$=_==null?null:_-C;C=_,y&&y({action:h,location:T.location,delta:$})}function R(_,$){h="PUSH";let H=yu(T.location,_,$);C=E()+1;let M=qp(H,C),U=T.createHref(H);try{m.pushState(M,"",U)}catch(ee){if(ee instanceof DOMException&&ee.name==="DataCloneError")throw ee;c.location.assign(U)}p&&y&&y({action:h,location:T.location,delta:1})}function D(_,$){h="REPLACE";let H=yu(T.location,_,$);C=E();let M=qp(H,C),U=T.createHref(H);m.replaceState(M,"",U),p&&y&&y({action:h,location:T.location,delta:0})}function L(_){return sg(_)}let T={get action(){return h},get location(){return r(c,m)},listen(_){if(y)throw new Error("A history only accepts one active listener");return c.addEventListener(Hp,S),y=_,()=>{c.removeEventListener(Hp,S),y=null}},createHref(_){return i(c,_)},createURL:L,encodeLocation(_){let $=L(_);return{pathname:$.pathname,search:$.search,hash:$.hash}},push:R,replace:D,go(_){return m.go(_)}};return T}function sg(r,i=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),ze(o,"No window.location.(origin|href) available to create URL");let s=typeof r=="string"?r:wa(r);return s=s.replace(/ $/,"%20"),!i&&s.startsWith("//")&&(s=o+s),new URL(s,o)}function zf(r,i,o="/"){return ug(r,i,o,!1)}function ug(r,i,o,s){let c=typeof i=="string"?Ci(i):i,p=kn(c.pathname||"/",o);if(p==null)return null;let m=Mf(r);cg(m);let h=null;for(let y=0;h==null&&y<m.length;++y){let C=kg(p);h=xg(m[y],C,s)}return h}function Mf(r,i=[],o=[],s="",c=!1){let p=(m,h,y=c,C)=>{let E={relativePath:C===void 0?m.path||"":C,caseSensitive:m.caseSensitive===!0,childrenIndex:h,route:m};if(E.relativePath.startsWith("/")){if(!E.relativePath.startsWith(s)&&y)return;ze(E.relativePath.startsWith(s),`Absolute route path "${E.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),E.relativePath=E.relativePath.slice(s.length)}let S=xn([s,E.relativePath]),R=o.concat(E);m.children&&m.children.length>0&&(ze(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),Mf(m.children,i,R,S,y)),!(m.path==null&&!m.index)&&i.push({path:S,score:gg(S,m.index),routesMeta:R})};return r.forEach((m,h)=>{var y;if(m.path===""||!((y=m.path)!=null&&y.includes("?")))p(m,h);else for(let C of If(m.path))p(m,h,!0,C)}),i}function If(r){let i=r.split("/");if(i.length===0)return[];let[o,...s]=i,c=o.endsWith("?"),p=o.replace(/\?$/,"");if(s.length===0)return c?[p,""]:[p];let m=If(s.join("/")),h=[];return h.push(...m.map(y=>y===""?p:[p,y].join("/"))),c&&h.push(...m),h.map(y=>r.startsWith("/")&&y===""?"/":y)}function cg(r){r.sort((i,o)=>i.score!==o.score?o.score-i.score:yg(i.routesMeta.map(s=>s.childrenIndex),o.routesMeta.map(s=>s.childrenIndex)))}var dg=/^:[\w-]+$/,pg=3,fg=2,mg=1,hg=10,vg=-2,Vp=r=>r==="*";function gg(r,i){let o=r.split("/"),s=o.length;return o.some(Vp)&&(s+=vg),i&&(s+=fg),o.filter(c=>!Vp(c)).reduce((c,p)=>c+(dg.test(p)?pg:p===""?mg:hg),s)}function yg(r,i){return r.length===i.length&&r.slice(0,-1).every((s,c)=>s===i[c])?r[r.length-1]-i[i.length-1]:0}function xg(r,i,o=!1){let{routesMeta:s}=r,c={},p="/",m=[];for(let h=0;h<s.length;++h){let y=s[h],C=h===s.length-1,E=p==="/"?i:i.slice(p.length)||"/",S=Jo({path:y.relativePath,caseSensitive:y.caseSensitive,end:C},E),R=y.route;if(!S&&C&&o&&!s[s.length-1].route.index&&(S=Jo({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},E)),!S)return null;Object.assign(c,S.params),m.push({params:c,pathname:xn([p,S.pathname]),pathnameBase:bg(xn([p,S.pathnameBase])),route:R}),S.pathnameBase!=="/"&&(p=xn([p,S.pathnameBase]))}return m}function Jo(r,i){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[o,s]=wg(r.path,r.caseSensitive,r.end),c=i.match(o);if(!c)return null;let p=c[0],m=p.replace(/(.)\/+$/,"$1"),h=c.slice(1);return{params:s.reduce((C,{paramName:E,isOptional:S},R)=>{if(E==="*"){let L=h[R]||"";m=p.slice(0,p.length-L.length).replace(/(.)\/+$/,"$1")}const D=h[R];return S&&!D?C[E]=void 0:C[E]=(D||"").replace(/%2F/g,"/"),C},{}),pathname:p,pathnameBase:m,pattern:r}}function wg(r,i=!1,o=!0){tn(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let s=[],c="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,h,y)=>(s.push({paramName:h,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(s.push({paramName:"*"}),c+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?c+="\\/*$":r!==""&&r!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,i?void 0:"i"),s]}function kg(r){try{return r.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return tn(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),r}}function kn(r,i){if(i==="/")return r;if(!r.toLowerCase().startsWith(i.toLowerCase()))return null;let o=i.endsWith("/")?i.length-1:i.length,s=r.charAt(o);return s&&s!=="/"?null:r.slice(o)||"/"}var Sg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function jg(r,i="/"){let{pathname:o,search:s="",hash:c=""}=typeof r=="string"?Ci(r):r,p;return o?(o=o.replace(/\/\/+/g,"/"),o.startsWith("/")?p=Kp(o.substring(1),"/"):p=Kp(o,i)):p=i,{pathname:p,search:Cg(s),hash:Ng(c)}}function Kp(r,i){let o=i.replace(/\/+$/,"").split("/");return r.split("/").forEach(c=>{c===".."?o.length>1&&o.pop():c!=="."&&o.push(c)}),o.length>1?o.join("/"):"/"}function Ys(r,i,o,s){return`Cannot include a '${r}' character in a manually specified \`to.${i}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Eg(r){return r.filter((i,o)=>o===0||i.route.path&&i.route.path.length>0)}function Af(r){let i=Eg(r);return i.map((o,s)=>s===i.length-1?o.pathname:o.pathnameBase)}function Uf(r,i,o,s=!1){let c;typeof r=="string"?c=Ci(r):(c={...r},ze(!c.pathname||!c.pathname.includes("?"),Ys("?","pathname","search",c)),ze(!c.pathname||!c.pathname.includes("#"),Ys("#","pathname","hash",c)),ze(!c.search||!c.search.includes("#"),Ys("#","search","hash",c)));let p=r===""||c.pathname==="",m=p?"/":c.pathname,h;if(m==null)h=o;else{let S=i.length-1;if(!s&&m.startsWith("..")){let R=m.split("/");for(;R[0]==="..";)R.shift(),S-=1;c.pathname=R.join("/")}h=S>=0?i[S]:"/"}let y=jg(c,h),C=m&&m!=="/"&&m.endsWith("/"),E=(p||m===".")&&o.endsWith("/");return!y.pathname.endsWith("/")&&(C||E)&&(y.pathname+="/"),y}var xn=r=>r.join("/").replace(/\/\/+/g,"/"),bg=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),Cg=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,Ng=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,Pg=class{constructor(r,i,o,s=!1){this.status=r,this.statusText=i||"",this.internal=s,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function Rg(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function _g(r){return r.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var $f=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Bf(r,i){let o=r;if(typeof o!="string"||!Sg.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let s=o,c=!1;if($f)try{let p=new URL(window.location.href),m=o.startsWith("//")?new URL(p.protocol+o):new URL(o),h=kn(m.pathname,i);m.origin===p.origin&&h!=null?o=h+m.search+m.hash:c=!0}catch{tn(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:c,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Qf=["POST","PUT","PATCH","DELETE"];new Set(Qf);var Dg=["GET",...Qf];new Set(Dg);var Ni=k.createContext(null);Ni.displayName="DataRouter";var rl=k.createContext(null);rl.displayName="DataRouterState";var Tg=k.createContext(!1),Wf=k.createContext({isTransitioning:!1});Wf.displayName="ViewTransition";var Og=k.createContext(new Map);Og.displayName="Fetchers";var Lg=k.createContext(null);Lg.displayName="Await";var Lt=k.createContext(null);Lt.displayName="Navigation";var Na=k.createContext(null);Na.displayName="Location";var Sn=k.createContext({outlet:null,matches:[],isDataRoute:!1});Sn.displayName="Route";var Ou=k.createContext(null);Ou.displayName="RouteError";var Hf="REACT_ROUTER_ERROR",Fg="REDIRECT",zg="ROUTE_ERROR_RESPONSE";function Mg(r){if(r.startsWith(`${Hf}:${Fg}:{`))try{let i=JSON.parse(r.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function Ig(r){if(r.startsWith(`${Hf}:${zg}:{`))try{let i=JSON.parse(r.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new Pg(i.status,i.statusText,i.data)}catch{}}function Ag(r,{relative:i}={}){ze(Pa(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:s}=k.useContext(Lt),{hash:c,pathname:p,search:m}=Ra(r,{relative:i}),h=p;return o!=="/"&&(h=p==="/"?o:xn([o,p])),s.createHref({pathname:h,search:m,hash:c})}function Pa(){return k.useContext(Na)!=null}function Fr(){return ze(Pa(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(Na).location}var qf="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Vf(r){k.useContext(Lt).static||k.useLayoutEffect(r)}function Ug(){let{isDataRoute:r}=k.useContext(Sn);return r?Zg():$g()}function $g(){ze(Pa(),"useNavigate() may be used only in the context of a <Router> component.");let r=k.useContext(Ni),{basename:i,navigator:o}=k.useContext(Lt),{matches:s}=k.useContext(Sn),{pathname:c}=Fr(),p=JSON.stringify(Af(s)),m=k.useRef(!1);return Vf(()=>{m.current=!0}),k.useCallback((y,C={})=>{if(tn(m.current,qf),!m.current)return;if(typeof y=="number"){o.go(y);return}let E=Uf(y,JSON.parse(p),c,C.relative==="path");r==null&&i!=="/"&&(E.pathname=E.pathname==="/"?i:xn([i,E.pathname])),(C.replace?o.replace:o.push)(E,C.state,C)},[i,o,p,c,r])}k.createContext(null);function Ra(r,{relative:i}={}){let{matches:o}=k.useContext(Sn),{pathname:s}=Fr(),c=JSON.stringify(Af(o));return k.useMemo(()=>Uf(r,JSON.parse(c),s,i==="path"),[r,c,s,i])}function Bg(r,i){return Kf(r,i)}function Kf(r,i,o,s,c){var H;ze(Pa(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:p}=k.useContext(Lt),{matches:m}=k.useContext(Sn),h=m[m.length-1],y=h?h.params:{},C=h?h.pathname:"/",E=h?h.pathnameBase:"/",S=h&&h.route;{let M=S&&S.path||"";Yf(C,!S||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${C}" (under <Route path="${M}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
50
-
51
- Please change the parent <Route path="${M}"> to <Route path="${M==="/"?"*":`${M}/*`}">.`)}let R=Fr(),D;if(i){let M=typeof i=="string"?Ci(i):i;ze(E==="/"||((H=M.pathname)==null?void 0:H.startsWith(E)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${E}" but pathname "${M.pathname}" was given in the \`location\` prop.`),D=M}else D=R;let L=D.pathname||"/",T=L;if(E!=="/"){let M=E.replace(/^\//,"").split("/");T="/"+L.replace(/^\//,"").split("/").slice(M.length).join("/")}let _=zf(r,{pathname:T});tn(S||_!=null,`No routes matched location "${D.pathname}${D.search}${D.hash}" `),tn(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${D.pathname}${D.search}${D.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let $=Vg(_&&_.map(M=>Object.assign({},M,{params:Object.assign({},y,M.params),pathname:xn([E,p.encodeLocation?p.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?E:xn([E,p.encodeLocation?p.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),m,o,s,c);return i&&$?k.createElement(Na.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...D},navigationType:"POP"}},$):$}function Qg(){let r=Jg(),i=Rg(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),o=r instanceof Error?r.stack:null,s="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:s},p={padding:"2px 4px",backgroundColor:s},m=null;return console.error("Error handled by React Router default ErrorBoundary:",r),m=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:p},"ErrorBoundary")," or"," ",k.createElement("code",{style:p},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},i),o?k.createElement("pre",{style:c},o):null,m)}var Wg=k.createElement(Qg,null),Gf=class extends k.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,i){return i.location!==r.location||i.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:i.error,location:i.location,revalidation:r.revalidation||i.revalidation}}componentDidCatch(r,i){this.props.onError?this.props.onError(r,i):console.error("React Router caught the following error during render",r)}render(){let r=this.state.error;if(this.context&&typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){const o=Ig(r.digest);o&&(r=o)}let i=r!==void 0?k.createElement(Sn.Provider,{value:this.props.routeContext},k.createElement(Ou.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?k.createElement(Hg,{error:r},i):i}};Gf.contextType=Tg;var Xs=new WeakMap;function Hg({children:r,error:i}){let{basename:o}=k.useContext(Lt);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let s=Mg(i.digest);if(s){let c=Xs.get(i);if(c)throw c;let p=Bf(s.location,o);if($f&&!Xs.get(i))if(p.isExternal||s.reloadDocument)window.location.href=p.absoluteURL||p.to;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(p.to,{replace:s.replace}));throw Xs.set(i,m),m}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${p.absoluteURL||p.to}`})}}return r}function qg({routeContext:r,match:i,children:o}){let s=k.useContext(Ni);return s&&s.static&&s.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=i.route.id),k.createElement(Sn.Provider,{value:r},o)}function Vg(r,i=[],o=null,s=null,c=null){if(r==null){if(!o)return null;if(o.errors)r=o.matches;else if(i.length===0&&!o.initialized&&o.matches.length>0)r=o.matches;else return null}let p=r,m=o==null?void 0:o.errors;if(m!=null){let E=p.findIndex(S=>S.route.id&&(m==null?void 0:m[S.route.id])!==void 0);ze(E>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),p=p.slice(0,Math.min(p.length,E+1))}let h=!1,y=-1;if(o)for(let E=0;E<p.length;E++){let S=p[E];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(y=E),S.route.id){let{loaderData:R,errors:D}=o,L=S.route.loader&&!R.hasOwnProperty(S.route.id)&&(!D||D[S.route.id]===void 0);if(S.route.lazy||L){h=!0,y>=0?p=p.slice(0,y+1):p=[p[0]];break}}}let C=o&&s?(E,S)=>{var R,D;s(E,{location:o.location,params:((D=(R=o.matches)==null?void 0:R[0])==null?void 0:D.params)??{},unstable_pattern:_g(o.matches),errorInfo:S})}:void 0;return p.reduceRight((E,S,R)=>{let D,L=!1,T=null,_=null;o&&(D=m&&S.route.id?m[S.route.id]:void 0,T=S.route.errorElement||Wg,h&&(y<0&&R===0?(Yf("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,_=null):y===R&&(L=!0,_=S.route.hydrateFallbackElement||null)));let $=i.concat(p.slice(0,R+1)),H=()=>{let M;return D?M=T:L?M=_:S.route.Component?M=k.createElement(S.route.Component,null):S.route.element?M=S.route.element:M=E,k.createElement(qg,{match:S,routeContext:{outlet:E,matches:$,isDataRoute:o!=null},children:M})};return o&&(S.route.ErrorBoundary||S.route.errorElement||R===0)?k.createElement(Gf,{location:o.location,revalidation:o.revalidation,component:T,error:D,children:H(),routeContext:{outlet:null,matches:$,isDataRoute:!0},onError:C}):H()},null)}function Lu(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kg(r){let i=k.useContext(Ni);return ze(i,Lu(r)),i}function Gg(r){let i=k.useContext(rl);return ze(i,Lu(r)),i}function Yg(r){let i=k.useContext(Sn);return ze(i,Lu(r)),i}function Fu(r){let i=Yg(r),o=i.matches[i.matches.length-1];return ze(o.route.id,`${r} can only be used on routes that contain a unique "id"`),o.route.id}function Xg(){return Fu("useRouteId")}function Jg(){var s;let r=k.useContext(Ou),i=Gg("useRouteError"),o=Fu("useRouteError");return r!==void 0?r:(s=i.errors)==null?void 0:s[o]}function Zg(){let{router:r}=Kg("useNavigate"),i=Fu("useNavigate"),o=k.useRef(!1);return Vf(()=>{o.current=!0}),k.useCallback(async(c,p={})=>{tn(o.current,qf),o.current&&(typeof c=="number"?await r.navigate(c):await r.navigate(c,{fromRouteId:i,...p}))},[r,i])}var Gp={};function Yf(r,i,o){!i&&!Gp[r]&&(Gp[r]=!0,tn(!1,o))}k.memo(ey);function ey({routes:r,future:i,state:o,onError:s}){return Kf(r,void 0,o,s,i)}function ci(r){ze(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ty({basename:r="/",children:i=null,location:o,navigationType:s="POP",navigator:c,static:p=!1,unstable_useTransitions:m}){ze(!Pa(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=r.replace(/^\/*/,"/"),y=k.useMemo(()=>({basename:h,navigator:c,static:p,unstable_useTransitions:m,future:{}}),[h,c,p,m]);typeof o=="string"&&(o=Ci(o));let{pathname:C="/",search:E="",hash:S="",state:R=null,key:D="default"}=o,L=k.useMemo(()=>{let T=kn(C,h);return T==null?null:{location:{pathname:T,search:E,hash:S,state:R,key:D},navigationType:s}},[h,C,E,S,R,D,s]);return tn(L!=null,`<Router basename="${h}"> is not able to match the URL "${C}${E}${S}" because it does not start with the basename, so the <Router> won't render anything.`),L==null?null:k.createElement(Lt.Provider,{value:y},k.createElement(Na.Provider,{children:i,value:L}))}function ny({children:r,location:i}){return Bg(xu(r),i)}function xu(r,i=[]){let o=[];return k.Children.forEach(r,(s,c)=>{if(!k.isValidElement(s))return;let p=[...i,c];if(s.type===k.Fragment){o.push.apply(o,xu(s.props.children,p));return}ze(s.type===ci,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ze(!s.props.index||!s.props.children,"An index route cannot have child routes.");let m={id:s.props.id||p.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(m.children=xu(s.props.children,p)),o.push(m)}),o}var Ko="get",Go="application/x-www-form-urlencoded";function il(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function ry(r){return il(r)&&r.tagName.toLowerCase()==="button"}function iy(r){return il(r)&&r.tagName.toLowerCase()==="form"}function ay(r){return il(r)&&r.tagName.toLowerCase()==="input"}function oy(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function ly(r,i){return r.button===0&&(!i||i==="_self")&&!oy(r)}var Wo=null;function sy(){if(Wo===null)try{new FormData(document.createElement("form"),0),Wo=!1}catch{Wo=!0}return Wo}var uy=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Js(r){return r!=null&&!uy.has(r)?(tn(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Go}"`),null):r}function cy(r,i){let o,s,c,p,m;if(iy(r)){let h=r.getAttribute("action");s=h?kn(h,i):null,o=r.getAttribute("method")||Ko,c=Js(r.getAttribute("enctype"))||Go,p=new FormData(r)}else if(ry(r)||ay(r)&&(r.type==="submit"||r.type==="image")){let h=r.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=r.getAttribute("formaction")||h.getAttribute("action");if(s=y?kn(y,i):null,o=r.getAttribute("formmethod")||h.getAttribute("method")||Ko,c=Js(r.getAttribute("formenctype"))||Js(h.getAttribute("enctype"))||Go,p=new FormData(h,r),!sy()){let{name:C,type:E,value:S}=r;if(E==="image"){let R=C?`${C}.`:"";p.append(`${R}x`,"0"),p.append(`${R}y`,"0")}else C&&p.append(C,S)}}else{if(il(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=Ko,s=null,c=Go,m=r}return p&&c==="text/plain"&&(m=p,p=void 0),{action:s,method:o.toLowerCase(),encType:c,formData:p,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function zu(r,i){if(r===!1||r===null||typeof r>"u")throw new Error(i)}function dy(r,i,o,s){let c=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return o?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${s}`:c.pathname=`${c.pathname}.${s}`:c.pathname==="/"?c.pathname=`_root.${s}`:i&&kn(c.pathname,i)==="/"?c.pathname=`${i.replace(/\/$/,"")}/_root.${s}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${s}`,c}async function py(r,i){if(r.id in i)return i[r.id];try{let o=await import(r.module);return i[r.id]=o,o}catch(o){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function fy(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function my(r,i,o){let s=await Promise.all(r.map(async c=>{let p=i.routes[c.route.id];if(p){let m=await py(p,o);return m.links?m.links():[]}return[]}));return yy(s.flat(1).filter(fy).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function Yp(r,i,o,s,c,p){let m=(y,C)=>o[C]?y.route.id!==o[C].route.id:!0,h=(y,C)=>{var E;return o[C].pathname!==y.pathname||((E=o[C].route.path)==null?void 0:E.endsWith("*"))&&o[C].params["*"]!==y.params["*"]};return p==="assets"?i.filter((y,C)=>m(y,C)||h(y,C)):p==="data"?i.filter((y,C)=>{var S;let E=s.routes[y.route.id];if(!E||!E.hasLoader)return!1;if(m(y,C)||h(y,C))return!0;if(y.route.shouldRevalidate){let R=y.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:((S=o[0])==null?void 0:S.params)||{},nextUrl:new URL(r,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof R=="boolean")return R}return!0}):[]}function hy(r,i,{includeHydrateFallback:o}={}){return vy(r.map(s=>{let c=i.routes[s.route.id];if(!c)return[];let p=[c.module];return c.clientActionModule&&(p=p.concat(c.clientActionModule)),c.clientLoaderModule&&(p=p.concat(c.clientLoaderModule)),o&&c.hydrateFallbackModule&&(p=p.concat(c.hydrateFallbackModule)),c.imports&&(p=p.concat(c.imports)),p}).flat(1))}function vy(r){return[...new Set(r)]}function gy(r){let i={},o=Object.keys(r).sort();for(let s of o)i[s]=r[s];return i}function yy(r,i){let o=new Set;return new Set(i),r.reduce((s,c)=>{let p=JSON.stringify(gy(c));return o.has(p)||(o.add(p),s.push({key:p,link:c})),s},[])}function Xf(){let r=k.useContext(Ni);return zu(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function xy(){let r=k.useContext(rl);return zu(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var Mu=k.createContext(void 0);Mu.displayName="FrameworkContext";function Jf(){let r=k.useContext(Mu);return zu(r,"You must render this element inside a <HydratedRouter> element"),r}function wy(r,i){let o=k.useContext(Mu),[s,c]=k.useState(!1),[p,m]=k.useState(!1),{onFocus:h,onBlur:y,onMouseEnter:C,onMouseLeave:E,onTouchStart:S}=i,R=k.useRef(null);k.useEffect(()=>{if(r==="render"&&m(!0),r==="viewport"){let T=$=>{$.forEach(H=>{m(H.isIntersecting)})},_=new IntersectionObserver(T,{threshold:.5});return R.current&&_.observe(R.current),()=>{_.disconnect()}}},[r]),k.useEffect(()=>{if(s){let T=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(T)}}},[s]);let D=()=>{c(!0)},L=()=>{c(!1),m(!1)};return o?r!=="intent"?[p,R,{}]:[p,R,{onFocus:ga(h,D),onBlur:ga(y,L),onMouseEnter:ga(C,D),onMouseLeave:ga(E,L),onTouchStart:ga(S,D)}]:[!1,R,{}]}function ga(r,i){return o=>{r&&r(o),o.defaultPrevented||i(o)}}function ky({page:r,...i}){let{router:o}=Xf(),s=k.useMemo(()=>zf(o.routes,r,o.basename),[o.routes,r,o.basename]);return s?k.createElement(jy,{page:r,matches:s,...i}):null}function Sy(r){let{manifest:i,routeModules:o}=Jf(),[s,c]=k.useState([]);return k.useEffect(()=>{let p=!1;return my(r,i,o).then(m=>{p||c(m)}),()=>{p=!0}},[r,i,o]),s}function jy({page:r,matches:i,...o}){let s=Fr(),{future:c,manifest:p,routeModules:m}=Jf(),{basename:h}=Xf(),{loaderData:y,matches:C}=xy(),E=k.useMemo(()=>Yp(r,i,C,p,s,"data"),[r,i,C,p,s]),S=k.useMemo(()=>Yp(r,i,C,p,s,"assets"),[r,i,C,p,s]),R=k.useMemo(()=>{if(r===s.pathname+s.search+s.hash)return[];let T=new Set,_=!1;if(i.forEach(H=>{var U;let M=p.routes[H.route.id];!M||!M.hasLoader||(!E.some(ee=>ee.route.id===H.route.id)&&H.route.id in y&&((U=m[H.route.id])!=null&&U.shouldRevalidate)||M.hasClientLoader?_=!0:T.add(H.route.id))}),T.size===0)return[];let $=dy(r,h,c.unstable_trailingSlashAwareDataRequests,"data");return _&&T.size>0&&$.searchParams.set("_routes",i.filter(H=>T.has(H.route.id)).map(H=>H.route.id).join(",")),[$.pathname+$.search]},[h,c.unstable_trailingSlashAwareDataRequests,y,s,p,E,i,r,m]),D=k.useMemo(()=>hy(S,p),[S,p]),L=Sy(S);return k.createElement(k.Fragment,null,R.map(T=>k.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...o})),D.map(T=>k.createElement("link",{key:T,rel:"modulepreload",href:T,...o})),L.map(({key:T,link:_})=>k.createElement("link",{key:T,nonce:o.nonce,..._,crossOrigin:_.crossOrigin??o.crossOrigin})))}function Ey(...r){return i=>{r.forEach(o=>{typeof o=="function"?o(i):o!=null&&(o.current=i)})}}var by=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{by&&(window.__reactRouterVersion="7.13.0")}catch{}function Cy({basename:r,children:i,unstable_useTransitions:o,window:s}){let c=k.useRef();c.current==null&&(c.current=ag({window:s,v5Compat:!0}));let p=c.current,[m,h]=k.useState({action:p.action,location:p.location}),y=k.useCallback(C=>{o===!1?h(C):k.startTransition(()=>h(C))},[o]);return k.useLayoutEffect(()=>p.listen(y),[p,y]),k.createElement(ty,{basename:r,children:i,location:m.location,navigationType:m.action,navigator:p,unstable_useTransitions:o})}var Zf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Iu=k.forwardRef(function({onClick:i,discover:o="render",prefetch:s="none",relative:c,reloadDocument:p,replace:m,state:h,target:y,to:C,preventScrollReset:E,viewTransition:S,unstable_defaultShouldRevalidate:R,...D},L){let{basename:T,unstable_useTransitions:_}=k.useContext(Lt),$=typeof C=="string"&&Zf.test(C),H=Bf(C,T);C=H.to;let M=Ag(C,{relative:c}),[U,ee,le]=wy(s,D),pe=Ry(C,{replace:m,state:h,target:y,preventScrollReset:E,relative:c,viewTransition:S,unstable_defaultShouldRevalidate:R,unstable_useTransitions:_});function ie(me){i&&i(me),me.defaultPrevented||pe(me)}let ue=k.createElement("a",{...D,...le,href:H.absoluteURL||M,onClick:H.isExternal||p?i:ie,ref:Ey(L,ee),target:y,"data-discover":!$&&o==="render"?"true":void 0});return U&&!$?k.createElement(k.Fragment,null,ue,k.createElement(ky,{page:M})):ue});Iu.displayName="Link";var em=k.forwardRef(function({"aria-current":i="page",caseSensitive:o=!1,className:s="",end:c=!1,style:p,to:m,viewTransition:h,children:y,...C},E){let S=Ra(m,{relative:C.relative}),R=Fr(),D=k.useContext(rl),{navigator:L,basename:T}=k.useContext(Lt),_=D!=null&&Ly(S)&&h===!0,$=L.encodeLocation?L.encodeLocation(S).pathname:S.pathname,H=R.pathname,M=D&&D.navigation&&D.navigation.location?D.navigation.location.pathname:null;o||(H=H.toLowerCase(),M=M?M.toLowerCase():null,$=$.toLowerCase()),M&&T&&(M=kn(M,T)||M);const U=$!=="/"&&$.endsWith("/")?$.length-1:$.length;let ee=H===$||!c&&H.startsWith($)&&H.charAt(U)==="/",le=M!=null&&(M===$||!c&&M.startsWith($)&&M.charAt($.length)==="/"),pe={isActive:ee,isPending:le,isTransitioning:_},ie=ee?i:void 0,ue;typeof s=="function"?ue=s(pe):ue=[s,ee?"active":null,le?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let me=typeof p=="function"?p(pe):p;return k.createElement(Iu,{...C,"aria-current":ie,className:ue,ref:E,style:me,to:m,viewTransition:h},typeof y=="function"?y(pe):y)});em.displayName="NavLink";var Ny=k.forwardRef(({discover:r="render",fetcherKey:i,navigate:o,reloadDocument:s,replace:c,state:p,method:m=Ko,action:h,onSubmit:y,relative:C,preventScrollReset:E,viewTransition:S,unstable_defaultShouldRevalidate:R,...D},L)=>{let{unstable_useTransitions:T}=k.useContext(Lt),_=Ty(),$=Oy(h,{relative:C}),H=m.toLowerCase()==="get"?"get":"post",M=typeof h=="string"&&Zf.test(h),U=ee=>{if(y&&y(ee),ee.defaultPrevented)return;ee.preventDefault();let le=ee.nativeEvent.submitter,pe=(le==null?void 0:le.getAttribute("formmethod"))||m,ie=()=>_(le||ee.currentTarget,{fetcherKey:i,method:pe,navigate:o,replace:c,state:p,relative:C,preventScrollReset:E,viewTransition:S,unstable_defaultShouldRevalidate:R});T&&o!==!1?k.startTransition(()=>ie()):ie()};return k.createElement("form",{ref:L,method:H,action:$,onSubmit:s?y:U,...D,"data-discover":!M&&r==="render"?"true":void 0})});Ny.displayName="Form";function Py(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function tm(r){let i=k.useContext(Ni);return ze(i,Py(r)),i}function Ry(r,{target:i,replace:o,state:s,preventScrollReset:c,relative:p,viewTransition:m,unstable_defaultShouldRevalidate:h,unstable_useTransitions:y}={}){let C=Ug(),E=Fr(),S=Ra(r,{relative:p});return k.useCallback(R=>{if(ly(R,i)){R.preventDefault();let D=o!==void 0?o:wa(E)===wa(S),L=()=>C(r,{replace:D,state:s,preventScrollReset:c,relative:p,viewTransition:m,unstable_defaultShouldRevalidate:h});y?k.startTransition(()=>L()):L()}},[E,C,S,o,s,i,r,c,p,m,h,y])}var _y=0,Dy=()=>`__${String(++_y)}__`;function Ty(){let{router:r}=tm("useSubmit"),{basename:i}=k.useContext(Lt),o=Xg(),s=r.fetch,c=r.navigate;return k.useCallback(async(p,m={})=>{let{action:h,method:y,encType:C,formData:E,body:S}=cy(p,i);if(m.navigate===!1){let R=m.fetcherKey||Dy();await s(R,o,m.action||h,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:E,body:S,formMethod:m.method||y,formEncType:m.encType||C,flushSync:m.flushSync})}else await c(m.action||h,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:E,body:S,formMethod:m.method||y,formEncType:m.encType||C,replace:m.replace,state:m.state,fromRouteId:o,flushSync:m.flushSync,viewTransition:m.viewTransition})},[s,c,i,o])}function Oy(r,{relative:i}={}){let{basename:o}=k.useContext(Lt),s=k.useContext(Sn);ze(s,"useFormAction must be used inside a RouteContext");let[c]=s.matches.slice(-1),p={...Ra(r||".",{relative:i})},m=Fr();if(r==null){p.search=m.search;let h=new URLSearchParams(p.search),y=h.getAll("index");if(y.some(E=>E==="")){h.delete("index"),y.filter(S=>S).forEach(S=>h.append("index",S));let E=h.toString();p.search=E?`?${E}`:""}}return(!r||r===".")&&c.route.index&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(p.pathname=p.pathname==="/"?o:xn([o,p.pathname])),wa(p)}function Ly(r,{relative:i}={}){let o=k.useContext(Wf);ze(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=tm("useViewTransitionState"),c=Ra(r,{relative:i});if(!o.isTransitioning)return!1;let p=kn(o.currentLocation.pathname,s)||o.currentLocation.pathname,m=kn(o.nextLocation.pathname,s)||o.nextLocation.pathname;return Jo(c.pathname,m)!=null||Jo(c.pathname,p)!=null}class Fy extends k.Component{constructor(o){super(o);Ep(this,"handleRetry",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:null}}static getDerivedStateFromError(o){return{hasError:!0,error:o}}componentDidCatch(o,s){console.error("ErrorBoundary caught an error:",o,s)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 p-4",children:d.jsxs("div",{className:"max-w-md w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6 text-center",children:[d.jsx("div",{className:"text-red-500 mb-4",children:d.jsx("svg",{className:"w-16 h-16 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),d.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:"Something went wrong"}),d.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"An unexpected error occurred. Please try again."}),this.state.error&&d.jsx("pre",{className:"text-left text-sm bg-gray-100 dark:bg-gray-700 p-3 rounded mb-4 overflow-auto max-h-32 text-gray-700 dark:text-gray-300",children:this.state.error.message}),d.jsxs("div",{className:"flex gap-3 justify-center",children:[d.jsx("button",{type:"button",onClick:this.handleRetry,className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Try Again"}),d.jsx("button",{type:"button",onClick:()=>window.location.reload(),className:"px-4 py-2 bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-200 rounded-lg hover:bg-gray-300 dark:hover:bg-gray-500 transition-colors",children:"Reload Page"})]})]})}):this.props.children}}function zy({icon:r,title:i,description:o,action:s}){return d.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[r&&d.jsx("div",{className:"mb-4 text-gray-400",children:r}),d.jsx("h3",{className:"text-lg font-medium text-gray-900",children:i}),o&&d.jsx("p",{className:"mt-1 text-sm text-gray-500 max-w-sm",children:o}),s&&d.jsx("button",{type:"button",onClick:s.onClick,className:"mt-4 px-4 py-2 text-sm font-medium text-blue-600 bg-blue-50 rounded-lg hover:bg-blue-100 transition-colors",children:s.label})]})}function My({isOpen:r,onClose:i,title:o,children:s}){const c=k.useRef(null),p=k.useRef(null);return k.useEffect(()=>{var m;if(r){p.current=document.activeElement,(m=c.current)==null||m.focus();const h=y=>{y.key==="Escape"&&i()};return document.addEventListener("keydown",h),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",h),document.body.style.overflow="",p.current instanceof HTMLElement&&p.current.focus()}}},[r,i]),r?d.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"modal-title",children:[d.jsx("div",{className:"absolute inset-0 bg-black/50 transition-opacity",onClick:i,"aria-hidden":"true"}),d.jsxs("div",{ref:c,tabIndex:-1,className:"relative bg-white rounded-lg shadow-xl max-w-2xl w-full mx-4 max-h-[85vh] flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[d.jsx("h2",{id:"modal-title",className:"text-lg font-semibold text-gray-900",children:o}),d.jsx("button",{type:"button",onClick:i,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close modal",children:d.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),d.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:s})]})]}):null}const Iy={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-8 w-8"};function nr({size:r="md",className:i=""}){return d.jsxs("svg",{className:`animate-spin ${Iy[r]} ${i}`,fill:"none",viewBox:"0 0 24 24",role:"status","aria-label":"Loading",children:[d.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),d.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}const Ay={success:{container:"bg-green-50 border-green-200",icon:"text-green-500",title:"text-green-800",message:"text-green-700"},error:{container:"bg-red-50 border-red-200",icon:"text-red-500",title:"text-red-800",message:"text-red-700"},info:{container:"bg-blue-50 border-blue-200",icon:"text-blue-500",title:"text-blue-800",message:"text-blue-700"}};function Uy({toast:r,onDismiss:i}){const o=Ay[r.type],s=k.useRef(i);return s.current=i,k.useEffect(()=>{const c=setTimeout(()=>{s.current(r.id)},5e3);return()=>clearTimeout(c)},[r.id]),d.jsxs("div",{className:`flex items-start gap-3 p-4 border rounded-lg shadow-lg ${o.container}`,role:"alert","aria-live":"polite",children:[d.jsxs("div",{className:`flex-shrink-0 ${o.icon}`,children:[r.type==="success"&&d.jsx($y,{}),r.type==="error"&&d.jsx(By,{}),r.type==="info"&&d.jsx(Qy,{})]}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:`text-sm font-medium ${o.title}`,children:r.title}),r.message&&d.jsx("p",{className:`mt-1 text-sm ${o.message}`,children:r.message})]}),d.jsx("button",{type:"button",onClick:()=>i(r.id),className:"flex-shrink-0 text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Dismiss",children:d.jsx(Wy,{})})]})}function $y(){return d.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}function By(){return d.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}function Qy(){return d.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}function Wy(){return d.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function Hy({toasts:r,onDismiss:i}){return r.length===0?null:d.jsx("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2 max-w-sm",children:r.map(o=>d.jsx(Uy,{toast:o,onDismiss:i},o.id))})}const nm=k.createContext(null);function qy({children:r}){const[i,o]=k.useState([]),s=k.useCallback(p=>{const m=`${Date.now()}-${Math.random().toString(36).slice(2,9)}`;o(h=>[...h,{...p,id:m}])},[]),c=k.useCallback(p=>{o(m=>m.filter(h=>h.id!==p))},[]);return d.jsxs(nm.Provider,{value:{addToast:s,removeToast:c},children:[r,d.jsx(Hy,{toasts:i,onDismiss:c})]})}function al(){const r=k.useContext(nm);if(!r)throw new Error("useToast must be used within a ToastProvider");return r}const Vy="/api/v1/config",Ky=3e4;async function _a(r,i,o=Ky){const s=new AbortController,c=setTimeout(()=>s.abort(),o);try{const p=await fetch(`${Vy}${r}`,{headers:{"Content-Type":"application/json",...i==null?void 0:i.headers},...i,signal:s.signal}),m=await p.json();if(!p.ok)throw new Error(m.error||"Request failed");return m}catch(p){throw p instanceof Error&&p.name==="AbortError"?new Error("Request timed out"):p}finally{clearTimeout(c)}}async function Gy(){return _a("/current")}async function Yy(){return(await _a("/databases")).databases}async function Xy(r){return(await _a("/databases/switch",{method:"POST",body:JSON.stringify({dbPath:r})})).config}async function Jy(r,i){return(await _a("/databases/create",{method:"POST",body:JSON.stringify({dbPath:r,name:i})})).config}async function Zy(r){return(await _a("/databases/scan",{method:"POST",body:JSON.stringify({scanPath:r})})).databases}function rm(){const{data:r,isLoading:i,error:o,refetch:s}=nl({queryKey:["config","current"],queryFn:Gy});return{config:r,isLoading:i,error:o,refetch:s}}function ex(){const{data:r,isLoading:i,error:o,refetch:s}=nl({queryKey:["config","databases"],queryFn:Yy});return{databases:r||[],isLoading:i,error:o,refetch:s}}function tx(){const r=bi(),{addToast:i}=al(),o=Lr({mutationFn:s=>Xy(s),onSuccess:(s,c)=>{r.invalidateQueries({queryKey:["config"]}),r.invalidateQueries({queryKey:["files"]}),r.invalidateQueries({queryKey:["status"]}),i({type:"success",title:"Database switched",message:`Now using ${c.split("/").pop()||c}`})},onError:s=>{i({type:"error",title:"Failed to switch database",message:s.message})}});return{switchDatabase:o.mutate,switchDatabaseAsync:o.mutateAsync,isLoading:o.isPending,error:o.error,isSuccess:o.isSuccess}}function nx(){const r=bi(),{addToast:i}=al(),o=Lr({mutationFn:({dbPath:s,name:c})=>Jy(s,c),onSuccess:(s,c)=>{r.invalidateQueries({queryKey:["config"]}),r.invalidateQueries({queryKey:["files"]}),r.invalidateQueries({queryKey:["status"]}),i({type:"success",title:"Database created",message:`Created and switched to ${c.dbPath.split("/").pop()||c.dbPath}`})},onError:s=>{i({type:"error",title:"Failed to create database",message:s.message})}});return{createDatabase:o.mutate,createDatabaseAsync:o.mutateAsync,isLoading:o.isPending,error:o.error,isSuccess:o.isSuccess}}function rx(){const{addToast:r}=al(),i=Lr({mutationFn:o=>Zy(o),onError:o=>{r({type:"error",title:"Scan failed",message:o.message})}});return{scan:i.mutate,scanAsync:i.mutateAsync,isLoading:i.isPending,error:i.error,data:i.data,reset:i.reset}}const im="/api/v1",ix=3e4,ax=3e5;async function Da(r,i,o=ix){const s=new AbortController,c=setTimeout(()=>s.abort(),o);try{const p=await fetch(`${im}${r}`,{headers:{"Content-Type":"application/json",...i==null?void 0:i.headers},...i,signal:s.signal}),m=await p.json();if(!p.ok)throw new Error(m.error||"Request failed");return m}catch(p){throw p instanceof Error&&p.name==="AbortError"?new Error("Request timed out"):p}finally{clearTimeout(c)}}async function ox(r,i){return(await Da("/search",{method:"POST",body:JSON.stringify({query:r,limit:i})})).results}async function lx(r){const i=new AbortController,o=setTimeout(()=>i.abort(),ax);try{const s=new FormData;s.append("file",r);const c=await fetch(`${im}/files/upload`,{method:"POST",body:s,signal:i.signal}),p=await c.json();if(!c.ok)throw new Error(p.error||"Upload failed");return p}catch(s){throw s instanceof Error&&s.name==="AbortError"?new Error("Upload timed out"):s}finally{clearTimeout(o)}}async function sx(r,i,o){return Da("/data",{method:"POST",body:JSON.stringify({content:r,metadata:{source:i,format:o}})})}async function ux(){return(await Da("/files")).files}async function cx(r){await Da("/files",{method:"DELETE",body:JSON.stringify(r)})}async function dx(){return Da("/status")}function px(){const r=bi(),{addToast:i}=al(),{data:o=[],isLoading:s,error:c}=nl({queryKey:["files"],queryFn:ux}),p=Lr({mutationFn:cx,onSuccess:()=>{r.invalidateQueries({queryKey:["files"]}),i({type:"success",title:"File deleted",message:"The file has been removed from the knowledge base."})},onError:m=>{i({type:"error",title:"Failed to delete file",message:m.message})}});return{files:o,isLoading:s,error:c,deleteFile:p.mutate,isDeleting:p.isPending}}function fx(){const[r,i]=k.useState([]),[o,s]=k.useState(!1),c=Lr({mutationFn:({query:h,limit:y})=>ox(h,y),onSuccess:h=>{i(h),s(!0)}});return{results:r,search:(h,y)=>{c.mutate({query:h,limit:y})},clear:()=>{i([]),s(!1)},isLoading:c.isPending,error:c.error,hasSearched:o}}function mx(){const{data:r,isLoading:i,error:o,refetch:s}=nl({queryKey:["status"],queryFn:dx,refetchInterval:3e4});return{status:r,isLoading:i,error:o,refetch:s}}function hx(){const r=bi(),i=Lr({mutationFn:lx,onSuccess:()=>{r.invalidateQueries({queryKey:["files"]})}}),o=Lr({mutationFn:({content:s,source:c,format:p})=>sx(s,c,p),onSuccess:()=>{r.invalidateQueries({queryKey:["files"]})}});return{uploadFile:i.mutate,ingestData:o.mutate,isUploading:i.isPending,isIngesting:o.isPending,uploadError:i.error,ingestError:o.error,uploadResult:i.data,ingestResult:o.data,reset:()=>{i.reset(),o.reset()}}}function vx(){const{config:r}=rm();return d.jsx("header",{className:"bg-white border-b border-gray-200 px-6 py-4",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-xl font-semibold text-gray-900",children:"MCP Local RAG"}),d.jsxs("div",{className:"flex items-center gap-4",children:[r&&d.jsxs(Iu,{to:"/settings",className:"flex items-center gap-2 px-3 py-1.5 text-sm text-gray-600 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors",title:r.dbPath,children:[d.jsx(gx,{className:"w-4 h-4 text-green-500"}),d.jsx("span",{className:"font-medium",children:r.name}),d.jsx("span",{className:"text-gray-400",children:"|"}),d.jsxs("span",{children:[r.documentCount," docs"]})]}),d.jsx("span",{className:"text-sm text-gray-500",children:"Local Document Search"})]})]})})}function gx({className:r}){return d.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"})})}const yx=[{to:"/",label:"Search",icon:wx},{to:"/upload",label:"Upload",icon:kx},{to:"/files",label:"Files",icon:Sx},{to:"/status",label:"Status",icon:jx},{to:"/settings",label:"Settings",icon:Ex}];function xx(){return d.jsx("aside",{className:"w-56 bg-white border-r border-gray-200 p-4",children:d.jsx("nav",{className:"space-y-1",children:yx.map(r=>d.jsxs(em,{to:r.to,className:({isActive:i})=>`flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-colors ${i?"bg-blue-50 text-blue-700":"text-gray-700 hover:bg-gray-50"}`,children:[d.jsx(r.icon,{className:"w-5 h-5"}),r.label]},r.to))})})}function wx({className:r}){return d.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function kx({className:r}){return d.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}function Sx({className:r}){return d.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})})}function jx({className:r}){return d.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})}function Ex({className:r}){return d.jsxs("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}function bx({children:r}){return d.jsxs("div",{className:"min-h-screen flex flex-col",children:[d.jsx(vx,{}),d.jsxs("div",{className:"flex flex-1",children:[d.jsx(xx,{}),d.jsx("main",{className:"flex-1 p-6 overflow-auto",children:r})]})]})}function Cx({file:r,onDelete:i,isDeleting:o}){const[s,c]=k.useState(!1),p=r.source||r.filePath.split(/[/\\]/).pop()||r.filePath,m=r.filePath.includes("raw-data"),h=()=>{r.source?i({source:r.source}):i({filePath:r.filePath}),c(!1)};return d.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4 flex items-center justify-between gap-4",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("h3",{className:"font-medium text-gray-900 truncate",title:r.source||r.filePath,children:p}),d.jsxs("div",{className:"flex items-center gap-4 mt-1 text-sm text-gray-500",children:[d.jsxs("span",{children:[r.chunkCount," chunks"]}),m&&d.jsx("span",{className:"text-blue-600",children:"Ingested content"})]}),r.source&&d.jsx("p",{className:"text-xs text-gray-400 truncate mt-1",title:r.filePath,children:r.filePath})]}),d.jsx("div",{className:"flex items-center gap-2",children:s?d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:h,disabled:o,className:"px-3 py-1.5 text-sm bg-red-600 text-white rounded-lg hover:bg-red-700 disabled:opacity-50 transition-colors",children:"Confirm"}),d.jsx("button",{type:"button",onClick:()=>c(!1),disabled:o,className:"px-3 py-1.5 text-sm text-gray-600 bg-gray-100 rounded-lg hover:bg-gray-200 transition-colors",children:"Cancel"})]}):d.jsx("button",{type:"button",onClick:()=>c(!0),className:"px-3 py-1.5 text-sm text-red-600 hover:bg-red-50 rounded-lg transition-colors",children:"Delete"})})]})}function Nx({files:r,onDelete:i,isDeleting:o}){return r.length===0?d.jsxs("div",{className:"text-center py-12 text-gray-500",children:[d.jsx("p",{children:"No files ingested yet."}),d.jsx("p",{className:"text-sm mt-1",children:"Upload a file or paste content to get started."})]}):d.jsx("div",{className:"space-y-2",children:r.map(s=>d.jsx(Cx,{file:s,onDelete:i,isDeleting:o},s.filePath))})}function Px(){const{files:r,isLoading:i,error:o,deleteFile:s,isDeleting:c}=px();return d.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Ingested Files"}),d.jsx("p",{className:"text-gray-600",children:"Manage your knowledge base content."})]}),r.length>0&&d.jsxs("span",{className:"text-sm text-gray-500",children:[r.length," file",r.length!==1?"s":""]})]}),i?d.jsxs("div",{className:"flex items-center justify-center py-12",children:[d.jsx(nr,{className:"text-gray-400"}),d.jsx("span",{className:"ml-3 text-gray-500",children:"Loading files..."})]}):o?d.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 text-red-700",children:[d.jsx("p",{className:"font-medium",children:"Error loading files"}),d.jsx("p",{className:"text-sm",children:o.message})]}):d.jsx(Nx,{files:r,onDelete:s,isDeleting:c})]})}function Rx({result:r,isOpen:i,onClose:o}){const[s,c]=k.useState(!1),p=r.source||r.filePath,m=k.useRef(null);k.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const h=async()=>{try{await navigator.clipboard.writeText(r.text),c(!0),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>c(!1),2e3)}catch{}};return d.jsx(My,{isOpen:i,onClose:o,title:"Document Preview",children:d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-4 p-4 bg-gray-50 rounded-lg text-sm",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-500",children:"Source:"}),d.jsx("p",{className:"font-medium text-gray-900 break-all",children:p})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-500",children:"Chunk:"}),d.jsxs("p",{className:"font-medium text-gray-900",children:["#",r.chunkIndex]})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-500",children:"Score:"}),d.jsx("p",{className:"font-medium text-gray-900",children:r.score.toFixed(4)})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-500",children:"File Path:"}),d.jsx("p",{className:"font-medium text-gray-900 break-all truncate",title:r.filePath,children:r.filePath})]})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-700",children:"Content"}),d.jsx("button",{type:"button",onClick:h,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-gray-600 bg-gray-100 rounded hover:bg-gray-200 transition-colors",children:s?d.jsxs(d.Fragment,{children:[d.jsx(Dx,{}),"Copied"]}):d.jsxs(d.Fragment,{children:[d.jsx(_x,{}),"Copy"]})})]}),d.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded-lg",children:d.jsx("p",{className:"text-sm text-gray-700 whitespace-pre-wrap",children:r.text})})]})]})})}function _x(){return d.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}function Dx(){return d.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}function Tx({onSearch:r,isLoading:i}){const[o,s]=k.useState(""),[c,p]=k.useState(10),m=h=>{h.preventDefault(),o.trim()&&r(o.trim(),c)};return d.jsxs("form",{onSubmit:m,className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"query",className:"block text-sm font-medium text-gray-700 mb-1",children:"Search Query"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{type:"text",id:"query",value:o,onChange:h=>s(h.target.value),placeholder:"Enter your search query...",className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none",disabled:i}),d.jsx("button",{type:"submit",disabled:i||!o.trim(),className:"px-6 py-2 bg-blue-600 text-white font-medium rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:i?"Searching...":"Search"})]})]}),d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("label",{htmlFor:"limit",className:"text-sm text-gray-600",children:"Results limit:"}),d.jsxs("select",{id:"limit",value:c,onChange:h=>p(Number(h.target.value)),className:"px-3 py-1.5 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none",children:[d.jsx("option",{value:5,children:"5"}),d.jsx("option",{value:10,children:"10"}),d.jsx("option",{value:20,children:"20"}),d.jsx("option",{value:50,children:"50"})]})]})]})}function Ox({results:r,hasSearched:i}){const[o,s]=k.useState(null);return i?r.length===0?d.jsx(zy,{icon:d.jsx(Fx,{}),title:"No results found",description:"Try different keywords or a broader query."}):d.jsxs("div",{className:"space-y-4",children:[d.jsxs("h2",{className:"text-lg font-medium text-gray-900",children:["Results (",r.length,")"]}),d.jsx("div",{className:"space-y-3",children:r.map((c,p)=>d.jsx(Lx,{result:c,rank:p+1,onView:()=>s(c)},`${c.filePath}-${c.chunkIndex}`))}),o&&d.jsx(Rx,{result:o,isOpen:!0,onClose:()=>s(null)})]}):null}function Lx({result:r,rank:i,onView:o}){const s=r.source||r.filePath,c=Ix(r.score);return d.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow",children:[d.jsxs("div",{className:"flex items-start justify-between gap-4 mb-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("span",{className:"text-sm font-medium text-gray-400",children:["#",i]}),d.jsx("h3",{className:"font-medium text-gray-900 truncate",title:s,children:zx(s)})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:`px-2 py-0.5 text-xs font-medium rounded-full ${c}`,title:`Distance score: ${r.score.toFixed(4)}`,children:Mx(r.score)}),d.jsx("button",{type:"button",onClick:o,className:"px-2 py-1 text-xs font-medium text-blue-600 hover:text-blue-800 hover:bg-blue-50 rounded transition-colors",children:"View"})]})]}),d.jsx("p",{className:"text-sm text-gray-600 whitespace-pre-wrap line-clamp-4",children:r.text}),d.jsxs("div",{className:"mt-2 flex items-center gap-3 text-xs text-gray-400",children:[d.jsxs("span",{children:["Chunk #",r.chunkIndex]}),r.source&&d.jsx("span",{className:"truncate",title:r.filePath,children:r.filePath.split("/").pop()})]})]})}function Fx(){return d.jsx("svg",{className:"h-12 w-12",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function zx(r){if(r.startsWith("/")||r.includes("\\"))return r.split(/[/\\]/).pop()||r;if(r.startsWith("http"))try{const i=new URL(r);return i.hostname+i.pathname.slice(0,30)+(i.pathname.length>30?"...":"")}catch{return`${r.slice(0,40)}...`}return r}function Mx(r){return r<.3?"Excellent":r<.5?"Good":r<.7?"Fair":"Low"}function Ix(r){return r<.3?"bg-green-100 text-green-800":r<.5?"bg-blue-100 text-blue-800":r<.7?"bg-yellow-100 text-yellow-800":"bg-gray-100 text-gray-800"}function Ax(){const{results:r,search:i,isLoading:o,error:s,hasSearched:c}=fx();return d.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Search Documents"}),d.jsx("p",{className:"text-gray-600",children:"Search through your ingested documents using semantic and keyword matching."})]}),d.jsx("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:d.jsx(Tx,{onSearch:i,isLoading:o})}),s&&d.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 text-red-700",children:[d.jsx("p",{className:"font-medium",children:"Search Error"}),d.jsx("p",{className:"text-sm",children:s.message})]}),!o&&!c&&!s&&d.jsx("div",{className:"text-center py-12 text-gray-500",children:d.jsx("p",{children:"Enter a search query to find relevant documents."})}),d.jsx(Ox,{results:r,hasSearched:c&&!o})]})}function Ux({onCreate:r,isLoading:i,error:o}){const[s,c]=k.useState(""),[p,m]=k.useState(!1),h=y=>{y.preventDefault(),s.trim()&&(r(s.trim()),c(""),m(!1))};return d.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[d.jsx("div",{className:"p-2 bg-purple-50 rounded-lg",children:d.jsx($x,{className:"w-6 h-6 text-purple-600"})}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"Create Database"}),d.jsx("p",{className:"text-sm text-gray-500",children:"Create a new RAG database"})]})]}),p?d.jsxs("form",{onSubmit:h,className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"dbPath",className:"block text-sm font-medium text-gray-700 mb-1",children:"Database Path"}),d.jsx("input",{type:"text",id:"dbPath",value:s,onChange:y=>c(y.target.value),placeholder:"/path/to/new-database",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent",disabled:i}),d.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Enter the full path where you want to create the database"})]}),o&&d.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3 text-sm text-red-700",children:o.message}),d.jsxs("div",{className:"flex gap-3",children:[d.jsx("button",{type:"submit",disabled:i||!s.trim(),className:"flex-1 px-4 py-2 text-sm font-medium text-white bg-purple-600 rounded-lg hover:bg-purple-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:i?d.jsxs("span",{className:"flex items-center justify-center gap-2",children:[d.jsx(nr,{size:"sm"}),"Creating..."]}):"Create Database"}),d.jsx("button",{type:"button",onClick:()=>{m(!1),c("")},disabled:i,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded-lg hover:bg-gray-200 disabled:opacity-50 transition-colors",children:"Cancel"})]})]}):d.jsx("button",{type:"button",onClick:()=>m(!0),className:"w-full px-4 py-3 text-sm font-medium text-purple-700 bg-purple-50 border border-purple-200 rounded-lg hover:bg-purple-100 transition-colors",children:"+ Create New Database"})]})}function $x({className:r}){return d.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}function Bx({config:r}){return d.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[d.jsx("div",{className:"p-2 bg-green-50 rounded-lg",children:d.jsx(Qx,{className:"w-6 h-6 text-green-600"})}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"Current Database"}),d.jsx("p",{className:"text-sm text-gray-500",children:"Active RAG database"})]})]}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex justify-between items-center py-2 border-b border-gray-100",children:[d.jsx("span",{className:"text-gray-500",children:"Name"}),d.jsx("span",{className:"font-medium text-gray-900",children:r.name})]}),d.jsxs("div",{className:"flex justify-between items-center py-2 border-b border-gray-100",children:[d.jsx("span",{className:"text-gray-500",children:"Path"}),d.jsx("span",{className:"font-mono text-sm text-gray-900 max-w-xs truncate",title:r.dbPath,children:r.dbPath})]}),d.jsxs("div",{className:"flex justify-between items-center py-2 border-b border-gray-100",children:[d.jsx("span",{className:"text-gray-500",children:"Model"}),d.jsx("span",{className:"font-mono text-sm text-gray-900",children:r.modelName})]}),d.jsxs("div",{className:"flex justify-between items-center py-2 border-b border-gray-100",children:[d.jsx("span",{className:"text-gray-500",children:"Documents"}),d.jsx("span",{className:"font-medium text-gray-900",children:r.documentCount})]}),d.jsxs("div",{className:"flex justify-between items-center py-2",children:[d.jsx("span",{className:"text-gray-500",children:"Chunks"}),d.jsx("span",{className:"font-medium text-gray-900",children:r.chunkCount})]})]})]})}function Qx({className:r}){return d.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"})})}function Wx(r){const i=new Date(r),s=new Date().getTime()-i.getTime();if(s<6e4)return"Just now";if(s<36e5){const c=Math.floor(s/6e4);return`${c} minute${c>1?"s":""} ago`}if(s<864e5){const c=Math.floor(s/36e5);return`${c} hour${c>1?"s":""} ago`}if(s<6048e5){const c=Math.floor(s/864e5);return`${c} day${c>1?"s":""} ago`}return i.toLocaleDateString()}function Hx(r){const i=Math.floor(r/86400),o=Math.floor(r%86400/3600),s=Math.floor(r%3600/60),c=Math.floor(r%60),p=[];return i>0&&p.push(`${i}d`),o>0&&p.push(`${o}h`),s>0&&p.push(`${s}m`),(c>0||p.length===0)&&p.push(`${c}s`),p.join(" ")}function qx(r){if(r===0)return"0 B";const i=["B","KB","MB","GB","TB"],o=1024,s=Math.floor(Math.log(r)/Math.log(o));return`${(r/o**s).toFixed(s===0?0:1)} ${i[s]}`}function Vx({databases:r,currentDbPath:i,onSwitch:o,isLoading:s}){const[c,p]=k.useState(null),m=y=>{p(y),o(y)},h=r.filter(y=>y.path!==i);return h.length===0?d.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[d.jsx("div",{className:"p-2 bg-blue-50 rounded-lg",children:d.jsx(Xp,{className:"w-6 h-6 text-blue-600"})}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"Recent Databases"}),d.jsx("p",{className:"text-sm text-gray-500",children:"Switch between databases"})]})]}),d.jsx("p",{className:"text-gray-500 text-sm",children:"No other databases available. Create a new database or scan for existing ones."})]}):d.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[d.jsx("div",{className:"p-2 bg-blue-50 rounded-lg",children:d.jsx(Xp,{className:"w-6 h-6 text-blue-600"})}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"Recent Databases"}),d.jsx("p",{className:"text-sm text-gray-500",children:"Switch between databases"})]})]}),d.jsx("div",{className:"space-y-2",children:h.map(y=>d.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"font-medium text-gray-900",children:y.name}),d.jsx("p",{className:"text-sm text-gray-500 font-mono truncate max-w-xs",title:y.path,children:y.path}),d.jsxs("p",{className:"text-xs text-gray-400",children:["Last used: ",Wx(y.lastAccessed)]})]}),d.jsx("button",{type:"button",onClick:()=>m(y.path),disabled:s,className:"ml-4 px-4 py-2 text-sm font-medium text-blue-700 bg-blue-50 border border-blue-200 rounded-lg hover:bg-blue-100 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:s&&c===y.path?d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx(nr,{size:"sm"}),"Switching..."]}):"Switch"})]},y.path))})]})}function Xp({className:r}){return d.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})}function Kx({onScan:r,onSwitch:i,isScanning:o,isSwitching:s,scanResults:c,error:p,onReset:m}){const[h,y]=k.useState(""),[C,E]=k.useState(null),S=L=>{L.preventDefault(),h.trim()&&r(h.trim())},R=L=>{E(L),i(L)},D=()=>{y(""),m()};return d.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[d.jsx("div",{className:"p-2 bg-amber-50 rounded-lg",children:d.jsx(Gx,{className:"w-6 h-6 text-amber-600"})}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"Scan for Databases"}),d.jsx("p",{className:"text-sm text-gray-500",children:"Find existing RAG databases"})]})]}),d.jsx("form",{onSubmit:S,className:"space-y-4",children:d.jsxs("div",{children:[d.jsx("label",{htmlFor:"scanPath",className:"block text-sm font-medium text-gray-700 mb-1",children:"Directory to Scan"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{type:"text",id:"scanPath",value:h,onChange:L=>y(L.target.value),placeholder:"/path/to/scan",className:"flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-transparent",disabled:o}),d.jsx("button",{type:"submit",disabled:o||!h.trim(),className:"px-4 py-2 text-sm font-medium text-white bg-amber-600 rounded-lg hover:bg-amber-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:o?d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx(nr,{size:"sm"}),"Scanning..."]}):"Scan"})]}),d.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Searches the directory and one level of subdirectories"})]})}),p&&d.jsx("div",{className:"mt-4 bg-red-50 border border-red-200 rounded-lg p-3 text-sm text-red-700",children:p.message}),c&&d.jsxs("div",{className:"mt-4 space-y-2",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("h3",{className:"text-sm font-medium text-gray-700",children:["Found ",c.length," database",c.length!==1?"s":""]}),d.jsx("button",{type:"button",onClick:D,className:"text-sm text-gray-500 hover:text-gray-700",children:"Clear results"})]}),c.length===0?d.jsx("p",{className:"text-sm text-gray-500 py-2",children:"No databases found in this directory."}):d.jsx("div",{className:"space-y-2",children:c.map(L=>d.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("p",{className:"font-medium text-gray-900",children:L.name}),L.isKnown&&d.jsx("span",{className:"px-2 py-0.5 text-xs font-medium text-green-700 bg-green-100 rounded-full",children:"Known"})]}),d.jsx("p",{className:"text-sm text-gray-500 font-mono truncate max-w-xs",title:L.path,children:L.path})]}),d.jsx("button",{type:"button",onClick:()=>R(L.path),disabled:s,className:"ml-4 px-4 py-2 text-sm font-medium text-amber-700 bg-amber-50 border border-amber-200 rounded-lg hover:bg-amber-100 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:s&&C===L.path?d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx(nr,{size:"sm"}),"Switching..."]}):"Use"})]},L.path))})]})]})}function Gx({className:r}){return d.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function Yx(){const{config:r,isLoading:i,error:o,refetch:s}=rm(),{databases:c,isLoading:p}=ex(),{switchDatabase:m,isLoading:h}=tx(),{createDatabase:y,isLoading:C,error:E}=nx(),{scan:S,isLoading:R,data:D,error:L,reset:T}=rx(),_=M=>{m(M)},$=M=>{y({dbPath:M})},H=M=>{S(M)};return d.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Settings"}),d.jsx("p",{className:"text-gray-600",children:"Manage your RAG database configuration."})]}),d.jsx("button",{type:"button",onClick:()=>s(),disabled:i,className:"px-4 py-2 text-sm text-gray-600 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 disabled:opacity-50 transition-colors",children:i?"Refreshing...":"Refresh"})]}),i&&!r?d.jsxs("div",{className:"flex items-center justify-center py-12",children:[d.jsx(nr,{className:"text-gray-400"}),d.jsx("span",{className:"ml-3 text-gray-500",children:"Loading configuration..."})]}):o?d.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 text-red-700",children:[d.jsx("p",{className:"font-medium",children:"Error loading configuration"}),d.jsx("p",{className:"text-sm",children:o.message})]}):d.jsxs("div",{className:"space-y-6",children:[r&&d.jsx(Bx,{config:r}),!p&&d.jsx(Vx,{databases:c,currentDbPath:r==null?void 0:r.dbPath,onSwitch:_,isLoading:h}),d.jsx(Ux,{onCreate:$,isLoading:C,error:E}),d.jsx(Kx,{onScan:H,onSwitch:_,isScanning:R,isSwitching:h,scanResults:D,error:L,onReset:T})]})]})}function Xx({status:r}){const i=[{label:"Documents",value:r.documentCount.toString(),icon:Jx},{label:"Chunks",value:r.chunkCount.toString(),icon:Zx},{label:"Memory Usage",value:qx(r.memoryUsage*1024*1024),icon:e0}];return d.jsxs("div",{className:"space-y-6",children:[d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:i.map(o=>d.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 bg-blue-50 rounded-lg",children:d.jsx(o.icon,{className:"w-6 h-6 text-blue-600"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm text-gray-500",children:o.label}),d.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:o.value})]})]})},o.label))}),d.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[d.jsx("h2",{className:"text-lg font-medium text-gray-900 mb-4",children:"System Info"}),d.jsxs("dl",{className:"space-y-3",children:[d.jsxs("div",{className:"flex justify-between",children:[d.jsx("dt",{className:"text-gray-500",children:"Search Mode"}),d.jsx("dd",{className:"text-gray-900 font-mono text-sm",children:r.searchMode})]}),d.jsxs("div",{className:"flex justify-between",children:[d.jsx("dt",{className:"text-gray-500",children:"FTS Index"}),d.jsx("dd",{className:"text-gray-900 font-mono text-sm",children:r.ftsIndexEnabled?"Enabled":"Disabled"})]}),d.jsxs("div",{className:"flex justify-between",children:[d.jsx("dt",{className:"text-gray-500",children:"Uptime"}),d.jsx("dd",{className:"text-gray-900 font-mono text-sm",children:Hx(r.uptime)})]})]})]})]})}function Jx({className:r}){return d.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}function Zx({className:r}){return d.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function e0({className:r}){return d.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"})})}function t0(){const{status:r,isLoading:i,error:o,refetch:s}=mx();return d.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"System Status"}),d.jsx("p",{className:"text-gray-600",children:"Monitor your RAG system metrics and configuration."})]}),d.jsx("button",{type:"button",onClick:()=>s(),disabled:i,className:"px-4 py-2 text-sm text-gray-600 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 disabled:opacity-50 transition-colors",children:i?"Refreshing...":"Refresh"})]}),i&&!r?d.jsxs("div",{className:"flex items-center justify-center py-12",children:[d.jsx(nr,{className:"text-gray-400"}),d.jsx("span",{className:"ml-3 text-gray-500",children:"Loading status..."})]}):o?d.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 text-red-700",children:[d.jsx("p",{className:"font-medium",children:"Error loading status"}),d.jsx("p",{className:"text-sm",children:o.message})]}):r?d.jsx(Xx,{status:r}):null]})}function n0({onIngest:r,isIngesting:i}){const[o,s]=k.useState(""),[c,p]=k.useState(""),[m,h]=k.useState("text"),y=E=>{E.preventDefault(),o.trim()&&c.trim()&&r(o.trim(),c.trim(),m)},C=()=>{const E=new Date().toISOString().split("T")[0];p(m==="html"?`page://${E}`:m==="markdown"?`note://${E}`:`clipboard://${E}`)};return d.jsxs("form",{onSubmit:y,className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"source",className:"block text-sm font-medium text-gray-700 mb-1",children:"Source Identifier"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{type:"text",id:"source",value:c,onChange:E=>p(E.target.value),placeholder:"e.g., https://example.com or clipboard://2024-01-15",className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none",disabled:i}),d.jsx("button",{type:"button",onClick:C,className:"px-3 py-2 text-sm text-gray-600 bg-gray-100 rounded-lg hover:bg-gray-200 transition-colors",children:"Generate"})]})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"format",className:"block text-sm font-medium text-gray-700 mb-1",children:"Content Format"}),d.jsxs("select",{id:"format",value:m,onChange:E=>h(E.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none",disabled:i,children:[d.jsx("option",{value:"text",children:"Plain Text"}),d.jsx("option",{value:"html",children:"HTML"}),d.jsx("option",{value:"markdown",children:"Markdown"})]})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"content",className:"block text-sm font-medium text-gray-700 mb-1",children:"Content"}),d.jsx("textarea",{id:"content",value:o,onChange:E=>s(E.target.value),placeholder:"Paste your content here...",rows:10,className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none resize-y",disabled:i})]}),d.jsx("button",{type:"submit",disabled:i||!o.trim()||!c.trim(),className:"w-full px-6 py-2 bg-blue-600 text-white font-medium rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:i?"Ingesting...":"Ingest Content"})]})}var Zs={exports:{}},eu,Jp;function r0(){if(Jp)return eu;Jp=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return eu=r,eu}var tu,Zp;function i0(){if(Zp)return tu;Zp=1;var r=r0();function i(){}function o(){}return o.resetWarningCache=i,tu=function(){function s(m,h,y,C,E,S){if(S!==r){var R=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw R.name="Invariant Violation",R}}s.isRequired=s;function c(){return s}var p={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:c,element:s,elementType:s,instanceOf:c,node:s,objectOf:c,oneOf:c,oneOfType:c,shape:c,exact:c,checkPropTypes:o,resetWarningCache:i};return p.PropTypes=p,p},tu}var ef;function a0(){return ef||(ef=1,Zs.exports=i0()()),Zs.exports}var o0=a0();const Ce=Cu(o0);function zr(r,i,o,s){function c(p){return p instanceof o?p:new o(function(m){m(p)})}return new(o||(o=Promise))(function(p,m){function h(E){try{C(s.next(E))}catch(S){m(S)}}function y(E){try{C(s.throw(E))}catch(S){m(S)}}function C(E){E.done?p(E.value):c(E.value).then(h,y)}C((s=s.apply(r,i||[])).next())})}const l0=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function ji(r,i,o){const s=s0(r),{webkitRelativePath:c}=r,p=typeof i=="string"?i:typeof c=="string"&&c.length>0?c:`./${r.name}`;return typeof s.path!="string"&&tf(s,"path",p),tf(s,"relativePath",p),s}function s0(r){const{name:i}=r;if(i&&i.lastIndexOf(".")!==-1&&!r.type){const s=i.split(".").pop().toLowerCase(),c=l0.get(s);c&&Object.defineProperty(r,"type",{value:c,writable:!1,configurable:!1,enumerable:!0})}return r}function tf(r,i,o){Object.defineProperty(r,i,{value:o,writable:!1,configurable:!1,enumerable:!0})}const u0=[".DS_Store","Thumbs.db"];function c0(r){return zr(this,void 0,void 0,function*(){return Zo(r)&&d0(r.dataTransfer)?h0(r.dataTransfer,r.type):p0(r)?f0(r):Array.isArray(r)&&r.every(i=>"getFile"in i&&typeof i.getFile=="function")?m0(r):[]})}function d0(r){return Zo(r)}function p0(r){return Zo(r)&&Zo(r.target)}function Zo(r){return typeof r=="object"&&r!==null}function f0(r){return wu(r.target.files).map(i=>ji(i))}function m0(r){return zr(this,void 0,void 0,function*(){return(yield Promise.all(r.map(o=>o.getFile()))).map(o=>ji(o))})}function h0(r,i){return zr(this,void 0,void 0,function*(){if(r.items){const o=wu(r.items).filter(c=>c.kind==="file");if(i!=="drop")return o;const s=yield Promise.all(o.map(v0));return nf(am(s))}return nf(wu(r.files).map(o=>ji(o)))})}function nf(r){return r.filter(i=>u0.indexOf(i.name)===-1)}function wu(r){if(r===null)return[];const i=[];for(let o=0;o<r.length;o++){const s=r[o];i.push(s)}return i}function v0(r){if(typeof r.webkitGetAsEntry!="function")return rf(r);const i=r.webkitGetAsEntry();return i&&i.isDirectory?om(i):rf(r,i)}function am(r){return r.reduce((i,o)=>[...i,...Array.isArray(o)?am(o):[o]],[])}function rf(r,i){return zr(this,void 0,void 0,function*(){var o;if(globalThis.isSecureContext&&typeof r.getAsFileSystemHandle=="function"){const p=yield r.getAsFileSystemHandle();if(p===null)throw new Error(`${r} is not a File`);if(p!==void 0){const m=yield p.getFile();return m.handle=p,ji(m)}}const s=r.getAsFile();if(!s)throw new Error(`${r} is not a File`);return ji(s,(o=i==null?void 0:i.fullPath)!==null&&o!==void 0?o:void 0)})}function g0(r){return zr(this,void 0,void 0,function*(){return r.isDirectory?om(r):y0(r)})}function om(r){const i=r.createReader();return new Promise((o,s)=>{const c=[];function p(){i.readEntries(m=>zr(this,void 0,void 0,function*(){if(m.length){const h=Promise.all(m.map(g0));c.push(h),p()}else try{const h=yield Promise.all(c);o(h)}catch(h){s(h)}}),m=>{s(m)})}p()})}function y0(r){return zr(this,void 0,void 0,function*(){return new Promise((i,o)=>{r.file(s=>{const c=ji(s,r.fullPath);i(c)},s=>{o(s)})})})}var Ho={},af;function x0(){return af||(af=1,Ho.__esModule=!0,Ho.default=function(r,i){if(r&&i){var o=Array.isArray(i)?i:i.split(",");if(o.length===0)return!0;var s=r.name||"",c=(r.type||"").toLowerCase(),p=c.replace(/\/.*$/,"");return o.some(function(m){var h=m.trim().toLowerCase();return h.charAt(0)==="."?s.toLowerCase().endsWith(h):h.endsWith("/*")?p===h.replace(/\/.*$/,""):c===h})}return!0}),Ho}var w0=x0();const nu=Cu(w0);function of(r){return j0(r)||S0(r)||sm(r)||k0()}function k0(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
52
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S0(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function j0(r){if(Array.isArray(r))return ku(r)}function lf(r,i){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);i&&(s=s.filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable})),o.push.apply(o,s)}return o}function sf(r){for(var i=1;i<arguments.length;i++){var o=arguments[i]!=null?arguments[i]:{};i%2?lf(Object(o),!0).forEach(function(s){lm(r,s,o[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):lf(Object(o)).forEach(function(s){Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(o,s))})}return r}function lm(r,i,o){return i in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o,r}function ka(r,i){return C0(r)||b0(r,i)||sm(r,i)||E0()}function E0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
53
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sm(r,i){if(r){if(typeof r=="string")return ku(r,i);var o=Object.prototype.toString.call(r).slice(8,-1);if(o==="Object"&&r.constructor&&(o=r.constructor.name),o==="Map"||o==="Set")return Array.from(r);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return ku(r,i)}}function ku(r,i){(i==null||i>r.length)&&(i=r.length);for(var o=0,s=new Array(i);o<i;o++)s[o]=r[o];return s}function b0(r,i){var o=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(o!=null){var s=[],c=!0,p=!1,m,h;try{for(o=o.call(r);!(c=(m=o.next()).done)&&(s.push(m.value),!(i&&s.length===i));c=!0);}catch(y){p=!0,h=y}finally{try{!c&&o.return!=null&&o.return()}finally{if(p)throw h}}return s}}function C0(r){if(Array.isArray(r))return r}var N0=typeof nu=="function"?nu:nu.default,P0="file-invalid-type",R0="file-too-large",_0="file-too-small",D0="too-many-files",T0=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",o=i.split(","),s=o.length>1?"one of ".concat(o.join(", ")):o[0];return{code:P0,message:"File type must be ".concat(s)}},uf=function(i){return{code:R0,message:"File is larger than ".concat(i," ").concat(i===1?"byte":"bytes")}},cf=function(i){return{code:_0,message:"File is smaller than ".concat(i," ").concat(i===1?"byte":"bytes")}},O0={code:D0,message:"Too many files"};function um(r,i){var o=r.type==="application/x-moz-file"||N0(r,i);return[o,o?null:T0(i)]}function cm(r,i,o){if(kr(r.size))if(kr(i)&&kr(o)){if(r.size>o)return[!1,uf(o)];if(r.size<i)return[!1,cf(i)]}else{if(kr(i)&&r.size<i)return[!1,cf(i)];if(kr(o)&&r.size>o)return[!1,uf(o)]}return[!0,null]}function kr(r){return r!=null}function L0(r){var i=r.files,o=r.accept,s=r.minSize,c=r.maxSize,p=r.multiple,m=r.maxFiles,h=r.validator;return!p&&i.length>1||p&&m>=1&&i.length>m?!1:i.every(function(y){var C=um(y,o),E=ka(C,1),S=E[0],R=cm(y,s,c),D=ka(R,1),L=D[0],T=h?h(y):null;return S&&L&&!T})}function el(r){return typeof r.isPropagationStopped=="function"?r.isPropagationStopped():typeof r.cancelBubble<"u"?r.cancelBubble:!1}function qo(r){return r.dataTransfer?Array.prototype.some.call(r.dataTransfer.types,function(i){return i==="Files"||i==="application/x-moz-file"}):!!r.target&&!!r.target.files}function df(r){r.preventDefault()}function F0(r){return r.indexOf("MSIE")!==-1||r.indexOf("Trident/")!==-1}function z0(r){return r.indexOf("Edge/")!==-1}function M0(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return F0(r)||z0(r)}function Xt(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return function(s){for(var c=arguments.length,p=new Array(c>1?c-1:0),m=1;m<c;m++)p[m-1]=arguments[m];return i.some(function(h){return!el(s)&&h&&h.apply(void 0,[s].concat(p)),el(s)})}}function I0(){return"showOpenFilePicker"in window}function A0(r){if(kr(r)){var i=Object.entries(r).filter(function(o){var s=ka(o,2),c=s[0],p=s[1],m=!0;return dm(c)||(console.warn('Skipped "'.concat(c,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),m=!1),(!Array.isArray(p)||!p.every(pm))&&(console.warn('Skipped "'.concat(c,'" because an invalid file extension was provided.')),m=!1),m}).reduce(function(o,s){var c=ka(s,2),p=c[0],m=c[1];return sf(sf({},o),{},lm({},p,m))},{});return[{description:"Files",accept:i}]}return r}function U0(r){if(kr(r))return Object.entries(r).reduce(function(i,o){var s=ka(o,2),c=s[0],p=s[1];return[].concat(of(i),[c],of(p))},[]).filter(function(i){return dm(i)||pm(i)}).join(",")}function $0(r){return r instanceof DOMException&&(r.name==="AbortError"||r.code===r.ABORT_ERR)}function B0(r){return r instanceof DOMException&&(r.name==="SecurityError"||r.code===r.SECURITY_ERR)}function dm(r){return r==="audio/*"||r==="video/*"||r==="image/*"||r==="text/*"||r==="application/*"||/\w+\/[-+.\w]+/g.test(r)}function pm(r){return/^.*\.[\w]+$/.test(r)}var Q0=["children"],W0=["open"],H0=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],q0=["refKey","onChange","onClick"];function V0(r){return Y0(r)||G0(r)||fm(r)||K0()}function K0(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
54
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G0(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Y0(r){if(Array.isArray(r))return Su(r)}function ru(r,i){return Z0(r)||J0(r,i)||fm(r,i)||X0()}function X0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
55
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fm(r,i){if(r){if(typeof r=="string")return Su(r,i);var o=Object.prototype.toString.call(r).slice(8,-1);if(o==="Object"&&r.constructor&&(o=r.constructor.name),o==="Map"||o==="Set")return Array.from(r);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Su(r,i)}}function Su(r,i){(i==null||i>r.length)&&(i=r.length);for(var o=0,s=new Array(i);o<i;o++)s[o]=r[o];return s}function J0(r,i){var o=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(o!=null){var s=[],c=!0,p=!1,m,h;try{for(o=o.call(r);!(c=(m=o.next()).done)&&(s.push(m.value),!(i&&s.length===i));c=!0);}catch(y){p=!0,h=y}finally{try{!c&&o.return!=null&&o.return()}finally{if(p)throw h}}return s}}function Z0(r){if(Array.isArray(r))return r}function pf(r,i){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);i&&(s=s.filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable})),o.push.apply(o,s)}return o}function Fe(r){for(var i=1;i<arguments.length;i++){var o=arguments[i]!=null?arguments[i]:{};i%2?pf(Object(o),!0).forEach(function(s){ju(r,s,o[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):pf(Object(o)).forEach(function(s){Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(o,s))})}return r}function ju(r,i,o){return i in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o,r}function tl(r,i){if(r==null)return{};var o=ew(r,i),s,c;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(r);for(c=0;c<p.length;c++)s=p[c],!(i.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(r,s)&&(o[s]=r[s])}return o}function ew(r,i){if(r==null)return{};var o={},s=Object.keys(r),c,p;for(p=0;p<s.length;p++)c=s[p],!(i.indexOf(c)>=0)&&(o[c]=r[c]);return o}var Au=k.forwardRef(function(r,i){var o=r.children,s=tl(r,Q0),c=hm(s),p=c.open,m=tl(c,W0);return k.useImperativeHandle(i,function(){return{open:p}},[p]),Uv.createElement(k.Fragment,null,o(Fe(Fe({},m),{},{open:p})))});Au.displayName="Dropzone";var mm={disabled:!1,getFilesFromEvent:c0,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Au.defaultProps=mm;Au.propTypes={children:Ce.func,accept:Ce.objectOf(Ce.arrayOf(Ce.string)),multiple:Ce.bool,preventDropOnDocument:Ce.bool,noClick:Ce.bool,noKeyboard:Ce.bool,noDrag:Ce.bool,noDragEventsBubbling:Ce.bool,minSize:Ce.number,maxSize:Ce.number,maxFiles:Ce.number,disabled:Ce.bool,getFilesFromEvent:Ce.func,onFileDialogCancel:Ce.func,onFileDialogOpen:Ce.func,useFsAccessApi:Ce.bool,autoFocus:Ce.bool,onDragEnter:Ce.func,onDragLeave:Ce.func,onDragOver:Ce.func,onDrop:Ce.func,onDropAccepted:Ce.func,onDropRejected:Ce.func,onError:Ce.func,validator:Ce.func};var Eu={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function hm(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=Fe(Fe({},mm),r),o=i.accept,s=i.disabled,c=i.getFilesFromEvent,p=i.maxSize,m=i.minSize,h=i.multiple,y=i.maxFiles,C=i.onDragEnter,E=i.onDragLeave,S=i.onDragOver,R=i.onDrop,D=i.onDropAccepted,L=i.onDropRejected,T=i.onFileDialogCancel,_=i.onFileDialogOpen,$=i.useFsAccessApi,H=i.autoFocus,M=i.preventDropOnDocument,U=i.noClick,ee=i.noKeyboard,le=i.noDrag,pe=i.noDragEventsBubbling,ie=i.onError,ue=i.validator,me=k.useMemo(function(){return U0(o)},[o]),We=k.useMemo(function(){return A0(o)},[o]),He=k.useMemo(function(){return typeof _=="function"?_:ff},[_]),Ue=k.useMemo(function(){return typeof T=="function"?T:ff},[T]),ye=k.useRef(null),Ee=k.useRef(null),rt=k.useReducer(tw,Eu),Pe=ru(rt,2),B=Pe[0],Y=Pe[1],V=B.isFocused,j=B.isFileDialogActive,O=k.useRef(typeof window<"u"&&window.isSecureContext&&$&&I0()),se=function(){!O.current&&j&&setTimeout(function(){if(Ee.current){var re=Ee.current.files;re.length||(Y({type:"closeDialog"}),Ue())}},300)};k.useEffect(function(){return window.addEventListener("focus",se,!1),function(){window.removeEventListener("focus",se,!1)}},[Ee,j,Ue,O]);var oe=k.useRef([]),he=function(re){ye.current&&ye.current.contains(re.target)||(re.preventDefault(),oe.current=[])};k.useEffect(function(){return M&&(document.addEventListener("dragover",df,!1),document.addEventListener("drop",he,!1)),function(){M&&(document.removeEventListener("dragover",df),document.removeEventListener("drop",he))}},[ye,M]),k.useEffect(function(){return!s&&H&&ye.current&&ye.current.focus(),function(){}},[ye,H,s]);var ce=k.useCallback(function(Q){ie?ie(Q):console.error(Q)},[ie]),Se=k.useCallback(function(Q){Q.preventDefault(),Q.persist(),Ht(Q),oe.current=[].concat(V0(oe.current),[Q.target]),qo(Q)&&Promise.resolve(c(Q)).then(function(re){if(!(el(Q)&&!pe)){var Te=re.length,Me=Te>0&&L0({files:re,accept:me,minSize:m,maxSize:p,multiple:h,maxFiles:y,validator:ue}),Ye=Te>0&&!Me;Y({isDragAccept:Me,isDragReject:Ye,isDragActive:!0,type:"setDraggedFiles"}),C&&C(Q)}}).catch(function(re){return ce(re)})},[c,C,ce,pe,me,m,p,h,y,ue]),xe=k.useCallback(function(Q){Q.preventDefault(),Q.persist(),Ht(Q);var re=qo(Q);if(re&&Q.dataTransfer)try{Q.dataTransfer.dropEffect="copy"}catch{}return re&&S&&S(Q),!1},[S,pe]),be=k.useCallback(function(Q){Q.preventDefault(),Q.persist(),Ht(Q);var re=oe.current.filter(function(Me){return ye.current&&ye.current.contains(Me)}),Te=re.indexOf(Q.target);Te!==-1&&re.splice(Te,1),oe.current=re,!(re.length>0)&&(Y({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),qo(Q)&&E&&E(Q))},[ye,E,pe]),Ge=k.useCallback(function(Q,re){var Te=[],Me=[];Q.forEach(function(Ye){var bn=um(Ye,me),bt=ru(bn,2),an=bt[0],Di=bt[1],Ar=cm(Ye,m,p),ir=ru(Ar,2),Ti=ir[0],ar=ir[1],or=ue?ue(Ye):null;if(an&&Ti&&!or)Te.push(Ye);else{var lr=[Di,ar];or&&(lr=lr.concat(or)),Me.push({file:Ye,errors:lr.filter(function(Oi){return Oi})})}}),(!h&&Te.length>1||h&&y>=1&&Te.length>y)&&(Te.forEach(function(Ye){Me.push({file:Ye,errors:[O0]})}),Te.splice(0)),Y({acceptedFiles:Te,fileRejections:Me,isDragReject:Me.length>0,type:"setFiles"}),R&&R(Te,Me,re),Me.length>0&&L&&L(Me,re),Te.length>0&&D&&D(Te,re)},[Y,h,me,m,p,y,R,D,L,ue]),nn=k.useCallback(function(Q){Q.preventDefault(),Q.persist(),Ht(Q),oe.current=[],qo(Q)&&Promise.resolve(c(Q)).then(function(re){el(Q)&&!pe||Ge(re,Q)}).catch(function(re){return ce(re)}),Y({type:"reset"})},[c,Ge,ce,pe]),rn=k.useCallback(function(){if(O.current){Y({type:"openDialog"}),He();var Q={multiple:h,types:We};window.showOpenFilePicker(Q).then(function(re){return c(re)}).then(function(re){Ge(re,null),Y({type:"closeDialog"})}).catch(function(re){$0(re)?(Ue(re),Y({type:"closeDialog"})):B0(re)?(O.current=!1,Ee.current?(Ee.current.value=null,Ee.current.click()):ce(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ce(re)});return}Ee.current&&(Y({type:"openDialog"}),He(),Ee.current.value=null,Ee.current.click())},[Y,He,Ue,$,Ge,ce,We,h]),rr=k.useCallback(function(Q){!ye.current||!ye.current.isEqualNode(Q.target)||(Q.key===" "||Q.key==="Enter"||Q.keyCode===32||Q.keyCode===13)&&(Q.preventDefault(),rn())},[ye,rn]),Mr=k.useCallback(function(){Y({type:"focus"})},[]),Pi=k.useCallback(function(){Y({type:"blur"})},[]),Ri=k.useCallback(function(){U||(M0()?setTimeout(rn,0):rn())},[U,rn]),Wt=function(re){return s?null:re},Ir=function(re){return ee?null:Wt(re)},jn=function(re){return le?null:Wt(re)},Ht=function(re){pe&&re.stopPropagation()},En=k.useMemo(function(){return function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=Q.refKey,Te=re===void 0?"ref":re,Me=Q.role,Ye=Q.onKeyDown,bn=Q.onFocus,bt=Q.onBlur,an=Q.onClick,Di=Q.onDragEnter,Ar=Q.onDragOver,ir=Q.onDragLeave,Ti=Q.onDrop,ar=tl(Q,H0);return Fe(Fe(ju({onKeyDown:Ir(Xt(Ye,rr)),onFocus:Ir(Xt(bn,Mr)),onBlur:Ir(Xt(bt,Pi)),onClick:Wt(Xt(an,Ri)),onDragEnter:jn(Xt(Di,Se)),onDragOver:jn(Xt(Ar,xe)),onDragLeave:jn(Xt(ir,be)),onDrop:jn(Xt(Ti,nn)),role:typeof Me=="string"&&Me!==""?Me:"presentation"},Te,ye),!s&&!ee?{tabIndex:0}:{}),ar)}},[ye,rr,Mr,Pi,Ri,Se,xe,be,nn,ee,le,s]),_i=k.useCallback(function(Q){Q.stopPropagation()},[]),Ta=k.useMemo(function(){return function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=Q.refKey,Te=re===void 0?"ref":re,Me=Q.onChange,Ye=Q.onClick,bn=tl(Q,q0),bt=ju({accept:me,multiple:h,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Wt(Xt(Me,nn)),onClick:Wt(Xt(Ye,_i)),tabIndex:-1},Te,Ee);return Fe(Fe({},bt),bn)}},[Ee,o,h,nn,s]);return Fe(Fe({},B),{},{isFocused:V&&!s,getRootProps:En,getInputProps:Ta,rootRef:ye,inputRef:Ee,open:Wt(rn)})}function tw(r,i){switch(i.type){case"focus":return Fe(Fe({},r),{},{isFocused:!0});case"blur":return Fe(Fe({},r),{},{isFocused:!1});case"openDialog":return Fe(Fe({},Eu),{},{isFileDialogActive:!0});case"closeDialog":return Fe(Fe({},r),{},{isFileDialogActive:!1});case"setDraggedFiles":return Fe(Fe({},r),{},{isDragActive:i.isDragActive,isDragAccept:i.isDragAccept,isDragReject:i.isDragReject});case"setFiles":return Fe(Fe({},r),{},{acceptedFiles:i.acceptedFiles,fileRejections:i.fileRejections,isDragReject:i.isDragReject});case"reset":return Fe({},Eu);default:return r}}function ff(){}const nw={"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"text/plain":[".txt"],"text/markdown":[".md"],"text/html":[".html"],"application/json":[".json"]};function rw({onFileSelect:r,isUploading:i}){const o=k.useCallback(m=>{const h=m[0];h&&r(h)},[r]),{getRootProps:s,getInputProps:c,isDragActive:p}=hm({onDrop:o,accept:nw,maxFiles:1,disabled:i,maxSize:100*1024*1024});return d.jsxs("div",{...s(),className:`
56
- border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors
57
- ${p?"border-blue-500 bg-blue-50":"border-gray-300 hover:border-gray-400"}
58
- ${i?"opacity-50 cursor-not-allowed":""}
59
- `,children:[d.jsx("input",{...c()}),d.jsx(iw,{className:"w-12 h-12 mx-auto text-gray-400 mb-4"}),p?d.jsx("p",{className:"text-blue-600 font-medium",children:"Drop the file here..."}):d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"text-gray-600 font-medium mb-1",children:"Drag and drop a file here, or click to select"}),d.jsx("p",{className:"text-sm text-gray-400",children:"Supports PDF, DOCX, TXT, MD, HTML, JSON (max 100MB)"})]})]})}function iw({className:r}){return d.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})})}function aw(){const[r,i]=k.useState("file"),{uploadFile:o,ingestData:s,isUploading:c,isIngesting:p,uploadError:m,ingestError:h,uploadResult:y,ingestResult:C,reset:E}=hx(),S=_=>{E(),o(_)},R=(_,$,H)=>{E(),s({content:_,source:$,format:H})},D=y||C,L=m||h,T=c||p;return d.jsxs("div",{className:"max-w-2xl mx-auto space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Upload Content"}),d.jsx("p",{className:"text-gray-600",children:"Add documents to your knowledge base for semantic search."})]}),d.jsx("div",{className:"border-b border-gray-200",children:d.jsxs("nav",{className:"-mb-px flex gap-6",children:[d.jsx("button",{type:"button",onClick:()=>i("file"),className:`py-3 px-1 border-b-2 font-medium text-sm transition-colors ${r==="file"?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,children:"Upload File"}),d.jsx("button",{type:"button",onClick:()=>i("content"),className:`py-3 px-1 border-b-2 font-medium text-sm transition-colors ${r==="content"?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,children:"Paste Content"})]})}),d.jsx("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:r==="file"?d.jsx(rw,{onFileSelect:S,isUploading:c}):d.jsx(n0,{onIngest:R,isIngesting:p})}),T&&d.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 flex items-center gap-3",children:[d.jsx(nr,{className:"text-blue-600"}),d.jsx("span",{className:"text-blue-700",children:"Processing content..."})]}),L&&d.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 text-red-700",children:[d.jsx("p",{className:"font-medium",children:"Error"}),d.jsx("p",{className:"text-sm",children:L.message})]}),D&&!T&&d.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4 text-green-700",children:[d.jsx("p",{className:"font-medium",children:"Content Ingested Successfully"}),d.jsxs("div",{className:"text-sm mt-1 space-y-1",children:[d.jsxs("p",{children:["Chunks created: ",D.chunkCount]}),d.jsx("p",{className:"text-gray-500 truncate",children:D.filePath})]})]})]})}function ow(){return d.jsx(Fy,{children:d.jsx(bx,{children:d.jsxs(ny,{children:[d.jsx(ci,{path:"/",element:d.jsx(Ax,{})}),d.jsx(ci,{path:"/upload",element:d.jsx(aw,{})}),d.jsx(ci,{path:"/files",element:d.jsx(Px,{})}),d.jsx(ci,{path:"/status",element:d.jsx(t0,{})}),d.jsx(ci,{path:"/settings",element:d.jsx(Yx,{})})]})})})}const lw=new Av({defaultOptions:{queries:{staleTime:1e3*60,retry:1}}}),vm=document.getElementById("root");if(!vm)throw new Error('Root element not found. Ensure index.html has <div id="root"></div>');ig.createRoot(vm).render(d.jsx(k.StrictMode,{children:d.jsx($v,{client:lw,children:d.jsx(Cy,{children:d.jsx(qy,{children:d.jsx(ow,{})})})})}));