tokentracker-cli 0.23.0 → 0.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/dist/assets/{Card-BgXt23Ak.js → Card-WqeqJCTJ.js} +1 -1
- package/dashboard/dist/assets/DashboardPage-DfXV-T4E.js +42 -0
- package/dashboard/dist/assets/{DevicePage-CWTFzGYj.js → DevicePage-CKQwUIFV.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-r11-zwBU.js → FadeIn-BvXHu5jo.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-ZDYMF__6.js → HeaderGithubStar-BYgV73_y.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-cCSBXnv2.js → IpCheckPage-BjuJDGa8.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-DDUROVcN.js → LandingPage-Dymt6fsi.js} +1 -1
- package/dashboard/dist/assets/LeaderboardPage-BWJX1oGI.js +5 -0
- package/dashboard/dist/assets/{LeaderboardProfilePage-BthYFghU.js → LeaderboardProfilePage-DmNl8aoL.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-BQpint0k.js → LimitsPage-D_q9Z5nB.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-EUjSrjOv.js → LoginPage-BvwX7KJg.js} +1 -1
- package/dashboard/dist/assets/PopoverPopup-CrBQ_8vY.js +12 -0
- package/dashboard/dist/assets/{ProviderIcon-D7GhGvvD.js → ProviderIcon-Cb-YMfcK.js} +1 -1
- package/dashboard/dist/assets/SettingsPage-u30V0Mqy.js +1 -0
- package/dashboard/dist/assets/SkillsPage-ssktZGFE.js +1 -0
- package/dashboard/dist/assets/{WidgetsPage-QfPgS0dO.js → WidgetsPage-_geExCIR.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-0iiBrhBo.js → WrappedPage-C5Wcs8L4.js} +1 -1
- package/dashboard/dist/assets/check-Cu-lm-wz.js +1 -0
- package/dashboard/dist/assets/{chevron-down-Br4ZSPLP.js → chevron-down-BbPjwLP4.js} +1 -1
- package/dashboard/dist/assets/{download-CnQNKpma.js → download-iIollDJi.js} +1 -1
- package/dashboard/dist/assets/info-DjS23Duh.js +1 -0
- package/dashboard/dist/assets/{leaderboard-columns-Bdgb7vS7.js → leaderboard-columns-DTnRH3EZ.js} +1 -1
- package/dashboard/dist/assets/main-Cb6vMAZa.js +688 -0
- package/dashboard/dist/assets/{use-limits-display-prefs-B5TQdyrf.js → use-limits-display-prefs-DZ9hgvef.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-CSxKG_Na.js → use-native-settings-DS1TfSil.js} +1 -1
- package/dashboard/dist/assets/{use-reduced-motion-C9rLBEnX.js → use-reduced-motion-D82galUK.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-Bmok4oKO.js → use-usage-limits-B-svr8YY.js} +1 -1
- package/dashboard/dist/assets/useCurrency-uA9QPua4.js +1 -0
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +1 -1
- package/src/cli.js +2 -1
- package/src/commands/serve.js +57 -2
- package/src/lib/local-api.js +48 -9
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/dashboard/dist/assets/DashboardPage-NVAsY99I.js +0 -64
- package/dashboard/dist/assets/LeaderboardPage-BaETRtBF.js +0 -5
- package/dashboard/dist/assets/PopoverPopup-DyjmUoRY.js +0 -12
- package/dashboard/dist/assets/SettingsPage-9lfQ1c28.js +0 -1
- package/dashboard/dist/assets/SkillsPage-Bt7d1kd0.js +0 -1
- package/dashboard/dist/assets/check-CtXuxG1H.js +0 -1
- package/dashboard/dist/assets/main-D7f_DoMp.js +0 -676
|
@@ -1,676 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-NVAsY99I.js","assets/use-usage-limits-Bmok4oKO.js","assets/PopoverPopup-DyjmUoRY.js","assets/Card-BgXt23Ak.js","assets/use-reduced-motion-C9rLBEnX.js","assets/ProviderIcon-D7GhGvvD.js","assets/FadeIn-r11-zwBU.js","assets/LandingPage-DDUROVcN.js","assets/HeaderGithubStar-ZDYMF__6.js","assets/LeaderboardPage-BaETRtBF.js","assets/leaderboard-columns-Bdgb7vS7.js","assets/chevron-down-Br4ZSPLP.js","assets/LeaderboardProfilePage-BthYFghU.js","assets/LimitsPage-BQpint0k.js","assets/use-limits-display-prefs-B5TQdyrf.js","assets/SettingsPage-9lfQ1c28.js","assets/use-native-settings-CSxKG_Na.js","assets/check-CtXuxG1H.js","assets/download-CnQNKpma.js","assets/SkillsPage-Bt7d1kd0.js","assets/WidgetsPage-QfPgS0dO.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
function iP(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const s in a)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(a,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>a[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function _b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function sP(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function a(){var s=!1;try{s=this instanceof a}catch{}return s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}),n}var lh={exports:{}},lo={},uh={exports:{}},Ze={};var Py;function oP(){if(Py)return Ze;Py=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function b(N){return N===null||typeof N!="object"?null:(N=y&&N[y]||N["@@iterator"],typeof N=="function"?N:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,T={};function P(N,G,xe){this.props=N,this.context=G,this.refs=T,this.updater=xe||w}P.prototype.isReactComponent={},P.prototype.setState=function(N,G){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,G,"setState")},P.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function L(){}L.prototype=P.prototype;function D(N,G,xe){this.props=N,this.context=G,this.refs=T,this.updater=xe||w}var M=D.prototype=new L;M.constructor=D,S(M,P.prototype),M.isPureReactComponent=!0;var j=Array.isArray,q=Object.prototype.hasOwnProperty,K={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function x(N,G,xe){var Re,Se={},Ce=null,qe=null;if(G!=null)for(Re in G.ref!==void 0&&(qe=G.ref),G.key!==void 0&&(Ce=""+G.key),G)q.call(G,Re)&&!H.hasOwnProperty(Re)&&(Se[Re]=G[Re]);var Xe=arguments.length-2;if(Xe===1)Se.children=xe;else if(1<Xe){for(var Ue=Array(Xe),jt=0;jt<Xe;jt++)Ue[jt]=arguments[jt+2];Se.children=Ue}if(N&&N.defaultProps)for(Re in Xe=N.defaultProps,Xe)Se[Re]===void 0&&(Se[Re]=Xe[Re]);return{$$typeof:e,type:N,key:Ce,ref:qe,props:Se,_owner:K.current}}function Z(N,G){return{$$typeof:e,type:N.type,key:G,ref:N.ref,props:N.props,_owner:N._owner}}function Q(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function me(N){var G={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(xe){return G[xe]})}var oe=/\/+/g;function Ae(N,G){return typeof N=="object"&&N!==null&&N.key!=null?me(""+N.key):G.toString(36)}function fe(N,G,xe,Re,Se){var Ce=typeof N;(Ce==="undefined"||Ce==="boolean")&&(N=null);var qe=!1;if(N===null)qe=!0;else switch(Ce){case"string":case"number":qe=!0;break;case"object":switch(N.$$typeof){case e:case t:qe=!0}}if(qe)return qe=N,Se=Se(qe),N=Re===""?"."+Ae(qe,0):Re,j(Se)?(xe="",N!=null&&(xe=N.replace(oe,"$&/")+"/"),fe(Se,G,xe,"",function(jt){return jt})):Se!=null&&(Q(Se)&&(Se=Z(Se,xe+(!Se.key||qe&&qe.key===Se.key?"":(""+Se.key).replace(oe,"$&/")+"/")+N)),G.push(Se)),1;if(qe=0,Re=Re===""?".":Re+":",j(N))for(var Xe=0;Xe<N.length;Xe++){Ce=N[Xe];var Ue=Re+Ae(Ce,Xe);qe+=fe(Ce,G,xe,Ue,Se)}else if(Ue=b(N),typeof Ue=="function")for(N=Ue.call(N),Xe=0;!(Ce=N.next()).done;)Ce=Ce.value,Ue=Re+Ae(Ce,Xe++),qe+=fe(Ce,G,xe,Ue,Se);else if(Ce==="object")throw G=String(N),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return qe}function ce(N,G,xe){if(N==null)return N;var Re=[],Se=0;return fe(N,Re,"","",function(Ce){return G.call(xe,Ce,Se++)}),Re}function le(N){if(N._status===-1){var G=N._result;G=G(),G.then(function(xe){(N._status===0||N._status===-1)&&(N._status=1,N._result=xe)},function(xe){(N._status===0||N._status===-1)&&(N._status=2,N._result=xe)}),N._status===-1&&(N._status=0,N._result=G)}if(N._status===1)return N._result.default;throw N._result}var Me={current:null},W={transition:null},Y={ReactCurrentDispatcher:Me,ReactCurrentBatchConfig:W,ReactCurrentOwner:K};function $(){throw Error("act(...) is not supported in production builds of React.")}return Ze.Children={map:ce,forEach:function(N,G,xe){ce(N,function(){G.apply(this,arguments)},xe)},count:function(N){var G=0;return ce(N,function(){G++}),G},toArray:function(N){return ce(N,function(G){return G})||[]},only:function(N){if(!Q(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},Ze.Component=P,Ze.Fragment=n,Ze.Profiler=s,Ze.PureComponent=D,Ze.StrictMode=a,Ze.Suspense=h,Ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,Ze.act=$,Ze.cloneElement=function(N,G,xe){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var Re=S({},N.props),Se=N.key,Ce=N.ref,qe=N._owner;if(G!=null){if(G.ref!==void 0&&(Ce=G.ref,qe=K.current),G.key!==void 0&&(Se=""+G.key),N.type&&N.type.defaultProps)var Xe=N.type.defaultProps;for(Ue in G)q.call(G,Ue)&&!H.hasOwnProperty(Ue)&&(Re[Ue]=G[Ue]===void 0&&Xe!==void 0?Xe[Ue]:G[Ue])}var Ue=arguments.length-2;if(Ue===1)Re.children=xe;else if(1<Ue){Xe=Array(Ue);for(var jt=0;jt<Ue;jt++)Xe[jt]=arguments[jt+2];Re.children=Xe}return{$$typeof:e,type:N.type,key:Se,ref:Ce,props:Re,_owner:qe}},Ze.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:o,_context:N},N.Consumer=N},Ze.createElement=x,Ze.createFactory=function(N){var G=x.bind(null,N);return G.type=N,G},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function(N){return{$$typeof:c,render:N}},Ze.isValidElement=Q,Ze.lazy=function(N){return{$$typeof:m,_payload:{_status:-1,_result:N},_init:le}},Ze.memo=function(N,G){return{$$typeof:f,type:N,compare:G===void 0?null:G}},Ze.startTransition=function(N){var G=W.transition;W.transition={};try{N()}finally{W.transition=G}},Ze.unstable_act=$,Ze.useCallback=function(N,G){return Me.current.useCallback(N,G)},Ze.useContext=function(N){return Me.current.useContext(N)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(N){return Me.current.useDeferredValue(N)},Ze.useEffect=function(N,G){return Me.current.useEffect(N,G)},Ze.useId=function(){return Me.current.useId()},Ze.useImperativeHandle=function(N,G,xe){return Me.current.useImperativeHandle(N,G,xe)},Ze.useInsertionEffect=function(N,G){return Me.current.useInsertionEffect(N,G)},Ze.useLayoutEffect=function(N,G){return Me.current.useLayoutEffect(N,G)},Ze.useMemo=function(N,G){return Me.current.useMemo(N,G)},Ze.useReducer=function(N,G,xe){return Me.current.useReducer(N,G,xe)},Ze.useRef=function(N){return Me.current.useRef(N)},Ze.useState=function(N){return Me.current.useState(N)},Ze.useSyncExternalStore=function(N,G,xe){return Me.current.useSyncExternalStore(N,G,xe)},Ze.useTransition=function(){return Me.current.useTransition()},Ze.version="18.3.1",Ze}var Ty;function $f(){return Ty||(Ty=1,uh.exports=oP()),uh.exports}var Cy;function lP(){if(Cy)return lo;Cy=1;var e=$f(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function u(c,h,f){var m,y={},b=null,w=null;f!==void 0&&(b=""+f),h.key!==void 0&&(b=""+h.key),h.ref!==void 0&&(w=h.ref);for(m in h)a.call(h,m)&&!o.hasOwnProperty(m)&&(y[m]=h[m]);if(c&&c.defaultProps)for(m in h=c.defaultProps,h)y[m]===void 0&&(y[m]=h[m]);return{$$typeof:t,type:c,key:b,ref:w,props:y,_owner:s.current}}return lo.Fragment=n,lo.jsx=u,lo.jsxs=u,lo}var Ey;function uP(){return Ey||(Ey=1,lh.exports=lP()),lh.exports}var I=uP(),k=$f();const Hf=_b(k),cP=iP({__proto__:null,default:Hf},[k]);var au={},ch={exports:{}},yn={},dh={exports:{}},hh={};var Ay;function dP(){return Ay||(Ay=1,(function(e){function t(W,Y){var $=W.length;W.push(Y);e:for(;0<$;){var N=$-1>>>1,G=W[N];if(0<s(G,Y))W[N]=Y,W[$]=G,$=N;else break e}}function n(W){return W.length===0?null:W[0]}function a(W){if(W.length===0)return null;var Y=W[0],$=W.pop();if($!==Y){W[0]=$;e:for(var N=0,G=W.length,xe=G>>>1;N<xe;){var Re=2*(N+1)-1,Se=W[Re],Ce=Re+1,qe=W[Ce];if(0>s(Se,$))Ce<G&&0>s(qe,Se)?(W[N]=qe,W[Ce]=$,N=Ce):(W[N]=Se,W[Re]=$,N=Re);else if(Ce<G&&0>s(qe,$))W[N]=qe,W[Ce]=$,N=Ce;else break e}}return Y}function s(W,Y){var $=W.sortIndex-Y.sortIndex;return $!==0?$:W.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var h=[],f=[],m=1,y=null,b=3,w=!1,S=!1,T=!1,P=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,D=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(W){for(var Y=n(f);Y!==null;){if(Y.callback===null)a(f);else if(Y.startTime<=W)a(f),Y.sortIndex=Y.expirationTime,t(h,Y);else break;Y=n(f)}}function j(W){if(T=!1,M(W),!S)if(n(h)!==null)S=!0,le(q);else{var Y=n(f);Y!==null&&Me(j,Y.startTime-W)}}function q(W,Y){S=!1,T&&(T=!1,L(x),x=-1),w=!0;var $=b;try{for(M(Y),y=n(h);y!==null&&(!(y.expirationTime>Y)||W&&!me());){var N=y.callback;if(typeof N=="function"){y.callback=null,b=y.priorityLevel;var G=N(y.expirationTime<=Y);Y=e.unstable_now(),typeof G=="function"?y.callback=G:y===n(h)&&a(h),M(Y)}else a(h);y=n(h)}if(y!==null)var xe=!0;else{var Re=n(f);Re!==null&&Me(j,Re.startTime-Y),xe=!1}return xe}finally{y=null,b=$,w=!1}}var K=!1,H=null,x=-1,Z=5,Q=-1;function me(){return!(e.unstable_now()-Q<Z)}function oe(){if(H!==null){var W=e.unstable_now();Q=W;var Y=!0;try{Y=H(!0,W)}finally{Y?Ae():(K=!1,H=null)}}else K=!1}var Ae;if(typeof D=="function")Ae=function(){D(oe)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,ce=fe.port2;fe.port1.onmessage=oe,Ae=function(){ce.postMessage(null)}}else Ae=function(){P(oe,0)};function le(W){H=W,K||(K=!0,Ae())}function Me(W,Y){x=P(function(){W(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){S||w||(S=!0,le(q))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(h)},e.unstable_next=function(W){switch(b){case 1:case 2:case 3:var Y=3;break;default:Y=b}var $=b;b=Y;try{return W()}finally{b=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,Y){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var $=b;b=W;try{return Y()}finally{b=$}},e.unstable_scheduleCallback=function(W,Y,$){var N=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?N+$:N):$=N,W){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=$+G,W={id:m++,callback:Y,priorityLevel:W,startTime:$,expirationTime:G,sortIndex:-1},$>N?(W.sortIndex=$,t(f,W),n(h)===null&&W===n(f)&&(T?(L(x),x=-1):T=!0,Me(j,$-N))):(W.sortIndex=G,t(h,W),S||w||(S=!0,le(q))),W},e.unstable_shouldYield=me,e.unstable_wrapCallback=function(W){var Y=b;return function(){var $=b;b=Y;try{return W.apply(this,arguments)}finally{b=$}}}})(hh)),hh}var Ry;function hP(){return Ry||(Ry=1,dh.exports=dP()),dh.exports}var Ly;function fP(){if(Ly)return yn;Ly=1;var e=$f(),t=hP();function n(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,l=1;l<arguments.length;l++)i+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function o(r,i){u(r,i),u(r+"Capture",i)}function u(r,i){for(s[r]=i,r=0;r<i.length;r++)a.add(i[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,f=/^[: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]*$/,m={},y={};function b(r){return h.call(y,r)?!0:h.call(m,r)?!1:f.test(r)?y[r]=!0:(m[r]=!0,!1)}function w(r,i,l,d){if(l!==null&&l.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return d?!1:l!==null?!l.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function S(r,i,l,d){if(i===null||typeof i>"u"||w(r,i,l,d))return!0;if(d)return!1;if(l!==null)switch(l.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function T(r,i,l,d,p,g,_){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=d,this.attributeNamespace=p,this.mustUseProperty=l,this.propertyName=r,this.type=i,this.sanitizeURL=g,this.removeEmptyString=_}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){P[r]=new T(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];P[i]=new T(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){P[r]=new T(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){P[r]=new T(r,2,!1,r,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(r){P[r]=new T(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){P[r]=new T(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){P[r]=new T(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){P[r]=new T(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){P[r]=new T(r,5,!1,r.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function D(r){return r[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(r){var i=r.replace(L,D);P[i]=new T(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(L,D);P[i]=new T(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(L,D);P[i]=new T(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){P[r]=new T(r,1,!1,r.toLowerCase(),null,!1,!1)}),P.xlinkHref=new T("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){P[r]=new T(r,1,!1,r.toLowerCase(),null,!0,!0)});function M(r,i,l,d){var p=P.hasOwnProperty(i)?P[i]:null;(p!==null?p.type!==0:d||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(S(i,l,p,d)&&(l=null),d||p===null?b(i)&&(l===null?r.removeAttribute(i):r.setAttribute(i,""+l)):p.mustUseProperty?r[p.propertyName]=l===null?p.type===3?!1:"":l:(i=p.attributeName,d=p.attributeNamespace,l===null?r.removeAttribute(i):(p=p.type,l=p===3||p===4&&l===!0?"":""+l,d?r.setAttributeNS(d,i,l):r.setAttribute(i,l))))}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),K=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),Q=Symbol.for("react.provider"),me=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),Ae=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),Me=Symbol.for("react.offscreen"),W=Symbol.iterator;function Y(r){return r===null||typeof r!="object"?null:(r=W&&r[W]||r["@@iterator"],typeof r=="function"?r:null)}var $=Object.assign,N;function G(r){if(N===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\n( *(at )?)/);N=i&&i[1]||""}return`
|
|
3
|
-
`+N+r}var xe=!1;function Re(r,i){if(!r||xe)return"";xe=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(z){var d=z}Reflect.construct(r,[],i)}else{try{i.call()}catch(z){d=z}r.call(i.prototype)}else{try{throw Error()}catch(z){d=z}r()}}catch(z){if(z&&d&&typeof z.stack=="string"){for(var p=z.stack.split(`
|
|
4
|
-
`),g=d.stack.split(`
|
|
5
|
-
`),_=p.length-1,E=g.length-1;1<=_&&0<=E&&p[_]!==g[E];)E--;for(;1<=_&&0<=E;_--,E--)if(p[_]!==g[E]){if(_!==1||E!==1)do if(_--,E--,0>E||p[_]!==g[E]){var R=`
|
|
6
|
-
`+p[_].replace(" at new "," at ");return r.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",r.displayName)),R}while(1<=_&&0<=E);break}}}finally{xe=!1,Error.prepareStackTrace=l}return(r=r?r.displayName||r.name:"")?G(r):""}function Se(r){switch(r.tag){case 5:return G(r.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return r=Re(r.type,!1),r;case 11:return r=Re(r.type.render,!1),r;case 1:return r=Re(r.type,!0),r;default:return""}}function Ce(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case H:return"Fragment";case K:return"Portal";case Z:return"Profiler";case x:return"StrictMode";case Ae:return"Suspense";case fe:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case me:return(r.displayName||"Context")+".Consumer";case Q:return(r._context.displayName||"Context")+".Provider";case oe:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ce:return i=r.displayName||null,i!==null?i:Ce(r.type)||"Memo";case le:i=r._payload,r=r._init;try{return Ce(r(i))}catch{}}return null}function qe(r){var i=r.type;switch(r.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=i.render,r=r.displayName||r.name||"",i.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ce(i);case 8:return i===x?"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 i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function Xe(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Ue(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function jt(r){var i=Ue(r)?"checked":"value",l=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),d=""+r[i];if(!r.hasOwnProperty(i)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var p=l.get,g=l.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return p.call(this)},set:function(_){d=""+_,g.call(this,_)}}),Object.defineProperty(r,i,{enumerable:l.enumerable}),{getValue:function(){return d},setValue:function(_){d=""+_},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Hn(r){r._valueTracker||(r._valueTracker=jt(r))}function Tr(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var l=i.getValue(),d="";return r&&(d=Ue(r)?r.checked?"true":"false":r.value),r=d,r!==l?(i.setValue(r),!0):!1}function pt(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function en(r,i){var l=i.checked;return $({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l??r._wrapperState.initialChecked})}function ws(r,i){var l=i.defaultValue==null?"":i.defaultValue,d=i.checked!=null?i.checked:i.defaultChecked;l=Xe(i.value!=null?i.value:l),r._wrapperState={initialChecked:d,initialValue:l,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function Qo(r,i){i=i.checked,i!=null&&M(r,"checked",i,!1)}function Wn(r,i){Qo(r,i);var l=Xe(i.value),d=i.type;if(l!=null)d==="number"?(l===0&&r.value===""||r.value!=l)&&(r.value=""+l):r.value!==""+l&&(r.value=""+l);else if(d==="submit"||d==="reset"){r.removeAttribute("value");return}i.hasOwnProperty("value")?xs(r,i.type,l):i.hasOwnProperty("defaultValue")&&xs(r,i.type,Xe(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function Xo(r,i,l){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var d=i.type;if(!(d!=="submit"&&d!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+r._wrapperState.initialValue,l||i===r.value||(r.value=i),r.defaultValue=i}l=r.name,l!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,l!==""&&(r.name=l)}function xs(r,i,l){(i!=="number"||pt(r.ownerDocument)!==r)&&(l==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+l&&(r.defaultValue=""+l))}var qr=Array.isArray;function Gr(r,i,l,d){if(r=r.options,i){i={};for(var p=0;p<l.length;p++)i["$"+l[p]]=!0;for(l=0;l<r.length;l++)p=i.hasOwnProperty("$"+r[l].value),r[l].selected!==p&&(r[l].selected=p),p&&d&&(r[l].defaultSelected=!0)}else{for(l=""+Xe(l),i=null,p=0;p<r.length;p++){if(r[p].value===l){r[p].selected=!0,d&&(r[p].defaultSelected=!0);return}i!==null||r[p].disabled||(i=r[p])}i!==null&&(i.selected=!0)}}function Ss(r,i){if(i.dangerouslySetInnerHTML!=null)throw Error(n(91));return $({},i,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function Jo(r,i){var l=i.value;if(l==null){if(l=i.children,i=i.defaultValue,l!=null){if(i!=null)throw Error(n(92));if(qr(l)){if(1<l.length)throw Error(n(93));l=l[0]}i=l}i==null&&(i=""),l=i}r._wrapperState={initialValue:Xe(l)}}function el(r,i){var l=Xe(i.value),d=Xe(i.defaultValue);l!=null&&(l=""+l,l!==r.value&&(r.value=l),i.defaultValue==null&&r.defaultValue!==l&&(r.defaultValue=l)),d!=null&&(r.defaultValue=""+d)}function or(r){var i=r.textContent;i===r._wrapperState.initialValue&&i!==""&&i!==null&&(r.value=i)}function Yr(r){switch(r){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 yi(r,i){return r==null||r==="http://www.w3.org/1999/xhtml"?Yr(i):r==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Zr,Tn=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,l,d,p){MSApp.execUnsafeLocalFunction(function(){return r(i,l,d,p)})}:r})(function(r,i){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=i;else{for(Zr=Zr||document.createElement("div"),Zr.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=Zr.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function tn(r,i){if(i){var l=r.firstChild;if(l&&l===r.lastChild&&l.nodeType===3){l.nodeValue=i;return}}r.textContent=i}var Qr={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},Ec=["Webkit","ms","Moz","O"];Object.keys(Qr).forEach(function(r){Ec.forEach(function(i){i=i+r.charAt(0).toUpperCase()+r.substring(1),Qr[i]=Qr[r]})});function vi(r,i,l){return i==null||typeof i=="boolean"||i===""?"":l||typeof i!="number"||i===0||Qr.hasOwnProperty(r)&&Qr[r]?(""+i).trim():i+"px"}function tl(r,i){r=r.style;for(var l in i)if(i.hasOwnProperty(l)){var d=l.indexOf("--")===0,p=vi(l,i[l],d);l==="float"&&(l="cssFloat"),d?r.setProperty(l,p):r[l]=p}}var Kn=$({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 bi(r,i){if(i){if(Kn[r]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function _i(r,i){if(r.indexOf("-")===-1)return typeof i.is=="string";switch(r){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 ki=null;function Ps(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var wi=null,qn=null,Cr=null;function xi(r){if(r=qs(r)){if(typeof wi!="function")throw Error(n(280));var i=r.stateNode;i&&(i=bl(i),wi(r.stateNode,r.type,i))}}function nl(r){qn?Cr?Cr.push(r):Cr=[r]:qn=r}function Ts(){if(qn){var r=qn,i=Cr;if(Cr=qn=null,xi(r),i)for(r=0;r<i.length;r++)xi(i[r])}}function rl(r,i){return r(i)}function Cs(){}var Xr=!1;function Ua(r,i,l){if(Xr)return r(i,l);Xr=!0;try{return rl(r,i,l)}finally{Xr=!1,(qn!==null||Cr!==null)&&(Cs(),Ts())}}function Jr(r,i){var l=r.stateNode;if(l===null)return null;var d=bl(l);if(d===null)return null;l=d[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(l&&typeof l!="function")throw Error(n(231,i,typeof l));return l}var Es=!1;if(c)try{var Ba={};Object.defineProperty(Ba,"passive",{get:function(){Es=!0}}),window.addEventListener("test",Ba,Ba),window.removeEventListener("test",Ba,Ba)}catch{Es=!1}function A(r,i,l,d,p,g,_,E,R){var z=Array.prototype.slice.call(arguments,3);try{i.apply(l,z)}catch(ee){this.onError(ee)}}var U=!1,V=null,te=!1,ae=null,Ee={onError:function(r){U=!0,V=r}};function pe(r,i,l,d,p,g,_,E,R){U=!1,V=null,A.apply(Ee,arguments)}function De(r,i,l,d,p,g,_,E,R){if(pe.apply(this,arguments),U){if(U){var z=V;U=!1,V=null}else throw Error(n(198));te||(te=!0,ae=z)}}function he(r){var i=r,l=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(l=i.return),r=i.return;while(r)}return i.tag===3?l:null}function Ne(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function Oe(r){if(he(r)!==r)throw Error(n(188))}function Le(r){var i=r.alternate;if(!i){if(i=he(r),i===null)throw Error(n(188));return i!==r?null:r}for(var l=r,d=i;;){var p=l.return;if(p===null)break;var g=p.alternate;if(g===null){if(d=p.return,d!==null){l=d;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===l)return Oe(p),r;if(g===d)return Oe(p),i;g=g.sibling}throw Error(n(188))}if(l.return!==d.return)l=p,d=g;else{for(var _=!1,E=p.child;E;){if(E===l){_=!0,l=p,d=g;break}if(E===d){_=!0,d=p,l=g;break}E=E.sibling}if(!_){for(E=g.child;E;){if(E===l){_=!0,l=g,d=p;break}if(E===d){_=!0,d=g,l=p;break}E=E.sibling}if(!_)throw Error(n(189))}}if(l.alternate!==d)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?r:i}function st(r){return r=Le(r),r!==null?et(r):null}function et(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var i=et(r);if(i!==null)return i;r=r.sibling}return null}var ht=t.unstable_scheduleCallback,Pt=t.unstable_cancelCallback,$t=t.unstable_shouldYield,lt=t.unstable_requestPaint,rt=t.unstable_now,Er=t.unstable_getCurrentPriorityLevel,Ar=t.unstable_ImmediatePriority,Gn=t.unstable_UserBlockingPriority,nn=t.unstable_NormalPriority,As=t.unstable_LowPriority,ea=t.unstable_IdlePriority,Cn=null,rn=null;function Si(r){if(rn&&typeof rn.onCommitFiberRoot=="function")try{rn.onCommitFiberRoot(Cn,r,void 0,(r.current.flags&128)===128)}catch{}}var He=Math.clz32?Math.clz32:Rr,Ut=Math.log,ta=Math.LN2;function Rr(r){return r>>>=0,r===0?32:31-(Ut(r)/ta|0)|0}var ct=64,Lr=4194304;function na(r){switch(r&-r){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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Pi(r,i){var l=r.pendingLanes;if(l===0)return 0;var d=0,p=r.suspendedLanes,g=r.pingedLanes,_=l&268435455;if(_!==0){var E=_&~p;E!==0?d=na(E):(g&=_,g!==0&&(d=na(g)))}else _=l&~p,_!==0?d=na(_):g!==0&&(d=na(g));if(d===0)return 0;if(i!==0&&i!==d&&(i&p)===0&&(p=d&-d,g=i&-i,p>=g||p===16&&(g&4194240)!==0))return i;if((d&4)!==0&&(d|=l&16),i=r.entangledLanes,i!==0)for(r=r.entanglements,i&=d;0<i;)l=31-He(i),p=1<<l,d|=r[l],i&=~p;return d}function Sx(r,i){switch(r){case 1:case 2:case 4:return i+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 i+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 Px(r,i){for(var l=r.suspendedLanes,d=r.pingedLanes,p=r.expirationTimes,g=r.pendingLanes;0<g;){var _=31-He(g),E=1<<_,R=p[_];R===-1?((E&l)===0||(E&d)!==0)&&(p[_]=Sx(E,i)):R<=i&&(r.expiredLanes|=E),g&=~E}}function Ac(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function nm(){var r=ct;return ct<<=1,(ct&4194240)===0&&(ct=64),r}function Rc(r){for(var i=[],l=0;31>l;l++)i.push(r);return i}function Rs(r,i,l){r.pendingLanes|=i,i!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,i=31-He(i),r[i]=l}function Tx(r,i){var l=r.pendingLanes&~i;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=i,r.mutableReadLanes&=i,r.entangledLanes&=i,i=r.entanglements;var d=r.eventTimes;for(r=r.expirationTimes;0<l;){var p=31-He(l),g=1<<p;i[p]=0,d[p]=-1,r[p]=-1,l&=~g}}function Lc(r,i){var l=r.entangledLanes|=i;for(r=r.entanglements;l;){var d=31-He(l),p=1<<d;p&i|r[d]&i&&(r[d]|=i),l&=~p}}var ut=0;function rm(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var am,Dc,im,sm,om,Mc=!1,al=[],ra=null,aa=null,ia=null,Ls=new Map,Ds=new Map,sa=[],Cx="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 lm(r,i){switch(r){case"focusin":case"focusout":ra=null;break;case"dragenter":case"dragleave":aa=null;break;case"mouseover":case"mouseout":ia=null;break;case"pointerover":case"pointerout":Ls.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ds.delete(i.pointerId)}}function Ms(r,i,l,d,p,g){return r===null||r.nativeEvent!==g?(r={blockedOn:i,domEventName:l,eventSystemFlags:d,nativeEvent:g,targetContainers:[p]},i!==null&&(i=qs(i),i!==null&&Dc(i)),r):(r.eventSystemFlags|=d,i=r.targetContainers,p!==null&&i.indexOf(p)===-1&&i.push(p),r)}function Ex(r,i,l,d,p){switch(i){case"focusin":return ra=Ms(ra,r,i,l,d,p),!0;case"dragenter":return aa=Ms(aa,r,i,l,d,p),!0;case"mouseover":return ia=Ms(ia,r,i,l,d,p),!0;case"pointerover":var g=p.pointerId;return Ls.set(g,Ms(Ls.get(g)||null,r,i,l,d,p)),!0;case"gotpointercapture":return g=p.pointerId,Ds.set(g,Ms(Ds.get(g)||null,r,i,l,d,p)),!0}return!1}function um(r){var i=Fa(r.target);if(i!==null){var l=he(i);if(l!==null){if(i=l.tag,i===13){if(i=Ne(l),i!==null){r.blockedOn=i,om(r.priority,function(){im(l)});return}}else if(i===3&&l.stateNode.current.memoizedState.isDehydrated){r.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}r.blockedOn=null}function il(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var l=Oc(r.domEventName,r.eventSystemFlags,i[0],r.nativeEvent);if(l===null){l=r.nativeEvent;var d=new l.constructor(l.type,l);ki=d,l.target.dispatchEvent(d),ki=null}else return i=qs(l),i!==null&&Dc(i),r.blockedOn=l,!1;i.shift()}return!0}function cm(r,i,l){il(r)&&l.delete(i)}function Ax(){Mc=!1,ra!==null&&il(ra)&&(ra=null),aa!==null&&il(aa)&&(aa=null),ia!==null&&il(ia)&&(ia=null),Ls.forEach(cm),Ds.forEach(cm)}function Ns(r,i){r.blockedOn===i&&(r.blockedOn=null,Mc||(Mc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ax)))}function Os(r){function i(p){return Ns(p,r)}if(0<al.length){Ns(al[0],r);for(var l=1;l<al.length;l++){var d=al[l];d.blockedOn===r&&(d.blockedOn=null)}}for(ra!==null&&Ns(ra,r),aa!==null&&Ns(aa,r),ia!==null&&Ns(ia,r),Ls.forEach(i),Ds.forEach(i),l=0;l<sa.length;l++)d=sa[l],d.blockedOn===r&&(d.blockedOn=null);for(;0<sa.length&&(l=sa[0],l.blockedOn===null);)um(l),l.blockedOn===null&&sa.shift()}var Ti=j.ReactCurrentBatchConfig,sl=!0;function Rx(r,i,l,d){var p=ut,g=Ti.transition;Ti.transition=null;try{ut=1,Nc(r,i,l,d)}finally{ut=p,Ti.transition=g}}function Lx(r,i,l,d){var p=ut,g=Ti.transition;Ti.transition=null;try{ut=4,Nc(r,i,l,d)}finally{ut=p,Ti.transition=g}}function Nc(r,i,l,d){if(sl){var p=Oc(r,i,l,d);if(p===null)Xc(r,i,d,ol,l),lm(r,d);else if(Ex(p,r,i,l,d))d.stopPropagation();else if(lm(r,d),i&4&&-1<Cx.indexOf(r)){for(;p!==null;){var g=qs(p);if(g!==null&&am(g),g=Oc(r,i,l,d),g===null&&Xc(r,i,d,ol,l),g===p)break;p=g}p!==null&&d.stopPropagation()}else Xc(r,i,d,null,l)}}var ol=null;function Oc(r,i,l,d){if(ol=null,r=Ps(d),r=Fa(r),r!==null)if(i=he(r),i===null)r=null;else if(l=i.tag,l===13){if(r=Ne(i),r!==null)return r;r=null}else if(l===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null);return ol=r,null}function dm(r){switch(r){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(Er()){case Ar:return 1;case Gn:return 4;case nn:case As:return 16;case ea:return 536870912;default:return 16}default:return 16}}var oa=null,Ic=null,ll=null;function hm(){if(ll)return ll;var r,i=Ic,l=i.length,d,p="value"in oa?oa.value:oa.textContent,g=p.length;for(r=0;r<l&&i[r]===p[r];r++);var _=l-r;for(d=1;d<=_&&i[l-d]===p[g-d];d++);return ll=p.slice(r,1<d?1-d:void 0)}function ul(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function cl(){return!0}function fm(){return!1}function vn(r){function i(l,d,p,g,_){this._reactName=l,this._targetInst=p,this.type=d,this.nativeEvent=g,this.target=_,this.currentTarget=null;for(var E in r)r.hasOwnProperty(E)&&(l=r[E],this[E]=l?l(g):g[E]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?cl:fm,this.isPropagationStopped=fm,this}return $(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=cl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=cl)},persist:function(){},isPersistent:cl}),i}var Ci={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jc=vn(Ci),Is=$({},Ci,{view:0,detail:0}),Dx=vn(Is),Uc,Bc,js,dl=$({},Is,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vc,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==js&&(js&&r.type==="mousemove"?(Uc=r.screenX-js.screenX,Bc=r.screenY-js.screenY):Bc=Uc=0,js=r),Uc)},movementY:function(r){return"movementY"in r?r.movementY:Bc}}),pm=vn(dl),Mx=$({},dl,{dataTransfer:0}),Nx=vn(Mx),Ox=$({},Is,{relatedTarget:0}),Fc=vn(Ox),Ix=$({},Ci,{animationName:0,elapsedTime:0,pseudoElement:0}),jx=vn(Ix),Ux=$({},Ci,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Bx=vn(Ux),Fx=$({},Ci,{data:0}),mm=vn(Fx),Vx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zx={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"},$x={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Hx(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=$x[r])?!!i[r]:!1}function Vc(){return Hx}var Wx=$({},Is,{key:function(r){if(r.key){var i=Vx[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=ul(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?zx[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vc,charCode:function(r){return r.type==="keypress"?ul(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?ul(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),Kx=vn(Wx),qx=$({},dl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gm=vn(qx),Gx=$({},Is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vc}),Yx=vn(Gx),Zx=$({},Ci,{propertyName:0,elapsedTime:0,pseudoElement:0}),Qx=vn(Zx),Xx=$({},dl,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),Jx=vn(Xx),eS=[9,13,27,32],zc=c&&"CompositionEvent"in window,Us=null;c&&"documentMode"in document&&(Us=document.documentMode);var tS=c&&"TextEvent"in window&&!Us,ym=c&&(!zc||Us&&8<Us&&11>=Us),vm=" ",bm=!1;function _m(r,i){switch(r){case"keyup":return eS.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function km(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ei=!1;function nS(r,i){switch(r){case"compositionend":return km(i);case"keypress":return i.which!==32?null:(bm=!0,vm);case"textInput":return r=i.data,r===vm&&bm?null:r;default:return null}}function rS(r,i){if(Ei)return r==="compositionend"||!zc&&_m(r,i)?(r=hm(),ll=Ic=oa=null,Ei=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return ym&&i.locale!=="ko"?null:i.data;default:return null}}var aS={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 wm(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!aS[r.type]:i==="textarea"}function xm(r,i,l,d){nl(d),i=gl(i,"onChange"),0<i.length&&(l=new jc("onChange","change",null,l,d),r.push({event:l,listeners:i}))}var Bs=null,Fs=null;function iS(r){Vm(r,0)}function hl(r){var i=Mi(r);if(Tr(i))return r}function sS(r,i){if(r==="change")return i}var Sm=!1;if(c){var $c;if(c){var Hc="oninput"in document;if(!Hc){var Pm=document.createElement("div");Pm.setAttribute("oninput","return;"),Hc=typeof Pm.oninput=="function"}$c=Hc}else $c=!1;Sm=$c&&(!document.documentMode||9<document.documentMode)}function Tm(){Bs&&(Bs.detachEvent("onpropertychange",Cm),Fs=Bs=null)}function Cm(r){if(r.propertyName==="value"&&hl(Fs)){var i=[];xm(i,Fs,r,Ps(r)),Ua(iS,i)}}function oS(r,i,l){r==="focusin"?(Tm(),Bs=i,Fs=l,Bs.attachEvent("onpropertychange",Cm)):r==="focusout"&&Tm()}function lS(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return hl(Fs)}function uS(r,i){if(r==="click")return hl(i)}function cS(r,i){if(r==="input"||r==="change")return hl(i)}function dS(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var Yn=typeof Object.is=="function"?Object.is:dS;function Vs(r,i){if(Yn(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var l=Object.keys(r),d=Object.keys(i);if(l.length!==d.length)return!1;for(d=0;d<l.length;d++){var p=l[d];if(!h.call(i,p)||!Yn(r[p],i[p]))return!1}return!0}function Em(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Am(r,i){var l=Em(r);r=0;for(var d;l;){if(l.nodeType===3){if(d=r+l.textContent.length,r<=i&&d>=i)return{node:l,offset:i-r};r=d}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Em(l)}}function Rm(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Rm(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function Lm(){for(var r=window,i=pt();i instanceof r.HTMLIFrameElement;){try{var l=typeof i.contentWindow.location.href=="string"}catch{l=!1}if(l)r=i.contentWindow;else break;i=pt(r.document)}return i}function Wc(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function hS(r){var i=Lm(),l=r.focusedElem,d=r.selectionRange;if(i!==l&&l&&l.ownerDocument&&Rm(l.ownerDocument.documentElement,l)){if(d!==null&&Wc(l)){if(i=d.start,r=d.end,r===void 0&&(r=i),"selectionStart"in l)l.selectionStart=i,l.selectionEnd=Math.min(r,l.value.length);else if(r=(i=l.ownerDocument||document)&&i.defaultView||window,r.getSelection){r=r.getSelection();var p=l.textContent.length,g=Math.min(d.start,p);d=d.end===void 0?g:Math.min(d.end,p),!r.extend&&g>d&&(p=d,d=g,g=p),p=Am(l,g);var _=Am(l,d);p&&_&&(r.rangeCount!==1||r.anchorNode!==p.node||r.anchorOffset!==p.offset||r.focusNode!==_.node||r.focusOffset!==_.offset)&&(i=i.createRange(),i.setStart(p.node,p.offset),r.removeAllRanges(),g>d?(r.addRange(i),r.extend(_.node,_.offset)):(i.setEnd(_.node,_.offset),r.addRange(i)))}}for(i=[],r=l;r=r.parentNode;)r.nodeType===1&&i.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<i.length;l++)r=i[l],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var fS=c&&"documentMode"in document&&11>=document.documentMode,Ai=null,Kc=null,zs=null,qc=!1;function Dm(r,i,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;qc||Ai==null||Ai!==pt(d)||(d=Ai,"selectionStart"in d&&Wc(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),zs&&Vs(zs,d)||(zs=d,d=gl(Kc,"onSelect"),0<d.length&&(i=new jc("onSelect","select",null,i,l),r.push({event:i,listeners:d}),i.target=Ai)))}function fl(r,i){var l={};return l[r.toLowerCase()]=i.toLowerCase(),l["Webkit"+r]="webkit"+i,l["Moz"+r]="moz"+i,l}var Ri={animationend:fl("Animation","AnimationEnd"),animationiteration:fl("Animation","AnimationIteration"),animationstart:fl("Animation","AnimationStart"),transitionend:fl("Transition","TransitionEnd")},Gc={},Mm={};c&&(Mm=document.createElement("div").style,"AnimationEvent"in window||(delete Ri.animationend.animation,delete Ri.animationiteration.animation,delete Ri.animationstart.animation),"TransitionEvent"in window||delete Ri.transitionend.transition);function pl(r){if(Gc[r])return Gc[r];if(!Ri[r])return r;var i=Ri[r],l;for(l in i)if(i.hasOwnProperty(l)&&l in Mm)return Gc[r]=i[l];return r}var Nm=pl("animationend"),Om=pl("animationiteration"),Im=pl("animationstart"),jm=pl("transitionend"),Um=new Map,Bm="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 la(r,i){Um.set(r,i),o(i,[r])}for(var Yc=0;Yc<Bm.length;Yc++){var Zc=Bm[Yc],pS=Zc.toLowerCase(),mS=Zc[0].toUpperCase()+Zc.slice(1);la(pS,"on"+mS)}la(Nm,"onAnimationEnd"),la(Om,"onAnimationIteration"),la(Im,"onAnimationStart"),la("dblclick","onDoubleClick"),la("focusin","onFocus"),la("focusout","onBlur"),la(jm,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $s="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(" "),gS=new Set("cancel close invalid load scroll toggle".split(" ").concat($s));function Fm(r,i,l){var d=r.type||"unknown-event";r.currentTarget=l,De(d,i,void 0,r),r.currentTarget=null}function Vm(r,i){i=(i&4)!==0;for(var l=0;l<r.length;l++){var d=r[l],p=d.event;d=d.listeners;e:{var g=void 0;if(i)for(var _=d.length-1;0<=_;_--){var E=d[_],R=E.instance,z=E.currentTarget;if(E=E.listener,R!==g&&p.isPropagationStopped())break e;Fm(p,E,z),g=R}else for(_=0;_<d.length;_++){if(E=d[_],R=E.instance,z=E.currentTarget,E=E.listener,R!==g&&p.isPropagationStopped())break e;Fm(p,E,z),g=R}}}if(te)throw r=ae,te=!1,ae=null,r}function mt(r,i){var l=i[ad];l===void 0&&(l=i[ad]=new Set);var d=r+"__bubble";l.has(d)||(zm(i,r,2,!1),l.add(d))}function Qc(r,i,l){var d=0;i&&(d|=4),zm(l,r,d,i)}var ml="_reactListening"+Math.random().toString(36).slice(2);function Hs(r){if(!r[ml]){r[ml]=!0,a.forEach(function(l){l!=="selectionchange"&&(gS.has(l)||Qc(l,!1,r),Qc(l,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[ml]||(i[ml]=!0,Qc("selectionchange",!1,i))}}function zm(r,i,l,d){switch(dm(i)){case 1:var p=Rx;break;case 4:p=Lx;break;default:p=Nc}l=p.bind(null,i,l,r),p=void 0,!Es||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(p=!0),d?p!==void 0?r.addEventListener(i,l,{capture:!0,passive:p}):r.addEventListener(i,l,!0):p!==void 0?r.addEventListener(i,l,{passive:p}):r.addEventListener(i,l,!1)}function Xc(r,i,l,d,p){var g=d;if((i&1)===0&&(i&2)===0&&d!==null)e:for(;;){if(d===null)return;var _=d.tag;if(_===3||_===4){var E=d.stateNode.containerInfo;if(E===p||E.nodeType===8&&E.parentNode===p)break;if(_===4)for(_=d.return;_!==null;){var R=_.tag;if((R===3||R===4)&&(R=_.stateNode.containerInfo,R===p||R.nodeType===8&&R.parentNode===p))return;_=_.return}for(;E!==null;){if(_=Fa(E),_===null)return;if(R=_.tag,R===5||R===6){d=g=_;continue e}E=E.parentNode}}d=d.return}Ua(function(){var z=g,ee=Ps(l),ne=[];e:{var J=Um.get(r);if(J!==void 0){var de=jc,ve=r;switch(r){case"keypress":if(ul(l)===0)break e;case"keydown":case"keyup":de=Kx;break;case"focusin":ve="focus",de=Fc;break;case"focusout":ve="blur",de=Fc;break;case"beforeblur":case"afterblur":de=Fc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":de=pm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=Nx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=Yx;break;case Nm:case Om:case Im:de=jx;break;case jm:de=Qx;break;case"scroll":de=Dx;break;case"wheel":de=Jx;break;case"copy":case"cut":case"paste":de=Bx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=gm}var we=(i&4)!==0,Tt=!we&&r==="scroll",B=we?J!==null?J+"Capture":null:J;we=[];for(var O=z,F;O!==null;){F=O;var se=F.stateNode;if(F.tag===5&&se!==null&&(F=se,B!==null&&(se=Jr(O,B),se!=null&&we.push(Ws(O,se,F)))),Tt)break;O=O.return}0<we.length&&(J=new de(J,ve,null,l,ee),ne.push({event:J,listeners:we}))}}if((i&7)===0){e:{if(J=r==="mouseover"||r==="pointerover",de=r==="mouseout"||r==="pointerout",J&&l!==ki&&(ve=l.relatedTarget||l.fromElement)&&(Fa(ve)||ve[Dr]))break e;if((de||J)&&(J=ee.window===ee?ee:(J=ee.ownerDocument)?J.defaultView||J.parentWindow:window,de?(ve=l.relatedTarget||l.toElement,de=z,ve=ve?Fa(ve):null,ve!==null&&(Tt=he(ve),ve!==Tt||ve.tag!==5&&ve.tag!==6)&&(ve=null)):(de=null,ve=z),de!==ve)){if(we=pm,se="onMouseLeave",B="onMouseEnter",O="mouse",(r==="pointerout"||r==="pointerover")&&(we=gm,se="onPointerLeave",B="onPointerEnter",O="pointer"),Tt=de==null?J:Mi(de),F=ve==null?J:Mi(ve),J=new we(se,O+"leave",de,l,ee),J.target=Tt,J.relatedTarget=F,se=null,Fa(ee)===z&&(we=new we(B,O+"enter",ve,l,ee),we.target=F,we.relatedTarget=Tt,se=we),Tt=se,de&&ve)t:{for(we=de,B=ve,O=0,F=we;F;F=Li(F))O++;for(F=0,se=B;se;se=Li(se))F++;for(;0<O-F;)we=Li(we),O--;for(;0<F-O;)B=Li(B),F--;for(;O--;){if(we===B||B!==null&&we===B.alternate)break t;we=Li(we),B=Li(B)}we=null}else we=null;de!==null&&$m(ne,J,de,we,!1),ve!==null&&Tt!==null&&$m(ne,Tt,ve,we,!0)}}e:{if(J=z?Mi(z):window,de=J.nodeName&&J.nodeName.toLowerCase(),de==="select"||de==="input"&&J.type==="file")var Pe=sS;else if(wm(J))if(Sm)Pe=cS;else{Pe=lS;var Ie=oS}else(de=J.nodeName)&&de.toLowerCase()==="input"&&(J.type==="checkbox"||J.type==="radio")&&(Pe=uS);if(Pe&&(Pe=Pe(r,z))){xm(ne,Pe,l,ee);break e}Ie&&Ie(r,J,z),r==="focusout"&&(Ie=J._wrapperState)&&Ie.controlled&&J.type==="number"&&xs(J,"number",J.value)}switch(Ie=z?Mi(z):window,r){case"focusin":(wm(Ie)||Ie.contentEditable==="true")&&(Ai=Ie,Kc=z,zs=null);break;case"focusout":zs=Kc=Ai=null;break;case"mousedown":qc=!0;break;case"contextmenu":case"mouseup":case"dragend":qc=!1,Dm(ne,l,ee);break;case"selectionchange":if(fS)break;case"keydown":case"keyup":Dm(ne,l,ee)}var je;if(zc)e:{switch(r){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else Ei?_m(r,l)&&(Ve="onCompositionEnd"):r==="keydown"&&l.keyCode===229&&(Ve="onCompositionStart");Ve&&(ym&&l.locale!=="ko"&&(Ei||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&Ei&&(je=hm()):(oa=ee,Ic="value"in oa?oa.value:oa.textContent,Ei=!0)),Ie=gl(z,Ve),0<Ie.length&&(Ve=new mm(Ve,r,null,l,ee),ne.push({event:Ve,listeners:Ie}),je?Ve.data=je:(je=km(l),je!==null&&(Ve.data=je)))),(je=tS?nS(r,l):rS(r,l))&&(z=gl(z,"onBeforeInput"),0<z.length&&(ee=new mm("onBeforeInput","beforeinput",null,l,ee),ne.push({event:ee,listeners:z}),ee.data=je))}Vm(ne,i)})}function Ws(r,i,l){return{instance:r,listener:i,currentTarget:l}}function gl(r,i){for(var l=i+"Capture",d=[];r!==null;){var p=r,g=p.stateNode;p.tag===5&&g!==null&&(p=g,g=Jr(r,l),g!=null&&d.unshift(Ws(r,g,p)),g=Jr(r,i),g!=null&&d.push(Ws(r,g,p))),r=r.return}return d}function Li(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function $m(r,i,l,d,p){for(var g=i._reactName,_=[];l!==null&&l!==d;){var E=l,R=E.alternate,z=E.stateNode;if(R!==null&&R===d)break;E.tag===5&&z!==null&&(E=z,p?(R=Jr(l,g),R!=null&&_.unshift(Ws(l,R,E))):p||(R=Jr(l,g),R!=null&&_.push(Ws(l,R,E)))),l=l.return}_.length!==0&&r.push({event:i,listeners:_})}var yS=/\r\n?/g,vS=/\u0000|\uFFFD/g;function Hm(r){return(typeof r=="string"?r:""+r).replace(yS,`
|
|
7
|
-
`).replace(vS,"")}function yl(r,i,l){if(i=Hm(i),Hm(r)!==i&&l)throw Error(n(425))}function vl(){}var Jc=null,ed=null;function td(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var nd=typeof setTimeout=="function"?setTimeout:void 0,bS=typeof clearTimeout=="function"?clearTimeout:void 0,Wm=typeof Promise=="function"?Promise:void 0,_S=typeof queueMicrotask=="function"?queueMicrotask:typeof Wm<"u"?function(r){return Wm.resolve(null).then(r).catch(kS)}:nd;function kS(r){setTimeout(function(){throw r})}function rd(r,i){var l=i,d=0;do{var p=l.nextSibling;if(r.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"){if(d===0){r.removeChild(p),Os(i);return}d--}else l!=="$"&&l!=="$?"&&l!=="$!"||d++;l=p}while(l);Os(i)}function ua(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return r}function Km(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="$"||l==="$!"||l==="$?"){if(i===0)return r;i--}else l==="/$"&&i++}r=r.previousSibling}return null}var Di=Math.random().toString(36).slice(2),lr="__reactFiber$"+Di,Ks="__reactProps$"+Di,Dr="__reactContainer$"+Di,ad="__reactEvents$"+Di,wS="__reactListeners$"+Di,xS="__reactHandles$"+Di;function Fa(r){var i=r[lr];if(i)return i;for(var l=r.parentNode;l;){if(i=l[Dr]||l[lr]){if(l=i.alternate,i.child!==null||l!==null&&l.child!==null)for(r=Km(r);r!==null;){if(l=r[lr])return l;r=Km(r)}return i}r=l,l=r.parentNode}return null}function qs(r){return r=r[lr]||r[Dr],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Mi(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function bl(r){return r[Ks]||null}var id=[],Ni=-1;function ca(r){return{current:r}}function gt(r){0>Ni||(r.current=id[Ni],id[Ni]=null,Ni--)}function ft(r,i){Ni++,id[Ni]=r.current,r.current=i}var da={},Gt=ca(da),hn=ca(!1),Va=da;function Oi(r,i){var l=r.type.contextTypes;if(!l)return da;var d=r.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===i)return d.__reactInternalMemoizedMaskedChildContext;var p={},g;for(g in l)p[g]=i[g];return d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=p),p}function fn(r){return r=r.childContextTypes,r!=null}function _l(){gt(hn),gt(Gt)}function qm(r,i,l){if(Gt.current!==da)throw Error(n(168));ft(Gt,i),ft(hn,l)}function Gm(r,i,l){var d=r.stateNode;if(i=i.childContextTypes,typeof d.getChildContext!="function")return l;d=d.getChildContext();for(var p in d)if(!(p in i))throw Error(n(108,qe(r)||"Unknown",p));return $({},l,d)}function kl(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||da,Va=Gt.current,ft(Gt,r),ft(hn,hn.current),!0}function Ym(r,i,l){var d=r.stateNode;if(!d)throw Error(n(169));l?(r=Gm(r,i,Va),d.__reactInternalMemoizedMergedChildContext=r,gt(hn),gt(Gt),ft(Gt,r)):gt(hn),ft(hn,l)}var Mr=null,wl=!1,sd=!1;function Zm(r){Mr===null?Mr=[r]:Mr.push(r)}function SS(r){wl=!0,Zm(r)}function ha(){if(!sd&&Mr!==null){sd=!0;var r=0,i=ut;try{var l=Mr;for(ut=1;r<l.length;r++){var d=l[r];do d=d(!0);while(d!==null)}Mr=null,wl=!1}catch(p){throw Mr!==null&&(Mr=Mr.slice(r+1)),ht(Ar,ha),p}finally{ut=i,sd=!1}}return null}var Ii=[],ji=0,xl=null,Sl=0,En=[],An=0,za=null,Nr=1,Or="";function $a(r,i){Ii[ji++]=Sl,Ii[ji++]=xl,xl=r,Sl=i}function Qm(r,i,l){En[An++]=Nr,En[An++]=Or,En[An++]=za,za=r;var d=Nr;r=Or;var p=32-He(d)-1;d&=~(1<<p),l+=1;var g=32-He(i)+p;if(30<g){var _=p-p%5;g=(d&(1<<_)-1).toString(32),d>>=_,p-=_,Nr=1<<32-He(i)+p|l<<p|d,Or=g+r}else Nr=1<<g|l<<p|d,Or=r}function od(r){r.return!==null&&($a(r,1),Qm(r,1,0))}function ld(r){for(;r===xl;)xl=Ii[--ji],Ii[ji]=null,Sl=Ii[--ji],Ii[ji]=null;for(;r===za;)za=En[--An],En[An]=null,Or=En[--An],En[An]=null,Nr=En[--An],En[An]=null}var bn=null,_n=null,bt=!1,Zn=null;function Xm(r,i){var l=Mn(5,null,null,0);l.elementType="DELETED",l.stateNode=i,l.return=r,i=r.deletions,i===null?(r.deletions=[l],r.flags|=16):i.push(l)}function Jm(r,i){switch(r.tag){case 5:var l=r.type;return i=i.nodeType!==1||l.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(r.stateNode=i,bn=r,_n=ua(i.firstChild),!0):!1;case 6:return i=r.pendingProps===""||i.nodeType!==3?null:i,i!==null?(r.stateNode=i,bn=r,_n=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(l=za!==null?{id:Nr,overflow:Or}:null,r.memoizedState={dehydrated:i,treeContext:l,retryLane:1073741824},l=Mn(18,null,null,0),l.stateNode=i,l.return=r,r.child=l,bn=r,_n=null,!0):!1;default:return!1}}function ud(r){return(r.mode&1)!==0&&(r.flags&128)===0}function cd(r){if(bt){var i=_n;if(i){var l=i;if(!Jm(r,i)){if(ud(r))throw Error(n(418));i=ua(l.nextSibling);var d=bn;i&&Jm(r,i)?Xm(d,l):(r.flags=r.flags&-4097|2,bt=!1,bn=r)}}else{if(ud(r))throw Error(n(418));r.flags=r.flags&-4097|2,bt=!1,bn=r}}}function eg(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;bn=r}function Pl(r){if(r!==bn)return!1;if(!bt)return eg(r),bt=!0,!1;var i;if((i=r.tag!==3)&&!(i=r.tag!==5)&&(i=r.type,i=i!=="head"&&i!=="body"&&!td(r.type,r.memoizedProps)),i&&(i=_n)){if(ud(r))throw tg(),Error(n(418));for(;i;)Xm(r,i),i=ua(i.nextSibling)}if(eg(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="/$"){if(i===0){_n=ua(r.nextSibling);break e}i--}else l!=="$"&&l!=="$!"&&l!=="$?"||i++}r=r.nextSibling}_n=null}}else _n=bn?ua(r.stateNode.nextSibling):null;return!0}function tg(){for(var r=_n;r;)r=ua(r.nextSibling)}function Ui(){_n=bn=null,bt=!1}function dd(r){Zn===null?Zn=[r]:Zn.push(r)}var PS=j.ReactCurrentBatchConfig;function Gs(r,i,l){if(r=l.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var d=l.stateNode}if(!d)throw Error(n(147,r));var p=d,g=""+r;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===g?i.ref:(i=function(_){var E=p.refs;_===null?delete E[g]:E[g]=_},i._stringRef=g,i)}if(typeof r!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,r))}return r}function Tl(r,i){throw r=Object.prototype.toString.call(i),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r))}function ng(r){var i=r._init;return i(r._payload)}function rg(r){function i(B,O){if(r){var F=B.deletions;F===null?(B.deletions=[O],B.flags|=16):F.push(O)}}function l(B,O){if(!r)return null;for(;O!==null;)i(B,O),O=O.sibling;return null}function d(B,O){for(B=new Map;O!==null;)O.key!==null?B.set(O.key,O):B.set(O.index,O),O=O.sibling;return B}function p(B,O){return B=_a(B,O),B.index=0,B.sibling=null,B}function g(B,O,F){return B.index=F,r?(F=B.alternate,F!==null?(F=F.index,F<O?(B.flags|=2,O):F):(B.flags|=2,O)):(B.flags|=1048576,O)}function _(B){return r&&B.alternate===null&&(B.flags|=2),B}function E(B,O,F,se){return O===null||O.tag!==6?(O=nh(F,B.mode,se),O.return=B,O):(O=p(O,F),O.return=B,O)}function R(B,O,F,se){var Pe=F.type;return Pe===H?ee(B,O,F.props.children,se,F.key):O!==null&&(O.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===le&&ng(Pe)===O.type)?(se=p(O,F.props),se.ref=Gs(B,O,F),se.return=B,se):(se=Zl(F.type,F.key,F.props,null,B.mode,se),se.ref=Gs(B,O,F),se.return=B,se)}function z(B,O,F,se){return O===null||O.tag!==4||O.stateNode.containerInfo!==F.containerInfo||O.stateNode.implementation!==F.implementation?(O=rh(F,B.mode,se),O.return=B,O):(O=p(O,F.children||[]),O.return=B,O)}function ee(B,O,F,se,Pe){return O===null||O.tag!==7?(O=Qa(F,B.mode,se,Pe),O.return=B,O):(O=p(O,F),O.return=B,O)}function ne(B,O,F){if(typeof O=="string"&&O!==""||typeof O=="number")return O=nh(""+O,B.mode,F),O.return=B,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case q:return F=Zl(O.type,O.key,O.props,null,B.mode,F),F.ref=Gs(B,null,O),F.return=B,F;case K:return O=rh(O,B.mode,F),O.return=B,O;case le:var se=O._init;return ne(B,se(O._payload),F)}if(qr(O)||Y(O))return O=Qa(O,B.mode,F,null),O.return=B,O;Tl(B,O)}return null}function J(B,O,F,se){var Pe=O!==null?O.key:null;if(typeof F=="string"&&F!==""||typeof F=="number")return Pe!==null?null:E(B,O,""+F,se);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case q:return F.key===Pe?R(B,O,F,se):null;case K:return F.key===Pe?z(B,O,F,se):null;case le:return Pe=F._init,J(B,O,Pe(F._payload),se)}if(qr(F)||Y(F))return Pe!==null?null:ee(B,O,F,se,null);Tl(B,F)}return null}function de(B,O,F,se,Pe){if(typeof se=="string"&&se!==""||typeof se=="number")return B=B.get(F)||null,E(O,B,""+se,Pe);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case q:return B=B.get(se.key===null?F:se.key)||null,R(O,B,se,Pe);case K:return B=B.get(se.key===null?F:se.key)||null,z(O,B,se,Pe);case le:var Ie=se._init;return de(B,O,F,Ie(se._payload),Pe)}if(qr(se)||Y(se))return B=B.get(F)||null,ee(O,B,se,Pe,null);Tl(O,se)}return null}function ve(B,O,F,se){for(var Pe=null,Ie=null,je=O,Ve=O=0,Vt=null;je!==null&&Ve<F.length;Ve++){je.index>Ve?(Vt=je,je=null):Vt=je.sibling;var ot=J(B,je,F[Ve],se);if(ot===null){je===null&&(je=Vt);break}r&&je&&ot.alternate===null&&i(B,je),O=g(ot,O,Ve),Ie===null?Pe=ot:Ie.sibling=ot,Ie=ot,je=Vt}if(Ve===F.length)return l(B,je),bt&&$a(B,Ve),Pe;if(je===null){for(;Ve<F.length;Ve++)je=ne(B,F[Ve],se),je!==null&&(O=g(je,O,Ve),Ie===null?Pe=je:Ie.sibling=je,Ie=je);return bt&&$a(B,Ve),Pe}for(je=d(B,je);Ve<F.length;Ve++)Vt=de(je,B,Ve,F[Ve],se),Vt!==null&&(r&&Vt.alternate!==null&&je.delete(Vt.key===null?Ve:Vt.key),O=g(Vt,O,Ve),Ie===null?Pe=Vt:Ie.sibling=Vt,Ie=Vt);return r&&je.forEach(function(ka){return i(B,ka)}),bt&&$a(B,Ve),Pe}function we(B,O,F,se){var Pe=Y(F);if(typeof Pe!="function")throw Error(n(150));if(F=Pe.call(F),F==null)throw Error(n(151));for(var Ie=Pe=null,je=O,Ve=O=0,Vt=null,ot=F.next();je!==null&&!ot.done;Ve++,ot=F.next()){je.index>Ve?(Vt=je,je=null):Vt=je.sibling;var ka=J(B,je,ot.value,se);if(ka===null){je===null&&(je=Vt);break}r&&je&&ka.alternate===null&&i(B,je),O=g(ka,O,Ve),Ie===null?Pe=ka:Ie.sibling=ka,Ie=ka,je=Vt}if(ot.done)return l(B,je),bt&&$a(B,Ve),Pe;if(je===null){for(;!ot.done;Ve++,ot=F.next())ot=ne(B,ot.value,se),ot!==null&&(O=g(ot,O,Ve),Ie===null?Pe=ot:Ie.sibling=ot,Ie=ot);return bt&&$a(B,Ve),Pe}for(je=d(B,je);!ot.done;Ve++,ot=F.next())ot=de(je,B,Ve,ot.value,se),ot!==null&&(r&&ot.alternate!==null&&je.delete(ot.key===null?Ve:ot.key),O=g(ot,O,Ve),Ie===null?Pe=ot:Ie.sibling=ot,Ie=ot);return r&&je.forEach(function(aP){return i(B,aP)}),bt&&$a(B,Ve),Pe}function Tt(B,O,F,se){if(typeof F=="object"&&F!==null&&F.type===H&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case q:e:{for(var Pe=F.key,Ie=O;Ie!==null;){if(Ie.key===Pe){if(Pe=F.type,Pe===H){if(Ie.tag===7){l(B,Ie.sibling),O=p(Ie,F.props.children),O.return=B,B=O;break e}}else if(Ie.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===le&&ng(Pe)===Ie.type){l(B,Ie.sibling),O=p(Ie,F.props),O.ref=Gs(B,Ie,F),O.return=B,B=O;break e}l(B,Ie);break}else i(B,Ie);Ie=Ie.sibling}F.type===H?(O=Qa(F.props.children,B.mode,se,F.key),O.return=B,B=O):(se=Zl(F.type,F.key,F.props,null,B.mode,se),se.ref=Gs(B,O,F),se.return=B,B=se)}return _(B);case K:e:{for(Ie=F.key;O!==null;){if(O.key===Ie)if(O.tag===4&&O.stateNode.containerInfo===F.containerInfo&&O.stateNode.implementation===F.implementation){l(B,O.sibling),O=p(O,F.children||[]),O.return=B,B=O;break e}else{l(B,O);break}else i(B,O);O=O.sibling}O=rh(F,B.mode,se),O.return=B,B=O}return _(B);case le:return Ie=F._init,Tt(B,O,Ie(F._payload),se)}if(qr(F))return ve(B,O,F,se);if(Y(F))return we(B,O,F,se);Tl(B,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,O!==null&&O.tag===6?(l(B,O.sibling),O=p(O,F),O.return=B,B=O):(l(B,O),O=nh(F,B.mode,se),O.return=B,B=O),_(B)):l(B,O)}return Tt}var Bi=rg(!0),ag=rg(!1),Cl=ca(null),El=null,Fi=null,hd=null;function fd(){hd=Fi=El=null}function pd(r){var i=Cl.current;gt(Cl),r._currentValue=i}function md(r,i,l){for(;r!==null;){var d=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,d!==null&&(d.childLanes|=i)):d!==null&&(d.childLanes&i)!==i&&(d.childLanes|=i),r===l)break;r=r.return}}function Vi(r,i){El=r,hd=Fi=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&i)!==0&&(pn=!0),r.firstContext=null)}function Rn(r){var i=r._currentValue;if(hd!==r)if(r={context:r,memoizedValue:i,next:null},Fi===null){if(El===null)throw Error(n(308));Fi=r,El.dependencies={lanes:0,firstContext:r}}else Fi=Fi.next=r;return i}var Ha=null;function gd(r){Ha===null?Ha=[r]:Ha.push(r)}function ig(r,i,l,d){var p=i.interleaved;return p===null?(l.next=l,gd(i)):(l.next=p.next,p.next=l),i.interleaved=l,Ir(r,d)}function Ir(r,i){r.lanes|=i;var l=r.alternate;for(l!==null&&(l.lanes|=i),l=r,r=r.return;r!==null;)r.childLanes|=i,l=r.alternate,l!==null&&(l.childLanes|=i),l=r,r=r.return;return l.tag===3?l.stateNode:null}var fa=!1;function yd(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sg(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function jr(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function pa(r,i,l){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(at&2)!==0){var p=d.pending;return p===null?i.next=i:(i.next=p.next,p.next=i),d.pending=i,Ir(r,l)}return p=d.interleaved,p===null?(i.next=i,gd(d)):(i.next=p.next,p.next=i),d.interleaved=i,Ir(r,l)}function Al(r,i,l){if(i=i.updateQueue,i!==null&&(i=i.shared,(l&4194240)!==0)){var d=i.lanes;d&=r.pendingLanes,l|=d,i.lanes=l,Lc(r,l)}}function og(r,i){var l=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,l===d)){var p=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var _={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};g===null?p=g=_:g=g.next=_,l=l.next}while(l!==null);g===null?p=g=i:g=g.next=i}else p=g=i;l={baseState:d.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:d.shared,effects:d.effects},r.updateQueue=l;return}r=l.lastBaseUpdate,r===null?l.firstBaseUpdate=i:r.next=i,l.lastBaseUpdate=i}function Rl(r,i,l,d){var p=r.updateQueue;fa=!1;var g=p.firstBaseUpdate,_=p.lastBaseUpdate,E=p.shared.pending;if(E!==null){p.shared.pending=null;var R=E,z=R.next;R.next=null,_===null?g=z:_.next=z,_=R;var ee=r.alternate;ee!==null&&(ee=ee.updateQueue,E=ee.lastBaseUpdate,E!==_&&(E===null?ee.firstBaseUpdate=z:E.next=z,ee.lastBaseUpdate=R))}if(g!==null){var ne=p.baseState;_=0,ee=z=R=null,E=g;do{var J=E.lane,de=E.eventTime;if((d&J)===J){ee!==null&&(ee=ee.next={eventTime:de,lane:0,tag:E.tag,payload:E.payload,callback:E.callback,next:null});e:{var ve=r,we=E;switch(J=i,de=l,we.tag){case 1:if(ve=we.payload,typeof ve=="function"){ne=ve.call(de,ne,J);break e}ne=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=we.payload,J=typeof ve=="function"?ve.call(de,ne,J):ve,J==null)break e;ne=$({},ne,J);break e;case 2:fa=!0}}E.callback!==null&&E.lane!==0&&(r.flags|=64,J=p.effects,J===null?p.effects=[E]:J.push(E))}else de={eventTime:de,lane:J,tag:E.tag,payload:E.payload,callback:E.callback,next:null},ee===null?(z=ee=de,R=ne):ee=ee.next=de,_|=J;if(E=E.next,E===null){if(E=p.shared.pending,E===null)break;J=E,E=J.next,J.next=null,p.lastBaseUpdate=J,p.shared.pending=null}}while(!0);if(ee===null&&(R=ne),p.baseState=R,p.firstBaseUpdate=z,p.lastBaseUpdate=ee,i=p.shared.interleaved,i!==null){p=i;do _|=p.lane,p=p.next;while(p!==i)}else g===null&&(p.shared.lanes=0);qa|=_,r.lanes=_,r.memoizedState=ne}}function lg(r,i,l){if(r=i.effects,i.effects=null,r!==null)for(i=0;i<r.length;i++){var d=r[i],p=d.callback;if(p!==null){if(d.callback=null,d=l,typeof p!="function")throw Error(n(191,p));p.call(d)}}}var Ys={},ur=ca(Ys),Zs=ca(Ys),Qs=ca(Ys);function Wa(r){if(r===Ys)throw Error(n(174));return r}function vd(r,i){switch(ft(Qs,i),ft(Zs,r),ft(ur,Ys),r=i.nodeType,r){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:yi(null,"");break;default:r=r===8?i.parentNode:i,i=r.namespaceURI||null,r=r.tagName,i=yi(i,r)}gt(ur),ft(ur,i)}function zi(){gt(ur),gt(Zs),gt(Qs)}function ug(r){Wa(Qs.current);var i=Wa(ur.current),l=yi(i,r.type);i!==l&&(ft(Zs,r),ft(ur,l))}function bd(r){Zs.current===r&&(gt(ur),gt(Zs))}var kt=ca(0);function Ll(r){for(var i=r;i!==null;){if(i.tag===13){var l=i.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var _d=[];function kd(){for(var r=0;r<_d.length;r++)_d[r]._workInProgressVersionPrimary=null;_d.length=0}var Dl=j.ReactCurrentDispatcher,wd=j.ReactCurrentBatchConfig,Ka=0,wt=null,Mt=null,Bt=null,Ml=!1,Xs=!1,Js=0,TS=0;function Yt(){throw Error(n(321))}function xd(r,i){if(i===null)return!1;for(var l=0;l<i.length&&l<r.length;l++)if(!Yn(r[l],i[l]))return!1;return!0}function Sd(r,i,l,d,p,g){if(Ka=g,wt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,Dl.current=r===null||r.memoizedState===null?RS:LS,r=l(d,p),Xs){g=0;do{if(Xs=!1,Js=0,25<=g)throw Error(n(301));g+=1,Bt=Mt=null,i.updateQueue=null,Dl.current=DS,r=l(d,p)}while(Xs)}if(Dl.current=Il,i=Mt!==null&&Mt.next!==null,Ka=0,Bt=Mt=wt=null,Ml=!1,i)throw Error(n(300));return r}function Pd(){var r=Js!==0;return Js=0,r}function cr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?wt.memoizedState=Bt=r:Bt=Bt.next=r,Bt}function Ln(){if(Mt===null){var r=wt.alternate;r=r!==null?r.memoizedState:null}else r=Mt.next;var i=Bt===null?wt.memoizedState:Bt.next;if(i!==null)Bt=i,Mt=r;else{if(r===null)throw Error(n(310));Mt=r,r={memoizedState:Mt.memoizedState,baseState:Mt.baseState,baseQueue:Mt.baseQueue,queue:Mt.queue,next:null},Bt===null?wt.memoizedState=Bt=r:Bt=Bt.next=r}return Bt}function eo(r,i){return typeof i=="function"?i(r):i}function Td(r){var i=Ln(),l=i.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=r;var d=Mt,p=d.baseQueue,g=l.pending;if(g!==null){if(p!==null){var _=p.next;p.next=g.next,g.next=_}d.baseQueue=p=g,l.pending=null}if(p!==null){g=p.next,d=d.baseState;var E=_=null,R=null,z=g;do{var ee=z.lane;if((Ka&ee)===ee)R!==null&&(R=R.next={lane:0,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),d=z.hasEagerState?z.eagerState:r(d,z.action);else{var ne={lane:ee,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null};R===null?(E=R=ne,_=d):R=R.next=ne,wt.lanes|=ee,qa|=ee}z=z.next}while(z!==null&&z!==g);R===null?_=d:R.next=E,Yn(d,i.memoizedState)||(pn=!0),i.memoizedState=d,i.baseState=_,i.baseQueue=R,l.lastRenderedState=d}if(r=l.interleaved,r!==null){p=r;do g=p.lane,wt.lanes|=g,qa|=g,p=p.next;while(p!==r)}else p===null&&(l.lanes=0);return[i.memoizedState,l.dispatch]}function Cd(r){var i=Ln(),l=i.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=r;var d=l.dispatch,p=l.pending,g=i.memoizedState;if(p!==null){l.pending=null;var _=p=p.next;do g=r(g,_.action),_=_.next;while(_!==p);Yn(g,i.memoizedState)||(pn=!0),i.memoizedState=g,i.baseQueue===null&&(i.baseState=g),l.lastRenderedState=g}return[g,d]}function cg(){}function dg(r,i){var l=wt,d=Ln(),p=i(),g=!Yn(d.memoizedState,p);if(g&&(d.memoizedState=p,pn=!0),d=d.queue,Ed(pg.bind(null,l,d,r),[r]),d.getSnapshot!==i||g||Bt!==null&&Bt.memoizedState.tag&1){if(l.flags|=2048,to(9,fg.bind(null,l,d,p,i),void 0,null),Ft===null)throw Error(n(349));(Ka&30)!==0||hg(l,i,p)}return p}function hg(r,i,l){r.flags|=16384,r={getSnapshot:i,value:l},i=wt.updateQueue,i===null?(i={lastEffect:null,stores:null},wt.updateQueue=i,i.stores=[r]):(l=i.stores,l===null?i.stores=[r]:l.push(r))}function fg(r,i,l,d){i.value=l,i.getSnapshot=d,mg(i)&&gg(r)}function pg(r,i,l){return l(function(){mg(i)&&gg(r)})}function mg(r){var i=r.getSnapshot;r=r.value;try{var l=i();return!Yn(r,l)}catch{return!0}}function gg(r){var i=Ir(r,1);i!==null&&er(i,r,1,-1)}function yg(r){var i=cr();return typeof r=="function"&&(r=r()),i.memoizedState=i.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:eo,lastRenderedState:r},i.queue=r,r=r.dispatch=AS.bind(null,wt,r),[i.memoizedState,r]}function to(r,i,l,d){return r={tag:r,create:i,destroy:l,deps:d,next:null},i=wt.updateQueue,i===null?(i={lastEffect:null,stores:null},wt.updateQueue=i,i.lastEffect=r.next=r):(l=i.lastEffect,l===null?i.lastEffect=r.next=r:(d=l.next,l.next=r,r.next=d,i.lastEffect=r)),r}function vg(){return Ln().memoizedState}function Nl(r,i,l,d){var p=cr();wt.flags|=r,p.memoizedState=to(1|i,l,void 0,d===void 0?null:d)}function Ol(r,i,l,d){var p=Ln();d=d===void 0?null:d;var g=void 0;if(Mt!==null){var _=Mt.memoizedState;if(g=_.destroy,d!==null&&xd(d,_.deps)){p.memoizedState=to(i,l,g,d);return}}wt.flags|=r,p.memoizedState=to(1|i,l,g,d)}function bg(r,i){return Nl(8390656,8,r,i)}function Ed(r,i){return Ol(2048,8,r,i)}function _g(r,i){return Ol(4,2,r,i)}function kg(r,i){return Ol(4,4,r,i)}function wg(r,i){if(typeof i=="function")return r=r(),i(r),function(){i(null)};if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function xg(r,i,l){return l=l!=null?l.concat([r]):null,Ol(4,4,wg.bind(null,i,r),l)}function Ad(){}function Sg(r,i){var l=Ln();i=i===void 0?null:i;var d=l.memoizedState;return d!==null&&i!==null&&xd(i,d[1])?d[0]:(l.memoizedState=[r,i],r)}function Pg(r,i){var l=Ln();i=i===void 0?null:i;var d=l.memoizedState;return d!==null&&i!==null&&xd(i,d[1])?d[0]:(r=r(),l.memoizedState=[r,i],r)}function Tg(r,i,l){return(Ka&21)===0?(r.baseState&&(r.baseState=!1,pn=!0),r.memoizedState=l):(Yn(l,i)||(l=nm(),wt.lanes|=l,qa|=l,r.baseState=!0),i)}function CS(r,i){var l=ut;ut=l!==0&&4>l?l:4,r(!0);var d=wd.transition;wd.transition={};try{r(!1),i()}finally{ut=l,wd.transition=d}}function Cg(){return Ln().memoizedState}function ES(r,i,l){var d=va(r);if(l={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null},Eg(r))Ag(i,l);else if(l=ig(r,i,l,d),l!==null){var p=sn();er(l,r,d,p),Rg(l,i,d)}}function AS(r,i,l){var d=va(r),p={lane:d,action:l,hasEagerState:!1,eagerState:null,next:null};if(Eg(r))Ag(i,p);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=i.lastRenderedReducer,g!==null))try{var _=i.lastRenderedState,E=g(_,l);if(p.hasEagerState=!0,p.eagerState=E,Yn(E,_)){var R=i.interleaved;R===null?(p.next=p,gd(i)):(p.next=R.next,R.next=p),i.interleaved=p;return}}catch{}l=ig(r,i,p,d),l!==null&&(p=sn(),er(l,r,d,p),Rg(l,i,d))}}function Eg(r){var i=r.alternate;return r===wt||i!==null&&i===wt}function Ag(r,i){Xs=Ml=!0;var l=r.pending;l===null?i.next=i:(i.next=l.next,l.next=i),r.pending=i}function Rg(r,i,l){if((l&4194240)!==0){var d=i.lanes;d&=r.pendingLanes,l|=d,i.lanes=l,Lc(r,l)}}var Il={readContext:Rn,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useInsertionEffect:Yt,useLayoutEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useMutableSource:Yt,useSyncExternalStore:Yt,useId:Yt,unstable_isNewReconciler:!1},RS={readContext:Rn,useCallback:function(r,i){return cr().memoizedState=[r,i===void 0?null:i],r},useContext:Rn,useEffect:bg,useImperativeHandle:function(r,i,l){return l=l!=null?l.concat([r]):null,Nl(4194308,4,wg.bind(null,i,r),l)},useLayoutEffect:function(r,i){return Nl(4194308,4,r,i)},useInsertionEffect:function(r,i){return Nl(4,2,r,i)},useMemo:function(r,i){var l=cr();return i=i===void 0?null:i,r=r(),l.memoizedState=[r,i],r},useReducer:function(r,i,l){var d=cr();return i=l!==void 0?l(i):i,d.memoizedState=d.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},d.queue=r,r=r.dispatch=ES.bind(null,wt,r),[d.memoizedState,r]},useRef:function(r){var i=cr();return r={current:r},i.memoizedState=r},useState:yg,useDebugValue:Ad,useDeferredValue:function(r){return cr().memoizedState=r},useTransition:function(){var r=yg(!1),i=r[0];return r=CS.bind(null,r[1]),cr().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,l){var d=wt,p=cr();if(bt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=i(),Ft===null)throw Error(n(349));(Ka&30)!==0||hg(d,i,l)}p.memoizedState=l;var g={value:l,getSnapshot:i};return p.queue=g,bg(pg.bind(null,d,g,r),[r]),d.flags|=2048,to(9,fg.bind(null,d,g,l,i),void 0,null),l},useId:function(){var r=cr(),i=Ft.identifierPrefix;if(bt){var l=Or,d=Nr;l=(d&~(1<<32-He(d)-1)).toString(32)+l,i=":"+i+"R"+l,l=Js++,0<l&&(i+="H"+l.toString(32)),i+=":"}else l=TS++,i=":"+i+"r"+l.toString(32)+":";return r.memoizedState=i},unstable_isNewReconciler:!1},LS={readContext:Rn,useCallback:Sg,useContext:Rn,useEffect:Ed,useImperativeHandle:xg,useInsertionEffect:_g,useLayoutEffect:kg,useMemo:Pg,useReducer:Td,useRef:vg,useState:function(){return Td(eo)},useDebugValue:Ad,useDeferredValue:function(r){var i=Ln();return Tg(i,Mt.memoizedState,r)},useTransition:function(){var r=Td(eo)[0],i=Ln().memoizedState;return[r,i]},useMutableSource:cg,useSyncExternalStore:dg,useId:Cg,unstable_isNewReconciler:!1},DS={readContext:Rn,useCallback:Sg,useContext:Rn,useEffect:Ed,useImperativeHandle:xg,useInsertionEffect:_g,useLayoutEffect:kg,useMemo:Pg,useReducer:Cd,useRef:vg,useState:function(){return Cd(eo)},useDebugValue:Ad,useDeferredValue:function(r){var i=Ln();return Mt===null?i.memoizedState=r:Tg(i,Mt.memoizedState,r)},useTransition:function(){var r=Cd(eo)[0],i=Ln().memoizedState;return[r,i]},useMutableSource:cg,useSyncExternalStore:dg,useId:Cg,unstable_isNewReconciler:!1};function Qn(r,i){if(r&&r.defaultProps){i=$({},i),r=r.defaultProps;for(var l in r)i[l]===void 0&&(i[l]=r[l]);return i}return i}function Rd(r,i,l,d){i=r.memoizedState,l=l(d,i),l=l==null?i:$({},i,l),r.memoizedState=l,r.lanes===0&&(r.updateQueue.baseState=l)}var jl={isMounted:function(r){return(r=r._reactInternals)?he(r)===r:!1},enqueueSetState:function(r,i,l){r=r._reactInternals;var d=sn(),p=va(r),g=jr(d,p);g.payload=i,l!=null&&(g.callback=l),i=pa(r,g,p),i!==null&&(er(i,r,p,d),Al(i,r,p))},enqueueReplaceState:function(r,i,l){r=r._reactInternals;var d=sn(),p=va(r),g=jr(d,p);g.tag=1,g.payload=i,l!=null&&(g.callback=l),i=pa(r,g,p),i!==null&&(er(i,r,p,d),Al(i,r,p))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var l=sn(),d=va(r),p=jr(l,d);p.tag=2,i!=null&&(p.callback=i),i=pa(r,p,d),i!==null&&(er(i,r,d,l),Al(i,r,d))}};function Lg(r,i,l,d,p,g,_){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,g,_):i.prototype&&i.prototype.isPureReactComponent?!Vs(l,d)||!Vs(p,g):!0}function Dg(r,i,l){var d=!1,p=da,g=i.contextType;return typeof g=="object"&&g!==null?g=Rn(g):(p=fn(i)?Va:Gt.current,d=i.contextTypes,g=(d=d!=null)?Oi(r,p):da),i=new i(l,g),r.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=jl,r.stateNode=i,i._reactInternals=r,d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=p,r.__reactInternalMemoizedMaskedChildContext=g),i}function Mg(r,i,l,d){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(l,d),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(l,d),i.state!==r&&jl.enqueueReplaceState(i,i.state,null)}function Ld(r,i,l,d){var p=r.stateNode;p.props=l,p.state=r.memoizedState,p.refs={},yd(r);var g=i.contextType;typeof g=="object"&&g!==null?p.context=Rn(g):(g=fn(i)?Va:Gt.current,p.context=Oi(r,g)),p.state=r.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(Rd(r,i,g,l),p.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(i=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),i!==p.state&&jl.enqueueReplaceState(p,p.state,null),Rl(r,l,p,d),p.state=r.memoizedState),typeof p.componentDidMount=="function"&&(r.flags|=4194308)}function $i(r,i){try{var l="",d=i;do l+=Se(d),d=d.return;while(d);var p=l}catch(g){p=`
|
|
8
|
-
Error generating stack: `+g.message+`
|
|
9
|
-
`+g.stack}return{value:r,source:i,stack:p,digest:null}}function Dd(r,i,l){return{value:r,source:null,stack:l??null,digest:i??null}}function Md(r,i){try{console.error(i.value)}catch(l){setTimeout(function(){throw l})}}var MS=typeof WeakMap=="function"?WeakMap:Map;function Ng(r,i,l){l=jr(-1,l),l.tag=3,l.payload={element:null};var d=i.value;return l.callback=function(){Hl||(Hl=!0,Gd=d),Md(r,i)},l}function Og(r,i,l){l=jr(-1,l),l.tag=3;var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var p=i.value;l.payload=function(){return d(p)},l.callback=function(){Md(r,i)}}var g=r.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(l.callback=function(){Md(r,i),typeof d!="function"&&(ga===null?ga=new Set([this]):ga.add(this));var _=i.stack;this.componentDidCatch(i.value,{componentStack:_!==null?_:""})}),l}function Ig(r,i,l){var d=r.pingCache;if(d===null){d=r.pingCache=new MS;var p=new Set;d.set(i,p)}else p=d.get(i),p===void 0&&(p=new Set,d.set(i,p));p.has(l)||(p.add(l),r=qS.bind(null,r,i,l),i.then(r,r))}function jg(r){do{var i;if((i=r.tag===13)&&(i=r.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return r;r=r.return}while(r!==null);return null}function Ug(r,i,l,d,p){return(r.mode&1)===0?(r===i?r.flags|=65536:(r.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(i=jr(-1,1),i.tag=2,pa(l,i,1))),l.lanes|=1),r):(r.flags|=65536,r.lanes=p,r)}var NS=j.ReactCurrentOwner,pn=!1;function an(r,i,l,d){i.child=r===null?ag(i,null,l,d):Bi(i,r.child,l,d)}function Bg(r,i,l,d,p){l=l.render;var g=i.ref;return Vi(i,p),d=Sd(r,i,l,d,g,p),l=Pd(),r!==null&&!pn?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~p,Ur(r,i,p)):(bt&&l&&od(i),i.flags|=1,an(r,i,d,p),i.child)}function Fg(r,i,l,d,p){if(r===null){var g=l.type;return typeof g=="function"&&!th(g)&&g.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(i.tag=15,i.type=g,Vg(r,i,g,d,p)):(r=Zl(l.type,null,d,i,i.mode,p),r.ref=i.ref,r.return=i,i.child=r)}if(g=r.child,(r.lanes&p)===0){var _=g.memoizedProps;if(l=l.compare,l=l!==null?l:Vs,l(_,d)&&r.ref===i.ref)return Ur(r,i,p)}return i.flags|=1,r=_a(g,d),r.ref=i.ref,r.return=i,i.child=r}function Vg(r,i,l,d,p){if(r!==null){var g=r.memoizedProps;if(Vs(g,d)&&r.ref===i.ref)if(pn=!1,i.pendingProps=d=g,(r.lanes&p)!==0)(r.flags&131072)!==0&&(pn=!0);else return i.lanes=r.lanes,Ur(r,i,p)}return Nd(r,i,l,d,p)}function zg(r,i,l){var d=i.pendingProps,p=d.children,g=r!==null?r.memoizedState:null;if(d.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},ft(Wi,kn),kn|=l;else{if((l&1073741824)===0)return r=g!==null?g.baseLanes|l:l,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:r,cachePool:null,transitions:null},i.updateQueue=null,ft(Wi,kn),kn|=r,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=g!==null?g.baseLanes:l,ft(Wi,kn),kn|=d}else g!==null?(d=g.baseLanes|l,i.memoizedState=null):d=l,ft(Wi,kn),kn|=d;return an(r,i,p,l),i.child}function $g(r,i){var l=i.ref;(r===null&&l!==null||r!==null&&r.ref!==l)&&(i.flags|=512,i.flags|=2097152)}function Nd(r,i,l,d,p){var g=fn(l)?Va:Gt.current;return g=Oi(i,g),Vi(i,p),l=Sd(r,i,l,d,g,p),d=Pd(),r!==null&&!pn?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~p,Ur(r,i,p)):(bt&&d&&od(i),i.flags|=1,an(r,i,l,p),i.child)}function Hg(r,i,l,d,p){if(fn(l)){var g=!0;kl(i)}else g=!1;if(Vi(i,p),i.stateNode===null)Bl(r,i),Dg(i,l,d),Ld(i,l,d,p),d=!0;else if(r===null){var _=i.stateNode,E=i.memoizedProps;_.props=E;var R=_.context,z=l.contextType;typeof z=="object"&&z!==null?z=Rn(z):(z=fn(l)?Va:Gt.current,z=Oi(i,z));var ee=l.getDerivedStateFromProps,ne=typeof ee=="function"||typeof _.getSnapshotBeforeUpdate=="function";ne||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(E!==d||R!==z)&&Mg(i,_,d,z),fa=!1;var J=i.memoizedState;_.state=J,Rl(i,d,_,p),R=i.memoizedState,E!==d||J!==R||hn.current||fa?(typeof ee=="function"&&(Rd(i,l,ee,d),R=i.memoizedState),(E=fa||Lg(i,l,E,d,J,R,z))?(ne||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(i.flags|=4194308)):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=d,i.memoizedState=R),_.props=d,_.state=R,_.context=z,d=E):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),d=!1)}else{_=i.stateNode,sg(r,i),E=i.memoizedProps,z=i.type===i.elementType?E:Qn(i.type,E),_.props=z,ne=i.pendingProps,J=_.context,R=l.contextType,typeof R=="object"&&R!==null?R=Rn(R):(R=fn(l)?Va:Gt.current,R=Oi(i,R));var de=l.getDerivedStateFromProps;(ee=typeof de=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(E!==ne||J!==R)&&Mg(i,_,d,R),fa=!1,J=i.memoizedState,_.state=J,Rl(i,d,_,p);var ve=i.memoizedState;E!==ne||J!==ve||hn.current||fa?(typeof de=="function"&&(Rd(i,l,de,d),ve=i.memoizedState),(z=fa||Lg(i,l,z,d,J,ve,R)||!1)?(ee||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(d,ve,R),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(d,ve,R)),typeof _.componentDidUpdate=="function"&&(i.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof _.componentDidUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(i.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(i.flags|=1024),i.memoizedProps=d,i.memoizedState=ve),_.props=d,_.state=ve,_.context=R,d=z):(typeof _.componentDidUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(i.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||E===r.memoizedProps&&J===r.memoizedState||(i.flags|=1024),d=!1)}return Od(r,i,l,d,g,p)}function Od(r,i,l,d,p,g){$g(r,i);var _=(i.flags&128)!==0;if(!d&&!_)return p&&Ym(i,l,!1),Ur(r,i,g);d=i.stateNode,NS.current=i;var E=_&&typeof l.getDerivedStateFromError!="function"?null:d.render();return i.flags|=1,r!==null&&_?(i.child=Bi(i,r.child,null,g),i.child=Bi(i,null,E,g)):an(r,i,E,g),i.memoizedState=d.state,p&&Ym(i,l,!0),i.child}function Wg(r){var i=r.stateNode;i.pendingContext?qm(r,i.pendingContext,i.pendingContext!==i.context):i.context&&qm(r,i.context,!1),vd(r,i.containerInfo)}function Kg(r,i,l,d,p){return Ui(),dd(p),i.flags|=256,an(r,i,l,d),i.child}var Id={dehydrated:null,treeContext:null,retryLane:0};function jd(r){return{baseLanes:r,cachePool:null,transitions:null}}function qg(r,i,l){var d=i.pendingProps,p=kt.current,g=!1,_=(i.flags&128)!==0,E;if((E=_)||(E=r!==null&&r.memoizedState===null?!1:(p&2)!==0),E?(g=!0,i.flags&=-129):(r===null||r.memoizedState!==null)&&(p|=1),ft(kt,p&1),r===null)return cd(i),r=i.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((i.mode&1)===0?i.lanes=1:r.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(_=d.children,r=d.fallback,g?(d=i.mode,g=i.child,_={mode:"hidden",children:_},(d&1)===0&&g!==null?(g.childLanes=0,g.pendingProps=_):g=Ql(_,d,0,null),r=Qa(r,d,l,null),g.return=i,r.return=i,g.sibling=r,i.child=g,i.child.memoizedState=jd(l),i.memoizedState=Id,r):Ud(i,_));if(p=r.memoizedState,p!==null&&(E=p.dehydrated,E!==null))return OS(r,i,_,d,E,p,l);if(g){g=d.fallback,_=i.mode,p=r.child,E=p.sibling;var R={mode:"hidden",children:d.children};return(_&1)===0&&i.child!==p?(d=i.child,d.childLanes=0,d.pendingProps=R,i.deletions=null):(d=_a(p,R),d.subtreeFlags=p.subtreeFlags&14680064),E!==null?g=_a(E,g):(g=Qa(g,_,l,null),g.flags|=2),g.return=i,d.return=i,d.sibling=g,i.child=d,d=g,g=i.child,_=r.child.memoizedState,_=_===null?jd(l):{baseLanes:_.baseLanes|l,cachePool:null,transitions:_.transitions},g.memoizedState=_,g.childLanes=r.childLanes&~l,i.memoizedState=Id,d}return g=r.child,r=g.sibling,d=_a(g,{mode:"visible",children:d.children}),(i.mode&1)===0&&(d.lanes=l),d.return=i,d.sibling=null,r!==null&&(l=i.deletions,l===null?(i.deletions=[r],i.flags|=16):l.push(r)),i.child=d,i.memoizedState=null,d}function Ud(r,i){return i=Ql({mode:"visible",children:i},r.mode,0,null),i.return=r,r.child=i}function Ul(r,i,l,d){return d!==null&&dd(d),Bi(i,r.child,null,l),r=Ud(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function OS(r,i,l,d,p,g,_){if(l)return i.flags&256?(i.flags&=-257,d=Dd(Error(n(422))),Ul(r,i,_,d)):i.memoizedState!==null?(i.child=r.child,i.flags|=128,null):(g=d.fallback,p=i.mode,d=Ql({mode:"visible",children:d.children},p,0,null),g=Qa(g,p,_,null),g.flags|=2,d.return=i,g.return=i,d.sibling=g,i.child=d,(i.mode&1)!==0&&Bi(i,r.child,null,_),i.child.memoizedState=jd(_),i.memoizedState=Id,g);if((i.mode&1)===0)return Ul(r,i,_,null);if(p.data==="$!"){if(d=p.nextSibling&&p.nextSibling.dataset,d)var E=d.dgst;return d=E,g=Error(n(419)),d=Dd(g,d,void 0),Ul(r,i,_,d)}if(E=(_&r.childLanes)!==0,pn||E){if(d=Ft,d!==null){switch(_&-_){case 4:p=2;break;case 16:p=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:p=32;break;case 536870912:p=268435456;break;default:p=0}p=(p&(d.suspendedLanes|_))!==0?0:p,p!==0&&p!==g.retryLane&&(g.retryLane=p,Ir(r,p),er(d,r,p,-1))}return eh(),d=Dd(Error(n(421))),Ul(r,i,_,d)}return p.data==="$?"?(i.flags|=128,i.child=r.child,i=GS.bind(null,r),p._reactRetry=i,null):(r=g.treeContext,_n=ua(p.nextSibling),bn=i,bt=!0,Zn=null,r!==null&&(En[An++]=Nr,En[An++]=Or,En[An++]=za,Nr=r.id,Or=r.overflow,za=i),i=Ud(i,d.children),i.flags|=4096,i)}function Gg(r,i,l){r.lanes|=i;var d=r.alternate;d!==null&&(d.lanes|=i),md(r.return,i,l)}function Bd(r,i,l,d,p){var g=r.memoizedState;g===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:l,tailMode:p}:(g.isBackwards=i,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=l,g.tailMode=p)}function Yg(r,i,l){var d=i.pendingProps,p=d.revealOrder,g=d.tail;if(an(r,i,d.children,l),d=kt.current,(d&2)!==0)d=d&1|2,i.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Gg(r,l,i);else if(r.tag===19)Gg(r,l,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}d&=1}if(ft(kt,d),(i.mode&1)===0)i.memoizedState=null;else switch(p){case"forwards":for(l=i.child,p=null;l!==null;)r=l.alternate,r!==null&&Ll(r)===null&&(p=l),l=l.sibling;l=p,l===null?(p=i.child,i.child=null):(p=l.sibling,l.sibling=null),Bd(i,!1,p,l,g);break;case"backwards":for(l=null,p=i.child,i.child=null;p!==null;){if(r=p.alternate,r!==null&&Ll(r)===null){i.child=p;break}r=p.sibling,p.sibling=l,l=p,p=r}Bd(i,!0,l,null,g);break;case"together":Bd(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function Bl(r,i){(i.mode&1)===0&&r!==null&&(r.alternate=null,i.alternate=null,i.flags|=2)}function Ur(r,i,l){if(r!==null&&(i.dependencies=r.dependencies),qa|=i.lanes,(l&i.childLanes)===0)return null;if(r!==null&&i.child!==r.child)throw Error(n(153));if(i.child!==null){for(r=i.child,l=_a(r,r.pendingProps),i.child=l,l.return=i;r.sibling!==null;)r=r.sibling,l=l.sibling=_a(r,r.pendingProps),l.return=i;l.sibling=null}return i.child}function IS(r,i,l){switch(i.tag){case 3:Wg(i),Ui();break;case 5:ug(i);break;case 1:fn(i.type)&&kl(i);break;case 4:vd(i,i.stateNode.containerInfo);break;case 10:var d=i.type._context,p=i.memoizedProps.value;ft(Cl,d._currentValue),d._currentValue=p;break;case 13:if(d=i.memoizedState,d!==null)return d.dehydrated!==null?(ft(kt,kt.current&1),i.flags|=128,null):(l&i.child.childLanes)!==0?qg(r,i,l):(ft(kt,kt.current&1),r=Ur(r,i,l),r!==null?r.sibling:null);ft(kt,kt.current&1);break;case 19:if(d=(l&i.childLanes)!==0,(r.flags&128)!==0){if(d)return Yg(r,i,l);i.flags|=128}if(p=i.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),ft(kt,kt.current),d)break;return null;case 22:case 23:return i.lanes=0,zg(r,i,l)}return Ur(r,i,l)}var Zg,Fd,Qg,Xg;Zg=function(r,i){for(var l=i.child;l!==null;){if(l.tag===5||l.tag===6)r.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Fd=function(){},Qg=function(r,i,l,d){var p=r.memoizedProps;if(p!==d){r=i.stateNode,Wa(ur.current);var g=null;switch(l){case"input":p=en(r,p),d=en(r,d),g=[];break;case"select":p=$({},p,{value:void 0}),d=$({},d,{value:void 0}),g=[];break;case"textarea":p=Ss(r,p),d=Ss(r,d),g=[];break;default:typeof p.onClick!="function"&&typeof d.onClick=="function"&&(r.onclick=vl)}bi(l,d);var _;l=null;for(z in p)if(!d.hasOwnProperty(z)&&p.hasOwnProperty(z)&&p[z]!=null)if(z==="style"){var E=p[z];for(_ in E)E.hasOwnProperty(_)&&(l||(l={}),l[_]="")}else z!=="dangerouslySetInnerHTML"&&z!=="children"&&z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&z!=="autoFocus"&&(s.hasOwnProperty(z)?g||(g=[]):(g=g||[]).push(z,null));for(z in d){var R=d[z];if(E=p?.[z],d.hasOwnProperty(z)&&R!==E&&(R!=null||E!=null))if(z==="style")if(E){for(_ in E)!E.hasOwnProperty(_)||R&&R.hasOwnProperty(_)||(l||(l={}),l[_]="");for(_ in R)R.hasOwnProperty(_)&&E[_]!==R[_]&&(l||(l={}),l[_]=R[_])}else l||(g||(g=[]),g.push(z,l)),l=R;else z==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,E=E?E.__html:void 0,R!=null&&E!==R&&(g=g||[]).push(z,R)):z==="children"?typeof R!="string"&&typeof R!="number"||(g=g||[]).push(z,""+R):z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&(s.hasOwnProperty(z)?(R!=null&&z==="onScroll"&&mt("scroll",r),g||E===R||(g=[])):(g=g||[]).push(z,R))}l&&(g=g||[]).push("style",l);var z=g;(i.updateQueue=z)&&(i.flags|=4)}},Xg=function(r,i,l,d){l!==d&&(i.flags|=4)};function no(r,i){if(!bt)switch(r.tailMode){case"hidden":i=r.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r.tail=null:l.sibling=null;break;case"collapsed":l=r.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Zt(r){var i=r.alternate!==null&&r.alternate.child===r.child,l=0,d=0;if(i)for(var p=r.child;p!==null;)l|=p.lanes|p.childLanes,d|=p.subtreeFlags&14680064,d|=p.flags&14680064,p.return=r,p=p.sibling;else for(p=r.child;p!==null;)l|=p.lanes|p.childLanes,d|=p.subtreeFlags,d|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=d,r.childLanes=l,i}function jS(r,i,l){var d=i.pendingProps;switch(ld(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(i),null;case 1:return fn(i.type)&&_l(),Zt(i),null;case 3:return d=i.stateNode,zi(),gt(hn),gt(Gt),kd(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(r===null||r.child===null)&&(Pl(i)?i.flags|=4:r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Zn!==null&&(Qd(Zn),Zn=null))),Fd(r,i),Zt(i),null;case 5:bd(i);var p=Wa(Qs.current);if(l=i.type,r!==null&&i.stateNode!=null)Qg(r,i,l,d,p),r.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!d){if(i.stateNode===null)throw Error(n(166));return Zt(i),null}if(r=Wa(ur.current),Pl(i)){d=i.stateNode,l=i.type;var g=i.memoizedProps;switch(d[lr]=i,d[Ks]=g,r=(i.mode&1)!==0,l){case"dialog":mt("cancel",d),mt("close",d);break;case"iframe":case"object":case"embed":mt("load",d);break;case"video":case"audio":for(p=0;p<$s.length;p++)mt($s[p],d);break;case"source":mt("error",d);break;case"img":case"image":case"link":mt("error",d),mt("load",d);break;case"details":mt("toggle",d);break;case"input":ws(d,g),mt("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!g.multiple},mt("invalid",d);break;case"textarea":Jo(d,g),mt("invalid",d)}bi(l,g),p=null;for(var _ in g)if(g.hasOwnProperty(_)){var E=g[_];_==="children"?typeof E=="string"?d.textContent!==E&&(g.suppressHydrationWarning!==!0&&yl(d.textContent,E,r),p=["children",E]):typeof E=="number"&&d.textContent!==""+E&&(g.suppressHydrationWarning!==!0&&yl(d.textContent,E,r),p=["children",""+E]):s.hasOwnProperty(_)&&E!=null&&_==="onScroll"&&mt("scroll",d)}switch(l){case"input":Hn(d),Xo(d,g,!0);break;case"textarea":Hn(d),or(d);break;case"select":case"option":break;default:typeof g.onClick=="function"&&(d.onclick=vl)}d=p,i.updateQueue=d,d!==null&&(i.flags|=4)}else{_=p.nodeType===9?p:p.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=Yr(l)),r==="http://www.w3.org/1999/xhtml"?l==="script"?(r=_.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof d.is=="string"?r=_.createElement(l,{is:d.is}):(r=_.createElement(l),l==="select"&&(_=r,d.multiple?_.multiple=!0:d.size&&(_.size=d.size))):r=_.createElementNS(r,l),r[lr]=i,r[Ks]=d,Zg(r,i,!1,!1),i.stateNode=r;e:{switch(_=_i(l,d),l){case"dialog":mt("cancel",r),mt("close",r),p=d;break;case"iframe":case"object":case"embed":mt("load",r),p=d;break;case"video":case"audio":for(p=0;p<$s.length;p++)mt($s[p],r);p=d;break;case"source":mt("error",r),p=d;break;case"img":case"image":case"link":mt("error",r),mt("load",r),p=d;break;case"details":mt("toggle",r),p=d;break;case"input":ws(r,d),p=en(r,d),mt("invalid",r);break;case"option":p=d;break;case"select":r._wrapperState={wasMultiple:!!d.multiple},p=$({},d,{value:void 0}),mt("invalid",r);break;case"textarea":Jo(r,d),p=Ss(r,d),mt("invalid",r);break;default:p=d}bi(l,p),E=p;for(g in E)if(E.hasOwnProperty(g)){var R=E[g];g==="style"?tl(r,R):g==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&Tn(r,R)):g==="children"?typeof R=="string"?(l!=="textarea"||R!=="")&&tn(r,R):typeof R=="number"&&tn(r,""+R):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(s.hasOwnProperty(g)?R!=null&&g==="onScroll"&&mt("scroll",r):R!=null&&M(r,g,R,_))}switch(l){case"input":Hn(r),Xo(r,d,!1);break;case"textarea":Hn(r),or(r);break;case"option":d.value!=null&&r.setAttribute("value",""+Xe(d.value));break;case"select":r.multiple=!!d.multiple,g=d.value,g!=null?Gr(r,!!d.multiple,g,!1):d.defaultValue!=null&&Gr(r,!!d.multiple,d.defaultValue,!0);break;default:typeof p.onClick=="function"&&(r.onclick=vl)}switch(l){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return Zt(i),null;case 6:if(r&&i.stateNode!=null)Xg(r,i,r.memoizedProps,d);else{if(typeof d!="string"&&i.stateNode===null)throw Error(n(166));if(l=Wa(Qs.current),Wa(ur.current),Pl(i)){if(d=i.stateNode,l=i.memoizedProps,d[lr]=i,(g=d.nodeValue!==l)&&(r=bn,r!==null))switch(r.tag){case 3:yl(d.nodeValue,l,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&yl(d.nodeValue,l,(r.mode&1)!==0)}g&&(i.flags|=4)}else d=(l.nodeType===9?l:l.ownerDocument).createTextNode(d),d[lr]=i,i.stateNode=d}return Zt(i),null;case 13:if(gt(kt),d=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(bt&&_n!==null&&(i.mode&1)!==0&&(i.flags&128)===0)tg(),Ui(),i.flags|=98560,g=!1;else if(g=Pl(i),d!==null&&d.dehydrated!==null){if(r===null){if(!g)throw Error(n(318));if(g=i.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(n(317));g[lr]=i}else Ui(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Zt(i),g=!1}else Zn!==null&&(Qd(Zn),Zn=null),g=!0;if(!g)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=l,i):(d=d!==null,d!==(r!==null&&r.memoizedState!==null)&&d&&(i.child.flags|=8192,(i.mode&1)!==0&&(r===null||(kt.current&1)!==0?Nt===0&&(Nt=3):eh())),i.updateQueue!==null&&(i.flags|=4),Zt(i),null);case 4:return zi(),Fd(r,i),r===null&&Hs(i.stateNode.containerInfo),Zt(i),null;case 10:return pd(i.type._context),Zt(i),null;case 17:return fn(i.type)&&_l(),Zt(i),null;case 19:if(gt(kt),g=i.memoizedState,g===null)return Zt(i),null;if(d=(i.flags&128)!==0,_=g.rendering,_===null)if(d)no(g,!1);else{if(Nt!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(_=Ll(r),_!==null){for(i.flags|=128,no(g,!1),d=_.updateQueue,d!==null&&(i.updateQueue=d,i.flags|=4),i.subtreeFlags=0,d=l,l=i.child;l!==null;)g=l,r=d,g.flags&=14680066,_=g.alternate,_===null?(g.childLanes=0,g.lanes=r,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=_.childLanes,g.lanes=_.lanes,g.child=_.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=_.memoizedProps,g.memoizedState=_.memoizedState,g.updateQueue=_.updateQueue,g.type=_.type,r=_.dependencies,g.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),l=l.sibling;return ft(kt,kt.current&1|2),i.child}r=r.sibling}g.tail!==null&&rt()>Ki&&(i.flags|=128,d=!0,no(g,!1),i.lanes=4194304)}else{if(!d)if(r=Ll(_),r!==null){if(i.flags|=128,d=!0,l=r.updateQueue,l!==null&&(i.updateQueue=l,i.flags|=4),no(g,!0),g.tail===null&&g.tailMode==="hidden"&&!_.alternate&&!bt)return Zt(i),null}else 2*rt()-g.renderingStartTime>Ki&&l!==1073741824&&(i.flags|=128,d=!0,no(g,!1),i.lanes=4194304);g.isBackwards?(_.sibling=i.child,i.child=_):(l=g.last,l!==null?l.sibling=_:i.child=_,g.last=_)}return g.tail!==null?(i=g.tail,g.rendering=i,g.tail=i.sibling,g.renderingStartTime=rt(),i.sibling=null,l=kt.current,ft(kt,d?l&1|2:l&1),i):(Zt(i),null);case 22:case 23:return Jd(),d=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==d&&(i.flags|=8192),d&&(i.mode&1)!==0?(kn&1073741824)!==0&&(Zt(i),i.subtreeFlags&6&&(i.flags|=8192)):Zt(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function US(r,i){switch(ld(i),i.tag){case 1:return fn(i.type)&&_l(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return zi(),gt(hn),gt(Gt),kd(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return bd(i),null;case 13:if(gt(kt),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(n(340));Ui()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return gt(kt),null;case 4:return zi(),null;case 10:return pd(i.type._context),null;case 22:case 23:return Jd(),null;case 24:return null;default:return null}}var Fl=!1,Qt=!1,BS=typeof WeakSet=="function"?WeakSet:Set,ge=null;function Hi(r,i){var l=r.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(d){xt(r,i,d)}else l.current=null}function Vd(r,i,l){try{l()}catch(d){xt(r,i,d)}}var Jg=!1;function FS(r,i){if(Jc=sl,r=Lm(),Wc(r)){if("selectionStart"in r)var l={start:r.selectionStart,end:r.selectionEnd};else e:{l=(l=r.ownerDocument)&&l.defaultView||window;var d=l.getSelection&&l.getSelection();if(d&&d.rangeCount!==0){l=d.anchorNode;var p=d.anchorOffset,g=d.focusNode;d=d.focusOffset;try{l.nodeType,g.nodeType}catch{l=null;break e}var _=0,E=-1,R=-1,z=0,ee=0,ne=r,J=null;t:for(;;){for(var de;ne!==l||p!==0&&ne.nodeType!==3||(E=_+p),ne!==g||d!==0&&ne.nodeType!==3||(R=_+d),ne.nodeType===3&&(_+=ne.nodeValue.length),(de=ne.firstChild)!==null;)J=ne,ne=de;for(;;){if(ne===r)break t;if(J===l&&++z===p&&(E=_),J===g&&++ee===d&&(R=_),(de=ne.nextSibling)!==null)break;ne=J,J=ne.parentNode}ne=de}l=E===-1||R===-1?null:{start:E,end:R}}else l=null}l=l||{start:0,end:0}}else l=null;for(ed={focusedElem:r,selectionRange:l},sl=!1,ge=i;ge!==null;)if(i=ge,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,ge=r;else for(;ge!==null;){i=ge;try{var ve=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(ve!==null){var we=ve.memoizedProps,Tt=ve.memoizedState,B=i.stateNode,O=B.getSnapshotBeforeUpdate(i.elementType===i.type?we:Qn(i.type,we),Tt);B.__reactInternalSnapshotBeforeUpdate=O}break;case 3:var F=i.stateNode.containerInfo;F.nodeType===1?F.textContent="":F.nodeType===9&&F.documentElement&&F.removeChild(F.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(se){xt(i,i.return,se)}if(r=i.sibling,r!==null){r.return=i.return,ge=r;break}ge=i.return}return ve=Jg,Jg=!1,ve}function ro(r,i,l){var d=i.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var p=d=d.next;do{if((p.tag&r)===r){var g=p.destroy;p.destroy=void 0,g!==void 0&&Vd(i,l,g)}p=p.next}while(p!==d)}}function Vl(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var l=i=i.next;do{if((l.tag&r)===r){var d=l.create;l.destroy=d()}l=l.next}while(l!==i)}}function zd(r){var i=r.ref;if(i!==null){var l=r.stateNode;r.tag,r=l,typeof i=="function"?i(r):i.current=r}}function ey(r){var i=r.alternate;i!==null&&(r.alternate=null,ey(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[lr],delete i[Ks],delete i[ad],delete i[wS],delete i[xS])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function ty(r){return r.tag===5||r.tag===3||r.tag===4}function ny(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||ty(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function $d(r,i,l){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?l.nodeType===8?l.parentNode.insertBefore(r,i):l.insertBefore(r,i):(l.nodeType===8?(i=l.parentNode,i.insertBefore(r,l)):(i=l,i.appendChild(r)),l=l._reactRootContainer,l!=null||i.onclick!==null||(i.onclick=vl));else if(d!==4&&(r=r.child,r!==null))for($d(r,i,l),r=r.sibling;r!==null;)$d(r,i,l),r=r.sibling}function Hd(r,i,l){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?l.insertBefore(r,i):l.appendChild(r);else if(d!==4&&(r=r.child,r!==null))for(Hd(r,i,l),r=r.sibling;r!==null;)Hd(r,i,l),r=r.sibling}var Ht=null,Xn=!1;function ma(r,i,l){for(l=l.child;l!==null;)ry(r,i,l),l=l.sibling}function ry(r,i,l){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(Cn,l)}catch{}switch(l.tag){case 5:Qt||Hi(l,i);case 6:var d=Ht,p=Xn;Ht=null,ma(r,i,l),Ht=d,Xn=p,Ht!==null&&(Xn?(r=Ht,l=l.stateNode,r.nodeType===8?r.parentNode.removeChild(l):r.removeChild(l)):Ht.removeChild(l.stateNode));break;case 18:Ht!==null&&(Xn?(r=Ht,l=l.stateNode,r.nodeType===8?rd(r.parentNode,l):r.nodeType===1&&rd(r,l),Os(r)):rd(Ht,l.stateNode));break;case 4:d=Ht,p=Xn,Ht=l.stateNode.containerInfo,Xn=!0,ma(r,i,l),Ht=d,Xn=p;break;case 0:case 11:case 14:case 15:if(!Qt&&(d=l.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){p=d=d.next;do{var g=p,_=g.destroy;g=g.tag,_!==void 0&&((g&2)!==0||(g&4)!==0)&&Vd(l,i,_),p=p.next}while(p!==d)}ma(r,i,l);break;case 1:if(!Qt&&(Hi(l,i),d=l.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=l.memoizedProps,d.state=l.memoizedState,d.componentWillUnmount()}catch(E){xt(l,i,E)}ma(r,i,l);break;case 21:ma(r,i,l);break;case 22:l.mode&1?(Qt=(d=Qt)||l.memoizedState!==null,ma(r,i,l),Qt=d):ma(r,i,l);break;default:ma(r,i,l)}}function ay(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var l=r.stateNode;l===null&&(l=r.stateNode=new BS),i.forEach(function(d){var p=YS.bind(null,r,d);l.has(d)||(l.add(d),d.then(p,p))})}}function Jn(r,i){var l=i.deletions;if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];try{var g=r,_=i,E=_;e:for(;E!==null;){switch(E.tag){case 5:Ht=E.stateNode,Xn=!1;break e;case 3:Ht=E.stateNode.containerInfo,Xn=!0;break e;case 4:Ht=E.stateNode.containerInfo,Xn=!0;break e}E=E.return}if(Ht===null)throw Error(n(160));ry(g,_,p),Ht=null,Xn=!1;var R=p.alternate;R!==null&&(R.return=null),p.return=null}catch(z){xt(p,i,z)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)iy(i,r),i=i.sibling}function iy(r,i){var l=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(Jn(i,r),dr(r),d&4){try{ro(3,r,r.return),Vl(3,r)}catch(we){xt(r,r.return,we)}try{ro(5,r,r.return)}catch(we){xt(r,r.return,we)}}break;case 1:Jn(i,r),dr(r),d&512&&l!==null&&Hi(l,l.return);break;case 5:if(Jn(i,r),dr(r),d&512&&l!==null&&Hi(l,l.return),r.flags&32){var p=r.stateNode;try{tn(p,"")}catch(we){xt(r,r.return,we)}}if(d&4&&(p=r.stateNode,p!=null)){var g=r.memoizedProps,_=l!==null?l.memoizedProps:g,E=r.type,R=r.updateQueue;if(r.updateQueue=null,R!==null)try{E==="input"&&g.type==="radio"&&g.name!=null&&Qo(p,g),_i(E,_);var z=_i(E,g);for(_=0;_<R.length;_+=2){var ee=R[_],ne=R[_+1];ee==="style"?tl(p,ne):ee==="dangerouslySetInnerHTML"?Tn(p,ne):ee==="children"?tn(p,ne):M(p,ee,ne,z)}switch(E){case"input":Wn(p,g);break;case"textarea":el(p,g);break;case"select":var J=p._wrapperState.wasMultiple;p._wrapperState.wasMultiple=!!g.multiple;var de=g.value;de!=null?Gr(p,!!g.multiple,de,!1):J!==!!g.multiple&&(g.defaultValue!=null?Gr(p,!!g.multiple,g.defaultValue,!0):Gr(p,!!g.multiple,g.multiple?[]:"",!1))}p[Ks]=g}catch(we){xt(r,r.return,we)}}break;case 6:if(Jn(i,r),dr(r),d&4){if(r.stateNode===null)throw Error(n(162));p=r.stateNode,g=r.memoizedProps;try{p.nodeValue=g}catch(we){xt(r,r.return,we)}}break;case 3:if(Jn(i,r),dr(r),d&4&&l!==null&&l.memoizedState.isDehydrated)try{Os(i.containerInfo)}catch(we){xt(r,r.return,we)}break;case 4:Jn(i,r),dr(r);break;case 13:Jn(i,r),dr(r),p=r.child,p.flags&8192&&(g=p.memoizedState!==null,p.stateNode.isHidden=g,!g||p.alternate!==null&&p.alternate.memoizedState!==null||(qd=rt())),d&4&&ay(r);break;case 22:if(ee=l!==null&&l.memoizedState!==null,r.mode&1?(Qt=(z=Qt)||ee,Jn(i,r),Qt=z):Jn(i,r),dr(r),d&8192){if(z=r.memoizedState!==null,(r.stateNode.isHidden=z)&&!ee&&(r.mode&1)!==0)for(ge=r,ee=r.child;ee!==null;){for(ne=ge=ee;ge!==null;){switch(J=ge,de=J.child,J.tag){case 0:case 11:case 14:case 15:ro(4,J,J.return);break;case 1:Hi(J,J.return);var ve=J.stateNode;if(typeof ve.componentWillUnmount=="function"){d=J,l=J.return;try{i=d,ve.props=i.memoizedProps,ve.state=i.memoizedState,ve.componentWillUnmount()}catch(we){xt(d,l,we)}}break;case 5:Hi(J,J.return);break;case 22:if(J.memoizedState!==null){ly(ne);continue}}de!==null?(de.return=J,ge=de):ly(ne)}ee=ee.sibling}e:for(ee=null,ne=r;;){if(ne.tag===5){if(ee===null){ee=ne;try{p=ne.stateNode,z?(g=p.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none"):(E=ne.stateNode,R=ne.memoizedProps.style,_=R!=null&&R.hasOwnProperty("display")?R.display:null,E.style.display=vi("display",_))}catch(we){xt(r,r.return,we)}}}else if(ne.tag===6){if(ee===null)try{ne.stateNode.nodeValue=z?"":ne.memoizedProps}catch(we){xt(r,r.return,we)}}else if((ne.tag!==22&&ne.tag!==23||ne.memoizedState===null||ne===r)&&ne.child!==null){ne.child.return=ne,ne=ne.child;continue}if(ne===r)break e;for(;ne.sibling===null;){if(ne.return===null||ne.return===r)break e;ee===ne&&(ee=null),ne=ne.return}ee===ne&&(ee=null),ne.sibling.return=ne.return,ne=ne.sibling}}break;case 19:Jn(i,r),dr(r),d&4&&ay(r);break;case 21:break;default:Jn(i,r),dr(r)}}function dr(r){var i=r.flags;if(i&2){try{e:{for(var l=r.return;l!==null;){if(ty(l)){var d=l;break e}l=l.return}throw Error(n(160))}switch(d.tag){case 5:var p=d.stateNode;d.flags&32&&(tn(p,""),d.flags&=-33);var g=ny(r);Hd(r,g,p);break;case 3:case 4:var _=d.stateNode.containerInfo,E=ny(r);$d(r,E,_);break;default:throw Error(n(161))}}catch(R){xt(r,r.return,R)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function VS(r,i,l){ge=r,sy(r)}function sy(r,i,l){for(var d=(r.mode&1)!==0;ge!==null;){var p=ge,g=p.child;if(p.tag===22&&d){var _=p.memoizedState!==null||Fl;if(!_){var E=p.alternate,R=E!==null&&E.memoizedState!==null||Qt;E=Fl;var z=Qt;if(Fl=_,(Qt=R)&&!z)for(ge=p;ge!==null;)_=ge,R=_.child,_.tag===22&&_.memoizedState!==null?uy(p):R!==null?(R.return=_,ge=R):uy(p);for(;g!==null;)ge=g,sy(g),g=g.sibling;ge=p,Fl=E,Qt=z}oy(r)}else(p.subtreeFlags&8772)!==0&&g!==null?(g.return=p,ge=g):oy(r)}}function oy(r){for(;ge!==null;){var i=ge;if((i.flags&8772)!==0){var l=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:Qt||Vl(5,i);break;case 1:var d=i.stateNode;if(i.flags&4&&!Qt)if(l===null)d.componentDidMount();else{var p=i.elementType===i.type?l.memoizedProps:Qn(i.type,l.memoizedProps);d.componentDidUpdate(p,l.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var g=i.updateQueue;g!==null&&lg(i,g,d);break;case 3:var _=i.updateQueue;if(_!==null){if(l=null,i.child!==null)switch(i.child.tag){case 5:l=i.child.stateNode;break;case 1:l=i.child.stateNode}lg(i,_,l)}break;case 5:var E=i.stateNode;if(l===null&&i.flags&4){l=E;var R=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&l.focus();break;case"img":R.src&&(l.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var z=i.alternate;if(z!==null){var ee=z.memoizedState;if(ee!==null){var ne=ee.dehydrated;ne!==null&&Os(ne)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Qt||i.flags&512&&zd(i)}catch(J){xt(i,i.return,J)}}if(i===r){ge=null;break}if(l=i.sibling,l!==null){l.return=i.return,ge=l;break}ge=i.return}}function ly(r){for(;ge!==null;){var i=ge;if(i===r){ge=null;break}var l=i.sibling;if(l!==null){l.return=i.return,ge=l;break}ge=i.return}}function uy(r){for(;ge!==null;){var i=ge;try{switch(i.tag){case 0:case 11:case 15:var l=i.return;try{Vl(4,i)}catch(R){xt(i,l,R)}break;case 1:var d=i.stateNode;if(typeof d.componentDidMount=="function"){var p=i.return;try{d.componentDidMount()}catch(R){xt(i,p,R)}}var g=i.return;try{zd(i)}catch(R){xt(i,g,R)}break;case 5:var _=i.return;try{zd(i)}catch(R){xt(i,_,R)}}}catch(R){xt(i,i.return,R)}if(i===r){ge=null;break}var E=i.sibling;if(E!==null){E.return=i.return,ge=E;break}ge=i.return}}var zS=Math.ceil,zl=j.ReactCurrentDispatcher,Wd=j.ReactCurrentOwner,Dn=j.ReactCurrentBatchConfig,at=0,Ft=null,At=null,Wt=0,kn=0,Wi=ca(0),Nt=0,ao=null,qa=0,$l=0,Kd=0,io=null,mn=null,qd=0,Ki=1/0,Br=null,Hl=!1,Gd=null,ga=null,Wl=!1,ya=null,Kl=0,so=0,Yd=null,ql=-1,Gl=0;function sn(){return(at&6)!==0?rt():ql!==-1?ql:ql=rt()}function va(r){return(r.mode&1)===0?1:(at&2)!==0&&Wt!==0?Wt&-Wt:PS.transition!==null?(Gl===0&&(Gl=nm()),Gl):(r=ut,r!==0||(r=window.event,r=r===void 0?16:dm(r.type)),r)}function er(r,i,l,d){if(50<so)throw so=0,Yd=null,Error(n(185));Rs(r,l,d),((at&2)===0||r!==Ft)&&(r===Ft&&((at&2)===0&&($l|=l),Nt===4&&ba(r,Wt)),gn(r,d),l===1&&at===0&&(i.mode&1)===0&&(Ki=rt()+500,wl&&ha()))}function gn(r,i){var l=r.callbackNode;Px(r,i);var d=Pi(r,r===Ft?Wt:0);if(d===0)l!==null&&Pt(l),r.callbackNode=null,r.callbackPriority=0;else if(i=d&-d,r.callbackPriority!==i){if(l!=null&&Pt(l),i===1)r.tag===0?SS(dy.bind(null,r)):Zm(dy.bind(null,r)),_S(function(){(at&6)===0&&ha()}),l=null;else{switch(rm(d)){case 1:l=Ar;break;case 4:l=Gn;break;case 16:l=nn;break;case 536870912:l=ea;break;default:l=nn}l=by(l,cy.bind(null,r))}r.callbackPriority=i,r.callbackNode=l}}function cy(r,i){if(ql=-1,Gl=0,(at&6)!==0)throw Error(n(327));var l=r.callbackNode;if(qi()&&r.callbackNode!==l)return null;var d=Pi(r,r===Ft?Wt:0);if(d===0)return null;if((d&30)!==0||(d&r.expiredLanes)!==0||i)i=Yl(r,d);else{i=d;var p=at;at|=2;var g=fy();(Ft!==r||Wt!==i)&&(Br=null,Ki=rt()+500,Ya(r,i));do try{WS();break}catch(E){hy(r,E)}while(!0);fd(),zl.current=g,at=p,At!==null?i=0:(Ft=null,Wt=0,i=Nt)}if(i!==0){if(i===2&&(p=Ac(r),p!==0&&(d=p,i=Zd(r,p))),i===1)throw l=ao,Ya(r,0),ba(r,d),gn(r,rt()),l;if(i===6)ba(r,d);else{if(p=r.current.alternate,(d&30)===0&&!$S(p)&&(i=Yl(r,d),i===2&&(g=Ac(r),g!==0&&(d=g,i=Zd(r,g))),i===1))throw l=ao,Ya(r,0),ba(r,d),gn(r,rt()),l;switch(r.finishedWork=p,r.finishedLanes=d,i){case 0:case 1:throw Error(n(345));case 2:Za(r,mn,Br);break;case 3:if(ba(r,d),(d&130023424)===d&&(i=qd+500-rt(),10<i)){if(Pi(r,0)!==0)break;if(p=r.suspendedLanes,(p&d)!==d){sn(),r.pingedLanes|=r.suspendedLanes&p;break}r.timeoutHandle=nd(Za.bind(null,r,mn,Br),i);break}Za(r,mn,Br);break;case 4:if(ba(r,d),(d&4194240)===d)break;for(i=r.eventTimes,p=-1;0<d;){var _=31-He(d);g=1<<_,_=i[_],_>p&&(p=_),d&=~g}if(d=p,d=rt()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*zS(d/1960))-d,10<d){r.timeoutHandle=nd(Za.bind(null,r,mn,Br),d);break}Za(r,mn,Br);break;case 5:Za(r,mn,Br);break;default:throw Error(n(329))}}}return gn(r,rt()),r.callbackNode===l?cy.bind(null,r):null}function Zd(r,i){var l=io;return r.current.memoizedState.isDehydrated&&(Ya(r,i).flags|=256),r=Yl(r,i),r!==2&&(i=mn,mn=l,i!==null&&Qd(i)),r}function Qd(r){mn===null?mn=r:mn.push.apply(mn,r)}function $S(r){for(var i=r;;){if(i.flags&16384){var l=i.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var d=0;d<l.length;d++){var p=l[d],g=p.getSnapshot;p=p.value;try{if(!Yn(g(),p))return!1}catch{return!1}}}if(l=i.child,i.subtreeFlags&16384&&l!==null)l.return=i,i=l;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function ba(r,i){for(i&=~Kd,i&=~$l,r.suspendedLanes|=i,r.pingedLanes&=~i,r=r.expirationTimes;0<i;){var l=31-He(i),d=1<<l;r[l]=-1,i&=~d}}function dy(r){if((at&6)!==0)throw Error(n(327));qi();var i=Pi(r,0);if((i&1)===0)return gn(r,rt()),null;var l=Yl(r,i);if(r.tag!==0&&l===2){var d=Ac(r);d!==0&&(i=d,l=Zd(r,d))}if(l===1)throw l=ao,Ya(r,0),ba(r,i),gn(r,rt()),l;if(l===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=i,Za(r,mn,Br),gn(r,rt()),null}function Xd(r,i){var l=at;at|=1;try{return r(i)}finally{at=l,at===0&&(Ki=rt()+500,wl&&ha())}}function Ga(r){ya!==null&&ya.tag===0&&(at&6)===0&&qi();var i=at;at|=1;var l=Dn.transition,d=ut;try{if(Dn.transition=null,ut=1,r)return r()}finally{ut=d,Dn.transition=l,at=i,(at&6)===0&&ha()}}function Jd(){kn=Wi.current,gt(Wi)}function Ya(r,i){r.finishedWork=null,r.finishedLanes=0;var l=r.timeoutHandle;if(l!==-1&&(r.timeoutHandle=-1,bS(l)),At!==null)for(l=At.return;l!==null;){var d=l;switch(ld(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&_l();break;case 3:zi(),gt(hn),gt(Gt),kd();break;case 5:bd(d);break;case 4:zi();break;case 13:gt(kt);break;case 19:gt(kt);break;case 10:pd(d.type._context);break;case 22:case 23:Jd()}l=l.return}if(Ft=r,At=r=_a(r.current,null),Wt=kn=i,Nt=0,ao=null,Kd=$l=qa=0,mn=io=null,Ha!==null){for(i=0;i<Ha.length;i++)if(l=Ha[i],d=l.interleaved,d!==null){l.interleaved=null;var p=d.next,g=l.pending;if(g!==null){var _=g.next;g.next=p,d.next=_}l.pending=d}Ha=null}return r}function hy(r,i){do{var l=At;try{if(fd(),Dl.current=Il,Ml){for(var d=wt.memoizedState;d!==null;){var p=d.queue;p!==null&&(p.pending=null),d=d.next}Ml=!1}if(Ka=0,Bt=Mt=wt=null,Xs=!1,Js=0,Wd.current=null,l===null||l.return===null){Nt=1,ao=i,At=null;break}e:{var g=r,_=l.return,E=l,R=i;if(i=Wt,E.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var z=R,ee=E,ne=ee.tag;if((ee.mode&1)===0&&(ne===0||ne===11||ne===15)){var J=ee.alternate;J?(ee.updateQueue=J.updateQueue,ee.memoizedState=J.memoizedState,ee.lanes=J.lanes):(ee.updateQueue=null,ee.memoizedState=null)}var de=jg(_);if(de!==null){de.flags&=-257,Ug(de,_,E,g,i),de.mode&1&&Ig(g,z,i),i=de,R=z;var ve=i.updateQueue;if(ve===null){var we=new Set;we.add(R),i.updateQueue=we}else ve.add(R);break e}else{if((i&1)===0){Ig(g,z,i),eh();break e}R=Error(n(426))}}else if(bt&&E.mode&1){var Tt=jg(_);if(Tt!==null){(Tt.flags&65536)===0&&(Tt.flags|=256),Ug(Tt,_,E,g,i),dd($i(R,E));break e}}g=R=$i(R,E),Nt!==4&&(Nt=2),io===null?io=[g]:io.push(g),g=_;do{switch(g.tag){case 3:g.flags|=65536,i&=-i,g.lanes|=i;var B=Ng(g,R,i);og(g,B);break e;case 1:E=R;var O=g.type,F=g.stateNode;if((g.flags&128)===0&&(typeof O.getDerivedStateFromError=="function"||F!==null&&typeof F.componentDidCatch=="function"&&(ga===null||!ga.has(F)))){g.flags|=65536,i&=-i,g.lanes|=i;var se=Og(g,E,i);og(g,se);break e}}g=g.return}while(g!==null)}my(l)}catch(Pe){i=Pe,At===l&&l!==null&&(At=l=l.return);continue}break}while(!0)}function fy(){var r=zl.current;return zl.current=Il,r===null?Il:r}function eh(){(Nt===0||Nt===3||Nt===2)&&(Nt=4),Ft===null||(qa&268435455)===0&&($l&268435455)===0||ba(Ft,Wt)}function Yl(r,i){var l=at;at|=2;var d=fy();(Ft!==r||Wt!==i)&&(Br=null,Ya(r,i));do try{HS();break}catch(p){hy(r,p)}while(!0);if(fd(),at=l,zl.current=d,At!==null)throw Error(n(261));return Ft=null,Wt=0,Nt}function HS(){for(;At!==null;)py(At)}function WS(){for(;At!==null&&!$t();)py(At)}function py(r){var i=vy(r.alternate,r,kn);r.memoizedProps=r.pendingProps,i===null?my(r):At=i,Wd.current=null}function my(r){var i=r;do{var l=i.alternate;if(r=i.return,(i.flags&32768)===0){if(l=jS(l,i,kn),l!==null){At=l;return}}else{if(l=US(l,i),l!==null){l.flags&=32767,At=l;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Nt=6,At=null;return}}if(i=i.sibling,i!==null){At=i;return}At=i=r}while(i!==null);Nt===0&&(Nt=5)}function Za(r,i,l){var d=ut,p=Dn.transition;try{Dn.transition=null,ut=1,KS(r,i,l,d)}finally{Dn.transition=p,ut=d}return null}function KS(r,i,l,d){do qi();while(ya!==null);if((at&6)!==0)throw Error(n(327));l=r.finishedWork;var p=r.finishedLanes;if(l===null)return null;if(r.finishedWork=null,r.finishedLanes=0,l===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var g=l.lanes|l.childLanes;if(Tx(r,g),r===Ft&&(At=Ft=null,Wt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Wl||(Wl=!0,by(nn,function(){return qi(),null})),g=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||g){g=Dn.transition,Dn.transition=null;var _=ut;ut=1;var E=at;at|=4,Wd.current=null,FS(r,l),iy(l,r),hS(ed),sl=!!Jc,ed=Jc=null,r.current=l,VS(l),lt(),at=E,ut=_,Dn.transition=g}else r.current=l;if(Wl&&(Wl=!1,ya=r,Kl=p),g=r.pendingLanes,g===0&&(ga=null),Si(l.stateNode),gn(r,rt()),i!==null)for(d=r.onRecoverableError,l=0;l<i.length;l++)p=i[l],d(p.value,{componentStack:p.stack,digest:p.digest});if(Hl)throw Hl=!1,r=Gd,Gd=null,r;return(Kl&1)!==0&&r.tag!==0&&qi(),g=r.pendingLanes,(g&1)!==0?r===Yd?so++:(so=0,Yd=r):so=0,ha(),null}function qi(){if(ya!==null){var r=rm(Kl),i=Dn.transition,l=ut;try{if(Dn.transition=null,ut=16>r?16:r,ya===null)var d=!1;else{if(r=ya,ya=null,Kl=0,(at&6)!==0)throw Error(n(331));var p=at;for(at|=4,ge=r.current;ge!==null;){var g=ge,_=g.child;if((ge.flags&16)!==0){var E=g.deletions;if(E!==null){for(var R=0;R<E.length;R++){var z=E[R];for(ge=z;ge!==null;){var ee=ge;switch(ee.tag){case 0:case 11:case 15:ro(8,ee,g)}var ne=ee.child;if(ne!==null)ne.return=ee,ge=ne;else for(;ge!==null;){ee=ge;var J=ee.sibling,de=ee.return;if(ey(ee),ee===z){ge=null;break}if(J!==null){J.return=de,ge=J;break}ge=de}}}var ve=g.alternate;if(ve!==null){var we=ve.child;if(we!==null){ve.child=null;do{var Tt=we.sibling;we.sibling=null,we=Tt}while(we!==null)}}ge=g}}if((g.subtreeFlags&2064)!==0&&_!==null)_.return=g,ge=_;else e:for(;ge!==null;){if(g=ge,(g.flags&2048)!==0)switch(g.tag){case 0:case 11:case 15:ro(9,g,g.return)}var B=g.sibling;if(B!==null){B.return=g.return,ge=B;break e}ge=g.return}}var O=r.current;for(ge=O;ge!==null;){_=ge;var F=_.child;if((_.subtreeFlags&2064)!==0&&F!==null)F.return=_,ge=F;else e:for(_=O;ge!==null;){if(E=ge,(E.flags&2048)!==0)try{switch(E.tag){case 0:case 11:case 15:Vl(9,E)}}catch(Pe){xt(E,E.return,Pe)}if(E===_){ge=null;break e}var se=E.sibling;if(se!==null){se.return=E.return,ge=se;break e}ge=E.return}}if(at=p,ha(),rn&&typeof rn.onPostCommitFiberRoot=="function")try{rn.onPostCommitFiberRoot(Cn,r)}catch{}d=!0}return d}finally{ut=l,Dn.transition=i}}return!1}function gy(r,i,l){i=$i(l,i),i=Ng(r,i,1),r=pa(r,i,1),i=sn(),r!==null&&(Rs(r,1,i),gn(r,i))}function xt(r,i,l){if(r.tag===3)gy(r,r,l);else for(;i!==null;){if(i.tag===3){gy(i,r,l);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(ga===null||!ga.has(d))){r=$i(l,r),r=Og(i,r,1),i=pa(i,r,1),r=sn(),i!==null&&(Rs(i,1,r),gn(i,r));break}}i=i.return}}function qS(r,i,l){var d=r.pingCache;d!==null&&d.delete(i),i=sn(),r.pingedLanes|=r.suspendedLanes&l,Ft===r&&(Wt&l)===l&&(Nt===4||Nt===3&&(Wt&130023424)===Wt&&500>rt()-qd?Ya(r,0):Kd|=l),gn(r,i)}function yy(r,i){i===0&&((r.mode&1)===0?i=1:(i=Lr,Lr<<=1,(Lr&130023424)===0&&(Lr=4194304)));var l=sn();r=Ir(r,i),r!==null&&(Rs(r,i,l),gn(r,l))}function GS(r){var i=r.memoizedState,l=0;i!==null&&(l=i.retryLane),yy(r,l)}function YS(r,i){var l=0;switch(r.tag){case 13:var d=r.stateNode,p=r.memoizedState;p!==null&&(l=p.retryLane);break;case 19:d=r.stateNode;break;default:throw Error(n(314))}d!==null&&d.delete(i),yy(r,l)}var vy;vy=function(r,i,l){if(r!==null)if(r.memoizedProps!==i.pendingProps||hn.current)pn=!0;else{if((r.lanes&l)===0&&(i.flags&128)===0)return pn=!1,IS(r,i,l);pn=(r.flags&131072)!==0}else pn=!1,bt&&(i.flags&1048576)!==0&&Qm(i,Sl,i.index);switch(i.lanes=0,i.tag){case 2:var d=i.type;Bl(r,i),r=i.pendingProps;var p=Oi(i,Gt.current);Vi(i,l),p=Sd(null,i,d,r,p,l);var g=Pd();return i.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,fn(d)?(g=!0,kl(i)):g=!1,i.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,yd(i),p.updater=jl,i.stateNode=p,p._reactInternals=i,Ld(i,d,r,l),i=Od(null,i,d,!0,g,l)):(i.tag=0,bt&&g&&od(i),an(null,i,p,l),i=i.child),i;case 16:d=i.elementType;e:{switch(Bl(r,i),r=i.pendingProps,p=d._init,d=p(d._payload),i.type=d,p=i.tag=QS(d),r=Qn(d,r),p){case 0:i=Nd(null,i,d,r,l);break e;case 1:i=Hg(null,i,d,r,l);break e;case 11:i=Bg(null,i,d,r,l);break e;case 14:i=Fg(null,i,d,Qn(d.type,r),l);break e}throw Error(n(306,d,""))}return i;case 0:return d=i.type,p=i.pendingProps,p=i.elementType===d?p:Qn(d,p),Nd(r,i,d,p,l);case 1:return d=i.type,p=i.pendingProps,p=i.elementType===d?p:Qn(d,p),Hg(r,i,d,p,l);case 3:e:{if(Wg(i),r===null)throw Error(n(387));d=i.pendingProps,g=i.memoizedState,p=g.element,sg(r,i),Rl(i,d,null,l);var _=i.memoizedState;if(d=_.element,g.isDehydrated)if(g={element:d,isDehydrated:!1,cache:_.cache,pendingSuspenseBoundaries:_.pendingSuspenseBoundaries,transitions:_.transitions},i.updateQueue.baseState=g,i.memoizedState=g,i.flags&256){p=$i(Error(n(423)),i),i=Kg(r,i,d,l,p);break e}else if(d!==p){p=$i(Error(n(424)),i),i=Kg(r,i,d,l,p);break e}else for(_n=ua(i.stateNode.containerInfo.firstChild),bn=i,bt=!0,Zn=null,l=ag(i,null,d,l),i.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Ui(),d===p){i=Ur(r,i,l);break e}an(r,i,d,l)}i=i.child}return i;case 5:return ug(i),r===null&&cd(i),d=i.type,p=i.pendingProps,g=r!==null?r.memoizedProps:null,_=p.children,td(d,p)?_=null:g!==null&&td(d,g)&&(i.flags|=32),$g(r,i),an(r,i,_,l),i.child;case 6:return r===null&&cd(i),null;case 13:return qg(r,i,l);case 4:return vd(i,i.stateNode.containerInfo),d=i.pendingProps,r===null?i.child=Bi(i,null,d,l):an(r,i,d,l),i.child;case 11:return d=i.type,p=i.pendingProps,p=i.elementType===d?p:Qn(d,p),Bg(r,i,d,p,l);case 7:return an(r,i,i.pendingProps,l),i.child;case 8:return an(r,i,i.pendingProps.children,l),i.child;case 12:return an(r,i,i.pendingProps.children,l),i.child;case 10:e:{if(d=i.type._context,p=i.pendingProps,g=i.memoizedProps,_=p.value,ft(Cl,d._currentValue),d._currentValue=_,g!==null)if(Yn(g.value,_)){if(g.children===p.children&&!hn.current){i=Ur(r,i,l);break e}}else for(g=i.child,g!==null&&(g.return=i);g!==null;){var E=g.dependencies;if(E!==null){_=g.child;for(var R=E.firstContext;R!==null;){if(R.context===d){if(g.tag===1){R=jr(-1,l&-l),R.tag=2;var z=g.updateQueue;if(z!==null){z=z.shared;var ee=z.pending;ee===null?R.next=R:(R.next=ee.next,ee.next=R),z.pending=R}}g.lanes|=l,R=g.alternate,R!==null&&(R.lanes|=l),md(g.return,l,i),E.lanes|=l;break}R=R.next}}else if(g.tag===10)_=g.type===i.type?null:g.child;else if(g.tag===18){if(_=g.return,_===null)throw Error(n(341));_.lanes|=l,E=_.alternate,E!==null&&(E.lanes|=l),md(_,l,i),_=g.sibling}else _=g.child;if(_!==null)_.return=g;else for(_=g;_!==null;){if(_===i){_=null;break}if(g=_.sibling,g!==null){g.return=_.return,_=g;break}_=_.return}g=_}an(r,i,p.children,l),i=i.child}return i;case 9:return p=i.type,d=i.pendingProps.children,Vi(i,l),p=Rn(p),d=d(p),i.flags|=1,an(r,i,d,l),i.child;case 14:return d=i.type,p=Qn(d,i.pendingProps),p=Qn(d.type,p),Fg(r,i,d,p,l);case 15:return Vg(r,i,i.type,i.pendingProps,l);case 17:return d=i.type,p=i.pendingProps,p=i.elementType===d?p:Qn(d,p),Bl(r,i),i.tag=1,fn(d)?(r=!0,kl(i)):r=!1,Vi(i,l),Dg(i,d,p),Ld(i,d,p,l),Od(null,i,d,!0,r,l);case 19:return Yg(r,i,l);case 22:return zg(r,i,l)}throw Error(n(156,i.tag))};function by(r,i){return ht(r,i)}function ZS(r,i,l,d){this.tag=r,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mn(r,i,l,d){return new ZS(r,i,l,d)}function th(r){return r=r.prototype,!(!r||!r.isReactComponent)}function QS(r){if(typeof r=="function")return th(r)?1:0;if(r!=null){if(r=r.$$typeof,r===oe)return 11;if(r===ce)return 14}return 2}function _a(r,i){var l=r.alternate;return l===null?(l=Mn(r.tag,i,r.key,r.mode),l.elementType=r.elementType,l.type=r.type,l.stateNode=r.stateNode,l.alternate=r,r.alternate=l):(l.pendingProps=i,l.type=r.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=r.flags&14680064,l.childLanes=r.childLanes,l.lanes=r.lanes,l.child=r.child,l.memoizedProps=r.memoizedProps,l.memoizedState=r.memoizedState,l.updateQueue=r.updateQueue,i=r.dependencies,l.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},l.sibling=r.sibling,l.index=r.index,l.ref=r.ref,l}function Zl(r,i,l,d,p,g){var _=2;if(d=r,typeof r=="function")th(r)&&(_=1);else if(typeof r=="string")_=5;else e:switch(r){case H:return Qa(l.children,p,g,i);case x:_=8,p|=8;break;case Z:return r=Mn(12,l,i,p|2),r.elementType=Z,r.lanes=g,r;case Ae:return r=Mn(13,l,i,p),r.elementType=Ae,r.lanes=g,r;case fe:return r=Mn(19,l,i,p),r.elementType=fe,r.lanes=g,r;case Me:return Ql(l,p,g,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case Q:_=10;break e;case me:_=9;break e;case oe:_=11;break e;case ce:_=14;break e;case le:_=16,d=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return i=Mn(_,l,i,p),i.elementType=r,i.type=d,i.lanes=g,i}function Qa(r,i,l,d){return r=Mn(7,r,d,i),r.lanes=l,r}function Ql(r,i,l,d){return r=Mn(22,r,d,i),r.elementType=Me,r.lanes=l,r.stateNode={isHidden:!1},r}function nh(r,i,l){return r=Mn(6,r,null,i),r.lanes=l,r}function rh(r,i,l){return i=Mn(4,r.children!==null?r.children:[],r.key,i),i.lanes=l,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function XS(r,i,l,d,p){this.tag=i,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rc(0),this.expirationTimes=Rc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rc(0),this.identifierPrefix=d,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function ah(r,i,l,d,p,g,_,E,R){return r=new XS(r,i,l,E,R),i===1?(i=1,g===!0&&(i|=8)):i=0,g=Mn(3,null,null,i),r.current=g,g.stateNode=r,g.memoizedState={element:d,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},yd(g),r}function JS(r,i,l){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:K,key:d==null?null:""+d,children:r,containerInfo:i,implementation:l}}function _y(r){if(!r)return da;r=r._reactInternals;e:{if(he(r)!==r||r.tag!==1)throw Error(n(170));var i=r;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(fn(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(n(171))}if(r.tag===1){var l=r.type;if(fn(l))return Gm(r,l,i)}return i}function ky(r,i,l,d,p,g,_,E,R){return r=ah(l,d,!0,r,p,g,_,E,R),r.context=_y(null),l=r.current,d=sn(),p=va(l),g=jr(d,p),g.callback=i??null,pa(l,g,p),r.current.lanes=p,Rs(r,p,d),gn(r,d),r}function Xl(r,i,l,d){var p=i.current,g=sn(),_=va(p);return l=_y(l),i.context===null?i.context=l:i.pendingContext=l,i=jr(g,_),i.payload={element:r},d=d===void 0?null:d,d!==null&&(i.callback=d),r=pa(p,i,_),r!==null&&(er(r,p,_,g),Al(r,p,_)),_}function Jl(r){return r=r.current,r.child?(r.child.tag===5,r.child.stateNode):null}function wy(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var l=r.retryLane;r.retryLane=l!==0&&l<i?l:i}}function ih(r,i){wy(r,i),(r=r.alternate)&&wy(r,i)}function eP(){return null}var xy=typeof reportError=="function"?reportError:function(r){console.error(r)};function sh(r){this._internalRoot=r}eu.prototype.render=sh.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(n(409));Xl(r,i,null,null)},eu.prototype.unmount=sh.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Ga(function(){Xl(null,r,null,null)}),i[Dr]=null}};function eu(r){this._internalRoot=r}eu.prototype.unstable_scheduleHydration=function(r){if(r){var i=sm();r={blockedOn:null,target:r,priority:i};for(var l=0;l<sa.length&&i!==0&&i<sa[l].priority;l++);sa.splice(l,0,r),l===0&&um(r)}};function oh(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function tu(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function Sy(){}function tP(r,i,l,d,p){if(p){if(typeof d=="function"){var g=d;d=function(){var z=Jl(_);g.call(z)}}var _=ky(i,d,r,0,null,!1,!1,"",Sy);return r._reactRootContainer=_,r[Dr]=_.current,Hs(r.nodeType===8?r.parentNode:r),Ga(),_}for(;p=r.lastChild;)r.removeChild(p);if(typeof d=="function"){var E=d;d=function(){var z=Jl(R);E.call(z)}}var R=ah(r,0,!1,null,null,!1,!1,"",Sy);return r._reactRootContainer=R,r[Dr]=R.current,Hs(r.nodeType===8?r.parentNode:r),Ga(function(){Xl(i,R,l,d)}),R}function nu(r,i,l,d,p){var g=l._reactRootContainer;if(g){var _=g;if(typeof p=="function"){var E=p;p=function(){var R=Jl(_);E.call(R)}}Xl(i,_,r,p)}else _=tP(l,i,r,p,d);return Jl(_)}am=function(r){switch(r.tag){case 3:var i=r.stateNode;if(i.current.memoizedState.isDehydrated){var l=na(i.pendingLanes);l!==0&&(Lc(i,l|1),gn(i,rt()),(at&6)===0&&(Ki=rt()+500,ha()))}break;case 13:Ga(function(){var d=Ir(r,1);if(d!==null){var p=sn();er(d,r,1,p)}}),ih(r,1)}},Dc=function(r){if(r.tag===13){var i=Ir(r,134217728);if(i!==null){var l=sn();er(i,r,134217728,l)}ih(r,134217728)}},im=function(r){if(r.tag===13){var i=va(r),l=Ir(r,i);if(l!==null){var d=sn();er(l,r,i,d)}ih(r,i)}},sm=function(){return ut},om=function(r,i){var l=ut;try{return ut=r,i()}finally{ut=l}},wi=function(r,i,l){switch(i){case"input":if(Wn(r,l),i=l.name,l.type==="radio"&&i!=null){for(l=r;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<l.length;i++){var d=l[i];if(d!==r&&d.form===r.form){var p=bl(d);if(!p)throw Error(n(90));Tr(d),Wn(d,p)}}}break;case"textarea":el(r,l);break;case"select":i=l.value,i!=null&&Gr(r,!!l.multiple,i,!1)}},rl=Xd,Cs=Ga;var nP={usingClientEntryPoint:!1,Events:[qs,Mi,bl,nl,Ts,Xd]},oo={findFiberByHostInstance:Fa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rP={bundleType:oo.bundleType,version:oo.version,rendererPackageName:oo.rendererPackageName,rendererConfig:oo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=st(r),r===null?null:r.stateNode},findFiberByHostInstance:oo.findFiberByHostInstance||eP,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 ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ru.isDisabled&&ru.supportsFiber)try{Cn=ru.inject(rP),rn=ru}catch{}}return yn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nP,yn.createPortal=function(r,i){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!oh(i))throw Error(n(200));return JS(r,i,null,l)},yn.createRoot=function(r,i){if(!oh(r))throw Error(n(299));var l=!1,d="",p=xy;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onRecoverableError!==void 0&&(p=i.onRecoverableError)),i=ah(r,1,!1,null,null,l,!1,d,p),r[Dr]=i.current,Hs(r.nodeType===8?r.parentNode:r),new sh(i)},yn.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=st(i),r=r===null?null:r.stateNode,r},yn.flushSync=function(r){return Ga(r)},yn.hydrate=function(r,i,l){if(!tu(i))throw Error(n(200));return nu(null,r,i,!0,l)},yn.hydrateRoot=function(r,i,l){if(!oh(r))throw Error(n(405));var d=l!=null&&l.hydratedSources||null,p=!1,g="",_=xy;if(l!=null&&(l.unstable_strictMode===!0&&(p=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onRecoverableError!==void 0&&(_=l.onRecoverableError)),i=ky(i,null,r,1,l??null,p,!1,g,_),r[Dr]=i.current,Hs(r),d)for(r=0;r<d.length;r++)l=d[r],p=l._getVersion,p=p(l._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[l,p]:i.mutableSourceEagerHydrationData.push(l,p);return new eu(i)},yn.render=function(r,i,l){if(!tu(i))throw Error(n(200));return nu(null,r,i,!1,l)},yn.unmountComponentAtNode=function(r){if(!tu(r))throw Error(n(40));return r._reactRootContainer?(Ga(function(){nu(null,null,r,!1,function(){r._reactRootContainer=null,r[Dr]=null})}),!0):!1},yn.unstable_batchedUpdates=Xd,yn.unstable_renderSubtreeIntoContainer=function(r,i,l,d){if(!tu(l))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return nu(r,i,l,!1,d)},yn.version="18.3.1-next-f1338f8080-20240426",yn}var Dy;function kb(){if(Dy)return ch.exports;Dy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ch.exports=fP(),ch.exports}var My;function pP(){if(My)return au;My=1;var e=kb();return au.createRoot=e.createRoot,au.hydrateRoot=e.hydrateRoot,au}var mP=pP();var wb=e=>{throw TypeError(e)},gP=(e,t,n)=>t.has(e)||wb("Cannot "+n),fh=(e,t,n)=>(gP(e,t,"read from private field"),n?n.call(e):t.get(e)),yP=(e,t,n)=>t.has(e)?wb("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ny="popstate";function Oy(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function vP(e={}){function t(a,s){let o=s.state?.masked,{pathname:u,search:c,hash:h}=o||a.location;return Co("",{pathname:u,search:c,hash:h},s.state&&s.state.usr||null,s.state&&s.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function n(a,s){return typeof s=="string"?s:br(s)}return _P(t,n,null,e)}function Qe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Et(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function bP(){return Math.random().toString(36).substring(2,10)}function Iy(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Co(e,t,n=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Wr(t):t,state:n,key:t&&t.key||a||bP(),unstable_mask:s}}function br({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Wr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function _P(e,t,n,a={}){let{window:s=document.defaultView,v5Compat:o=!1}=a,u=s.history,c="POP",h=null,f=m();f==null&&(f=0,u.replaceState({...u.state,idx:f},""));function m(){return(u.state||{idx:null}).idx}function y(){c="POP";let P=m(),L=P==null?null:P-f;f=P,h&&h({action:c,location:T.location,delta:L})}function b(P,L){c="PUSH";let D=Oy(P)?P:Co(T.location,P,L);f=m()+1;let M=Iy(D,f),j=T.createHref(D.unstable_mask||D);try{u.pushState(M,"",j)}catch(q){if(q instanceof DOMException&&q.name==="DataCloneError")throw q;s.location.assign(j)}o&&h&&h({action:c,location:T.location,delta:1})}function w(P,L){c="REPLACE";let D=Oy(P)?P:Co(T.location,P,L);f=m();let M=Iy(D,f),j=T.createHref(D.unstable_mask||D);u.replaceState(M,"",j),o&&h&&h({action:c,location:T.location,delta:0})}function S(P){return xb(P)}let T={get action(){return c},get location(){return e(s,u)},listen(P){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener(Ny,y),h=P,()=>{s.removeEventListener(Ny,y),h=null}},createHref(P){return t(s,P)},createURL:S,encodeLocation(P){let L=S(P);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:b,replace:w,go(P){return u.go(P)}};return T}function xb(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Qe(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:br(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}var go,jy=class{constructor(e){if(yP(this,go,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(fh(this,go).has(e))return fh(this,go).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){fh(this,go).set(e,t)}};go=new WeakMap;var kP=new Set(["lazy","caseSensitive","path","id","index","children"]);function wP(e){return kP.has(e)}var xP=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function SP(e){return xP.has(e)}function PP(e){return e.index===!0}function Eo(e,t,n=[],a={},s=!1){return e.map((o,u)=>{let c=[...n,String(u)],h=typeof o.id=="string"?o.id:c.join("-");if(Qe(o.index!==!0||!o.children,"Cannot specify children on an index route"),Qe(s||!a[h],`Found a route id collision on id "${h}". Route id's must be globally unique within Data Router usages`),PP(o)){let f={...o,id:h};return a[h]=Uy(f,t(f)),f}else{let f={...o,id:h,children:void 0};return a[h]=Uy(f,t(f)),o.children&&(f.children=Eo(o.children,t,c,a,s)),f}})}function Uy(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Ta(e,t,n="/"){return yo(e,t,n,!1)}function yo(e,t,n,a){let s=typeof t=="string"?Wr(t):t,o=Un(s.pathname||"/",n);if(o==null)return null;let u=Sb(e);CP(u);let c=null;for(let h=0;c==null&&h<u.length;++h){let f=UP(o);c=IP(u[h],f,a)}return c}function TP(e,t){let{route:n,pathname:a,params:s}=e;return{id:n.id,pathname:a,params:s,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function Sb(e,t=[],n=[],a="",s=!1){let o=(u,c,h=s,f)=>{let m={relativePath:f===void 0?u.path||"":f,caseSensitive:u.caseSensitive===!0,childrenIndex:c,route:u};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(a)&&h)return;Qe(m.relativePath.startsWith(a),`Absolute route path "${m.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(a.length)}let y=ar([a,m.relativePath]),b=n.concat(m);u.children&&u.children.length>0&&(Qe(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),Sb(u.children,t,b,y,h)),!(u.path==null&&!u.index)&&t.push({path:y,score:NP(y,u.index),routesMeta:b})};return e.forEach((u,c)=>{if(u.path===""||!u.path?.includes("?"))o(u,c);else for(let h of Pb(u.path))o(u,c,!0,h)}),t}function Pb(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(a.length===0)return s?[o,""]:[o];let u=Pb(a.join("/")),c=[];return c.push(...u.map(h=>h===""?o:[o,h].join("/"))),s&&c.push(...u),c.map(h=>e.startsWith("/")&&h===""?"/":h)}function CP(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:OP(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var EP=/^:[\w-]+$/,AP=3,RP=2,LP=1,DP=10,MP=-2,By=e=>e==="*";function NP(e,t){let n=e.split("/"),a=n.length;return n.some(By)&&(a+=MP),t&&(a+=RP),n.filter(s=>!By(s)).reduce((s,o)=>s+(EP.test(o)?AP:o===""?LP:DP),a)}function OP(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function IP(e,t,n=!1){let{routesMeta:a}=e,s={},o="/",u=[];for(let c=0;c<a.length;++c){let h=a[c],f=c===a.length-1,m=o==="/"?t:t.slice(o.length)||"/",y=Uu({path:h.relativePath,caseSensitive:h.caseSensitive,end:f},m),b=h.route;if(!y&&f&&n&&!a[a.length-1].route.index&&(y=Uu({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},m)),!y)return null;Object.assign(s,y.params),u.push({params:s,pathname:ar([o,y.pathname]),pathnameBase:VP(ar([o,y.pathnameBase])),route:b}),y.pathnameBase!=="/"&&(o=ar([o,y.pathnameBase]))}return u}function Uu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=jP(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],u=o.replace(/(.)\/+$/,"$1"),c=s.slice(1);return{params:a.reduce((f,{paramName:m,isOptional:y},b)=>{if(m==="*"){let S=c[b]||"";u=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const w=c[b];return y&&!w?f[m]=void 0:f[m]=(w||"").replace(/%2F/g,"/"),f},{}),pathname:o,pathnameBase:u,pattern:e}}function jP(e,t=!1,n=!0){Et(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,c,h,f,m)=>{if(a.push({paramName:c,isOptional:h!=null}),h){let y=m.charAt(f+u.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function UP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Et(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Un(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}function BP({basename:e,pathname:t}){return t==="/"?e:ar([e,t])}var Tb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Wf=e=>Tb.test(e);function FP(e,t="/"){let{pathname:n,search:a="",hash:s=""}=typeof e=="string"?Wr(e):e,o;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?o=Fy(n.substring(1),"/"):o=Fy(n,t)):o=t,{pathname:o,search:zP(a),hash:$P(s)}}function Fy(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function ph(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Cb(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Kf(e){let t=Cb(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function dc(e,t,n,a=!1){let s;typeof e=="string"?s=Wr(e):(s={...e},Qe(!s.pathname||!s.pathname.includes("?"),ph("?","pathname","search",s)),Qe(!s.pathname||!s.pathname.includes("#"),ph("#","pathname","hash",s)),Qe(!s.search||!s.search.includes("#"),ph("#","search","hash",s)));let o=e===""||s.pathname==="",u=o?"/":s.pathname,c;if(u==null)c=n;else{let y=t.length-1;if(!a&&u.startsWith("..")){let b=u.split("/");for(;b[0]==="..";)b.shift(),y-=1;s.pathname=b.join("/")}c=y>=0?t[y]:"/"}let h=FP(s,c),f=u&&u!=="/"&&u.endsWith("/"),m=(o||u===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(f||m)&&(h.pathname+="/"),h}var ar=e=>e.join("/").replace(/\/\/+/g,"/"),VP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),zP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,$P=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Io=class{constructor(e,t,n,a=!1){this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ao(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function jo(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Eb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ab(e,t){let n=e;if(typeof n!="string"||!Tb.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,s=!1;if(Eb)try{let o=new URL(window.location.href),u=n.startsWith("//")?new URL(o.protocol+n):new URL(n),c=Un(u.pathname,t);u.origin===o.origin&&c!=null?n=c+u.search+u.hash:s=!0}catch{Et(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:n}}var Aa=Symbol("Uninstrumented");function HP(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(s=>s({id:t.id,index:t.index,path:t.path,instrument(o){let u=Object.keys(n);for(let c of u)o[c]&&n[c].push(o[c])}}));let a={};if(typeof t.lazy=="function"&&n.lazy.length>0){let s=ns(n.lazy,t.lazy,()=>{});s&&(a.lazy=s)}if(typeof t.lazy=="object"){let s=t.lazy;["middleware","loader","action"].forEach(o=>{let u=s[o],c=n[`lazy.${o}`];if(typeof u=="function"&&c.length>0){let h=ns(c,u,()=>{});h&&(a.lazy=Object.assign(a.lazy||{},{[o]:h}))}})}return["loader","action"].forEach(s=>{let o=t[s];if(typeof o=="function"&&n[s].length>0){let u=o[Aa]??o,c=ns(n[s],u,(...h)=>Vy(h[0]));c&&(s==="loader"&&u.hydrate===!0&&(c.hydrate=!0),c[Aa]=u,a[s]=c)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(a.middleware=t.middleware.map(s=>{let o=s[Aa]??s,u=ns(n.middleware,o,(...c)=>Vy(c[0]));return u?(u[Aa]=o,u):s})),a}function WP(e,t){let n={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(s){let o=Object.keys(s);for(let u of o)s[u]&&n[u].push(s[u])}})),n.navigate.length>0){let a=e.navigate[Aa]??e.navigate,s=ns(n.navigate,a,(...o)=>{let[u,c]=o;return{to:typeof u=="number"||typeof u=="string"?u:u?br(u):".",...zy(e,c??{})}});s&&(s[Aa]=a,e.navigate=s)}if(n.fetch.length>0){let a=e.fetch[Aa]??e.fetch,s=ns(n.fetch,a,(...o)=>{let[u,,c,h]=o;return{href:c??".",fetcherKey:u,...zy(e,h??{})}});s&&(s[Aa]=a,e.fetch=s)}return e}function ns(e,t,n){return e.length===0?null:async(...a)=>{let s=await Rb(e,n(...a),()=>t(...a),e.length-1);if(s.type==="error")throw s.value;return s.value}}async function Rb(e,t,n,a){let s=e[a],o;if(s){let u,c=async()=>(u?console.error("You cannot call instrumented handlers more than once"):u=Rb(e,t,n,a-1),o=await u,Qe(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await s(c,t)}catch(h){console.error("An instrumentation function threw an error:",h)}u||await c(),await u}else try{o={type:"success",value:await n()}}catch(u){o={type:"error",value:u}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Vy(e){let{request:t,context:n,params:a,unstable_pattern:s}=e;return{request:KP(t),params:{...a},unstable_pattern:s,context:qP(n)}}function zy(e,t){return{currentUrl:br(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function KP(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function qP(e){if(YP(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var GP=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function YP(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===GP}var Lb=["POST","PUT","PATCH","DELETE"],ZP=new Set(Lb),QP=["GET",...Lb],XP=new Set(QP),Db=new Set([301,302,303,307,308]),JP=new Set([307,308]),mh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},e1={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},uo={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},t1=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Mb="remix-router-transitions",Nb=Symbol("ResetLoaderData");function n1(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";Qe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],s=e.mapRouteProperties||t1,o=s;if(e.unstable_instrumentations){let A=e.unstable_instrumentations;o=U=>({...s(U),...HP(A.map(V=>V.route).filter(Boolean),U)})}let u={},c=Eo(e.routes,o,void 0,u),h,f=e.basename||"/";f.startsWith("/")||(f=`/${f}`);let m=e.dataStrategy||o1,y={...e.future},b=null,w=new Set,S=null,T=null,P=null,L=e.hydrationData!=null,D=Ta(c,e.history.location,f),M=!1,j=null,q,K;if(D==null&&!e.patchRoutesOnNavigation){let A=Nn(404,{pathname:e.history.location.pathname}),{matches:U,route:V}=iu(c);q=!0,K=!q,D=U,j={[V.id]:A}}else if(D&&!e.hydrationData&&Xr(D,c,e.history.location.pathname).active&&(D=null),D)if(D.some(A=>A.route.lazy))q=!1,K=!q;else if(!D.some(A=>qf(A.route)))q=!0,K=!q;else{let A=e.hydrationData?e.hydrationData.loaderData:null,U=e.hydrationData?e.hydrationData.errors:null,V=D;if(U){let te=D.findIndex(ae=>U[ae.route.id]!==void 0);V=V.slice(0,te+1)}K=!1,q=V.every(te=>{let ae=Ob(te.route,A,U);return K=K||ae.renderFallback,!ae.shouldLoad})}else{q=!1,K=!q,D=[];let A=Xr(null,c,e.history.location.pathname);A.active&&A.matches&&(M=!0,D=A.matches)}let H,x={historyAction:e.history.action,location:e.history.location,matches:D,initialized:q,renderFallback:K,navigation:mh,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||j,fetchers:new Map,blockers:new Map},Z="POP",Q=null,me=!1,oe,Ae=!1,fe=new Map,ce=null,le=!1,Me=!1,W=new Set,Y=new Map,$=0,N=-1,G=new Map,xe=new Set,Re=new Map,Se=new Map,Ce=new Set,qe=new Map,Xe,Ue=null;function jt(){if(b=e.history.listen(({action:A,location:U,delta:V})=>{if(Xe){Xe(),Xe=void 0;return}Et(qe.size===0||V!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let te=Cr({currentLocation:x.location,nextLocation:U,historyAction:A});if(te&&V!=null){let ae=new Promise(Ee=>{Xe=Ee});e.history.go(V*-1),qn(te,{state:"blocked",location:U,proceed(){qn(te,{state:"proceeding",proceed:void 0,reset:void 0,location:U}),ae.then(()=>e.history.go(V))},reset(){let Ee=new Map(x.blockers);Ee.set(te,uo),pt({blockers:Ee})}}),Q?.resolve(),Q=null;return}return Wn(A,U)}),n){P1(t,fe);let A=()=>T1(t,fe);t.addEventListener("pagehide",A),ce=()=>t.removeEventListener("pagehide",A)}return x.initialized||Wn("POP",x.location,{initialHydration:!0}),H}function Hn(){b&&b(),ce&&ce(),w.clear(),oe&&oe.abort(),x.fetchers.forEach((A,U)=>vi(U)),x.blockers.forEach((A,U)=>wi(U))}function Tr(A){return w.add(A),()=>w.delete(A)}function pt(A,U={}){A.matches&&(A.matches=A.matches.map(ae=>{let Ee=u[ae.route.id],pe=ae.route;return pe.element!==Ee.element||pe.errorElement!==Ee.errorElement||pe.hydrateFallbackElement!==Ee.hydrateFallbackElement?{...ae,route:Ee}:ae})),x={...x,...A};let V=[],te=[];x.fetchers.forEach((ae,Ee)=>{ae.state==="idle"&&(Ce.has(Ee)?V.push(Ee):te.push(Ee))}),Ce.forEach(ae=>{!x.fetchers.has(ae)&&!Y.has(ae)&&V.push(ae)}),[...w].forEach(ae=>ae(x,{deletedFetchers:V,newErrors:A.errors??null,viewTransitionOpts:U.viewTransitionOpts,flushSync:U.flushSync===!0})),V.forEach(ae=>vi(ae)),te.forEach(ae=>x.fetchers.delete(ae))}function en(A,U,{flushSync:V}={}){let te=x.actionData!=null&&x.navigation.formMethod!=null&&Xt(x.navigation.formMethod)&&x.navigation.state==="loading"&&A.state?._isRedirect!==!0,ae;U.actionData?Object.keys(U.actionData).length>0?ae=U.actionData:ae=null:te?ae=x.actionData:ae=null;let Ee=U.loaderData?Xy(x.loaderData,U.loaderData,U.matches||[],U.errors):x.loaderData,pe=x.blockers;pe.size>0&&(pe=new Map(pe),pe.forEach((Oe,Le)=>pe.set(Le,uo)));let De=le?!1:Cs(A,U.matches||x.matches),he=me===!0||x.navigation.formMethod!=null&&Xt(x.navigation.formMethod)&&A.state?._isRedirect!==!0;h&&(c=h,h=void 0),le||Z==="POP"||(Z==="PUSH"?e.history.push(A,A.state):Z==="REPLACE"&&e.history.replace(A,A.state));let Ne;if(Z==="POP"){let Oe=fe.get(x.location.pathname);Oe&&Oe.has(A.pathname)?Ne={currentLocation:x.location,nextLocation:A}:fe.has(A.pathname)&&(Ne={currentLocation:A,nextLocation:x.location})}else if(Ae){let Oe=fe.get(x.location.pathname);Oe?Oe.add(A.pathname):(Oe=new Set([A.pathname]),fe.set(x.location.pathname,Oe)),Ne={currentLocation:x.location,nextLocation:A}}pt({...U,actionData:ae,loaderData:Ee,historyAction:Z,location:A,initialized:!0,renderFallback:!1,navigation:mh,revalidation:"idle",restoreScrollPosition:De,preventScrollReset:he,blockers:pe},{viewTransitionOpts:Ne,flushSync:V===!0}),Z="POP",me=!1,Ae=!1,le=!1,Me=!1,Q?.resolve(),Q=null,Ue?.resolve(),Ue=null}async function ws(A,U){if(Q?.resolve(),Q=null,typeof A=="number"){Q||(Q=nv());let ht=Q.promise;return e.history.go(A),ht}let V=qh(x.location,x.matches,f,A,U?.fromRouteId,U?.relative),{path:te,submission:ae,error:Ee}=$y(!1,V,U),pe;U?.unstable_mask&&(pe={pathname:"",search:"",hash:"",...typeof U.unstable_mask=="string"?Wr(U.unstable_mask):{...x.location.unstable_mask,...U.unstable_mask}});let De=x.location,he=Co(De,te,U&&U.state,void 0,pe);he={...he,...e.history.encodeLocation(he)};let Ne=U&&U.replace!=null?U.replace:void 0,Oe="PUSH";Ne===!0?Oe="REPLACE":Ne===!1||ae!=null&&Xt(ae.formMethod)&&ae.formAction===x.location.pathname+x.location.search&&(Oe="REPLACE");let Le=U&&"preventScrollReset"in U?U.preventScrollReset===!0:void 0,st=(U&&U.flushSync)===!0,et=Cr({currentLocation:De,nextLocation:he,historyAction:Oe});if(et){qn(et,{state:"blocked",location:he,proceed(){qn(et,{state:"proceeding",proceed:void 0,reset:void 0,location:he}),ws(A,U)},reset(){let ht=new Map(x.blockers);ht.set(et,uo),pt({blockers:ht})}});return}await Wn(Oe,he,{submission:ae,pendingError:Ee,preventScrollReset:Le,replace:U&&U.replace,enableViewTransition:U&&U.viewTransition,flushSync:st,callSiteDefaultShouldRevalidate:U&&U.unstable_defaultShouldRevalidate})}function Qo(){Ue||(Ue=nv()),Zr(),pt({revalidation:"loading"});let A=Ue.promise;return x.navigation.state==="submitting"?A:x.navigation.state==="idle"?(Wn(x.historyAction,x.location,{startUninterruptedRevalidation:!0}),A):(Wn(Z||x.historyAction,x.navigation.location,{overrideNavigation:x.navigation,enableViewTransition:Ae===!0}),A)}async function Wn(A,U,V){oe&&oe.abort(),oe=null,Z=A,le=(V&&V.startUninterruptedRevalidation)===!0,rl(x.location,x.matches),me=(V&&V.preventScrollReset)===!0,Ae=(V&&V.enableViewTransition)===!0;let te=h||c,ae=V&&V.overrideNavigation,Ee=V?.initialHydration&&x.matches&&x.matches.length>0&&!M?x.matches:Ta(te,U,f),pe=(V&&V.flushSync)===!0;if(Ee&&x.initialized&&!Me&&m1(x.location,U)&&!(V&&V.submission&&Xt(V.submission.formMethod))){en(U,{matches:Ee},{flushSync:pe});return}let De=Xr(Ee,te,U.pathname);if(De.active&&De.matches&&(Ee=De.matches),!Ee){let{error:Pt,notFoundMatches:$t,route:lt}=xi(U.pathname);en(U,{matches:$t,loaderData:{},errors:{[lt.id]:Pt}},{flushSync:pe});return}oe=new AbortController;let he=Ji(e.history,U,oe.signal,V&&V.submission),Ne=e.getContext?await e.getContext():new jy,Oe;if(V&&V.pendingError)Oe=[Ca(Ee).route.id,{type:"error",error:V.pendingError}];else if(V&&V.submission&&Xt(V.submission.formMethod)){let Pt=await Xo(he,U,V.submission,Ee,Ne,De.active,V&&V.initialHydration===!0,{replace:V.replace,flushSync:pe});if(Pt.shortCircuited)return;if(Pt.pendingActionResult){let[$t,lt]=Pt.pendingActionResult;if(xn(lt)&&Ao(lt.error)&<.error.status===404){oe=null,en(U,{matches:Pt.matches,loaderData:{},errors:{[$t]:lt.error}});return}}Ee=Pt.matches||Ee,Oe=Pt.pendingActionResult,ae=gh(U,V.submission),pe=!1,De.active=!1,he=Ji(e.history,he.url,he.signal)}let{shortCircuited:Le,matches:st,loaderData:et,errors:ht}=await xs(he,U,Ee,Ne,De.active,ae,V&&V.submission,V&&V.fetcherSubmission,V&&V.replace,V&&V.initialHydration===!0,pe,Oe,V&&V.callSiteDefaultShouldRevalidate);Le||(oe=null,en(U,{matches:st||Ee,...Jy(Oe),loaderData:et,errors:ht}))}async function Xo(A,U,V,te,ae,Ee,pe,De={}){Zr();let he=x1(U,V);if(pt({navigation:he},{flushSync:De.flushSync===!0}),Ee){let Le=await Ua(te,U.pathname,A.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){if(Le.partialMatches.length===0){let{matches:et,route:ht}=iu(c);return{matches:et,pendingActionResult:[ht.id,{type:"error",error:Le.error}]}}let st=Ca(Le.partialMatches).route.id;return{matches:Le.partialMatches,pendingActionResult:[st,{type:"error",error:Le.error}]}}else if(Le.matches)te=Le.matches;else{let{notFoundMatches:st,error:et,route:ht}=xi(U.pathname);return{matches:st,pendingActionResult:[ht.id,{type:"error",error:et}]}}}let Ne,Oe=_u(te,U);if(!Oe.route.action&&!Oe.route.lazy)Ne={type:"error",error:Nn(405,{method:A.method,pathname:U.pathname,routeId:Oe.route.id})};else{let Le=os(o,u,A,te,Oe,pe?[]:a,ae),st=await Yr(A,Le,ae,null);if(Ne=st[Oe.route.id],!Ne){for(let et of te)if(st[et.route.id]){Ne=st[et.route.id];break}}if(A.signal.aborted)return{shortCircuited:!0}}if(ti(Ne)){let Le;return De&&De.replace!=null?Le=De.replace:Le=Yy(Ne.response.headers.get("Location"),new URL(A.url),f,e.history)===x.location.pathname+x.location.search,await or(A,Ne,!0,{submission:V,replace:Le}),{shortCircuited:!0}}if(xn(Ne)){let Le=Ca(te,Oe.route.id);return(De&&De.replace)!==!0&&(Z="PUSH"),{matches:te,pendingActionResult:[Le.route.id,Ne,Oe.route.id]}}return{matches:te,pendingActionResult:[Oe.route.id,Ne]}}async function xs(A,U,V,te,ae,Ee,pe,De,he,Ne,Oe,Le,st){let et=Ee||gh(U,pe),ht=pe||De||tv(et),Pt=!le&&!Ne;if(ae){if(Pt){let Ut=qr(Le);pt({navigation:et,...Ut!==void 0?{actionData:Ut}:{}},{flushSync:Oe})}let He=await Ua(V,U.pathname,A.signal);if(He.type==="aborted")return{shortCircuited:!0};if(He.type==="error"){if(He.partialMatches.length===0){let{matches:ta,route:Rr}=iu(c);return{matches:ta,loaderData:{},errors:{[Rr.id]:He.error}}}let Ut=Ca(He.partialMatches).route.id;return{matches:He.partialMatches,loaderData:{},errors:{[Ut]:He.error}}}else if(He.matches)V=He.matches;else{let{error:Ut,notFoundMatches:ta,route:Rr}=xi(U.pathname);return{matches:ta,loaderData:{},errors:{[Rr.id]:Ut}}}}let $t=h||c,{dsMatches:lt,revalidatingFetchers:rt}=Hy(A,te,o,u,e.history,x,V,ht,U,Ne?[]:a,Ne===!0,Me,W,Ce,Re,xe,$t,f,e.patchRoutesOnNavigation!=null,Le,st);if(N=++$,!e.dataStrategy&&!lt.some(He=>He.shouldLoad)&&!lt.some(He=>He.route.middleware&&He.route.middleware.length>0)&&rt.length===0){let He=_i();return en(U,{matches:V,loaderData:{},errors:Le&&xn(Le[1])?{[Le[0]]:Le[1].error}:null,...Jy(Le),...He?{fetchers:new Map(x.fetchers)}:{}},{flushSync:Oe}),{shortCircuited:!0}}if(Pt){let He={};if(!ae){He.navigation=et;let Ut=qr(Le);Ut!==void 0&&(He.actionData=Ut)}rt.length>0&&(He.fetchers=Gr(rt)),pt(He,{flushSync:Oe})}rt.forEach(He=>{Kn(He.key),He.controller&&Y.set(He.key,He.controller)});let Er=()=>rt.forEach(He=>Kn(He.key));oe&&oe.signal.addEventListener("abort",Er);let{loaderResults:Ar,fetcherResults:Gn}=await yi(lt,rt,A,te);if(A.signal.aborted)return{shortCircuited:!0};oe&&oe.signal.removeEventListener("abort",Er),rt.forEach(He=>Y.delete(He.key));let nn=su(Ar);if(nn)return await or(A,nn.result,!0,{replace:he}),{shortCircuited:!0};if(nn=su(Gn),nn)return xe.add(nn.key),await or(A,nn.result,!0,{replace:he}),{shortCircuited:!0};let{loaderData:As,errors:ea}=Qy(x,V,Ar,Le,rt,Gn);Ne&&x.errors&&(ea={...x.errors,...ea});let Cn=_i(),rn=ki(N),Si=Cn||rn||rt.length>0;return{matches:V,loaderData:As,errors:ea,...Si?{fetchers:new Map(x.fetchers)}:{}}}function qr(A){if(A&&!xn(A[1]))return{[A[0]]:A[1].data};if(x.actionData)return Object.keys(x.actionData).length===0?null:x.actionData}function Gr(A){return A.forEach(U=>{let V=x.fetchers.get(U.key),te=co(void 0,V?V.data:void 0);x.fetchers.set(U.key,te)}),new Map(x.fetchers)}async function Ss(A,U,V,te){Kn(A);let ae=(te&&te.flushSync)===!0,Ee=h||c,pe=qh(x.location,x.matches,f,V,U,te?.relative),De=Ta(Ee,pe,f),he=Xr(De,Ee,pe);if(he.active&&he.matches&&(De=he.matches),!De){tn(A,U,Nn(404,{pathname:pe}),{flushSync:ae});return}let{path:Ne,submission:Oe,error:Le}=$y(!0,pe,te);if(Le){tn(A,U,Le,{flushSync:ae});return}let st=e.getContext?await e.getContext():new jy,et=(te&&te.preventScrollReset)===!0;if(Oe&&Xt(Oe.formMethod)){await Jo(A,U,Ne,De,st,he.active,ae,et,Oe,te&&te.unstable_defaultShouldRevalidate);return}Re.set(A,{routeId:U,path:Ne}),await el(A,U,Ne,De,st,he.active,ae,et,Oe)}async function Jo(A,U,V,te,ae,Ee,pe,De,he,Ne){Zr(),Re.delete(A);let Oe=x.fetchers.get(A);Tn(A,S1(he,Oe),{flushSync:pe});let Le=new AbortController,st=Ji(e.history,V,Le.signal,he);if(Ee){let ct=await Ua(te,new URL(st.url).pathname,st.signal,A);if(ct.type==="aborted")return;if(ct.type==="error"){tn(A,U,ct.error,{flushSync:pe});return}else if(ct.matches)te=ct.matches;else{tn(A,U,Nn(404,{pathname:V}),{flushSync:pe});return}}let et=_u(te,V);if(!et.route.action&&!et.route.lazy){let ct=Nn(405,{method:he.formMethod,pathname:V,routeId:U});tn(A,U,ct,{flushSync:pe});return}Y.set(A,Le);let ht=$,Pt=os(o,u,st,te,et,a,ae),$t=await Yr(st,Pt,ae,A),lt=$t[et.route.id];if(!lt){for(let ct of Pt)if($t[ct.route.id]){lt=$t[ct.route.id];break}}if(st.signal.aborted){Y.get(A)===Le&&Y.delete(A);return}if(Ce.has(A)){if(ti(lt)||xn(lt)){Tn(A,Vr(void 0));return}}else{if(ti(lt))if(Y.delete(A),N>ht){Tn(A,Vr(void 0));return}else return xe.add(A),Tn(A,co(he)),or(st,lt,!1,{fetcherSubmission:he,preventScrollReset:De});if(xn(lt)){tn(A,U,lt.error);return}}let rt=x.navigation.location||x.location,Er=Ji(e.history,rt,Le.signal),Ar=h||c,Gn=x.navigation.state!=="idle"?Ta(Ar,x.navigation.location,f):x.matches;Qe(Gn,"Didn't find any matches after fetcher action");let nn=++$;G.set(A,nn);let As=co(he,lt.data);x.fetchers.set(A,As);let{dsMatches:ea,revalidatingFetchers:Cn}=Hy(Er,ae,o,u,e.history,x,Gn,he,rt,a,!1,Me,W,Ce,Re,xe,Ar,f,e.patchRoutesOnNavigation!=null,[et.route.id,lt],Ne);Cn.filter(ct=>ct.key!==A).forEach(ct=>{let Lr=ct.key,na=x.fetchers.get(Lr),Pi=co(void 0,na?na.data:void 0);x.fetchers.set(Lr,Pi),Kn(Lr),ct.controller&&Y.set(Lr,ct.controller)}),pt({fetchers:new Map(x.fetchers)});let rn=()=>Cn.forEach(ct=>Kn(ct.key));Le.signal.addEventListener("abort",rn);let{loaderResults:Si,fetcherResults:He}=await yi(ea,Cn,Er,ae);if(Le.signal.aborted)return;if(Le.signal.removeEventListener("abort",rn),G.delete(A),Y.delete(A),Cn.forEach(ct=>Y.delete(ct.key)),x.fetchers.has(A)){let ct=Vr(lt.data);x.fetchers.set(A,ct)}let Ut=su(Si);if(Ut)return or(Er,Ut.result,!1,{preventScrollReset:De});if(Ut=su(He),Ut)return xe.add(Ut.key),or(Er,Ut.result,!1,{preventScrollReset:De});let{loaderData:ta,errors:Rr}=Qy(x,Gn,Si,void 0,Cn,He);ki(nn),x.navigation.state==="loading"&&nn>N?(Qe(Z,"Expected pending action"),oe&&oe.abort(),en(x.navigation.location,{matches:Gn,loaderData:ta,errors:Rr,fetchers:new Map(x.fetchers)})):(pt({errors:Rr,loaderData:Xy(x.loaderData,ta,Gn,Rr),fetchers:new Map(x.fetchers)}),Me=!1)}async function el(A,U,V,te,ae,Ee,pe,De,he){let Ne=x.fetchers.get(A);Tn(A,co(he,Ne?Ne.data:void 0),{flushSync:pe});let Oe=new AbortController,Le=Ji(e.history,V,Oe.signal);if(Ee){let lt=await Ua(te,new URL(Le.url).pathname,Le.signal,A);if(lt.type==="aborted")return;if(lt.type==="error"){tn(A,U,lt.error,{flushSync:pe});return}else if(lt.matches)te=lt.matches;else{tn(A,U,Nn(404,{pathname:V}),{flushSync:pe});return}}let st=_u(te,V);Y.set(A,Oe);let et=$,ht=os(o,u,Le,te,st,a,ae),$t=(await Yr(Le,ht,ae,A))[st.route.id];if(Y.get(A)===Oe&&Y.delete(A),!Le.signal.aborted){if(Ce.has(A)){Tn(A,Vr(void 0));return}if(ti($t))if(N>et){Tn(A,Vr(void 0));return}else{xe.add(A),await or(Le,$t,!1,{preventScrollReset:De});return}if(xn($t)){tn(A,U,$t.error);return}Tn(A,Vr($t.data))}}async function or(A,U,V,{submission:te,fetcherSubmission:ae,preventScrollReset:Ee,replace:pe}={}){V||(Q?.resolve(),Q=null),U.response.headers.has("X-Remix-Revalidate")&&(Me=!0);let De=U.response.headers.get("Location");Qe(De,"Expected a Location header on the redirect Response"),De=Yy(De,new URL(A.url),f,e.history);let he=Co(x.location,De,{_isRedirect:!0});if(n){let ht=!1;if(U.response.headers.has("X-Remix-Reload-Document"))ht=!0;else if(Wf(De)){const Pt=xb(De,!0);ht=Pt.origin!==t.location.origin||Un(Pt.pathname,f)==null}if(ht){pe?t.location.replace(De):t.location.assign(De);return}}oe=null;let Ne=pe===!0||U.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Oe,formAction:Le,formEncType:st}=x.navigation;!te&&!ae&&Oe&&Le&&st&&(te=tv(x.navigation));let et=te||ae;if(JP.has(U.response.status)&&et&&Xt(et.formMethod))await Wn(Ne,he,{submission:{...et,formAction:De},preventScrollReset:Ee||me,enableViewTransition:V?Ae:void 0});else{let ht=gh(he,te);await Wn(Ne,he,{overrideNavigation:ht,fetcherSubmission:ae,preventScrollReset:Ee||me,enableViewTransition:V?Ae:void 0})}}async function Yr(A,U,V,te){let ae,Ee={};try{ae=await u1(m,A,U,te,V,!1)}catch(pe){return U.filter(De=>De.shouldLoad).forEach(De=>{Ee[De.route.id]={type:"error",error:pe}}),Ee}if(A.signal.aborted)return Ee;if(!Xt(A.method))for(let pe of U){if(ae[pe.route.id]?.type==="error")break;!ae.hasOwnProperty(pe.route.id)&&!x.loaderData.hasOwnProperty(pe.route.id)&&(!x.errors||!x.errors.hasOwnProperty(pe.route.id))&&pe.shouldCallHandler()&&(ae[pe.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${pe.route.id}`)})}for(let[pe,De]of Object.entries(ae))if(b1(De)){let he=De.result;Ee[pe]={type:"redirect",response:f1(he,A,pe,U,f)}}else Ee[pe]=await h1(De);return Ee}async function yi(A,U,V,te){let ae=Yr(V,A,te,null),Ee=Promise.all(U.map(async he=>{if(he.matches&&he.match&&he.request&&he.controller){let Oe=(await Yr(he.request,he.matches,te,he.key))[he.match.route.id];return{[he.key]:Oe}}else return Promise.resolve({[he.key]:{type:"error",error:Nn(404,{pathname:he.path})}})})),pe=await ae,De=(await Ee).reduce((he,Ne)=>Object.assign(he,Ne),{});return{loaderResults:pe,fetcherResults:De}}function Zr(){Me=!0,Re.forEach((A,U)=>{Y.has(U)&&W.add(U),Kn(U)})}function Tn(A,U,V={}){x.fetchers.set(A,U),pt({fetchers:new Map(x.fetchers)},{flushSync:(V&&V.flushSync)===!0})}function tn(A,U,V,te={}){let ae=Ca(x.matches,U);vi(A),pt({errors:{[ae.route.id]:V},fetchers:new Map(x.fetchers)},{flushSync:(te&&te.flushSync)===!0})}function Qr(A){return Se.set(A,(Se.get(A)||0)+1),Ce.has(A)&&Ce.delete(A),x.fetchers.get(A)||e1}function Ec(A,U){Kn(A,U?.reason),Tn(A,Vr(null))}function vi(A){let U=x.fetchers.get(A);Y.has(A)&&!(U&&U.state==="loading"&&G.has(A))&&Kn(A),Re.delete(A),G.delete(A),xe.delete(A),Ce.delete(A),W.delete(A),x.fetchers.delete(A)}function tl(A){let U=(Se.get(A)||0)-1;U<=0?(Se.delete(A),Ce.add(A)):Se.set(A,U),pt({fetchers:new Map(x.fetchers)})}function Kn(A,U){let V=Y.get(A);V&&(V.abort(U),Y.delete(A))}function bi(A){for(let U of A){let V=Qr(U),te=Vr(V.data);x.fetchers.set(U,te)}}function _i(){let A=[],U=!1;for(let V of xe){let te=x.fetchers.get(V);Qe(te,`Expected fetcher: ${V}`),te.state==="loading"&&(xe.delete(V),A.push(V),U=!0)}return bi(A),U}function ki(A){let U=[];for(let[V,te]of G)if(te<A){let ae=x.fetchers.get(V);Qe(ae,`Expected fetcher: ${V}`),ae.state==="loading"&&(Kn(V),G.delete(V),U.push(V))}return bi(U),U.length>0}function Ps(A,U){let V=x.blockers.get(A)||uo;return qe.get(A)!==U&&qe.set(A,U),V}function wi(A){x.blockers.delete(A),qe.delete(A)}function qn(A,U){let V=x.blockers.get(A)||uo;Qe(V.state==="unblocked"&&U.state==="blocked"||V.state==="blocked"&&U.state==="blocked"||V.state==="blocked"&&U.state==="proceeding"||V.state==="blocked"&&U.state==="unblocked"||V.state==="proceeding"&&U.state==="unblocked",`Invalid blocker state transition: ${V.state} -> ${U.state}`);let te=new Map(x.blockers);te.set(A,U),pt({blockers:te})}function Cr({currentLocation:A,nextLocation:U,historyAction:V}){if(qe.size===0)return;qe.size>1&&Et(!1,"A router only supports one blocker at a time");let te=Array.from(qe.entries()),[ae,Ee]=te[te.length-1],pe=x.blockers.get(ae);if(!(pe&&pe.state==="proceeding")&&Ee({currentLocation:A,nextLocation:U,historyAction:V}))return ae}function xi(A){let U=Nn(404,{pathname:A}),V=h||c,{matches:te,route:ae}=iu(V);return{notFoundMatches:te,route:ae,error:U}}function nl(A,U,V){if(S=A,P=U,T=V||null,!L&&x.navigation===mh){L=!0;let te=Cs(x.location,x.matches);te!=null&&pt({restoreScrollPosition:te})}return()=>{S=null,P=null,T=null}}function Ts(A,U){return T&&T(A,U.map(te=>TP(te,x.loaderData)))||A.key}function rl(A,U){if(S&&P){let V=Ts(A,U);S[V]=P()}}function Cs(A,U){if(S){let V=Ts(A,U),te=S[V];if(typeof te=="number")return te}return null}function Xr(A,U,V){if(e.patchRoutesOnNavigation)if(A){if(Object.keys(A[0].params).length>0)return{active:!0,matches:yo(U,V,f,!0)}}else return{active:!0,matches:yo(U,V,f,!0)||[]};return{active:!1,matches:null}}async function Ua(A,U,V,te){if(!e.patchRoutesOnNavigation)return{type:"success",matches:A};let ae=A;for(;;){let Ee=h==null,pe=h||c,De=u;try{await e.patchRoutesOnNavigation({signal:V,path:U,matches:ae,fetcherKey:te,patch:(Oe,Le)=>{V.aborted||Wy(Oe,Le,pe,De,o,!1)}})}catch(Oe){return{type:"error",error:Oe,partialMatches:ae}}finally{Ee&&!V.aborted&&(c=[...c])}if(V.aborted)return{type:"aborted"};let he=Ta(pe,U,f),Ne=null;if(he){if(Object.keys(he[0].params).length===0)return{type:"success",matches:he};if(Ne=yo(pe,U,f,!0),!(Ne&&ae.length<Ne.length&&Jr(ae,Ne.slice(0,ae.length))))return{type:"success",matches:he}}if(Ne||(Ne=yo(pe,U,f,!0)),!Ne||Jr(ae,Ne))return{type:"success",matches:null};ae=Ne}}function Jr(A,U){return A.length===U.length&&A.every((V,te)=>V.route.id===U[te].route.id)}function Es(A){u={},h=Eo(A,o,void 0,u)}function Ba(A,U,V=!1){let te=h==null;Wy(A,U,h||c,u,o,V),te&&(c=[...c],pt({}))}return H={get basename(){return f},get future(){return y},get state(){return x},get routes(){return c},get window(){return t},initialize:jt,subscribe:Tr,enableScrollRestoration:nl,navigate:ws,fetch:Ss,revalidate:Qo,createHref:A=>e.history.createHref(A),encodeLocation:A=>e.history.encodeLocation(A),getFetcher:Qr,resetFetcher:Ec,deleteFetcher:tl,dispose:Hn,getBlocker:Ps,deleteBlocker:wi,patchRoutes:Ba,_internalFetchControllers:Y,_internalSetRoutes:Es,_internalSetStateDoNotUseOrYouWillBreakYourApp(A){pt(A)}},e.unstable_instrumentations&&(H=WP(H,e.unstable_instrumentations.map(A=>A.router).filter(Boolean))),H}function r1(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function qh(e,t,n,a,s,o){let u,c;if(s){u=[];for(let f of t)if(u.push(f),f.route.id===s){c=f;break}}else u=t,c=t[t.length-1];let h=dc(a||".",Kf(u),Un(e.pathname,n)||e.pathname,o==="path");if(a==null&&(h.search=e.search,h.hash=e.hash),(a==null||a===""||a===".")&&c){let f=Yf(h.search);if(c.route.index&&!f)h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&f){let m=new URLSearchParams(h.search),y=m.getAll("index");m.delete("index"),y.filter(w=>w).forEach(w=>m.append("index",w));let b=m.toString();h.search=b?`?${b}`:""}}return n!=="/"&&(h.pathname=BP({basename:n,pathname:h.pathname})),br(h)}function $y(e,t,n){if(!n||!r1(n))return{path:t};if(n.formMethod&&!w1(n.formMethod))return{path:t,error:Nn(405,{method:n.formMethod})};let a=()=>({path:t,error:Nn(400,{type:"invalid-body"})}),o=(n.formMethod||"get").toUpperCase(),u=Vb(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Xt(o))return a();let y=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((b,[w,S])=>`${b}${w}=${S}
|
|
10
|
-
`,""):String(n.body);return{path:t,submission:{formMethod:o,formAction:u,formEncType:n.formEncType,formData:void 0,json:void 0,text:y}}}else if(n.formEncType==="application/json"){if(!Xt(o))return a();try{let y=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:o,formAction:u,formEncType:n.formEncType,formData:void 0,json:y,text:void 0}}}catch{return a()}}}Qe(typeof FormData=="function","FormData is not available in this environment");let c,h;if(n.formData)c=Yh(n.formData),h=n.formData;else if(n.body instanceof FormData)c=Yh(n.body),h=n.body;else if(n.body instanceof URLSearchParams)c=n.body,h=Zy(c);else if(n.body==null)c=new URLSearchParams,h=new FormData;else try{c=new URLSearchParams(n.body),h=Zy(c)}catch{return a()}let f={formMethod:o,formAction:u,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(Xt(f.formMethod))return{path:t,submission:f};let m=Wr(t);return e&&m.search&&Yf(m.search)&&c.append("index",""),m.search=`?${c}`,{path:br(m),submission:f}}function Hy(e,t,n,a,s,o,u,c,h,f,m,y,b,w,S,T,P,L,D,M,j){let q=M?xn(M[1])?M[1].error:M[1].data:void 0,K=s.createURL(o.location),H=s.createURL(h),x;if(m&&o.errors){let ce=Object.keys(o.errors)[0];x=u.findIndex(le=>le.route.id===ce)}else if(M&&xn(M[1])){let ce=M[0];x=u.findIndex(le=>le.route.id===ce)-1}let Z=M?M[1].statusCode:void 0,Q=Z&&Z>=400,me={currentUrl:K,currentParams:o.matches[0]?.params||{},nextUrl:H,nextParams:u[0].params,...c,actionResult:q,actionStatus:Z},oe=jo(u),Ae=u.map((ce,le)=>{let{route:Me}=ce,W=null;if(x!=null&&le>x)W=!1;else if(Me.lazy)W=!0;else if(!qf(Me))W=!1;else if(m){let{shouldLoad:G}=Ob(Me,o.loaderData,o.errors);W=G}else a1(o.loaderData,o.matches[le],ce)&&(W=!0);if(W!==null)return Gh(n,a,e,oe,ce,f,t,W);let Y=!1;typeof j=="boolean"?Y=j:Q?Y=!1:(y||K.pathname+K.search===H.pathname+H.search||K.search!==H.search||i1(o.matches[le],ce))&&(Y=!0);let $={...me,defaultShouldRevalidate:Y},N=ko(ce,$);return Gh(n,a,e,oe,ce,f,t,N,$,j)}),fe=[];return S.forEach((ce,le)=>{if(m||!u.some(Re=>Re.route.id===ce.routeId)||w.has(le))return;let Me=o.fetchers.get(le),W=Me&&Me.state!=="idle"&&Me.data===void 0,Y=Ta(P,ce.path,L);if(!Y){if(D&&W)return;fe.push({key:le,routeId:ce.routeId,path:ce.path,matches:null,match:null,request:null,controller:null});return}if(T.has(le))return;let $=_u(Y,ce.path),N=new AbortController,G=Ji(s,ce.path,N.signal),xe=null;if(b.has(le))b.delete(le),xe=os(n,a,G,Y,$,f,t);else if(W)y&&(xe=os(n,a,G,Y,$,f,t));else{let Re;typeof j=="boolean"?Re=j:Q?Re=!1:Re=y;let Se={...me,defaultShouldRevalidate:Re};ko($,Se)&&(xe=os(n,a,G,Y,$,f,t,Se))}xe&&fe.push({key:le,routeId:ce.routeId,path:ce.path,matches:xe,match:$,request:G,controller:N})}),{dsMatches:Ae,revalidatingFetchers:fe}}function qf(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Ob(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!qf(e))return{shouldLoad:!1,renderFallback:!1};let a=t!=null&&e.id in t,s=n!=null&&n[e.id]!==void 0;if(!a&&s)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let o=!a&&!s;return{shouldLoad:o,renderFallback:o}}function a1(e,t,n){let a=!t||n.route.id!==t.route.id,s=!e.hasOwnProperty(n.route.id);return a||s}function i1(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ko(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function Wy(e,t,n,a,s,o){let u;if(e){let f=a[e];Qe(f,`No route found to patch children into: routeId = ${e}`),f.children||(f.children=[]),u=f.children}else u=n;let c=[],h=[];if(t.forEach(f=>{let m=u.find(y=>Ib(f,y));m?h.push({existingRoute:m,newRoute:f}):c.push(f)}),c.length>0){let f=Eo(c,s,[e||"_","patch",String(u?.length||"0")],a);u.push(...f)}if(o&&h.length>0)for(let f=0;f<h.length;f++){let{existingRoute:m,newRoute:y}=h[f],b=m,[w]=Eo([y],s,[],{},!0);Object.assign(b,{element:w.element?w.element:b.element,errorElement:w.errorElement?w.errorElement:b.errorElement,hydrateFallbackElement:w.hydrateFallbackElement?w.hydrateFallbackElement:b.hydrateFallbackElement})}}function Ib(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((n,a)=>t.children?.some(s=>Ib(n,s)))??!1:!1}var Ky=new WeakMap,jb=({key:e,route:t,manifest:n,mapRouteProperties:a})=>{let s=n[t.id];if(Qe(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let o=s.lazy[e];if(!o)return;let u=Ky.get(s);u||(u={},Ky.set(s,u));let c=u[e];if(c)return c;let h=(async()=>{let f=wP(e),y=s[e]!==void 0&&e!=="hasErrorBoundary";if(f)Et(!f,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),u[e]=Promise.resolve();else if(y)Et(!1,`Route "${s.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let b=await o();b!=null&&(Object.assign(s,{[e]:b}),Object.assign(s,a(s)))}typeof s.lazy=="object"&&(s.lazy[e]=void 0,Object.values(s.lazy).every(b=>b===void 0)&&(s.lazy=void 0))})();return u[e]=h,h},qy=new WeakMap;function s1(e,t,n,a,s){let o=n[e.id];if(Qe(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let m=qy.get(o);if(m)return{lazyRoutePromise:m,lazyHandlerPromise:m};let y=(async()=>{Qe(typeof e.lazy=="function","No lazy route function found");let b=await e.lazy(),w={};for(let S in b){let T=b[S];if(T===void 0)continue;let P=SP(S),D=o[S]!==void 0&&S!=="hasErrorBoundary";P?Et(!P,"Route property "+S+" is not a supported property to be returned from a lazy route function. This property will be ignored."):D?Et(!D,`Route "${o.id}" has a static property "${S}" defined but its lazy function is also returning a value for this property. The lazy route property "${S}" will be ignored.`):w[S]=T}Object.assign(o,w),Object.assign(o,{...a(o),lazy:void 0})})();return qy.set(o,y),y.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:y}}let u=Object.keys(e.lazy),c=[],h;for(let m of u){if(s&&s.includes(m))continue;let y=jb({key:m,route:e,manifest:n,mapRouteProperties:a});y&&(c.push(y),m===t&&(h=y))}let f=c.length>0?Promise.all(c).then(()=>{}):void 0;return f?.catch(()=>{}),h?.catch(()=>{}),{lazyRoutePromise:f,lazyHandlerPromise:h}}async function Gy(e){let t=e.matches.filter(s=>s.shouldLoad),n={};return(await Promise.all(t.map(s=>s.resolve()))).forEach((s,o)=>{n[t[o].route.id]=s}),n}async function o1(e){return e.matches.some(t=>t.route.middleware)?Ub(e,()=>Gy(e)):Gy(e)}function Ub(e,t){return l1(e,t,a=>{if(k1(a))throw a;return a},y1,n);function n(a,s,o){if(o)return Promise.resolve(Object.assign(o.value,{[s]:{type:"error",result:a}}));{let{matches:u}=e,c=Math.min(Math.max(u.findIndex(f=>f.route.id===s),0),Math.max(u.findIndex(f=>f.shouldCallHandler()),0)),h=Ca(u,u[c].route.id).route.id;return Promise.resolve({[h]:{type:"error",result:a}})}}}async function l1(e,t,n,a,s){let{matches:o,request:u,params:c,context:h,unstable_pattern:f}=e,m=o.flatMap(b=>b.route.middleware?b.route.middleware.map(w=>[b.route.id,w]):[]);return await Bb({request:u,params:c,context:h,unstable_pattern:f},m,t,n,a,s)}async function Bb(e,t,n,a,s,o,u=0){let{request:c}=e;if(c.signal.aborted)throw c.signal.reason??new Error(`Request aborted: ${c.method} ${c.url}`);let h=t[u];if(!h)return await n();let[f,m]=h,y,b=async()=>{if(y)throw new Error("You may only call `next()` once per middleware");try{return y={value:await Bb(e,t,n,a,s,o,u+1)},y.value}catch(w){return y={value:await o(w,f,y)},y.value}};try{let w=await m(e,b),S=w!=null?a(w):void 0;return s(S)?S:y?S??y.value:(y={value:await b()},y.value)}catch(w){return await o(w,f,y)}}function Fb(e,t,n,a,s){let o=jb({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),u=s1(a.route,Xt(n.method)?"action":"loader",t,e,s);return{middleware:o,route:u.lazyRoutePromise,handler:u.lazyHandlerPromise}}function Gh(e,t,n,a,s,o,u,c,h=null,f){let m=!1,y=Fb(e,t,n,s,o);return{...s,_lazyPromises:y,shouldLoad:c,shouldRevalidateArgs:h,shouldCallHandler(b){return m=!0,h?typeof f=="boolean"?ko(s,{...h,defaultShouldRevalidate:f}):typeof b=="boolean"?ko(s,{...h,defaultShouldRevalidate:b}):ko(s,h):c},resolve(b){let{lazy:w,loader:S,middleware:T}=s.route,P=m||c||b&&!Xt(n.method)&&(w||S),L=T&&T.length>0&&!S&&!w;return P&&(Xt(n.method)||!L)?c1({request:n,unstable_pattern:a,match:s,lazyHandlerPromise:y?.handler,lazyRoutePromise:y?.route,handlerOverride:b,scopedContext:u}):Promise.resolve({type:"data",result:void 0})}}}function os(e,t,n,a,s,o,u,c=null){return a.map(h=>h.route.id!==s.route.id?{...h,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Fb(e,t,n,h,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Gh(e,t,n,jo(a),h,o,u,!0,c))}async function u1(e,t,n,a,s,o){n.some(f=>f._lazyPromises?.middleware)&&await Promise.all(n.map(f=>f._lazyPromises?.middleware));let u={request:t,unstable_pattern:jo(n),params:n[0].params,context:s,matches:n},h=await e({...u,fetcherKey:a,runClientMiddleware:f=>{let m=u;return Ub(m,()=>f({...m,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(f=>[f._lazyPromises?.handler,f._lazyPromises?.route]))}catch{}return h}async function c1({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:a,lazyRoutePromise:s,handlerOverride:o,scopedContext:u}){let c,h,f=Xt(e.method),m=f?"action":"loader",y=b=>{let w,S=new Promise((L,D)=>w=D);h=()=>w(),e.signal.addEventListener("abort",h);let T=L=>typeof b!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${m}" [routeId: ${n.route.id}]`)):b({request:e,unstable_pattern:t,params:n.params,context:u},...L!==void 0?[L]:[]),P=(async()=>{try{return{type:"data",result:await(o?o(D=>T(D)):T())}}catch(L){return{type:"error",result:L}}})();return Promise.race([P,S])};try{let b=f?n.route.action:n.route.loader;if(a||s)if(b){let w,[S]=await Promise.all([y(b).catch(T=>{w=T}),a,s]);if(w!==void 0)throw w;c=S}else{await a;let w=f?n.route.action:n.route.loader;if(w)[c]=await Promise.all([y(w),s]);else if(m==="action"){let S=new URL(e.url),T=S.pathname+S.search;throw Nn(405,{method:e.method,pathname:T,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(b)c=await y(b);else{let w=new URL(e.url),S=w.pathname+w.search;throw Nn(404,{pathname:S})}}catch(b){return{type:"error",result:b}}finally{h&&e.signal.removeEventListener("abort",h)}return c}async function d1(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function h1(e){let{result:t,type:n}=e;if(Gf(t)){let a;try{a=await d1(t)}catch(s){return{type:"error",error:s}}return n==="error"?{type:"error",error:new Io(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return n==="error"?ev(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:g1(t),statusCode:Ao(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Ao(t)?t.status:void 0}:ev(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function f1(e,t,n,a,s){let o=e.headers.get("Location");if(Qe(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Wf(o)){let u=a.slice(0,a.findIndex(c=>c.route.id===n)+1);o=qh(new URL(t.url),u,s,o),e.headers.set("Location",o)}return e}function Yy(e,t,n,a){let s=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Wf(e)){let o=e,u=o.startsWith("//")?new URL(t.protocol+o):new URL(o);if(s.includes(u.protocol))throw new Error("Invalid redirect location");let c=Un(u.pathname,n)!=null;if(u.origin===t.origin&&c)return u.pathname+u.search+u.hash}try{let o=a.createURL(e);if(s.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Ji(e,t,n,a){let s=e.createURL(Vb(t)).toString(),o={signal:n};if(a&&Xt(a.formMethod)){let{formMethod:u,formEncType:c}=a;o.method=u.toUpperCase(),c==="application/json"?(o.headers=new Headers({"Content-Type":c}),o.body=JSON.stringify(a.json)):c==="text/plain"?o.body=a.text:c==="application/x-www-form-urlencoded"&&a.formData?o.body=Yh(a.formData):o.body=a.formData}return new Request(s,o)}function Yh(e){let t=new URLSearchParams;for(let[n,a]of e.entries())t.append(n,typeof a=="string"?a:a.name);return t}function Zy(e){let t=new FormData;for(let[n,a]of e.entries())t.append(n,a);return t}function p1(e,t,n,a=!1,s=!1){let o={},u=null,c,h=!1,f={},m=n&&xn(n[1])?n[1].error:void 0;return e.forEach(y=>{if(!(y.route.id in t))return;let b=y.route.id,w=t[b];if(Qe(!ti(w),"Cannot handle redirect results in processLoaderData"),xn(w)){let S=w.error;if(m!==void 0&&(S=m,m=void 0),u=u||{},s)u[b]=S;else{let T=Ca(e,b);u[T.route.id]==null&&(u[T.route.id]=S)}a||(o[b]=Nb),h||(h=!0,c=Ao(w.error)?w.error.status:500),w.headers&&(f[b]=w.headers)}else o[b]=w.data,w.statusCode&&w.statusCode!==200&&!h&&(c=w.statusCode),w.headers&&(f[b]=w.headers)}),m!==void 0&&n&&(u={[n[0]]:m},n[2]&&(o[n[2]]=void 0)),{loaderData:o,errors:u,statusCode:c||200,loaderHeaders:f}}function Qy(e,t,n,a,s,o){let{loaderData:u,errors:c}=p1(t,n,a);return s.filter(h=>!h.matches||h.matches.some(f=>f.shouldLoad)).forEach(h=>{let{key:f,match:m,controller:y}=h;if(y&&y.signal.aborted)return;let b=o[f];if(Qe(b,"Did not find corresponding fetcher result"),xn(b)){let w=Ca(e.matches,m?.route.id);c&&c[w.route.id]||(c={...c,[w.route.id]:b.error}),e.fetchers.delete(f)}else if(ti(b))Qe(!1,"Unhandled fetcher revalidation redirect");else{let w=Vr(b.data);e.fetchers.set(f,w)}}),{loaderData:u,errors:c}}function Xy(e,t,n,a){let s=Object.entries(t).filter(([,o])=>o!==Nb).reduce((o,[u,c])=>(o[u]=c,o),{});for(let o of n){let u=o.route.id;if(!t.hasOwnProperty(u)&&e.hasOwnProperty(u)&&o.route.loader&&(s[u]=e[u]),a&&a.hasOwnProperty(u))break}return s}function Jy(e){return e?xn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ca(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function iu(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Nn(e,{pathname:t,routeId:n,method:a,type:s,message:o}={}){let u="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(u="Bad Request",a&&t&&n?c=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:s==="invalid-body"&&(c="Unable to encode submission body")):e===403?(u="Forbidden",c=`Route "${n}" does not match URL "${t}"`):e===404?(u="Not Found",c=`No route matches URL "${t}"`):e===405&&(u="Method Not Allowed",a&&t&&n?c=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:a&&(c=`Invalid request method "${a.toUpperCase()}"`)),new Io(e||500,u,new Error(c),!0)}function su(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[a,s]=t[n];if(ti(s))return{key:a,result:s}}}function Vb(e){let t=typeof e=="string"?Wr(e):e;return br({...t,hash:""})}function m1(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function g1(e){return new Io(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function y1(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,n])=>typeof t=="string"&&v1(n))}function v1(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function b1(e){return Gf(e.result)&&Db.has(e.result.status)}function xn(e){return e.type==="error"}function ti(e){return(e&&e.type)==="redirect"}function ev(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Gf(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function _1(e){return Db.has(e)}function k1(e){return Gf(e)&&_1(e.status)&&e.headers.has("Location")}function w1(e){return XP.has(e.toUpperCase())}function Xt(e){return ZP.has(e.toUpperCase())}function Yf(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function _u(e,t){let n=typeof t=="string"?Wr(t).search:t.search;if(e[e.length-1].route.index&&Yf(n||""))return e[e.length-1];let a=Cb(e);return a[a.length-1]}function tv(e){let{formMethod:t,formAction:n,formEncType:a,text:s,formData:o,json:u}=e;if(!(!t||!n||!a)){if(s!=null)return{formMethod:t,formAction:n,formEncType:a,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:n,formEncType:a,formData:o,json:void 0,text:void 0};if(u!==void 0)return{formMethod:t,formAction:n,formEncType:a,formData:void 0,json:u,text:void 0}}}function gh(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function x1(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function co(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function S1(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Vr(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function P1(e,t){try{let n=e.sessionStorage.getItem(Mb);if(n){let a=JSON.parse(n);for(let[s,o]of Object.entries(a||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function T1(e,t){if(t.size>0){let n={};for(let[a,s]of t)n[a]=[...s];try{e.sessionStorage.setItem(Mb,JSON.stringify(n))}catch(a){Et(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function nv(){let e,t,n=new Promise((a,s)=>{e=async o=>{a(o);try{await n}catch{}},t=async o=>{s(o);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var pi=k.createContext(null);pi.displayName="DataRouter";var Uo=k.createContext(null);Uo.displayName="DataRouterState";var zb=k.createContext(!1);function C1(){return k.useContext(zb)}var Zf=k.createContext({isTransitioning:!1});Zf.displayName="ViewTransition";var $b=k.createContext(new Map);$b.displayName="Fetchers";var E1=k.createContext(null);E1.displayName="Await";var Bn=k.createContext(null);Bn.displayName="Navigation";var hc=k.createContext(null);hc.displayName="Location";var Kr=k.createContext({outlet:null,matches:[],isDataRoute:!1});Kr.displayName="Route";var Qf=k.createContext(null);Qf.displayName="RouteError";var Hb="REACT_ROUTER_ERROR",A1="REDIRECT",R1="ROUTE_ERROR_RESPONSE";function L1(e){if(e.startsWith(`${Hb}:${A1}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function D1(e){if(e.startsWith(`${Hb}:${R1}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Io(t.status,t.statusText,t.data)}catch{}}function M1(e,{relative:t}={}){Qe(Bo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=k.useContext(Bn),{hash:s,pathname:o,search:u}=Fo(e,{relative:t}),c=o;return n!=="/"&&(c=o==="/"?n:ar([n,o])),a.createHref({pathname:c,search:u,hash:s})}function Bo(){return k.useContext(hc)!=null}function Fn(){return Qe(Bo(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(hc).location}var Wb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Kb(e){k.useContext(Bn).static||k.useLayoutEffect(e)}function fc(){let{isDataRoute:e}=k.useContext(Kr);return e?K1():N1()}function N1(){Qe(Bo(),"useNavigate() may be used only in the context of a <Router> component.");let e=k.useContext(pi),{basename:t,navigator:n}=k.useContext(Bn),{matches:a}=k.useContext(Kr),{pathname:s}=Fn(),o=JSON.stringify(Kf(a)),u=k.useRef(!1);return Kb(()=>{u.current=!0}),k.useCallback((h,f={})=>{if(Et(u.current,Wb),!u.current)return;if(typeof h=="number"){n.go(h);return}let m=dc(h,JSON.parse(o),s,f.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:ar([t,m.pathname])),(f.replace?n.replace:n.push)(m,f.state,f)},[t,n,o,s,e])}k.createContext(null);function Fo(e,{relative:t}={}){let{matches:n}=k.useContext(Kr),{pathname:a}=Fn(),s=JSON.stringify(Kf(n));return k.useMemo(()=>dc(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function O1(e,t,n){Qe(Bo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=k.useContext(Bn),{matches:s}=k.useContext(Kr),o=s[s.length-1],u=o?o.params:{},c=o?o.pathname:"/",h=o?o.pathnameBase:"/",f=o&&o.route;{let P=f&&f.path||"";Gb(c,!f||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${P}">) 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.
|
|
11
|
-
|
|
12
|
-
Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let m=Fn(),y;y=m;let b=y.pathname||"/",w=b;if(h!=="/"){let P=h.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(P.length).join("/")}let S=Ta(e,{pathname:w});return Et(f||S!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),Et(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.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.`),F1(S&&S.map(P=>Object.assign({},P,{params:Object.assign({},u,P.params),pathname:ar([h,a.encodeLocation?a.encodeLocation(P.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?h:ar([h,a.encodeLocation?a.encodeLocation(P.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),s,n)}function I1(){let e=W1(),t=Ao(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=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:o},"ErrorBoundary")," or"," ",k.createElement("code",{style:o},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:s},n):null,u)}var j1=k.createElement(I1,null),qb=class extends k.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=D1(e.digest);n&&(e=n)}let t=e!==void 0?k.createElement(Kr.Provider,{value:this.props.routeContext},k.createElement(Qf.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?k.createElement(U1,{error:e},t):t}};qb.contextType=zb;var yh=new WeakMap;function U1({children:e,error:t}){let{basename:n}=k.useContext(Bn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=L1(t.digest);if(a){let s=yh.get(t);if(s)throw s;let o=Ab(a.location,n);if(Eb&&!yh.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw yh.set(t,u),u}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function B1({routeContext:e,match:t,children:n}){let a=k.useContext(pi);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),k.createElement(Kr.Provider,{value:e},n)}function F1(e,t=[],n){let a=n?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let s=e,o=a?.errors;if(o!=null){let m=s.findIndex(y=>y.route.id&&o?.[y.route.id]!==void 0);Qe(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,m+1))}let u=!1,c=-1;if(n&&a){u=a.renderFallback;for(let m=0;m<s.length;m++){let y=s[m];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(c=m),y.route.id){let{loaderData:b,errors:w}=a,S=y.route.loader&&!b.hasOwnProperty(y.route.id)&&(!w||w[y.route.id]===void 0);if(y.route.lazy||S){n.isStatic&&(u=!0),c>=0?s=s.slice(0,c+1):s=[s[0]];break}}}}let h=n?.onError,f=a&&h?(m,y)=>{h(m,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:jo(a.matches),errorInfo:y})}:void 0;return s.reduceRight((m,y,b)=>{let w,S=!1,T=null,P=null;a&&(w=o&&y.route.id?o[y.route.id]:void 0,T=y.route.errorElement||j1,u&&(c<0&&b===0?(Gb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,P=null):c===b&&(S=!0,P=y.route.hydrateFallbackElement||null)));let L=t.concat(s.slice(0,b+1)),D=()=>{let M;return w?M=T:S?M=P:y.route.Component?M=k.createElement(y.route.Component,null):y.route.element?M=y.route.element:M=m,k.createElement(B1,{match:y,routeContext:{outlet:m,matches:L,isDataRoute:a!=null},children:M})};return a&&(y.route.ErrorBoundary||y.route.errorElement||b===0)?k.createElement(qb,{location:a.location,revalidation:a.revalidation,component:T,error:w,children:D(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:f}):D()},null)}function Xf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function V1(e){let t=k.useContext(pi);return Qe(t,Xf(e)),t}function z1(e){let t=k.useContext(Uo);return Qe(t,Xf(e)),t}function $1(e){let t=k.useContext(Kr);return Qe(t,Xf(e)),t}function Jf(e){let t=$1(e),n=t.matches[t.matches.length-1];return Qe(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function H1(){return Jf("useRouteId")}function W1(){let e=k.useContext(Qf),t=z1("useRouteError"),n=Jf("useRouteError");return e!==void 0?e:t.errors?.[n]}function K1(){let{router:e}=V1("useNavigate"),t=Jf("useNavigate"),n=k.useRef(!1);return Kb(()=>{n.current=!0}),k.useCallback(async(s,o={})=>{Et(n.current,Wb),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var rv={};function Gb(e,t,n){!t&&!rv[e]&&(rv[e]=!0,Et(!1,n))}var av={};function iv(e,t){!e&&!av[t]&&(av[t]=!0,console.warn(t))}var q1="useOptimistic",sv=cP[q1],G1=()=>{};function Y1(e){return sv?sv(e):[e,G1]}function Z1(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Et(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:k.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Et(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:k.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Et(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:k.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Q1=["HydrateFallback","hydrateFallbackElement"],X1=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",t(n))}})}};function J1({router:e,flushSync:t,onError:n,unstable_useTransitions:a}){a=C1()||a;let[o,u]=k.useState(e.state),[c,h]=Y1(o),[f,m]=k.useState(),[y,b]=k.useState({isTransitioning:!1}),[w,S]=k.useState(),[T,P]=k.useState(),[L,D]=k.useState(),M=k.useRef(new Map),j=k.useCallback((x,{deletedFetchers:Z,newErrors:Q,flushSync:me,viewTransitionOpts:oe})=>{Q&&n&&Object.values(Q).forEach(fe=>n(fe,{location:x.location,params:x.matches[0]?.params??{},unstable_pattern:jo(x.matches)})),x.fetchers.forEach((fe,ce)=>{fe.data!==void 0&&M.current.set(ce,fe.data)}),Z.forEach(fe=>M.current.delete(fe)),iv(me===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Ae=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(iv(oe==null||Ae,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!oe||!Ae){t&&me?t(()=>u(x)):a===!1?u(x):k.startTransition(()=>{a===!0&&h(fe=>ov(fe,x)),u(x)});return}if(t&&me){t(()=>{T&&(w?.resolve(),T.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:oe.currentLocation,nextLocation:oe.nextLocation})});let fe=e.window.document.startViewTransition(()=>{t(()=>u(x))});fe.finished.finally(()=>{t(()=>{S(void 0),P(void 0),m(void 0),b({isTransitioning:!1})})}),t(()=>P(fe));return}T?(w?.resolve(),T.skipTransition(),D({state:x,currentLocation:oe.currentLocation,nextLocation:oe.nextLocation})):(m(x),b({isTransitioning:!0,flushSync:!1,currentLocation:oe.currentLocation,nextLocation:oe.nextLocation}))},[e.window,t,T,w,a,h,n]);k.useLayoutEffect(()=>e.subscribe(j),[e,j]),k.useEffect(()=>{y.isTransitioning&&!y.flushSync&&S(new X1)},[y]),k.useEffect(()=>{if(w&&f&&e.window){let x=f,Z=w.promise,Q=e.window.document.startViewTransition(async()=>{a===!1?u(x):k.startTransition(()=>{a===!0&&h(me=>ov(me,x)),u(x)}),await Z});Q.finished.finally(()=>{S(void 0),P(void 0),m(void 0),b({isTransitioning:!1})}),P(Q)}},[f,w,e.window,a,h]),k.useEffect(()=>{w&&f&&c.location.key===f.location.key&&w.resolve()},[w,T,c.location,f]),k.useEffect(()=>{!y.isTransitioning&&L&&(m(L.state),b({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}),D(void 0))},[y.isTransitioning,L]);let q=k.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:x=>e.navigate(x),push:(x,Z,Q)=>e.navigate(x,{state:Z,preventScrollReset:Q?.preventScrollReset}),replace:(x,Z,Q)=>e.navigate(x,{replace:!0,state:Z,preventScrollReset:Q?.preventScrollReset})}),[e]),K=e.basename||"/",H=k.useMemo(()=>({router:e,navigator:q,static:!1,basename:K,onError:n}),[e,q,K,n]);return k.createElement(k.Fragment,null,k.createElement(pi.Provider,{value:H},k.createElement(Uo.Provider,{value:c},k.createElement($b.Provider,{value:M.current},k.createElement(Zf.Provider,{value:y},k.createElement(nT,{basename:K,location:c.location,navigationType:c.historyAction,navigator:q,unstable_useTransitions:a},k.createElement(eT,{routes:e.routes,future:e.future,state:c,isStatic:!1,onError:n})))))),null)}function ov(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var eT=k.memo(tT);function tT({routes:e,future:t,state:n,isStatic:a,onError:s}){return O1(e,void 0,{state:n,isStatic:a,onError:s})}function nT({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:s,static:o=!1,unstable_useTransitions:u}){Qe(!Bo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),h=k.useMemo(()=>({basename:c,navigator:s,static:o,unstable_useTransitions:u,future:{}}),[c,s,o,u]);typeof n=="string"&&(n=Wr(n));let{pathname:f="/",search:m="",hash:y="",state:b=null,key:w="default",unstable_mask:S}=n,T=k.useMemo(()=>{let P=Un(f,c);return P==null?null:{location:{pathname:P,search:m,hash:y,state:b,key:w,unstable_mask:S},navigationType:a}},[c,f,m,y,b,w,a,S]);return Et(T!=null,`<Router basename="${c}"> is not able to match the URL "${f}${m}${y}" because it does not start with the basename, so the <Router> won't render anything.`),T==null?null:k.createElement(Bn.Provider,{value:h},k.createElement(hc.Provider,{children:t,value:T}))}var ku="get",wu="application/x-www-form-urlencoded";function pc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function rT(e){return pc(e)&&e.tagName.toLowerCase()==="button"}function aT(e){return pc(e)&&e.tagName.toLowerCase()==="form"}function iT(e){return pc(e)&&e.tagName.toLowerCase()==="input"}function sT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oT(e,t){return e.button===0&&(!t||t==="_self")&&!sT(e)}function Zh(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(s=>[n,s]):[[n,a]])},[]))}function lT(e,t){let n=Zh(e);return t&&t.forEach((a,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}var ou=null;function uT(){if(ou===null)try{new FormData(document.createElement("form"),0),ou=!1}catch{ou=!0}return ou}var cT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vh(e){return e!=null&&!cT.has(e)?(Et(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${wu}"`),null):e}function dT(e,t){let n,a,s,o,u;if(aT(e)){let c=e.getAttribute("action");a=c?Un(c,t):null,n=e.getAttribute("method")||ku,s=vh(e.getAttribute("enctype"))||wu,o=new FormData(e)}else if(rT(e)||iT(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||c.getAttribute("action");if(a=h?Un(h,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||ku,s=vh(e.getAttribute("formenctype"))||vh(c.getAttribute("enctype"))||wu,o=new FormData(c,e),!uT()){let{name:f,type:m,value:y}=e;if(m==="image"){let b=f?`${f}.`:"";o.append(`${b}x`,"0"),o.append(`${b}y`,"0")}else f&&o.append(f,y)}}else{if(pc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ku,a=null,s=wu,u=e}return o&&s==="text/plain"&&(u=o,o=void 0),{action:a,method:n.toLowerCase(),encType:s,formData:o,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ep(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function hT(e,t,n,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&Un(s.pathname,t)==="/"?s.pathname=`${t.replace(/\/$/,"")}/_root.${a}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${a}`,s}async function fT(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function pT(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function mT(e,t,n){let a=await Promise.all(e.map(async s=>{let o=t.routes[s.route.id];if(o){let u=await fT(o,n);return u.links?u.links():[]}return[]}));return bT(a.flat(1).filter(pT).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function lv(e,t,n,a,s,o){let u=(h,f)=>n[f]?h.route.id!==n[f].route.id:!0,c=(h,f)=>n[f].pathname!==h.pathname||n[f].route.path?.endsWith("*")&&n[f].params["*"]!==h.params["*"];return o==="assets"?t.filter((h,f)=>u(h,f)||c(h,f)):o==="data"?t.filter((h,f)=>{let m=a.routes[h.route.id];if(!m||!m.hasLoader)return!1;if(u(h,f)||c(h,f))return!0;if(h.route.shouldRevalidate){let y=h.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function gT(e,t,{includeHydrateFallback:n}={}){return yT(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function yT(e){return[...new Set(e)]}function vT(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function bT(e,t){let n=new Set;return new Set(t),e.reduce((a,s)=>{let o=JSON.stringify(vT(s));return n.has(o)||(n.add(o),a.push({key:o,link:s})),a},[])}function Yb(){let e=k.useContext(pi);return ep(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function _T(){let e=k.useContext(Uo);return ep(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var tp=k.createContext(void 0);tp.displayName="FrameworkContext";function Zb(){let e=k.useContext(tp);return ep(e,"You must render this element inside a <HydratedRouter> element"),e}function kT(e,t){let n=k.useContext(tp),[a,s]=k.useState(!1),[o,u]=k.useState(!1),{onFocus:c,onBlur:h,onMouseEnter:f,onMouseLeave:m,onTouchStart:y}=t,b=k.useRef(null);k.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let T=L=>{L.forEach(D=>{u(D.isIntersecting)})},P=new IntersectionObserver(T,{threshold:.5});return b.current&&P.observe(b.current),()=>{P.disconnect()}}},[e]),k.useEffect(()=>{if(a){let T=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(T)}}},[a]);let w=()=>{s(!0)},S=()=>{s(!1),u(!1)};return n?e!=="intent"?[o,b,{}]:[o,b,{onFocus:ho(c,w),onBlur:ho(h,S),onMouseEnter:ho(f,w),onMouseLeave:ho(m,S),onTouchStart:ho(y,w)}]:[!1,b,{}]}function ho(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function wT({page:e,...t}){let{router:n}=Yb(),a=k.useMemo(()=>Ta(n.routes,e,n.basename),[n.routes,e,n.basename]);return a?k.createElement(ST,{page:e,matches:a,...t}):null}function xT(e){let{manifest:t,routeModules:n}=Zb(),[a,s]=k.useState([]);return k.useEffect(()=>{let o=!1;return mT(e,t,n).then(u=>{o||s(u)}),()=>{o=!0}},[e,t,n]),a}function ST({page:e,matches:t,...n}){let a=Fn(),{future:s,manifest:o,routeModules:u}=Zb(),{basename:c}=Yb(),{loaderData:h,matches:f}=_T(),m=k.useMemo(()=>lv(e,t,f,o,a,"data"),[e,t,f,o,a]),y=k.useMemo(()=>lv(e,t,f,o,a,"assets"),[e,t,f,o,a]),b=k.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let T=new Set,P=!1;if(t.forEach(D=>{let M=o.routes[D.route.id];!M||!M.hasLoader||(!m.some(j=>j.route.id===D.route.id)&&D.route.id in h&&u[D.route.id]?.shouldRevalidate||M.hasClientLoader?P=!0:T.add(D.route.id))}),T.size===0)return[];let L=hT(e,c,s.unstable_trailingSlashAwareDataRequests,"data");return P&&T.size>0&&L.searchParams.set("_routes",t.filter(D=>T.has(D.route.id)).map(D=>D.route.id).join(",")),[L.pathname+L.search]},[c,s.unstable_trailingSlashAwareDataRequests,h,a,o,m,t,e,u]),w=k.useMemo(()=>gT(y,o),[y,o]),S=xT(y);return k.createElement(k.Fragment,null,b.map(T=>k.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...n})),w.map(T=>k.createElement("link",{key:T,rel:"modulepreload",href:T,...n})),S.map(({key:T,link:P})=>k.createElement("link",{key:T,nonce:n.nonce,...P,crossOrigin:P.crossOrigin??n.crossOrigin})))}function PT(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var TT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{TT&&(window.__reactRouterVersion="7.13.1")}catch{}function CT(e,t){return n1({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:vP({window:t?.window}),hydrationData:ET(),routes:e,mapRouteProperties:Z1,hydrationRouteProperties:Q1,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function ET(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:AT(e.errors)}),e}function AT(e){if(!e)return null;let t=Object.entries(e),n={};for(let[a,s]of t)if(s&&s.__type==="RouteErrorResponse")n[a]=new Io(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let o=window[s.__subType];if(typeof o=="function")try{let u=new o(s.message);u.stack="",n[a]=u}catch{}}if(n[a]==null){let o=new Error(s.message);o.stack="",n[a]=o}}else n[a]=s;return n}var Qb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mc=k.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:s,reloadDocument:o,replace:u,unstable_mask:c,state:h,target:f,to:m,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:w,...S},T){let{basename:P,navigator:L,unstable_useTransitions:D}=k.useContext(Bn),M=typeof m=="string"&&Qb.test(m),j=Ab(m,P);m=j.to;let q=M1(m,{relative:s}),K=Fn(),H=null;if(c){let ce=dc(c,[],K.unstable_mask?K.unstable_mask.pathname:"/",!0);P!=="/"&&(ce.pathname=ce.pathname==="/"?P:ar([P,ce.pathname])),H=L.createHref(ce)}let[x,Z,Q]=kT(a,S),me=MT(m,{replace:u,unstable_mask:c,state:h,target:f,preventScrollReset:y,relative:s,viewTransition:b,unstable_defaultShouldRevalidate:w,unstable_useTransitions:D});function oe(ce){t&&t(ce),ce.defaultPrevented||me(ce)}let Ae=!(j.isExternal||o),fe=k.createElement("a",{...S,...Q,href:(Ae?H:void 0)||j.absoluteURL||q,onClick:Ae?oe:t,ref:PT(T,Z),target:f,"data-discover":!M&&n==="render"?"true":void 0});return x&&!M?k.createElement(k.Fragment,null,fe,k.createElement(wT,{page:q})):fe});mc.displayName="Link";var RT=k.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:u,viewTransition:c,children:h,...f},m){let y=Fo(u,{relative:f.relative}),b=Fn(),w=k.useContext(Uo),{navigator:S,basename:T}=k.useContext(Bn),P=w!=null&&UT(y)&&c===!0,L=S.encodeLocation?S.encodeLocation(y).pathname:y.pathname,D=b.pathname,M=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;n||(D=D.toLowerCase(),M=M?M.toLowerCase():null,L=L.toLowerCase()),M&&T&&(M=Un(M,T)||M);const j=L!=="/"&&L.endsWith("/")?L.length-1:L.length;let q=D===L||!s&&D.startsWith(L)&&D.charAt(j)==="/",K=M!=null&&(M===L||!s&&M.startsWith(L)&&M.charAt(L.length)==="/"),H={isActive:q,isPending:K,isTransitioning:P},x=q?t:void 0,Z;typeof a=="function"?Z=a(H):Z=[a,q?"active":null,K?"pending":null,P?"transitioning":null].filter(Boolean).join(" ");let Q=typeof o=="function"?o(H):o;return k.createElement(mc,{...f,"aria-current":x,className:Z,ref:m,style:Q,to:u,viewTransition:c},typeof h=="function"?h(H):h)});RT.displayName="NavLink";var LT=k.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:s,state:o,method:u=ku,action:c,onSubmit:h,relative:f,preventScrollReset:m,viewTransition:y,unstable_defaultShouldRevalidate:b,...w},S)=>{let{unstable_useTransitions:T}=k.useContext(Bn),P=IT(),L=jT(c,{relative:f}),D=u.toLowerCase()==="get"?"get":"post",M=typeof c=="string"&&Qb.test(c),j=q=>{if(h&&h(q),q.defaultPrevented)return;q.preventDefault();let K=q.nativeEvent.submitter,H=K?.getAttribute("formmethod")||u,x=()=>P(K||q.currentTarget,{fetcherKey:t,method:H,navigate:n,replace:s,state:o,relative:f,preventScrollReset:m,viewTransition:y,unstable_defaultShouldRevalidate:b});T&&n!==!1?k.startTransition(()=>x()):x()};return k.createElement("form",{ref:S,method:D,action:L,onSubmit:a?h:j,...w,"data-discover":!M&&e==="render"?"true":void 0})});LT.displayName="Form";function DT(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Xb(e){let t=k.useContext(pi);return Qe(t,DT(e)),t}function MT(e,{target:t,replace:n,unstable_mask:a,state:s,preventScrollReset:o,relative:u,viewTransition:c,unstable_defaultShouldRevalidate:h,unstable_useTransitions:f}={}){let m=fc(),y=Fn(),b=Fo(e,{relative:u});return k.useCallback(w=>{if(oT(w,t)){w.preventDefault();let S=n!==void 0?n:br(y)===br(b),T=()=>m(e,{replace:S,unstable_mask:a,state:s,preventScrollReset:o,relative:u,viewTransition:c,unstable_defaultShouldRevalidate:h});f?k.startTransition(()=>T()):T()}},[y,m,b,n,a,s,t,e,o,u,c,h,f])}function Tj(e){Et(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=k.useRef(Zh(e)),n=k.useRef(!1),a=Fn(),s=k.useMemo(()=>lT(a.search,n.current?null:t.current),[a.search]),o=fc(),u=k.useCallback((c,h)=>{const f=Zh(typeof c=="function"?c(new URLSearchParams(s)):c);n.current=!0,o("?"+f,h)},[o,s]);return[s,u]}var NT=0,OT=()=>`__${String(++NT)}__`;function IT(){let{router:e}=Xb("useSubmit"),{basename:t}=k.useContext(Bn),n=H1(),a=e.fetch,s=e.navigate;return k.useCallback(async(o,u={})=>{let{action:c,method:h,encType:f,formData:m,body:y}=dT(o,t);if(u.navigate===!1){let b=u.fetcherKey||OT();await a(b,n,u.action||c,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:m,body:y,formMethod:u.method||h,formEncType:u.encType||f,flushSync:u.flushSync})}else await s(u.action||c,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:m,body:y,formMethod:u.method||h,formEncType:u.encType||f,replace:u.replace,state:u.state,fromRouteId:n,flushSync:u.flushSync,viewTransition:u.viewTransition})},[a,s,t,n])}function jT(e,{relative:t}={}){let{basename:n}=k.useContext(Bn),a=k.useContext(Kr);Qe(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),o={...Fo(e||".",{relative:t})},u=Fn();if(e==null){o.search=u.search;let c=new URLSearchParams(o.search),h=c.getAll("index");if(h.some(m=>m==="")){c.delete("index"),h.filter(y=>y).forEach(y=>c.append("index",y));let m=c.toString();o.search=m?`?${m}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:ar([n,o.pathname])),br(o)}function UT(e,{relative:t}={}){let n=k.useContext(Zf);Qe(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Xb("useViewTransitionState"),s=Fo(e,{relative:t});if(!n.isTransitioning)return!1;let o=Un(n.currentLocation.pathname,a)||n.currentLocation.pathname,u=Un(n.nextLocation.pathname,a)||n.nextLocation.pathname;return Uu(s.pathname,u)!=null||Uu(s.pathname,o)!=null}var BT=kb();function FT(e){return k.createElement(J1,{flushSync:BT.flushSync,...e})}var it;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const o={};for(const u of s)o[u]=u;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(c=>typeof s[s[c]]!="number"),u={};for(const c of o)u[c]=s[c];return e.objectValues(u)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const u in s)Object.prototype.hasOwnProperty.call(s,u)&&o.push(u);return o},e.find=(s,o)=>{for(const u of s)if(o(u))return u},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function a(s,o=" | "){return s.map(u=>typeof u=="string"?`'${u}'`:u).join(o)}e.joinValues=a,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(it||(it={}));var uv;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(uv||(uv={}));const ye=it.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Pa=e=>{switch(typeof e){case"undefined":return ye.undefined;case"string":return ye.string;case"number":return Number.isNaN(e)?ye.nan:ye.number;case"boolean":return ye.boolean;case"function":return ye.function;case"bigint":return ye.bigint;case"symbol":return ye.symbol;case"object":return Array.isArray(e)?ye.array:e===null?ye.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ye.promise:typeof Map<"u"&&e instanceof Map?ye.map:typeof Set<"u"&&e instanceof Set?ye.set:typeof Date<"u"&&e instanceof Date?ye.date:ye.object;default:return ye.unknown}},re=it.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Hr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},a={_errors:[]},s=o=>{for(const u of o.issues)if(u.code==="invalid_union")u.unionErrors.map(s);else if(u.code==="invalid_return_type")s(u.returnTypeError);else if(u.code==="invalid_arguments")s(u.argumentsError);else if(u.path.length===0)a._errors.push(n(u));else{let c=a,h=0;for(;h<u.path.length;){const f=u.path[h];h===u.path.length-1?(c[f]=c[f]||{_errors:[]},c[f]._errors.push(n(u))):c[f]=c[f]||{_errors:[]},c=c[f],h++}}};return s(this),a}static assert(t){if(!(t instanceof Hr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,it.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},a=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];n[o]=n[o]||[],n[o].push(t(s))}else a.push(t(s));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}}Hr.create=e=>new Hr(e);const Qh=(e,t)=>{let n;switch(e.code){case re.invalid_type:e.received===ye.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,it.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${it.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${it.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${it.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:it.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case re.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case re.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=t.defaultError,it.assertNever(e)}return{message:n}};let VT=Qh;function zT(){return VT}const $T=e=>{const{data:t,path:n,errorMaps:a,issueData:s}=e,o=[...n,...s.path||[]],u={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let c="";const h=a.filter(f=>!!f).slice().reverse();for(const f of h)c=f(u,{data:t,defaultError:c}).message;return{...s,path:o,message:c}};function ue(e,t){const n=zT(),a=$T({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Qh?void 0:Qh].filter(s=>!!s)});e.common.issues.push(a)}class cn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const a=[];for(const s of n){if(s.status==="aborted")return ze;s.status==="dirty"&&t.dirty(),a.push(s.value)}return{status:t.value,value:a}}static async mergeObjectAsync(t,n){const a=[];for(const s of n){const o=await s.key,u=await s.value;a.push({key:o,value:u})}return cn.mergeObjectSync(t,a)}static mergeObjectSync(t,n){const a={};for(const s of n){const{key:o,value:u}=s;if(o.status==="aborted"||u.status==="aborted")return ze;o.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof u.value<"u"||s.alwaysSet)&&(a[o.value]=u.value)}return{status:t.value,value:a}}}const ze=Object.freeze({status:"aborted"}),vo=e=>({status:"dirty",value:e}),Vn=e=>({status:"valid",value:e}),cv=e=>e.status==="aborted",dv=e=>e.status==="dirty",us=e=>e.status==="valid",Bu=e=>typeof Promise<"u"&&e instanceof Promise;var Te;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Te||(Te={}));class _r{constructor(t,n,a,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=a,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const hv=(e,t)=>{if(us(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Hr(e.common.issues);return this._error=n,this._error}}};function Ke(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:a,description:s}=e;if(t&&(n||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(u,c)=>{const{message:h}=e;return u.code==="invalid_enum_value"?{message:h??c.defaultError}:typeof c.data>"u"?{message:h??a??c.defaultError}:u.code!=="invalid_type"?{message:c.defaultError}:{message:h??n??c.defaultError}},description:s}}class Je{get description(){return this._def.description}_getType(t){return Pa(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Pa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new cn,ctx:{common:t.parent.common,data:t.data,parsedType:Pa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Bu(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const a=this.safeParse(t,n);if(a.success)return a.data;throw a.error}safeParse(t,n){const a={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pa(t)},s=this._parseSync({data:t,path:a.path,parent:a});return hv(a,s)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pa(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return us(a)?{value:a.value}:{issues:n.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(a=>us(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){const a=await this.safeParseAsync(t,n);if(a.success)return a.data;throw a.error}async safeParseAsync(t,n){const a={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pa(t)},s=this._parse({data:t,path:a.path,parent:a}),o=await(Bu(s)?s:Promise.resolve(s));return hv(a,o)}refine(t,n){const a=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const u=t(s),c=()=>o.addIssue({code:re.custom,...a(s)});return typeof Promise<"u"&&u instanceof Promise?u.then(h=>h?!0:(c(),!1)):u?!0:(c(),!1)})}refinement(t,n){return this._refinement((a,s)=>t(a)?!0:(s.addIssue(typeof n=="function"?n(a,s):n),!1))}_refinement(t){return new di({schema:this,typeName:$e.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return $r.create(this,this._def)}nullable(){return hi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return yr.create(this)}promise(){return Wu.create(this,this._def)}or(t){return Vu.create([this,t],this._def)}and(t){return zu.create(this,t,this._def)}transform(t){return new di({...Ke(this._def),schema:this,typeName:$e.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ku({...Ke(this._def),innerType:this,defaultValue:n,typeName:$e.ZodDefault})}brand(){return new n_({typeName:$e.ZodBranded,type:this,...Ke(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new qu({...Ke(this._def),innerType:this,catchValue:n,typeName:$e.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return rp.create(this,t)}readonly(){return Gu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const HT=/^c[^\s-]{8,}$/i,WT=/^[0-9a-z]+$/,KT=/^[0-9A-HJKMNP-TV-Z]{26}$/i,qT=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,GT=/^[a-z0-9_-]{21}$/i,YT=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ZT=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,QT=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,XT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let bh;const JT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,eC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,tC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,nC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,rC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,aC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Jb="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",iC=new RegExp(`^${Jb}$`);function e_(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function sC(e){return new RegExp(`^${e_(e)}$`)}function oC(e){let t=`${Jb}T${e_(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function lC(e,t){return!!((t==="v4"||!t)&&JT.test(e)||(t==="v6"||!t)&&tC.test(e))}function uC(e,t){if(!YT.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const a=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(a));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function cC(e,t){return!!((t==="v4"||!t)&&eC.test(e)||(t==="v6"||!t)&&nC.test(e))}class gr extends Je{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ye.string){const o=this._getOrReturnCtx(t);return ue(o,{code:re.invalid_type,expected:ye.string,received:o.parsedType}),ze}const a=new cn;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),ue(s,{code:re.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),ue(s,{code:re.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="length"){const u=t.data.length>o.value,c=t.data.length<o.value;(u||c)&&(s=this._getOrReturnCtx(t,s),u?ue(s,{code:re.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):c&&ue(s,{code:re.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),a.dirty())}else if(o.kind==="email")QT.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"email",code:re.invalid_string,message:o.message}),a.dirty());else if(o.kind==="emoji")bh||(bh=new RegExp(XT,"u")),bh.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"emoji",code:re.invalid_string,message:o.message}),a.dirty());else if(o.kind==="uuid")qT.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"uuid",code:re.invalid_string,message:o.message}),a.dirty());else if(o.kind==="nanoid")GT.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"nanoid",code:re.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid")HT.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"cuid",code:re.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid2")WT.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"cuid2",code:re.invalid_string,message:o.message}),a.dirty());else if(o.kind==="ulid")KT.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"ulid",code:re.invalid_string,message:o.message}),a.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ue(s,{validation:"url",code:re.invalid_string,message:o.message}),a.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"regex",code:re.invalid_string,message:o.message}),a.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),ue(s,{code:re.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),a.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),ue(s,{code:re.invalid_string,validation:{startsWith:o.value},message:o.message}),a.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),ue(s,{code:re.invalid_string,validation:{endsWith:o.value},message:o.message}),a.dirty()):o.kind==="datetime"?oC(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{code:re.invalid_string,validation:"datetime",message:o.message}),a.dirty()):o.kind==="date"?iC.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{code:re.invalid_string,validation:"date",message:o.message}),a.dirty()):o.kind==="time"?sC(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{code:re.invalid_string,validation:"time",message:o.message}),a.dirty()):o.kind==="duration"?ZT.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"duration",code:re.invalid_string,message:o.message}),a.dirty()):o.kind==="ip"?lC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"ip",code:re.invalid_string,message:o.message}),a.dirty()):o.kind==="jwt"?uC(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"jwt",code:re.invalid_string,message:o.message}),a.dirty()):o.kind==="cidr"?cC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"cidr",code:re.invalid_string,message:o.message}),a.dirty()):o.kind==="base64"?rC.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"base64",code:re.invalid_string,message:o.message}),a.dirty()):o.kind==="base64url"?aC.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"base64url",code:re.invalid_string,message:o.message}),a.dirty()):it.assertNever(o);return{status:a.value,value:t.data}}_regex(t,n,a){return this.refinement(s=>t.test(s),{validation:n,code:re.invalid_string,...Te.errToObj(a)})}_addCheck(t){return new gr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Te.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Te.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Te.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Te.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Te.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Te.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Te.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Te.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Te.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Te.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Te.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Te.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Te.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Te.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Te.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Te.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Te.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Te.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Te.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Te.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Te.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Te.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Te.errToObj(n)})}nonempty(t){return this.min(1,Te.errToObj(t))}trim(){return new gr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new gr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new gr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}gr.create=e=>new gr({checks:[],typeName:$e.ZodString,coerce:e?.coerce??!1,...Ke(e)});function dC(e,t){const n=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,s=n>a?n:a,o=Number.parseInt(e.toFixed(s).replace(".","")),u=Number.parseInt(t.toFixed(s).replace(".",""));return o%u/10**s}class oi extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ye.number){const o=this._getOrReturnCtx(t);return ue(o,{code:re.invalid_type,expected:ye.number,received:o.parsedType}),ze}let a;const s=new cn;for(const o of this._def.checks)o.kind==="int"?it.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),ue(a,{code:re.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(a=this._getOrReturnCtx(t,a),ue(a,{code:re.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(a=this._getOrReturnCtx(t,a),ue(a,{code:re.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?dC(t.data,o.value)!==0&&(a=this._getOrReturnCtx(t,a),ue(a,{code:re.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),ue(a,{code:re.not_finite,message:o.message}),s.dirty()):it.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,a,s){return new oi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:Te.toString(s)}]})}_addCheck(t){return new oi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Te.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Te.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Te.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Te.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Te.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&it.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(n===null||a.value>n)&&(n=a.value):a.kind==="max"&&(t===null||a.value<t)&&(t=a.value)}return Number.isFinite(n)&&Number.isFinite(t)}}oi.create=e=>new oi({checks:[],typeName:$e.ZodNumber,coerce:e?.coerce||!1,...Ke(e)});class li extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ye.bigint)return this._getInvalidInput(t);let a;const s=new cn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(a=this._getOrReturnCtx(t,a),ue(a,{code:re.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(a=this._getOrReturnCtx(t,a),ue(a,{code:re.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(a=this._getOrReturnCtx(t,a),ue(a,{code:re.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):it.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ue(n,{code:re.invalid_type,expected:ye.bigint,received:n.parsedType}),ze}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,a,s){return new li({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:Te.toString(s)}]})}_addCheck(t){return new li({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}li.create=e=>new li({checks:[],typeName:$e.ZodBigInt,coerce:e?.coerce??!1,...Ke(e)});class Fu extends Je{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ye.boolean){const a=this._getOrReturnCtx(t);return ue(a,{code:re.invalid_type,expected:ye.boolean,received:a.parsedType}),ze}return Vn(t.data)}}Fu.create=e=>new Fu({typeName:$e.ZodBoolean,coerce:e?.coerce||!1,...Ke(e)});class cs extends Je{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ye.date){const o=this._getOrReturnCtx(t);return ue(o,{code:re.invalid_type,expected:ye.date,received:o.parsedType}),ze}if(Number.isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ue(o,{code:re.invalid_date}),ze}const a=new cn;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),ue(s,{code:re.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),a.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),ue(s,{code:re.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),a.dirty()):it.assertNever(o);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new cs({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Te.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Te.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}cs.create=e=>new cs({checks:[],coerce:e?.coerce||!1,typeName:$e.ZodDate,...Ke(e)});class fv extends Je{_parse(t){if(this._getType(t)!==ye.symbol){const a=this._getOrReturnCtx(t);return ue(a,{code:re.invalid_type,expected:ye.symbol,received:a.parsedType}),ze}return Vn(t.data)}}fv.create=e=>new fv({typeName:$e.ZodSymbol,...Ke(e)});class Xh extends Je{_parse(t){if(this._getType(t)!==ye.undefined){const a=this._getOrReturnCtx(t);return ue(a,{code:re.invalid_type,expected:ye.undefined,received:a.parsedType}),ze}return Vn(t.data)}}Xh.create=e=>new Xh({typeName:$e.ZodUndefined,...Ke(e)});class Jh extends Je{_parse(t){if(this._getType(t)!==ye.null){const a=this._getOrReturnCtx(t);return ue(a,{code:re.invalid_type,expected:ye.null,received:a.parsedType}),ze}return Vn(t.data)}}Jh.create=e=>new Jh({typeName:$e.ZodNull,...Ke(e)});class pv extends Je{constructor(){super(...arguments),this._any=!0}_parse(t){return Vn(t.data)}}pv.create=e=>new pv({typeName:$e.ZodAny,...Ke(e)});class ef extends Je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Vn(t.data)}}ef.create=e=>new ef({typeName:$e.ZodUnknown,...Ke(e)});class Da extends Je{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:re.invalid_type,expected:ye.never,received:n.parsedType}),ze}}Da.create=e=>new Da({typeName:$e.ZodNever,...Ke(e)});class mv extends Je{_parse(t){if(this._getType(t)!==ye.undefined){const a=this._getOrReturnCtx(t);return ue(a,{code:re.invalid_type,expected:ye.void,received:a.parsedType}),ze}return Vn(t.data)}}mv.create=e=>new mv({typeName:$e.ZodVoid,...Ke(e)});class yr extends Je{_parse(t){const{ctx:n,status:a}=this._processInputParams(t),s=this._def;if(n.parsedType!==ye.array)return ue(n,{code:re.invalid_type,expected:ye.array,received:n.parsedType}),ze;if(s.exactLength!==null){const u=n.data.length>s.exactLength.value,c=n.data.length<s.exactLength.value;(u||c)&&(ue(n,{code:u?re.too_big:re.too_small,minimum:c?s.exactLength.value:void 0,maximum:u?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),a.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(ue(n,{code:re.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),a.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ue(n,{code:re.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),a.dirty()),n.common.async)return Promise.all([...n.data].map((u,c)=>s.type._parseAsync(new _r(n,u,n.path,c)))).then(u=>cn.mergeArray(a,u));const o=[...n.data].map((u,c)=>s.type._parseSync(new _r(n,u,n.path,c)));return cn.mergeArray(a,o)}get element(){return this._def.type}min(t,n){return new yr({...this._def,minLength:{value:t,message:Te.toString(n)}})}max(t,n){return new yr({...this._def,maxLength:{value:t,message:Te.toString(n)}})}length(t,n){return new yr({...this._def,exactLength:{value:t,message:Te.toString(n)}})}nonempty(t){return this.min(1,t)}}yr.create=(e,t)=>new yr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$e.ZodArray,...Ke(t)});function es(e){if(e instanceof Rt){const t={};for(const n in e.shape){const a=e.shape[n];t[n]=$r.create(es(a))}return new Rt({...e._def,shape:()=>t})}else return e instanceof yr?new yr({...e._def,type:es(e.element)}):e instanceof $r?$r.create(es(e.unwrap())):e instanceof hi?hi.create(es(e.unwrap())):e instanceof ui?ui.create(e.items.map(t=>es(t))):e}class Rt extends Je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=it.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==ye.object){const f=this._getOrReturnCtx(t);return ue(f,{code:re.invalid_type,expected:ye.object,received:f.parsedType}),ze}const{status:a,ctx:s}=this._processInputParams(t),{shape:o,keys:u}=this._getCached(),c=[];if(!(this._def.catchall instanceof Da&&this._def.unknownKeys==="strip"))for(const f in s.data)u.includes(f)||c.push(f);const h=[];for(const f of u){const m=o[f],y=s.data[f];h.push({key:{status:"valid",value:f},value:m._parse(new _r(s,y,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof Da){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of c)h.push({key:{status:"valid",value:m},value:{status:"valid",value:s.data[m]}});else if(f==="strict")c.length>0&&(ue(s,{code:re.unrecognized_keys,keys:c}),a.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of c){const y=s.data[m];h.push({key:{status:"valid",value:m},value:f._parse(new _r(s,y,s.path,m)),alwaysSet:m in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of h){const y=await m.key,b=await m.value;f.push({key:y,value:b,alwaysSet:m.alwaysSet})}return f}).then(f=>cn.mergeObjectSync(a,f)):cn.mergeObjectSync(a,h)}get shape(){return this._def.shape()}strict(t){return Te.errToObj,new Rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,a)=>{const s=this._def.errorMap?.(n,a).message??a.defaultError;return n.code==="unrecognized_keys"?{message:Te.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new Rt({...this._def,unknownKeys:"strip"})}passthrough(){return new Rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$e.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Rt({...this._def,catchall:t})}pick(t){const n={};for(const a of it.objectKeys(t))t[a]&&this.shape[a]&&(n[a]=this.shape[a]);return new Rt({...this._def,shape:()=>n})}omit(t){const n={};for(const a of it.objectKeys(this.shape))t[a]||(n[a]=this.shape[a]);return new Rt({...this._def,shape:()=>n})}deepPartial(){return es(this)}partial(t){const n={};for(const a of it.objectKeys(this.shape)){const s=this.shape[a];t&&!t[a]?n[a]=s:n[a]=s.optional()}return new Rt({...this._def,shape:()=>n})}required(t){const n={};for(const a of it.objectKeys(this.shape))if(t&&!t[a])n[a]=this.shape[a];else{let o=this.shape[a];for(;o instanceof $r;)o=o._def.innerType;n[a]=o}return new Rt({...this._def,shape:()=>n})}keyof(){return t_(it.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:Da.create(),typeName:$e.ZodObject,...Ke(t)});Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:Da.create(),typeName:$e.ZodObject,...Ke(t)});Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:Da.create(),typeName:$e.ZodObject,...Ke(t)});class Vu extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),a=this._def.options;function s(o){for(const c of o)if(c.result.status==="valid")return c.result;for(const c of o)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;const u=o.map(c=>new Hr(c.ctx.common.issues));return ue(n,{code:re.invalid_union,unionErrors:u}),ze}if(n.common.async)return Promise.all(a.map(async o=>{const u={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:u}),ctx:u}})).then(s);{let o;const u=[];for(const h of a){const f={...n,common:{...n.common,issues:[]},parent:null},m=h._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!o&&(o={result:m,ctx:f}),f.common.issues.length&&u.push(f.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const c=u.map(h=>new Hr(h));return ue(n,{code:re.invalid_union,unionErrors:c}),ze}}get options(){return this._def.options}}Vu.create=(e,t)=>new Vu({options:e,typeName:$e.ZodUnion,...Ke(t)});const zr=e=>e instanceof nf?zr(e.schema):e instanceof di?zr(e.innerType()):e instanceof Hu?[e.value]:e instanceof ci?e.options:e instanceof rf?it.objectValues(e.enum):e instanceof Ku?zr(e._def.innerType):e instanceof Xh?[void 0]:e instanceof Jh?[null]:e instanceof $r?[void 0,...zr(e.unwrap())]:e instanceof hi?[null,...zr(e.unwrap())]:e instanceof n_||e instanceof Gu?zr(e.unwrap()):e instanceof qu?zr(e._def.innerType):[];class np extends Je{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.object)return ue(n,{code:re.invalid_type,expected:ye.object,received:n.parsedType}),ze;const a=this.discriminator,s=n.data[a],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(ue(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),ze)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,a){const s=new Map;for(const o of n){const u=zr(o.shape[t]);if(!u.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const c of u){if(s.has(c))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(c)}`);s.set(c,o)}}return new np({typeName:$e.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ke(a)})}}function tf(e,t){const n=Pa(e),a=Pa(t);if(e===t)return{valid:!0,data:e};if(n===ye.object&&a===ye.object){const s=it.objectKeys(t),o=it.objectKeys(e).filter(c=>s.indexOf(c)!==-1),u={...e,...t};for(const c of o){const h=tf(e[c],t[c]);if(!h.valid)return{valid:!1};u[c]=h.data}return{valid:!0,data:u}}else if(n===ye.array&&a===ye.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const u=e[o],c=t[o],h=tf(u,c);if(!h.valid)return{valid:!1};s.push(h.data)}return{valid:!0,data:s}}else return n===ye.date&&a===ye.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class zu extends Je{_parse(t){const{status:n,ctx:a}=this._processInputParams(t),s=(o,u)=>{if(cv(o)||cv(u))return ze;const c=tf(o.value,u.value);return c.valid?((dv(o)||dv(u))&&n.dirty(),{status:n.value,value:c.data}):(ue(a,{code:re.invalid_intersection_types}),ze)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([o,u])=>s(o,u)):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}zu.create=(e,t,n)=>new zu({left:e,right:t,typeName:$e.ZodIntersection,...Ke(n)});class ui extends Je{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==ye.array)return ue(a,{code:re.invalid_type,expected:ye.array,received:a.parsedType}),ze;if(a.data.length<this._def.items.length)return ue(a,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ze;!this._def.rest&&a.data.length>this._def.items.length&&(ue(a,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...a.data].map((u,c)=>{const h=this._def.items[c]||this._def.rest;return h?h._parse(new _r(a,u,a.path,c)):null}).filter(u=>!!u);return a.common.async?Promise.all(o).then(u=>cn.mergeArray(n,u)):cn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new ui({...this._def,rest:t})}}ui.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ui({items:e,typeName:$e.ZodTuple,rest:null,...Ke(t)})};class $u extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==ye.object)return ue(a,{code:re.invalid_type,expected:ye.object,received:a.parsedType}),ze;const s=[],o=this._def.keyType,u=this._def.valueType;for(const c in a.data)s.push({key:o._parse(new _r(a,c,a.path,c)),value:u._parse(new _r(a,a.data[c],a.path,c)),alwaysSet:c in a.data});return a.common.async?cn.mergeObjectAsync(n,s):cn.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,a){return n instanceof Je?new $u({keyType:t,valueType:n,typeName:$e.ZodRecord,...Ke(a)}):new $u({keyType:gr.create(),valueType:t,typeName:$e.ZodRecord,...Ke(n)})}}class gv extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==ye.map)return ue(a,{code:re.invalid_type,expected:ye.map,received:a.parsedType}),ze;const s=this._def.keyType,o=this._def.valueType,u=[...a.data.entries()].map(([c,h],f)=>({key:s._parse(new _r(a,c,a.path,[f,"key"])),value:o._parse(new _r(a,h,a.path,[f,"value"]))}));if(a.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const h of u){const f=await h.key,m=await h.value;if(f.status==="aborted"||m.status==="aborted")return ze;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),c.set(f.value,m.value)}return{status:n.value,value:c}})}else{const c=new Map;for(const h of u){const f=h.key,m=h.value;if(f.status==="aborted"||m.status==="aborted")return ze;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),c.set(f.value,m.value)}return{status:n.value,value:c}}}}gv.create=(e,t,n)=>new gv({valueType:t,keyType:e,typeName:$e.ZodMap,...Ke(n)});class Ro extends Je{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==ye.set)return ue(a,{code:re.invalid_type,expected:ye.set,received:a.parsedType}),ze;const s=this._def;s.minSize!==null&&a.data.size<s.minSize.value&&(ue(a,{code:re.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&a.data.size>s.maxSize.value&&(ue(a,{code:re.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function u(h){const f=new Set;for(const m of h){if(m.status==="aborted")return ze;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const c=[...a.data.values()].map((h,f)=>o._parse(new _r(a,h,a.path,f)));return a.common.async?Promise.all(c).then(h=>u(h)):u(c)}min(t,n){return new Ro({...this._def,minSize:{value:t,message:Te.toString(n)}})}max(t,n){return new Ro({...this._def,maxSize:{value:t,message:Te.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ro.create=(e,t)=>new Ro({valueType:e,minSize:null,maxSize:null,typeName:$e.ZodSet,...Ke(t)});class nf extends Je{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}nf.create=(e,t)=>new nf({getter:e,typeName:$e.ZodLazy,...Ke(t)});class Hu extends Je{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),ze}return{status:"valid",value:t.data}}get value(){return this._def.value}}Hu.create=(e,t)=>new Hu({value:e,typeName:$e.ZodLiteral,...Ke(t)});function t_(e,t){return new ci({values:e,typeName:$e.ZodEnum,...Ke(t)})}class ci extends Je{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),a=this._def.values;return ue(n,{expected:it.joinValues(a),received:n.parsedType,code:re.invalid_type}),ze}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),a=this._def.values;return ue(n,{received:n.data,code:re.invalid_enum_value,options:a}),ze}return Vn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return ci.create(t,{...this._def,...n})}exclude(t,n=this._def){return ci.create(this.options.filter(a=>!t.includes(a)),{...this._def,...n})}}ci.create=t_;class rf extends Je{_parse(t){const n=it.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==ye.string&&a.parsedType!==ye.number){const s=it.objectValues(n);return ue(a,{expected:it.joinValues(s),received:a.parsedType,code:re.invalid_type}),ze}if(this._cache||(this._cache=new Set(it.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=it.objectValues(n);return ue(a,{received:a.data,code:re.invalid_enum_value,options:s}),ze}return Vn(t.data)}get enum(){return this._def.values}}rf.create=(e,t)=>new rf({values:e,typeName:$e.ZodNativeEnum,...Ke(t)});class Wu extends Je{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.promise&&n.common.async===!1)return ue(n,{code:re.invalid_type,expected:ye.promise,received:n.parsedType}),ze;const a=n.parsedType===ye.promise?n.data:Promise.resolve(n.data);return Vn(a.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Wu.create=(e,t)=>new Wu({type:e,typeName:$e.ZodPromise,...Ke(t)});class di extends Je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$e.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:a}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:u=>{ue(a,u),u.fatal?n.abort():n.dirty()},get path(){return a.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const u=s.transform(a.data,o);if(a.common.async)return Promise.resolve(u).then(async c=>{if(n.value==="aborted")return ze;const h=await this._def.schema._parseAsync({data:c,path:a.path,parent:a});return h.status==="aborted"?ze:h.status==="dirty"||n.value==="dirty"?vo(h.value):h});{if(n.value==="aborted")return ze;const c=this._def.schema._parseSync({data:u,path:a.path,parent:a});return c.status==="aborted"?ze:c.status==="dirty"||n.value==="dirty"?vo(c.value):c}}if(s.type==="refinement"){const u=c=>{const h=s.refinement(c,o);if(a.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(a.common.async===!1){const c=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return c.status==="aborted"?ze:(c.status==="dirty"&&n.dirty(),u(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(c=>c.status==="aborted"?ze:(c.status==="dirty"&&n.dirty(),u(c.value).then(()=>({status:n.value,value:c.value}))))}if(s.type==="transform")if(a.common.async===!1){const u=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!us(u))return ze;const c=s.transform(u.value,o);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(u=>us(u)?Promise.resolve(s.transform(u.value,o)).then(c=>({status:n.value,value:c})):ze);it.assertNever(s)}}di.create=(e,t,n)=>new di({schema:e,typeName:$e.ZodEffects,effect:t,...Ke(n)});di.createWithPreprocess=(e,t,n)=>new di({schema:t,effect:{type:"preprocess",transform:e},typeName:$e.ZodEffects,...Ke(n)});class $r extends Je{_parse(t){return this._getType(t)===ye.undefined?Vn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}$r.create=(e,t)=>new $r({innerType:e,typeName:$e.ZodOptional,...Ke(t)});class hi extends Je{_parse(t){return this._getType(t)===ye.null?Vn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}hi.create=(e,t)=>new hi({innerType:e,typeName:$e.ZodNullable,...Ke(t)});class Ku extends Je{_parse(t){const{ctx:n}=this._processInputParams(t);let a=n.data;return n.parsedType===ye.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ku.create=(e,t)=>new Ku({innerType:e,typeName:$e.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ke(t)});class qu extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),a={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return Bu(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Hr(a.common.issues)},input:a.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Hr(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}qu.create=(e,t)=>new qu({innerType:e,typeName:$e.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ke(t)});class yv extends Je{_parse(t){if(this._getType(t)!==ye.nan){const a=this._getOrReturnCtx(t);return ue(a,{code:re.invalid_type,expected:ye.nan,received:a.parsedType}),ze}return{status:"valid",value:t.data}}}yv.create=e=>new yv({typeName:$e.ZodNaN,...Ke(e)});class n_ extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}}class rp extends Je{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?ze:o.status==="dirty"?(n.dirty(),vo(o.value)):this._def.out._parseAsync({data:o.value,path:a.path,parent:a})})();{const s=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return s.status==="aborted"?ze:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:a.path,parent:a})}}static create(t,n){return new rp({in:t,out:n,typeName:$e.ZodPipeline})}}class Gu extends Je{_parse(t){const n=this._def.innerType._parse(t),a=s=>(us(s)&&(s.value=Object.freeze(s.value)),s);return Bu(n)?n.then(s=>a(s)):a(n)}unwrap(){return this._def.innerType}}Gu.create=(e,t)=>new Gu({innerType:e,typeName:$e.ZodReadonly,...Ke(t)});var $e;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})($e||($e={}));const v=gr.create,X=oi.create;li.create;const Be=Fu.create,ap=cs.create,Jt=ef.create;Da.create;const ie=yr.create,C=Rt.create,zn=Vu.create,r_=np.create;zu.create;ui.create;const _t=$u.create,Ye=Hu.create,nt=ci.create;Wu.create;$r.create;hi.create;const af={string:(e=>gr.create({...e,coerce:!0})),number:(e=>oi.create({...e,coerce:!0})),boolean:(e=>Fu.create({...e,coerce:!0})),bigint:(e=>li.create({...e,coerce:!0})),date:(e=>cs.create({...e,coerce:!0}))};var hr;(function(e){e.STRING="string",e.DATE="date",e.DATETIME="datetime",e.INTEGER="integer",e.FLOAT="float",e.BOOLEAN="boolean",e.UUID="uuid",e.JSON="json"})(hr||(hr={}));const hC=nt(["CASCADE","RESTRICT","NO ACTION"]),fC=nt(["CASCADE","SET NULL","SET DEFAULT","RESTRICT","NO ACTION"]),pC=nt([hr.STRING,hr.DATE,hr.DATETIME,hr.INTEGER,hr.FLOAT,hr.BOOLEAN,hr.UUID,hr.JSON]),a_=C({referenceTable:v().min(1,"Target table cannot be empty"),referenceColumn:v().min(1,"Target column cannot be empty"),onDelete:fC,onUpdate:hC}),i_=C({columnName:v().min(1,"Column name cannot be empty").max(64,"Column name must be less than 64 characters"),type:zn([pC,v()]),defaultValue:v().optional(),isPrimaryKey:Be().optional(),isNullable:Be(),isUnique:Be(),foreignKey:a_.optional()}),s_=C({tableName:v().min(1,"Table name cannot be empty").max(64,"Table name must be less than 64 characters"),columns:ie(i_).min(1,"At least one column is required"),recordCount:X().optional(),createdAt:v().optional(),updatedAt:v().optional()}),mC=C({functionName:v(),functionDef:v(),kind:v()}),gC=C({tableName:v(),indexName:v(),indexDef:v(),isUnique:Be().nullable(),isPrimary:Be().nullable()}),yC=C({tableName:v(),policyName:v(),cmd:v(),roles:ie(v()),qual:v().nullable(),withCheck:v().nullable()}),vC=C({tableName:v(),triggerName:v(),actionTiming:v(),eventManipulation:v(),actionOrientation:v(),actionCondition:v().nullable(),actionStatement:v()});s_.pick({tableName:!0,columns:!0}).extend({rlsEnabled:Be().default(!0)});s_.pick({tableName:!0,columns:!0}).extend({message:v(),autoFields:ie(v()),nextActions:v()});C({addColumns:ie(i_.omit({foreignKey:!0})).optional(),dropColumns:ie(v()).optional(),updateColumns:ie(C({columnName:v(),defaultValue:v().optional(),newColumnName:v().min(1,"New column name cannot be empty").max(64,"New column name must be less than 64 characters").optional()})).optional(),addForeignKeys:ie(C({columnName:v().min(1,"Column name is required for adding foreign key"),foreignKey:a_})).optional(),dropForeignKeys:ie(v()).optional(),renameTable:C({newTableName:v().min(1,"New table name cannot be empty").max(64,"New table name must be less than 64 characters")}).optional()});C({message:v(),tableName:v(),operations:ie(v())});C({message:v(),tableName:v(),nextActions:v()});C({query:v().min(1,"Query is required"),params:ie(Jt()).optional()});C({rows:ie(_t(v(),Jt())),rowCount:X().nullable(),fields:ie(C({name:v(),dataTypeID:X()})).optional()});C({tables:ie(v()).optional(),format:nt(["sql","json"]).default("sql"),includeData:Be().default(!0),includeFunctions:Be().default(!1),includeSequences:Be().default(!1),includeViews:Be().default(!1),rowLimit:X().int().positive().max(1e4).default(1e3)});const bC=C({timestamp:v(),tables:_t(v(),C({schema:ie(C({columnName:v(),dataType:v(),characterMaximumLength:X().nullable(),isNullable:v(),columnDefault:v().nullable()})),indexes:ie(C({indexname:v(),indexdef:v(),isUnique:Be().nullable(),isPrimary:Be().nullable()})),foreignKeys:ie(C({constraintName:v(),columnName:v(),foreignTableName:v(),foreignColumnName:v(),deleteRule:v().nullable(),updateRule:v().nullable()})),rlsEnabled:Be().optional(),policies:ie(C({policyname:v(),cmd:v(),roles:ie(v()),qual:v().nullable(),withCheck:v().nullable()})),triggers:ie(C({triggerName:v(),actionTiming:v(),eventManipulation:v(),actionOrientation:v(),actionCondition:v().nullable(),actionStatement:v(),newTable:v().nullable(),oldTable:v().nullable()})),rows:ie(_t(v(),Jt())).optional(),recordCount:X().optional()})),functions:ie(C({functionName:v(),functionDef:v(),kind:v()})),sequences:ie(C({sequenceName:v(),startValue:v(),increment:v(),minValue:v().nullable(),maxValue:v().nullable(),cycle:v()})),views:ie(C({viewName:v(),definition:v()}))});C({format:nt(["sql","json"]),data:zn([v(),bC]),timestamp:v()});C({truncate:zn([Be(),v().transform(e=>{if(e==="true")return!0;if(e==="false")return!1;throw new Error("Invalid boolean string")})]).default(!1)});C({success:Be(),message:v(),filename:v(),tables:ie(v()),rowsImported:X(),fileSize:X()});C({table:v().min(1,"Table name is required"),upsertKey:v().optional()});C({success:Be(),message:v(),table:v(),rowsAffected:X(),totalRecords:X(),filename:v()});C({functions:ie(mC)});C({indexes:ie(gC)});C({policies:ie(yC)});C({triggers:ie(vC)});const _C=C({id:v(),key:v(),isActive:Be(),isReserved:Be(),lastUsedAt:v().nullable(),expiresAt:v().nullable(),createdAt:v(),updatedAt:v()});C({secrets:ie(_C)});C({key:v(),value:v()});C({key:v().regex(/^[A-Z0-9_]+$/,"Use uppercase letters, numbers, and underscores only"),value:v().min(1,"Value is required")});C({success:Ye(!0),message:v(),id:v()});C({success:Ye(!0),message:v()});C({success:Ye(!0),message:v()});const kC=C({key:v(),bucket:v(),size:X(),mimeType:v().optional(),uploadedAt:v(),url:v()}),wC=C({name:v(),public:Be(),createdAt:v()});C({id:v().uuid(),maxFileSizeMb:X().int().positive(),createdAt:v(),updatedAt:v()});C({bucketName:v().min(1,"Bucket name cannot be empty"),isPublic:Be().default(!0)});C({isPublic:Be()});C({objects:ie(kC),pagination:C({offset:X(),limit:X(),total:X()})});C({filename:v().min(1,"Filename cannot be empty"),contentType:v().optional(),size:X().optional()});C({method:nt(["presigned","direct"]),uploadUrl:v(),fields:_t(v()).optional(),key:v(),confirmRequired:Be(),confirmUrl:v().optional(),expiresAt:ap().optional()});C({expiresIn:X().optional().default(3600)});C({method:nt(["presigned","direct"]),url:v(),expiresAt:ap().optional(),headers:_t(v()).optional()});C({size:X(),contentType:v().optional(),etag:v().optional()});C({maxFileSizeMb:X().int().min(1,"Must be at least 1 MB").max(200,"Must be at most 200 MB")});const gc=v().uuid("Invalid user ID format"),kr=v().email("Invalid email format").toLowerCase().trim(),ip=v(),xC=v().min(1,"Name is required").max(100,"Name must be less than 100 characters").trim(),SC=nt(["anon","authenticated","project_admin"]),vv=nt(["code","link"]),o_=C({name:v().optional(),avatar_url:v().url().optional()}).passthrough(),ys=C({id:gc,email:kr,emailVerified:Be(),providers:ie(v()).optional(),createdAt:v(),updatedAt:v(),profile:o_.nullable(),metadata:_t(Jt()).nullable()}),yc=nt(["google","github","discord","linkedin","facebook","instagram","tiktok","apple","x","spotify","microsoft"]);C({provider:yc,redirectUri:v().url().optional()});const sp=C({id:v().uuid(),provider:yc,clientId:v().optional(),scopes:ie(v()).optional(),redirectUri:v().optional(),useSharedKey:Be(),createdAt:v(),updatedAt:v()}),PC=/^(?:(?:https?:\/\/)(?:(?:\*\.)?[^\s/:?#]+|\[[0-9A-Fa-f:.]+\])(?::\d+)?(?:\/[^\s]*)?|(?!(?:https?|javascript|data|file|vbscript):)[a-zA-Z][a-zA-Z0-9+.-]*:(?:\/\/[^\s/]+(?:\/[^\s]*)?|\/[^\s]*))$/i,l_=C({id:v().uuid(),requireEmailVerification:Be(),passwordMinLength:X().min(4).max(128),requireNumber:Be(),requireLowercase:Be(),requireUppercase:Be(),requireSpecialChar:Be(),verifyEmailMethod:vv,resetPasswordMethod:vv,allowedRedirectUrls:ie(v().regex(PC,{message:"Invalid URL or wildcard URL"})).optional().nullable(),createdAt:v(),updatedAt:v()});C({sub:gc,email:kr,role:SC,iat:X().optional(),exp:X().optional()});const u_=v().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Key must contain only lowercase letters, numbers, hyphens, and underscores"),op=C({id:v().uuid(),key:u_,name:v().min(1),discoveryEndpoint:v().url(),clientId:v().min(1),createdAt:v(),updatedAt:v()}),TC=C({limit:v().optional(),offset:v().optional()});C({email:kr,password:ip,name:xC.optional(),redirectTo:v().url().optional()});C({email:kr,password:ip});C({refreshToken:v().min(1,"refreshToken is required")});C({code:v()});TC.extend({search:v().optional()}).optional();C({userIds:ie(gc).min(1,"At least one user ID is required")});C({profile:_t(Jt())});C({email:kr,redirectTo:v().url().optional()});C({email:kr,otp:v().regex(/^\d{6}$/,"OTP code must be a 6-digit numeric code")});C({email:kr,redirectTo:v().url().optional()});C({email:kr,code:v().regex(/^\d{6}$/,"Reset password code must be a 6-digit numeric code")});C({newPassword:ip,otp:v().min(1,"OTP/token is required")});C({user:ys.optional(),accessToken:v().nullable(),requireEmailVerification:Be().optional(),csrfToken:v().nullable().optional(),refreshToken:v().optional()});C({user:ys,accessToken:v(),csrfToken:v().nullable().optional(),refreshToken:v().optional()});C({user:ys,accessToken:v(),csrfToken:v().nullable().optional(),refreshToken:v().optional()});C({accessToken:v(),user:ys,csrfToken:v().optional(),refreshToken:v().optional()});C({token:v(),expiresAt:v().datetime()});C({message:v()});C({user:ys});C({id:gc,profile:o_.nullable()});C({data:ie(ys),pagination:C({offset:X(),limit:X(),total:X()})});C({message:v(),deletedCount:X().int().nonnegative()});C({authUrl:v().url()});sp.omit({id:!0,createdAt:!0,updatedAt:!0}).extend({clientSecret:v().optional()});sp.omit({id:!0,provider:!0,createdAt:!0,updatedAt:!0}).extend({clientSecret:v().optional()}).partial();const c_=/^[A-Za-z0-9._~-]+$/;C({redirect_uri:v().url().optional(),code_challenge:v().min(43,"Code challenge must be at least 43 characters").max(128,"Code challenge must be at most 128 characters").regex(c_,"Code challenge must be base64url encoded")});C({code:v().min(1,"Exchange code is required"),code_verifier:v().min(43,"Code verifier must be at least 43 characters").max(128,"Code verifier must be at most 128 characters").regex(c_,"Code verifier must be base64url encoded")});C({data:ie(sp),count:X()});l_.omit({id:!0,createdAt:!0,updatedAt:!0}).partial();const CC=C({oAuthProviders:ie(yc),customOAuthProviders:ie(u_),...l_.omit({id:!0,updatedAt:!0,createdAt:!0,allowedRedirectUrls:!0}).shape});C({error:v(),message:v(),statusCode:X().int(),nextActions:v().optional()});op.omit({id:!0,createdAt:!0,updatedAt:!0}).extend({clientSecret:v().min(1,"Client secret is required")});op.omit({id:!0,key:!0,createdAt:!0,updatedAt:!0}).extend({clientSecret:v().min(1).optional()}).partial();C({data:ie(op),count:X()});const d_=nt(["system","user"]),h_=C({id:v().uuid(),pattern:v().min(1),description:v().nullable(),webhookUrls:ie(v().url()).nullable(),enabled:Be(),createdAt:v().datetime(),updatedAt:v().datetime()}),EC=C({id:v().uuid(),eventName:v().min(1),channelId:v().uuid().nullable(),channelName:v().min(1),payload:_t(v(),Jt()),senderType:d_,senderId:v().uuid().nullable(),wsAudienceCount:X().int().min(0),whAudienceCount:X().int().min(0),whDeliveredCount:X().int().min(0),createdAt:v().datetime()}),AC=C({retentionDays:X().int().positive().nullable()});C({channel:v().min(1)});C({channel:v().min(1)});C({channel:v().min(1),event:v().min(1),payload:_t(v(),Jt())});r_("ok",[C({ok:Ye(!0),channel:v().min(1)}),C({ok:Ye(!1),channel:v().min(1),error:C({code:v().min(1),message:v().min(1)})})]);C({channel:v().optional(),code:v().min(1),message:v().min(1)});C({messageId:v().uuid(),channel:v().min(1),eventName:v().min(1),payload:_t(v(),Jt())});const RC=C({channel:v().optional(),messageId:v().uuid(),senderType:d_,senderId:v().uuid().optional(),timestamp:v().datetime()});C({meta:RC}).passthrough();C({pattern:v().min(1,"Channel pattern is required"),description:v().optional(),webhookUrls:ie(v().url()).optional(),enabled:Be().optional().default(!0)});C({pattern:v().min(1).optional(),description:v().optional(),webhookUrls:ie(v().url()).optional(),enabled:Be().optional()});ie(h_);C({message:v()});C({channelId:v().uuid().optional(),eventName:v().optional(),limit:af.number().int().min(1).max(1e3).optional().default(100),offset:af.number().int().min(0).optional().default(0)});ie(EC);C({channelId:v().uuid().optional(),since:af.date().optional()});C({totalMessages:X().int().min(0),whDeliveryRate:X().min(0).max(1),topEvents:ie(C({eventName:v(),count:X().int().min(0)})),retentionDays:AC.shape.retentionDays});const bv=C({policyName:v(),tableName:v(),command:v(),roles:ie(v()),using:v().nullable(),withCheck:v().nullable()}),LC=C({subscribe:C({policies:ie(bv)}),publish:C({policies:ie(bv)})}),DC=CC,MC=C({tables:ie(C({tableName:v(),recordCount:X()})),totalSizeInGB:X(),hint:v().optional()}),NC=wC.extend({objectCount:X().optional()}),OC=C({buckets:ie(NC),totalSizeInGB:X()}),IC=C({slug:v(),name:v(),description:v().nullable(),status:v()}),jC=C({models:ie(C({inputModality:ie(v()),outputModality:ie(v()),modelId:v()}))}),UC=C({channels:ie(h_),permissions:LC});C({auth:DC,database:MC,storage:OC,aiIntegration:jC.optional(),functions:ie(IC),realtime:UC.optional(),version:v().optional()});const BC=C({host:v(),port:X(),database:v(),user:v(),password:v(),sslmode:v()});C({connectionURL:v(),parameters:BC});C({databasePassword:v()});C({apiKey:v()});C({projectId:v().nullable()});const ds=nt(["text","image","audio"]),FC=C({inputModality:ie(ds).min(1),outputModality:ie(ds).min(1),provider:v(),modelId:v(),systemPrompt:v().optional()}),f_=FC.extend({id:v().uuid()});f_.extend({usageStats:C({totalInputTokens:X(),totalOutputTokens:X(),totalTokens:X(),totalImageCount:X(),totalRequests:X()}).optional()});const VC=C({configId:v().uuid(),inputTokens:X().int().optional(),outputTokens:X().int().optional(),imageCount:X().int().optional(),imageResolution:v().optional()}),zC=VC.extend({id:v().uuid(),createdAt:ap(),modelId:v().nullable().optional(),model:v().nullable(),provider:v().nullable(),inputModality:ie(ds).nullable(),outputModality:ie(ds).nullable()});C({totalInputTokens:X(),totalOutputTokens:X(),totalTokens:X(),totalImageCount:X(),totalRequests:X()});const $C=C({type:Ye("text"),text:v()}),HC=C({type:Ye("image_url"),image_url:C({url:v(),detail:nt(["auto","low","high"]).optional()})}),WC=C({type:Ye("input_audio"),input_audio:C({data:v(),format:nt(["wav","mp3","aiff","aac","ogg","flac","m4a"])})}),KC=C({type:Ye("file"),file:C({filename:v(),file_data:v()})}),qC=zn([$C,HC,WC,KC]),GC=C({name:v(),description:v().optional(),parameters:_t(Jt()).optional()}),YC=C({type:Ye("function"),function:GC}),ZC=zn([nt(["auto","none","required"]),C({type:Ye("function"),function:C({name:v()})})]),p_=C({id:v(),type:Ye("function"),function:C({name:v(),arguments:v()})}),QC=C({role:nt(["user","assistant","system","tool"]),content:zn([v(),ie(qC)]).nullable(),images:ie(C({url:v()})).optional(),tool_calls:ie(p_).optional(),tool_call_id:v().optional()}),XC=C({enabled:Be(),engine:nt(["native","exa"]).optional(),maxResults:X().min(1).max(10).optional(),searchPrompt:v().optional()}),JC=C({enabled:Be(),pdf:C({engine:nt(["pdf-text","mistral-ocr","native"]).optional()}).optional()});C({model:v(),messages:ie(QC),temperature:X().min(0).max(2).optional(),maxTokens:X().positive().optional(),topP:X().min(0).max(1).optional(),stream:Be().optional(),webSearch:XC.optional(),fileParser:JC.optional(),thinking:Be().optional(),tools:ie(YC).optional(),toolChoice:ZC.optional(),parallelToolCalls:Be().optional()});const eE=C({type:Ye("url_citation"),urlCitation:C({url:v(),title:v().optional(),content:v().optional(),startIndex:X().optional(),endIndex:X().optional()})}),tE=C({type:Ye("file"),file:C({filename:v(),parsedContent:v().optional(),metadata:_t(Jt()).optional()})}),nE=zn([eE,tE]);C({text:v(),tool_calls:ie(p_).optional(),annotations:ie(nE).optional(),metadata:C({model:v(),usage:C({promptTokens:X().optional(),completionTokens:X().optional(),totalTokens:X().optional()}).optional()}).optional()});C({model:v(),input:zn([v(),ie(v())]),encoding_format:nt(["float","base64"]).optional(),dimensions:X().int().min(0).optional()});const rE=C({object:Ye("embedding"),embedding:zn([ie(X()),v()]),index:X()});C({object:Ye("list"),data:ie(rE),metadata:C({model:v(),usage:C({promptTokens:X().optional(),totalTokens:X().optional()}).optional()}).optional()});C({model:v(),prompt:v(),images:ie(C({url:v()})).optional()});C({text:v().optional(),images:ie(C({type:Ye("imageUrl"),imageUrl:v()})),metadata:C({model:v(),usage:C({promptTokens:X().optional(),completionTokens:X().optional(),totalTokens:X().optional()}).optional()}).optional()});C({id:v(),inputModality:ie(ds).min(1),outputModality:ie(ds).min(1),provider:v(),modelId:v(),inputPrice:X().min(0).optional(),outputPrice:X().min(0).optional()});f_.omit({id:!0});C({systemPrompt:v().nullable()});C({records:ie(zC),total:X()});C({startDate:v().datetime().optional(),endDate:v().datetime().optional(),limit:v().regex(/^\d+$/).default("50"),offset:v().regex(/^\d+$/).default("0")});C({configId:v().uuid().optional(),startDate:v().datetime().optional(),endDate:v().datetime().optional()});const aE=nt(["byok","cloud","env","unconfigured"]);C({keySource:aE,hasByokKey:Be(),maskedKey:v().optional()});C({apiKey:v().min(1,"API key is required")});const m_=C({id:v(),actor:v(),action:v(),module:v(),details:_t(Jt()).nullable(),ipAddress:v().nullable(),createdAt:v(),updatedAt:v()});C({id:v(),name:v(),token:v()});const iE=C({id:v(),eventMessage:v(),timestamp:v(),body:_t(v(),Jt()),source:v().optional()});C({source:v(),count:X(),lastActivity:v()});const sE=C({level:v(),message:v()});C({deploymentId:v(),status:nt(["pending","success","failed"]),logs:ie(sE),createdAt:v()});C({limit:X().default(100),offset:X().default(0),actor:v().optional(),action:v().optional(),module:v().optional(),startDate:v().optional(),endDate:v().optional()});C({data:ie(m_),pagination:C({limit:X(),offset:X(),total:X()})});C({days:X().default(7)});C({totalLogs:X(),uniqueActors:X(),uniqueModules:X(),actionsByModule:_t(X()),recentActivity:ie(m_)});C({daysToKeep:X().default(90)});C({message:v(),deleted:X()});C({logs:ie(iE),total:X()});const g_=C({id:v(),slug:v(),name:v(),description:v().nullable(),code:v(),status:nt(["draft","active","error"]),createdAt:v(),updatedAt:v(),deployedAt:v().nullable()});C({name:v().min(1,"Name is required"),slug:v().regex(/^[a-zA-Z0-9_-]+$/,"Invalid slug format - must be alphanumeric with hyphens or underscores only").optional(),code:v().min(1),description:v().optional(),status:nt(["draft","active"]).optional().default("active")});C({name:v().optional(),code:v().optional(),description:v().optional(),status:nt(["draft","active"]).optional()});C({functions:ie(g_),runtime:C({status:nt(["running","unavailable"])}),deploymentUrl:v().nullable().optional()});const oE=C({id:v(),status:nt(["success","failed"]),url:v().nullable(),buildLogs:ie(v()).optional()});C({success:Be(),function:g_,deployment:oE.nullable().optional()});const lE=C({type:Ye("APP_ROUTE_CHANGE"),path:v()}),uE=C({type:Ye("AUTH_SUCCESS")}),cE=C({type:Ye("AUTH_ERROR"),message:v()}),dE=C({type:Ye("MCP_CONNECTION_STATUS"),connected:Be(),toolName:v(),timestamp:zn([X(),v()])}),hE=C({type:Ye("SHOW_ONBOARDING_OVERLAY")}),fE=C({type:Ye("SHOW_SETTINGS_OVERLAY")}),pE=C({type:Ye("ONBOARDING_SUCCESS")}),mE=C({type:Ye("NAVIGATE_TO_USAGE")}),gE=C({type:Ye("SHOW_CONTACT_MODAL")}),yE=C({type:Ye("SHOW_CONNECT_OVERLAY")}),vE=C({type:Ye("SHOW_PLAN_MODAL")}),bE=C({type:Ye("AUTHORIZATION_CODE"),code:v()}),_E=C({type:Ye("ROUTE_CHANGE"),path:v()}),kE=C({type:Ye("REQUEST_PROJECT_INFO")}),wE=C({type:Ye("PROJECT_INFO"),name:v(),instanceType:v(),region:v(),latestVersion:v().optional()}),xE=C({type:Ye("REQUEST_INSTANCE_INFO")}),SE=C({type:Ye("INSTANCE_INFO"),currentInstanceType:v(),planName:v(),computeCredits:X(),currentOrgComputeCost:X(),instanceTypes:ie(C({id:v(),name:v(),cpu:v(),ram:v(),pricePerHour:X(),pricePerMonth:X()})),projects:ie(C({name:v(),instanceType:v(),monthlyCost:X(),isCurrent:Be(),status:v()}))}),PE=C({type:Ye("REQUEST_INSTANCE_TYPE_CHANGE"),instanceType:v()}),TE=C({type:Ye("INSTANCE_TYPE_CHANGE_RESULT"),success:Be(),instanceType:v().optional(),error:v().optional()});r_("type",[lE,uE,cE,dE,hE,fE,pE,mE,gE,yE,vE,bE,_E,kE,wE,xE,SE,PE,TE]);nt(["db","storage","functions","auth","ai","realtime"]).describe(`
|
|
13
|
-
SDK feature categories:
|
|
14
|
-
|
|
15
|
-
- "db" - Database operations
|
|
16
|
-
- "storage" - File storage
|
|
17
|
-
- "functions" - Edge functions
|
|
18
|
-
- "auth" - User authentication
|
|
19
|
-
- "ai" - AI features
|
|
20
|
-
- "realtime" - Real-time WebSockets
|
|
21
|
-
`);nt(["typescript","swift","kotlin","rest-api"]).describe(`
|
|
22
|
-
SDK languages:
|
|
23
|
-
|
|
24
|
-
- "typescript" - JavaScript/TypeScript SDK
|
|
25
|
-
- "swift" - Swift SDK
|
|
26
|
-
- "kotlin" - Kotlin SDK
|
|
27
|
-
- "rest-api" - REST API
|
|
28
|
-
`);nt(["instructions","auth-sdk","db-sdk","storage-sdk","functions-sdk","ai-integration-sdk","real-time","deployment"]).describe(`
|
|
29
|
-
Documentation type:
|
|
30
|
-
"instructions" (essential backend setup - use FIRST),
|
|
31
|
-
"db-sdk" (database operations),
|
|
32
|
-
"storage-sdk" (file storage),
|
|
33
|
-
"functions-sdk" (edge functions),
|
|
34
|
-
"auth-sdk" (direct SDK methods for custom auth flows),
|
|
35
|
-
"ai-integration-sdk" (AI features),
|
|
36
|
-
"real-time" (real-time pub/sub through WebSockets),
|
|
37
|
-
"deployment" (deploy frontend applications via MCP tool)
|
|
38
|
-
`);const _h=zn([kr,ie(kr).min(1,"At least one email is required").max(50,"Maximum 50 recipients allowed")]);C({to:_h,subject:v().trim().min(1,"Subject is required").max(500,"Subject too long"),html:v().trim().min(1,"HTML content is required"),cc:_h.optional(),bcc:_h.optional(),from:v().trim().max(100,"From name too long").optional(),replyTo:v().email("Reply-To must be a valid email").optional()});C({});const CE=nt(["WAITING","UPLOADING","QUEUED","BUILDING","READY","ERROR","CANCELED"]),EE=C({id:v().uuid(),providerDeploymentId:v().nullable(),provider:v(),status:CE,url:v().nullable(),metadata:_t(Jt()).nullable(),createdAt:v().datetime(),updatedAt:v().datetime()}),AE=C({buildCommand:v().nullable().optional(),outputDirectory:v().nullable().optional(),installCommand:v().nullable().optional(),devCommand:v().nullable().optional(),rootDirectory:v().nullable().optional()}),RE=C({key:v(),value:v()});C({id:v().uuid(),uploadUrl:v().url(),uploadFields:_t(v())});C({projectSettings:AE.optional(),envVars:ie(RE).optional(),meta:_t(v()).optional()});C({data:ie(EE),pagination:C({limit:X(),offset:X(),total:X()})});const LE=C({id:v(),key:v(),type:nt(["plain","encrypted","secret","sensitive","system"]),updatedAt:X().optional()}),DE=C({id:v(),key:v(),value:v(),type:nt(["plain","encrypted","secret","sensitive","system"]),updatedAt:X().optional()});C({envVars:ie(LE)});C({envVar:DE});const ME=C({key:v().trim().min(1,"key is required"),value:v()});C({envVars:ie(ME).min(1)}).superRefine(({envVars:e},t)=>{const n=new Map;e.forEach((a,s)=>{if(n.get(a.key)!==void 0){t.addIssue({code:re.custom,message:"duplicate environment variable key",path:["envVars",s,"key"]});return}n.set(a.key,s)})});C({success:Ye(!0),message:v()});C({success:Ye(!0),message:v(),count:X().int().positive()});C({success:Ye(!0),message:v()});C({slug:v().trim().min(3,"slug must be at least 3 characters").max(63,"slug must be at most 63 characters").regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,"slug must be lowercase alphanumeric with hyphens, not starting or ending with hyphen").nullable()});C({success:Be(),slug:v().nullable(),domain:v().nullable()});C({currentDeploymentId:v().uuid().nullable(),defaultDomainUrl:v().nullable(),customDomainUrl:v().nullable()});const NE=C({type:v(),domain:v(),value:v()}),OE=C({domain:v(),apexDomain:v(),verified:Be(),misconfigured:Be(),verification:ie(NE),cnameTarget:v().nullable(),aRecordValue:v().nullable()});C({domain:v().trim().min(1,"Domain is required").regex(/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$/i,"Invalid domain format (e.g. myapp.com or www.myapp.com)").refine(e=>!e.toLowerCase().endsWith(".insforge.site"),{message:"Domains ending with .insforge.site are reserved by InsForge"})});C({domains:ie(OE)});const IE=C({id:v().uuid(),name:v(),cronSchedule:v(),functionUrl:v().url(),httpMethod:nt(["GET","POST","PUT","PATCH","DELETE"]),headers:_t(v()).nullable(),body:zn([v(),_t(Jt())]).nullable(),cronJobId:v().nullable(),lastExecutedAt:v().datetime().nullable(),isActive:Be().default(!0),nextRun:v().datetime().nullable(),createdAt:v().datetime(),updatedAt:v().datetime()}),jE=C({id:v().uuid(),scheduleId:v().uuid(),executedAt:v().datetime(),statusCode:X().int(),success:Be(),durationMs:X().int(),message:v().nullable()}),y_=v().refine(e=>{const t=e.split(" ");return t.length===5||t.length===6},{message:'Invalid cron schedule format. Use 5 or 6 parts (e.g., "* * * * *").'});C({name:v().min(3,"Schedule name must be at least 3 characters long"),cronSchedule:y_,functionUrl:v().url("The function URL must be a valid URL."),httpMethod:nt(["GET","POST","PUT","PATCH","DELETE"]),headers:_t(v()).optional().describe("Header values can reference secrets using ${{secrets.KEY_NAME}} syntax."),body:_t(Jt()).optional().describe("The JSON body to send with the request.")});C({name:v().min(3,"Schedule name must be at least 3 characters long").optional(),cronSchedule:y_.optional(),functionUrl:v().url("The function URL must be a valid URL.").optional(),httpMethod:nt(["GET","POST","PUT","PATCH","DELETE"]).optional(),headers:_t(v()).optional().describe("Header values can reference secrets using ${{secrets.KEY_NAME}} syntax."),body:_t(Jt()).optional().describe("The JSON body to send with the request."),isActive:Be().optional().describe("Enable or disable the schedule.")});ie(IE);const UE=jE;C({logs:ie(UE),totalCount:X().int().nonnegative(),limit:X().int().positive(),offset:X().int().nonnegative()});C({id:v().uuid(),cronJobId:v(),message:v()});C({id:v().uuid(),cronJobId:v().optional(),message:v()});C({message:v()});var zt={},Gi={},Yi={},Zi={},Qi={},Xi={},BE=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},hs=BE();const FE=hs.fetch,VE=hs.fetch.bind(hs),zE=hs.Headers,$E=hs.Request,HE=hs.Response,WE=Object.freeze(Object.defineProperty({__proto__:null,Headers:zE,Request:$E,Response:HE,default:VE,fetch:FE},Symbol.toStringTag,{value:"Module"})),KE=sP(WE);var lu={},_v;function v_(){if(_v)return lu;_v=1,Object.defineProperty(lu,"__esModule",{value:!0});class e extends Error{constructor(n){super(n.message),this.name="PostgrestError",this.details=n.details,this.hint=n.hint,this.code=n.code}}return lu.default=e,lu}var kv;function b_(){if(kv)return Xi;kv=1;var e=Xi&&Xi.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Xi,"__esModule",{value:!0});const t=e(KE),n=e(v_());class a{constructor(o){var u,c;this.shouldThrowOnError=!1,this.method=o.method,this.url=o.url,this.headers=new Headers(o.headers),this.schema=o.schema,this.body=o.body,this.shouldThrowOnError=(u=o.shouldThrowOnError)!==null&&u!==void 0?u:!1,this.signal=o.signal,this.isMaybeSingle=(c=o.isMaybeSingle)!==null&&c!==void 0?c:!1,o.fetch?this.fetch=o.fetch:typeof fetch>"u"?this.fetch=t.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(o,u){return this.headers=new Headers(this.headers),this.headers.set(o,u),this}then(o,u){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const c=this.fetch;let h=c(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async f=>{var m,y,b,w;let S=null,T=null,P=null,L=f.status,D=f.statusText;if(f.ok){if(this.method!=="HEAD"){const K=await f.text();K===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((m=this.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text"))?T=K:T=JSON.parse(K))}const j=(y=this.headers.get("Prefer"))===null||y===void 0?void 0:y.match(/count=(exact|planned|estimated)/),q=(b=f.headers.get("content-range"))===null||b===void 0?void 0:b.split("/");j&&q&&q.length>1&&(P=parseInt(q[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(T)&&(T.length>1?(S={code:"PGRST116",details:`Results contain ${T.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},T=null,P=null,L=406,D="Not Acceptable"):T.length===1?T=T[0]:T=null)}else{const j=await f.text();try{S=JSON.parse(j),Array.isArray(S)&&f.status===404&&(T=[],S=null,L=200,D="OK")}catch{f.status===404&&j===""?(L=204,D="No Content"):S={message:j}}if(S&&this.isMaybeSingle&&(!((w=S?.details)===null||w===void 0)&&w.includes("0 rows"))&&(S=null,L=200,D="OK"),S&&this.shouldThrowOnError)throw new n.default(S)}return{error:S,data:T,count:P,status:L,statusText:D}});return this.shouldThrowOnError||(h=h.catch(f=>{var m,y,b;return{error:{message:`${(m=f?.name)!==null&&m!==void 0?m:"FetchError"}: ${f?.message}`,details:`${(y=f?.stack)!==null&&y!==void 0?y:""}`,hint:"",code:`${(b=f?.code)!==null&&b!==void 0?b:""}`},data:null,count:null,status:0,statusText:""}})),h.then(o,u)}returns(){return this}overrideTypes(){return this}}return Xi.default=a,Xi}var wv;function __(){if(wv)return Qi;wv=1;var e=Qi&&Qi.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Qi,"__esModule",{value:!0});const t=e(b_());class n extends t.default{select(s){let o=!1;const u=(s??"*").split("").map(c=>/\s/.test(c)&&!o?"":(c==='"'&&(o=!o),c)).join("");return this.url.searchParams.set("select",u),this.headers.append("Prefer","return=representation"),this}order(s,{ascending:o=!0,nullsFirst:u,foreignTable:c,referencedTable:h=c}={}){const f=h?`${h}.order`:"order",m=this.url.searchParams.get(f);return this.url.searchParams.set(f,`${m?`${m},`:""}${s}.${o?"asc":"desc"}${u===void 0?"":u?".nullsfirst":".nullslast"}`),this}limit(s,{foreignTable:o,referencedTable:u=o}={}){const c=typeof u>"u"?"limit":`${u}.limit`;return this.url.searchParams.set(c,`${s}`),this}range(s,o,{foreignTable:u,referencedTable:c=u}={}){const h=typeof c>"u"?"offset":`${c}.offset`,f=typeof c>"u"?"limit":`${c}.limit`;return this.url.searchParams.set(h,`${s}`),this.url.searchParams.set(f,`${o-s+1}`),this}abortSignal(s){return this.signal=s,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:s=!1,verbose:o=!1,settings:u=!1,buffers:c=!1,wal:h=!1,format:f="text"}={}){var m;const y=[s?"analyze":null,o?"verbose":null,u?"settings":null,c?"buffers":null,h?"wal":null].filter(Boolean).join("|"),b=(m=this.headers.get("Accept"))!==null&&m!==void 0?m:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${f}; for="${b}"; options=${y};`),f==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(s){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${s}`),this}}return Qi.default=n,Qi}var xv;function lp(){if(xv)return Zi;xv=1;var e=Zi&&Zi.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Zi,"__esModule",{value:!0});const t=e(__());class n extends t.default{eq(s,o){return this.url.searchParams.append(s,`eq.${o}`),this}neq(s,o){return this.url.searchParams.append(s,`neq.${o}`),this}gt(s,o){return this.url.searchParams.append(s,`gt.${o}`),this}gte(s,o){return this.url.searchParams.append(s,`gte.${o}`),this}lt(s,o){return this.url.searchParams.append(s,`lt.${o}`),this}lte(s,o){return this.url.searchParams.append(s,`lte.${o}`),this}like(s,o){return this.url.searchParams.append(s,`like.${o}`),this}likeAllOf(s,o){return this.url.searchParams.append(s,`like(all).{${o.join(",")}}`),this}likeAnyOf(s,o){return this.url.searchParams.append(s,`like(any).{${o.join(",")}}`),this}ilike(s,o){return this.url.searchParams.append(s,`ilike.${o}`),this}ilikeAllOf(s,o){return this.url.searchParams.append(s,`ilike(all).{${o.join(",")}}`),this}ilikeAnyOf(s,o){return this.url.searchParams.append(s,`ilike(any).{${o.join(",")}}`),this}is(s,o){return this.url.searchParams.append(s,`is.${o}`),this}in(s,o){const u=Array.from(new Set(o)).map(c=>typeof c=="string"&&new RegExp("[,()]").test(c)?`"${c}"`:`${c}`).join(",");return this.url.searchParams.append(s,`in.(${u})`),this}contains(s,o){return typeof o=="string"?this.url.searchParams.append(s,`cs.${o}`):Array.isArray(o)?this.url.searchParams.append(s,`cs.{${o.join(",")}}`):this.url.searchParams.append(s,`cs.${JSON.stringify(o)}`),this}containedBy(s,o){return typeof o=="string"?this.url.searchParams.append(s,`cd.${o}`):Array.isArray(o)?this.url.searchParams.append(s,`cd.{${o.join(",")}}`):this.url.searchParams.append(s,`cd.${JSON.stringify(o)}`),this}rangeGt(s,o){return this.url.searchParams.append(s,`sr.${o}`),this}rangeGte(s,o){return this.url.searchParams.append(s,`nxl.${o}`),this}rangeLt(s,o){return this.url.searchParams.append(s,`sl.${o}`),this}rangeLte(s,o){return this.url.searchParams.append(s,`nxr.${o}`),this}rangeAdjacent(s,o){return this.url.searchParams.append(s,`adj.${o}`),this}overlaps(s,o){return typeof o=="string"?this.url.searchParams.append(s,`ov.${o}`):this.url.searchParams.append(s,`ov.{${o.join(",")}}`),this}textSearch(s,o,{config:u,type:c}={}){let h="";c==="plain"?h="pl":c==="phrase"?h="ph":c==="websearch"&&(h="w");const f=u===void 0?"":`(${u})`;return this.url.searchParams.append(s,`${h}fts${f}.${o}`),this}match(s){return Object.entries(s).forEach(([o,u])=>{this.url.searchParams.append(o,`eq.${u}`)}),this}not(s,o,u){return this.url.searchParams.append(s,`not.${o}.${u}`),this}or(s,{foreignTable:o,referencedTable:u=o}={}){const c=u?`${u}.or`:"or";return this.url.searchParams.append(c,`(${s})`),this}filter(s,o,u){return this.url.searchParams.append(s,`${o}.${u}`),this}}return Zi.default=n,Zi}var Sv;function k_(){if(Sv)return Yi;Sv=1;var e=Yi&&Yi.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Yi,"__esModule",{value:!0});const t=e(lp());class n{constructor(s,{headers:o={},schema:u,fetch:c}){this.url=s,this.headers=new Headers(o),this.schema=u,this.fetch=c}select(s,{head:o=!1,count:u}={}){const c=o?"HEAD":"GET";let h=!1;const f=(s??"*").split("").map(m=>/\s/.test(m)&&!h?"":(m==='"'&&(h=!h),m)).join("");return this.url.searchParams.set("select",f),u&&this.headers.append("Prefer",`count=${u}`),new t.default({method:c,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(s,{count:o,defaultToNull:u=!0}={}){var c;const h="POST";if(o&&this.headers.append("Prefer",`count=${o}`),u||this.headers.append("Prefer","missing=default"),Array.isArray(s)){const f=s.reduce((m,y)=>m.concat(Object.keys(y)),[]);if(f.length>0){const m=[...new Set(f)].map(y=>`"${y}"`);this.url.searchParams.set("columns",m.join(","))}}return new t.default({method:h,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch})}upsert(s,{onConflict:o,ignoreDuplicates:u=!1,count:c,defaultToNull:h=!0}={}){var f;const m="POST";if(this.headers.append("Prefer",`resolution=${u?"ignore":"merge"}-duplicates`),o!==void 0&&this.url.searchParams.set("on_conflict",o),c&&this.headers.append("Prefer",`count=${c}`),h||this.headers.append("Prefer","missing=default"),Array.isArray(s)){const y=s.reduce((b,w)=>b.concat(Object.keys(w)),[]);if(y.length>0){const b=[...new Set(y)].map(w=>`"${w}"`);this.url.searchParams.set("columns",b.join(","))}}return new t.default({method:m,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(f=this.fetch)!==null&&f!==void 0?f:fetch})}update(s,{count:o}={}){var u;const c="PATCH";return o&&this.headers.append("Prefer",`count=${o}`),new t.default({method:c,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch})}delete({count:s}={}){var o;const u="DELETE";return s&&this.headers.append("Prefer",`count=${s}`),new t.default({method:u,url:this.url,headers:this.headers,schema:this.schema,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}}return Yi.default=n,Yi}var Pv;function qE(){if(Pv)return Gi;Pv=1;var e=Gi&&Gi.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Gi,"__esModule",{value:!0});const t=e(k_()),n=e(lp());class a{constructor(o,{headers:u={},schema:c,fetch:h}={}){this.url=o,this.headers=new Headers(u),this.schemaName=c,this.fetch=h}from(o){const u=new URL(`${this.url}/${o}`);return new t.default(u,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(o){return new a(this.url,{headers:this.headers,schema:o,fetch:this.fetch})}rpc(o,u={},{head:c=!1,get:h=!1,count:f}={}){var m;let y;const b=new URL(`${this.url}/rpc/${o}`);let w;c||h?(y=c?"HEAD":"GET",Object.entries(u).filter(([T,P])=>P!==void 0).map(([T,P])=>[T,Array.isArray(P)?`{${P.join(",")}}`:`${P}`]).forEach(([T,P])=>{b.searchParams.append(T,P)})):(y="POST",w=u);const S=new Headers(this.headers);return f&&S.set("Prefer",`count=${f}`),new n.default({method:y,url:b,headers:S,schema:this.schemaName,body:w,fetch:(m=this.fetch)!==null&&m!==void 0?m:fetch})}}return Gi.default=a,Gi}var Tv;function GE(){if(Tv)return zt;Tv=1;var e=zt&&zt.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(zt,"__esModule",{value:!0}),zt.PostgrestError=zt.PostgrestBuilder=zt.PostgrestTransformBuilder=zt.PostgrestFilterBuilder=zt.PostgrestQueryBuilder=zt.PostgrestClient=void 0;const t=e(qE());zt.PostgrestClient=t.default;const n=e(k_());zt.PostgrestQueryBuilder=n.default;const a=e(lp());zt.PostgrestFilterBuilder=a.default;const s=e(__());zt.PostgrestTransformBuilder=s.default;const o=e(b_());zt.PostgrestBuilder=o.default;const u=e(v_());return zt.PostgrestError=u.default,zt.default={PostgrestClient:t.default,PostgrestQueryBuilder:n.default,PostgrestFilterBuilder:a.default,PostgrestTransformBuilder:s.default,PostgrestBuilder:o.default,PostgrestError:u.default},zt}var YE=GE();const ZE=_b(YE),{PostgrestClient:QE,PostgrestQueryBuilder:Cj,PostgrestFilterBuilder:Ej,PostgrestTransformBuilder:Aj,PostgrestBuilder:Rj,PostgrestError:Lj}=ZE,wr=Object.create(null);wr.open="0";wr.close="1";wr.ping="2";wr.pong="3";wr.message="4";wr.upgrade="5";wr.noop="6";const xu=Object.create(null);Object.keys(wr).forEach(e=>{xu[wr[e]]=e});const sf={type:"error",data:"parser error"},w_=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",x_=typeof ArrayBuffer=="function",S_=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,up=({type:e,data:t},n,a)=>w_&&t instanceof Blob?n?a(t):Cv(t,a):x_&&(t instanceof ArrayBuffer||S_(t))?n?a(t):Cv(new Blob([t]),a):a(wr[e]+(t||"")),Cv=(e,t)=>{const n=new FileReader;return n.onload=function(){const a=n.result.split(",")[1];t("b"+(a||""))},n.readAsDataURL(e)};function Ev(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let kh;function XE(e,t){if(w_&&e.data instanceof Blob)return e.data.arrayBuffer().then(Ev).then(t);if(x_&&(e.data instanceof ArrayBuffer||S_(e.data)))return t(Ev(e.data));up(e,!1,n=>{kh||(kh=new TextEncoder),t(kh.encode(n))})}const Av="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Av.length;e++)bo[Av.charCodeAt(e)]=e;const JE=e=>{let t=e.length*.75,n=e.length,a,s=0,o,u,c,h;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),m=new Uint8Array(f);for(a=0;a<n;a+=4)o=bo[e.charCodeAt(a)],u=bo[e.charCodeAt(a+1)],c=bo[e.charCodeAt(a+2)],h=bo[e.charCodeAt(a+3)],m[s++]=o<<2|u>>4,m[s++]=(u&15)<<4|c>>2,m[s++]=(c&3)<<6|h&63;return f},eA=typeof ArrayBuffer=="function",cp=(e,t)=>{if(typeof e!="string")return{type:"message",data:P_(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:tA(e.substring(1),t)}:xu[n]?e.length>1?{type:xu[n],data:e.substring(1)}:{type:xu[n]}:sf},tA=(e,t)=>{if(eA){const n=JE(e);return P_(n,t)}else return{base64:!0,data:e}},P_=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,T_="",nA=(e,t)=>{const n=e.length,a=new Array(n);let s=0;e.forEach((o,u)=>{up(o,!1,c=>{a[u]=c,++s===n&&t(a.join(T_))})})},rA=(e,t)=>{const n=e.split(T_),a=[];for(let s=0;s<n.length;s++){const o=cp(n[s],t);if(a.push(o),o.type==="error")break}return a};function aA(){return new TransformStream({transform(e,t){XE(e,n=>{const a=n.length;let s;if(a<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,a);else if(a<65536){s=new Uint8Array(3);const o=new DataView(s.buffer);o.setUint8(0,126),o.setUint16(1,a)}else{s=new Uint8Array(9);const o=new DataView(s.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(a))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let wh;function uu(e){return e.reduce((t,n)=>t+n.length,0)}function cu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let a=0;for(let s=0;s<t;s++)n[s]=e[0][a++],a===e[0].length&&(e.shift(),a=0);return e.length&&a<e[0].length&&(e[0]=e[0].slice(a)),n}function iA(e,t){wh||(wh=new TextDecoder);const n=[];let a=0,s=-1,o=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(a===0){if(uu(n)<1)break;const h=cu(n,1);o=(h[0]&128)===128,s=h[0]&127,s<126?a=3:s===126?a=1:a=2}else if(a===1){if(uu(n)<2)break;const h=cu(n,2);s=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),a=3}else if(a===2){if(uu(n)<8)break;const h=cu(n,8),f=new DataView(h.buffer,h.byteOffset,h.length),m=f.getUint32(0);if(m>Math.pow(2,21)-1){c.enqueue(sf);break}s=m*Math.pow(2,32)+f.getUint32(4),a=3}else{if(uu(n)<s)break;const h=cu(n,s);c.enqueue(cp(o?h:wh.decode(h),t)),a=0}if(s===0||s>e){c.enqueue(sf);break}}}})}const C_=4;function Dt(e){if(e)return sA(e)}function sA(e){for(var t in Dt.prototype)e[t]=Dt.prototype[t];return e}Dt.prototype.on=Dt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Dt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Dt.prototype.off=Dt.prototype.removeListener=Dt.prototype.removeAllListeners=Dt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var a,s=0;s<n.length;s++)if(a=n[s],a===t||a.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Dt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],a=1;a<arguments.length;a++)t[a-1]=arguments[a];if(n){n=n.slice(0);for(var a=0,s=n.length;a<s;++a)n[a].apply(this,t)}return this};Dt.prototype.emitReserved=Dt.prototype.emit;Dt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Dt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const vc=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),On=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),oA="arraybuffer";function E_(e,...t){return t.reduce((n,a)=>(e.hasOwnProperty(a)&&(n[a]=e[a]),n),{})}const lA=On.setTimeout,uA=On.clearTimeout;function bc(e,t){t.useNativeTimers?(e.setTimeoutFn=lA.bind(On),e.clearTimeoutFn=uA.bind(On)):(e.setTimeoutFn=On.setTimeout.bind(On),e.clearTimeoutFn=On.clearTimeout.bind(On))}const cA=1.33;function dA(e){return typeof e=="string"?hA(e):Math.ceil((e.byteLength||e.size)*cA)}function hA(e){let t=0,n=0;for(let a=0,s=e.length;a<s;a++)t=e.charCodeAt(a),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(a++,n+=4);return n}function A_(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function fA(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function pA(e){let t={},n=e.split("&");for(let a=0,s=n.length;a<s;a++){let o=n[a].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class mA extends Error{constructor(t,n,a){super(t),this.description=n,this.context=a,this.type="TransportError"}}class dp extends Dt{constructor(t){super(),this.writable=!1,bc(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,a){return super.emitReserved("error",new mA(t,n,a)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=cp(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=fA(t);return n.length?"?"+n:""}}class gA extends dp{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let a=0;this._polling&&(a++,this.once("pollComplete",function(){--a||n()})),this.writable||(a++,this.once("drain",function(){--a||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=a=>{if(this.readyState==="opening"&&a.type==="open"&&this.onOpen(),a.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};rA(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,nA(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=A_()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let R_=!1;try{R_=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const yA=R_;function vA(){}class bA extends gA{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let a=location.port;a||(a=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||a!==t.port}}doWrite(t,n){const a=this.request({method:"POST",data:t});a.on("success",n),a.on("error",(s,o)=>{this.onError("xhr post error",s,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,a)=>{this.onError("xhr poll error",n,a)}),this.pollXhr=t}}let ls=class Su extends Dt{constructor(t,n,a){super(),this.createRequest=t,bc(this,a),this._opts=a,this._method=a.method||"GET",this._uri=n,this._data=a.data!==void 0?a.data:null,this._create()}_create(){var t;const n=E_(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const a=this._xhr=this.createRequest(n);try{a.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&a.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{a.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(a),"withCredentials"in a&&(a.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(a.timeout=this._opts.requestTimeout),a.onreadystatechange=()=>{var s;a.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(a.getResponseHeader("set-cookie"))),a.readyState===4&&(a.status===200||a.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof a.status=="number"?a.status:0)},0))},a.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=Su.requestsCount++,Su.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=vA,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Su.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};ls.requestsCount=0;ls.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Rv);else if(typeof addEventListener=="function"){const e="onpagehide"in On?"pagehide":"unload";addEventListener(e,Rv,!1)}}function Rv(){for(let e in ls.requests)ls.requests.hasOwnProperty(e)&&ls.requests[e].abort()}const _A=(function(){const e=L_({xdomain:!1});return e&&e.responseType!==null})();class kA extends bA{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=_A&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ls(L_,this.uri(),t)}}function L_(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||yA))return new XMLHttpRequest}catch{}if(!t)try{return new On[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const D_=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class wA extends dp{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,a=D_?{}:E_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(a.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,a)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const a=t[n],s=n===t.length-1;up(a,this.supportsBinary,o=>{try{this.doWrite(a,o)}catch{}s&&vc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=A_()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const xh=On.WebSocket||On.MozWebSocket;class xA extends wA{createSocket(t,n,a){return D_?new xh(t,n,a):n?new xh(t,n):new xh(t)}doWrite(t,n){this.ws.send(n)}}class SA extends dp{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=iA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=t.readable.pipeThrough(n).getReader(),s=aA();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const o=()=>{a.read().then(({done:c,value:h})=>{c||(this.onPacket(h),o())}).catch(c=>{})};o();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const a=t[n],s=n===t.length-1;this._writer.write(a).then(()=>{s&&vc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const PA={websocket:xA,webtransport:SA,polling:kA},TA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,CA=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function of(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),a=e.indexOf("]");n!=-1&&a!=-1&&(e=e.substring(0,n)+e.substring(n,a).replace(/:/g,";")+e.substring(a,e.length));let s=TA.exec(e||""),o={},u=14;for(;u--;)o[CA[u]]=s[u]||"";return n!=-1&&a!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=EA(o,o.path),o.queryKey=AA(o,o.query),o}function EA(e,t){const n=/\/{2,9}/g,a=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&a.splice(0,1),t.slice(-1)=="/"&&a.splice(a.length-1,1),a}function AA(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,s,o){s&&(n[s]=o)}),n}const lf=typeof addEventListener=="function"&&typeof removeEventListener=="function",Pu=[];lf&&addEventListener("offline",()=>{Pu.forEach(e=>e())},!1);class La extends Dt{constructor(t,n){if(super(),this.binaryType=oA,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const a=of(t);n.hostname=a.host,n.secure=a.protocol==="https"||a.protocol==="wss",n.port=a.port,a.query&&(n.query=a.query)}else n.host&&(n.hostname=of(n.host).host);bc(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(a=>{const s=a.prototype.name;this.transports.push(s),this._transportsByName[s]=a}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=pA(this.opts.query)),lf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Pu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=C_,n.transport=t,this.id&&(n.sid=this.id);const a=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&La.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",La.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let a=0;a<this.writeBuffer.length;a++){const s=this.writeBuffer[a].data;if(s&&(n+=dA(s)),a>0&&n>this._maxPayload)return this.writeBuffer.slice(0,a);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,vc(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,a){return this._sendPacket("message",t,n,a),this}send(t,n,a){return this._sendPacket("message",t,n,a),this}_sendPacket(t,n,a,s){if(typeof n=="function"&&(s=n,n=void 0),typeof a=="function"&&(s=a,a=null),this.readyState==="closing"||this.readyState==="closed")return;a=a||{},a.compress=a.compress!==!1;const o={type:t,data:n,options:a};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},a=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?a():t()}):this.upgrading?a():t()),this}_onError(t){if(La.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),lf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const a=Pu.indexOf(this._offlineEventListener);a!==-1&&Pu.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}La.protocol=C_;class RA extends La{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),a=!1;La.priorWebsocketSuccess=!1;const s=()=>{a||(n.send([{type:"ping",data:"probe"}]),n.once("packet",y=>{if(!a)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;La.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{a||this.readyState!=="closed"&&(m(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function o(){a||(a=!0,m(),n.close(),n=null)}const u=y=>{const b=new Error("probe error: "+y);b.transport=n.name,o(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function h(){u("socket closed")}function f(y){n&&y.name!==n.name&&o()}const m=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",c),this.off("close",h),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",c),this.once("close",h),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{a||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let a=0;a<t.length;a++)~this.transports.indexOf(t[a])&&n.push(t[a]);return n}}let LA=class extends RA{constructor(t,n={}){const a=typeof t=="object"?t:n;(!a.transports||a.transports&&typeof a.transports[0]=="string")&&(a.transports=(a.transports||["polling","websocket","webtransport"]).map(s=>PA[s]).filter(s=>!!s)),super(t,a)}};function DA(e,t="",n){let a=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),a=of(e)),a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443")),a.path=a.path||"/";const o=a.host.indexOf(":")!==-1?"["+a.host+"]":a.host;return a.id=a.protocol+"://"+o+":"+a.port+t,a.href=a.protocol+"://"+o+(n&&n.port===a.port?"":":"+a.port),a}const MA=typeof ArrayBuffer=="function",NA=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,M_=Object.prototype.toString,OA=typeof Blob=="function"||typeof Blob<"u"&&M_.call(Blob)==="[object BlobConstructor]",IA=typeof File=="function"||typeof File<"u"&&M_.call(File)==="[object FileConstructor]";function hp(e){return MA&&(e instanceof ArrayBuffer||NA(e))||OA&&e instanceof Blob||IA&&e instanceof File}function Tu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,a=e.length;n<a;n++)if(Tu(e[n]))return!0;return!1}if(hp(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Tu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Tu(e[n]))return!0;return!1}function jA(e){const t=[],n=e.data,a=e;return a.data=uf(n,t),a.attachments=t.length,{packet:a,buffers:t}}function uf(e,t){if(!e)return e;if(hp(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let a=0;a<e.length;a++)n[a]=uf(e[a],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=uf(e[a],t));return n}return e}function UA(e,t){return e.data=cf(e.data,t),delete e.attachments,e}function cf(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=cf(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=cf(e[n],t));return e}const BA=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var tt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(tt||(tt={}));class FA{constructor(t){this.replacer=t}encode(t){return(t.type===tt.EVENT||t.type===tt.ACK)&&Tu(t)?this.encodeAsBinary({type:t.type===tt.EVENT?tt.BINARY_EVENT:tt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===tt.BINARY_EVENT||t.type===tt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=jA(t),a=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(a),s}}class fp extends Dt{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const a=n.type===tt.BINARY_EVENT;a||n.type===tt.BINARY_ACK?(n.type=a?tt.EVENT:tt.ACK,this.reconstructor=new VA(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(hp(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const a={type:Number(t.charAt(0))};if(tt[a.type]===void 0)throw new Error("unknown packet type "+a.type);if(a.type===tt.BINARY_EVENT||a.type===tt.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(o,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!zA(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");a.attachments=c}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););a.nsp=t.substring(o,n)}else a.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const o=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}a.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(fp.isPayloadValid(a.type,o))a.data=o;else throw new Error("invalid payload")}return a}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case tt.CONNECT:return Lv(n);case tt.DISCONNECT:return n===void 0;case tt.CONNECT_ERROR:return typeof n=="string"||Lv(n);case tt.EVENT:case tt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&BA.indexOf(n[0])===-1);case tt.ACK:case tt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class VA{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=UA(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const zA=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Lv(e){return Object.prototype.toString.call(e)==="[object Object]"}const $A=Object.freeze(Object.defineProperty({__proto__:null,Decoder:fp,Encoder:FA,get PacketType(){return tt}},Symbol.toStringTag,{value:"Module"}));function rr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const HA=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class N_ extends Dt{constructor(t,n,a){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,a&&a.auth&&(this.auth=a.auth),this._opts=Object.assign({},a),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[rr(t,"open",this.onopen.bind(this)),rr(t,"packet",this.onpacket.bind(this)),rr(t,"error",this.onerror.bind(this)),rr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var a,s,o;if(HA.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:tt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const m=this.ids++,y=n.pop();this._registerAckCallback(m,y),u.id=m}const c=(s=(a=this.io.engine)===null||a===void 0?void 0:a.transport)===null||s===void 0?void 0:s.writable,h=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!c||(h?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var a;const s=(a=this.flags.timeout)!==null&&a!==void 0?a:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},s),u=(...c)=>{this.io.clearTimeoutFn(o),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((a,s)=>{const o=(u,c)=>u?s(u):a(c);o.withError=!0,n.push(o),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const a={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...o)=>(this._queue[0],s!==null?a.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...o)),a.pending=!1,this._drainQueue())),this._queue.push(a),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:tt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(a=>String(a.id)===t)){const a=this.acks[t];delete this.acks[t],a.withError&&a.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case tt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tt.EVENT:case tt.BINARY_EVENT:this.onevent(t);break;case tt.ACK:case tt.BINARY_ACK:this.onack(t);break;case tt.DISCONNECT:this.ondisconnect();break;case tt.CONNECT_ERROR:this.destroy();const a=new Error(t.data.message);a.data=t.data.data,this.emitReserved("connect_error",a);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const a of n)a.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let a=!1;return function(...s){a||(a=!0,n.packet({type:tt.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:tt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let a=0;a<n.length;a++)if(t===n[a])return n.splice(a,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let a=0;a<n.length;a++)if(t===n[a])return n.splice(a,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const a of n)a.apply(this,t.data)}}}function vs(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}vs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};vs.prototype.reset=function(){this.attempts=0};vs.prototype.setMin=function(e){this.ms=e};vs.prototype.setMax=function(e){this.max=e};vs.prototype.setJitter=function(e){this.jitter=e};class df extends Dt{constructor(t,n){var a;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,bc(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((a=n.randomizationFactor)!==null&&a!==void 0?a:.5),this.backoff=new vs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||$A;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new LA(this.uri,this.opts);const n=this.engine,a=this;this._readyState="opening",this.skipReconnect=!1;const s=rr(n,"open",function(){a.onopen(),t&&t()}),o=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=rr(n,"error",o);if(this._timeout!==!1){const c=this._timeout,h=this.setTimeoutFn(()=>{s(),o(new Error("timeout")),n.close()},c);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(s),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(rr(t,"ping",this.onping.bind(this)),rr(t,"data",this.ondata.bind(this)),rr(t,"error",this.onerror.bind(this)),rr(t,"close",this.onclose.bind(this)),rr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){vc(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let a=this.nsps[t];return a?this._autoConnect&&!a.active&&a.connect():(a=new N_(this,t,n),this.nsps[t]=a),a}_destroy(t){const n=Object.keys(this.nsps);for(const a of n)if(this.nsps[a].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let a=0;a<n.length;a++)this.engine.write(n[a],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var a;this.cleanup(),(a=this.engine)===null||a===void 0||a.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const a=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const fo={};function Cu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=DA(e,t.path||"/socket.io"),a=n.source,s=n.id,o=n.path,u=fo[s]&&o in fo[s].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let h;return c?h=new df(a,t):(fo[s]||(fo[s]=new df(a,t)),h=fo[s]),n.query&&!t.query&&(t.query=n.queryKey),h.socket(n.path,t)}Object.assign(Cu,{Manager:df,Socket:N_,io:Cu,connect:Cu});var We=class O_ extends Error{constructor(t,n,a,s){super(t),this.name="InsForgeError",this.statusCode=n,this.error=a,this.nextActions=s}static fromApiError(t){return new O_(t.message,t.statusCode,t.error,t.nextActions)}},WA=["authorization","x-api-key","cookie","set-cookie"],KA=["password","token","accesstoken","refreshtoken","authorization","secret","apikey","api_key","email","ssn","creditcard","credit_card"];function qA(e){const t={};for(const[n,a]of Object.entries(e))WA.includes(n.toLowerCase())?t[n]="***REDACTED***":t[n]=a;return t}function wo(e){if(e==null)return e;if(typeof e=="string")try{const t=JSON.parse(e);return wo(t)}catch{return e}if(Array.isArray(e))return e.map(wo);if(typeof e=="object"){const t={};for(const[n,a]of Object.entries(e))KA.includes(n.toLowerCase().replace(/[-_]/g,""))?t[n]="***REDACTED***":t[n]=wo(a);return t}return e}function Dv(e){if(e==null)return"";if(typeof e=="string")try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}if(typeof FormData<"u"&&e instanceof FormData)return"[FormData]";try{return JSON.stringify(e,null,2)}catch{return"[Unserializable body]"}}var I_=class{constructor(e){typeof e=="function"?(this.enabled=!0,this.customLog=e):(this.enabled=!!e,this.customLog=null)}log(e,...t){if(!this.enabled)return;const n=`[InsForge Debug] ${e}`;this.customLog?this.customLog(n,...t):console.log(n,...t)}warn(e,...t){if(!this.enabled)return;const n=`[InsForge Debug] ${e}`;this.customLog?this.customLog(n,...t):console.warn(n,...t)}error(e,...t){if(!this.enabled)return;const n=`[InsForge Debug] ${e}`;this.customLog?this.customLog(n,...t):console.error(n,...t)}logRequest(e,t,n,a){if(!this.enabled)return;const s=[`→ ${e} ${t}`];n&&Object.keys(n).length>0&&s.push(` Headers: ${JSON.stringify(qA(n))}`);const o=Dv(wo(a));if(o){const u=o.length>1e3?o.slice(0,1e3)+"... [truncated]":o;s.push(` Body: ${u}`)}this.log(s.join(`
|
|
39
|
-
`))}logResponse(e,t,n,a,s){if(!this.enabled)return;const o=[`← ${e} ${t} ${n} (${a}ms)`],u=Dv(wo(s));if(u){const c=u.length>1e3?u.slice(0,1e3)+"... [truncated]":u;o.push(` Body: ${c}`)}n>=400?this.error(o.join(`
|
|
40
|
-
`)):this.log(o.join(`
|
|
41
|
-
`))}},pp="insforge_csrf_token";function j_(){if(typeof document>"u")return null;const e=document.cookie.split(";").find(t=>t.trim().startsWith(`${pp}=`));return e&&e.split("=")[1]||null}function U_(e){if(typeof document>"u")return;const t=10080*60,n=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=`${pp}=${encodeURIComponent(e)}; path=/; max-age=${t}; SameSite=Lax${n}`}function B_(){if(typeof document>"u")return;const e=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=`${pp}=; path=/; max-age=0; SameSite=Lax${e}`}var F_=class{constructor(){this.accessToken=null,this.user=null,this.onTokenChange=null}saveSession(e){const t=e.accessToken!==this.accessToken;this.accessToken=e.accessToken,this.user=e.user,t&&this.onTokenChange&&this.onTokenChange()}getSession(){return!this.accessToken||!this.user?null:{accessToken:this.accessToken,user:this.user}}getAccessToken(){return this.accessToken}setAccessToken(e){const t=e!==this.accessToken;this.accessToken=e,t&&this.onTokenChange&&this.onTokenChange()}getUser(){return this.user}setUser(e){this.user=e}clearSession(){const e=this.accessToken!==null;this.accessToken=null,this.user=null,e&&this.onTokenChange&&this.onTokenChange()}},GA=new Set([500,502,503,504]),YA=new Set(["GET","HEAD","PUT","DELETE","OPTIONS"]),ZA=class{constructor(e,t,n){if(this.userToken=null,this.autoRefreshToken=!0,this.isRefreshing=!1,this.refreshPromise=null,this.refreshToken=null,this.baseUrl=e.baseUrl||"http://localhost:7130",this.autoRefreshToken=e.autoRefreshToken??!0,this.fetch=e.fetch||(globalThis.fetch?globalThis.fetch.bind(globalThis):void 0),this.anonKey=e.anonKey,this.defaultHeaders={...e.headers},this.tokenManager=t??new F_,this.logger=n||new I_(!1),this.timeout=e.timeout??3e4,this.retryCount=e.retryCount??3,this.retryDelay=e.retryDelay??500,!this.fetch)throw new Error("Fetch is not available. Please provide a fetch implementation in the config.")}buildUrl(e,t){const n=new URL(e,this.baseUrl);return t&&Object.entries(t).forEach(([a,s])=>{if(a==="select"){let o=s.replace(/\s+/g," ").trim();o=o.replace(/\s*\(\s*/g,"(").replace(/\s*\)\s*/g,")").replace(/\(\s+/g,"(").replace(/\s+\)/g,")").replace(/,\s+(?=[^()]*\))/g,","),n.searchParams.append(a,o)}else n.searchParams.append(a,s)}),n.toString()}isRetryableStatus(e){return GA.has(e)}computeRetryDelay(e){const n=this.retryDelay*Math.pow(2,e-1)*(.85+Math.random()*.3);return Math.round(n)}async handleRequest(e,t,n={}){const{params:a,headers:s={},body:o,signal:u,...c}=n,h=this.buildUrl(t,a),f=Date.now(),y=YA.has(e.toUpperCase())||n.idempotent===!0?this.retryCount:0,b={...this.defaultHeaders},w=this.userToken||this.anonKey;w&&(b.Authorization=`Bearer ${w}`);let S;o!==void 0&&(typeof FormData<"u"&&o instanceof FormData?S=o:(e!=="GET"&&(b["Content-Type"]="application/json;charset=UTF-8"),S=JSON.stringify(o))),s instanceof Headers?s.forEach((P,L)=>{b[L]=P}):Array.isArray(s)?s.forEach(([P,L])=>{b[P]=L}):Object.assign(b,s),this.logger.logRequest(e,h,b,S);let T;for(let P=0;P<=y;P++){if(P>0){const M=this.computeRetryDelay(P);if(this.logger.warn(`Retry ${P}/${y} for ${e} ${h} in ${M}ms`),u?.aborted)throw u.reason;await new Promise((j,q)=>{const K=()=>{clearTimeout(H),q(u.reason)},H=setTimeout(()=>{u&&u.removeEventListener("abort",K),j()},M);u&&u.addEventListener("abort",K,{once:!0})})}let L,D;if((this.timeout>0||u)&&(L=new AbortController,this.timeout>0&&(D=setTimeout(()=>L.abort(),this.timeout)),u))if(u.aborted)L.abort(u.reason);else{const M=()=>L.abort(u.reason);u.addEventListener("abort",M,{once:!0}),L.signal.addEventListener("abort",()=>{u.removeEventListener("abort",M)},{once:!0})}try{const M=await this.fetch(h,{method:e,headers:b,body:S,...c,...L?{signal:L.signal}:{}});if(this.isRetryableStatus(M.status)&&P<y){D!==void 0&&clearTimeout(D),await M.body?.cancel(),T=new We(`Server error: ${M.status} ${M.statusText}`,M.status,"SERVER_ERROR");continue}if(M.status===204){D!==void 0&&clearTimeout(D);return}let j;const q=M.headers.get("content-type");try{q?.includes("json")?j=await M.json():j=await M.text()}catch(K){throw D!==void 0&&clearTimeout(D),new We(`Failed to parse response body: ${K?.message||"Unknown error"}`,M.status,M.ok?"PARSE_ERROR":"REQUEST_FAILED")}if(D!==void 0&&clearTimeout(D),!M.ok){if(this.logger.logResponse(e,h,M.status,Date.now()-f,j),j&&typeof j=="object"&&"error"in j){!j.statusCode&&!j.status&&(j.statusCode=M.status);const K=We.fromApiError(j);throw Object.keys(j).forEach(H=>{H!=="error"&&H!=="message"&&H!=="statusCode"&&(K[H]=j[H])}),K}throw new We(`Request failed: ${M.statusText}`,M.status,"REQUEST_FAILED")}return this.logger.logResponse(e,h,M.status,Date.now()-f,j),j}catch(M){if(D!==void 0&&clearTimeout(D),M?.name==="AbortError")throw L&&L.signal.aborted&&this.timeout>0&&!u?.aborted?new We(`Request timed out after ${this.timeout}ms`,408,"REQUEST_TIMEOUT"):M;if(M instanceof We)throw M;if(P<y){T=M;continue}throw new We(`Network request failed: ${M?.message||"Unknown error"}`,0,"NETWORK_ERROR")}}throw T||new We("Request failed after all retry attempts",0,"NETWORK_ERROR")}async request(e,t,n={}){try{return await this.handleRequest(e,t,{...n})}catch(a){if(a instanceof We&&a.statusCode===401&&a.error==="INVALID_TOKEN"&&this.autoRefreshToken)try{const s=await this.handleTokenRefresh();return this.setAuthToken(s.accessToken),this.tokenManager.saveSession(s),s.csrfToken&&U_(s.csrfToken),s.refreshToken&&this.setRefreshToken(s.refreshToken),await this.handleRequest(e,t,{...n})}catch(s){throw this.tokenManager.clearSession(),this.userToken=null,this.refreshToken=null,B_(),s}throw a}}get(e,t){return this.request("GET",e,t)}post(e,t,n){return this.request("POST",e,{...n,body:t})}put(e,t,n){return this.request("PUT",e,{...n,body:t})}patch(e,t,n){return this.request("PATCH",e,{...n,body:t})}delete(e,t){return this.request("DELETE",e,t)}setAuthToken(e){this.userToken=e}setRefreshToken(e){this.refreshToken=e}getHeaders(){const e={...this.defaultHeaders},t=this.userToken||this.anonKey;return t&&(e.Authorization=`Bearer ${t}`),e}async handleTokenRefresh(){return this.isRefreshing?this.refreshPromise:(this.isRefreshing=!0,this.refreshPromise=(async()=>{try{const e=j_(),t=this.refreshToken?{refreshToken:this.refreshToken}:void 0;return await this.handleRequest("POST","/api/auth/sessions/current",{body:t,headers:e?{"X-CSRF-Token":e}:{},credentials:"include"})}finally{this.isRefreshing=!1,this.refreshPromise=null}})(),this.refreshPromise)}},hf="insforge_pkce_verifier";function V_(e){return btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function QA(){const e=new Uint8Array(32);return crypto.getRandomValues(e),V_(e)}async function XA(e){const n=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",n);return V_(new Uint8Array(a))}function JA(e){typeof sessionStorage<"u"&&sessionStorage.setItem(hf,e)}function eR(){if(typeof sessionStorage>"u")return null;const e=sessionStorage.getItem(hf);return e&&sessionStorage.removeItem(hf),e}function wn(e,t){return e instanceof We?{data:null,error:e}:{data:null,error:new We(e instanceof Error?e.message:t,500,"UNEXPECTED_ERROR")}}function Mv(...e){if(typeof window>"u")return;const t=new URL(window.location.href);e.forEach(n=>t.searchParams.delete(n)),window.history.replaceState({},document.title,t.toString())}var tR=class{constructor(e,t,n={}){this.http=e,this.tokenManager=t,this.options=n,this.authCallbackHandled=this.detectAuthCallback()}isServerMode(){return!!this.options.isServerMode}saveSessionFromResponse(e){if(!e.accessToken||!e.user)return!1;const t={accessToken:e.accessToken,user:e.user};return!this.isServerMode()&&e.csrfToken&&U_(e.csrfToken),this.isServerMode()||this.tokenManager.saveSession(t),this.http.setAuthToken(e.accessToken),this.http.setRefreshToken(e.refreshToken??null),!0}async detectAuthCallback(){if(!(this.isServerMode()||typeof window>"u"))try{const e=new URLSearchParams(window.location.search),t=e.get("error");if(t){Mv("error"),console.debug("OAuth callback error:",t);return}const n=e.get("insforge_code");if(n){Mv("insforge_code");const{error:a}=await this.exchangeOAuthCode(n);a&&console.debug("OAuth code exchange failed:",a.message);return}}catch(e){console.debug("OAuth callback detection skipped:",e)}}async signUp(e){try{const t=await this.http.post(this.isServerMode()?"/api/auth/users?client_type=mobile":"/api/auth/users",e,{credentials:"include"});return t.accessToken&&t.user&&this.saveSessionFromResponse(t),t.refreshToken&&this.http.setRefreshToken(t.refreshToken),{data:t,error:null}}catch(t){return wn(t,"An unexpected error occurred during sign up")}}async signInWithPassword(e){try{const t=await this.http.post(this.isServerMode()?"/api/auth/sessions?client_type=mobile":"/api/auth/sessions",e,{credentials:"include"});return this.saveSessionFromResponse(t),t.refreshToken&&this.http.setRefreshToken(t.refreshToken),{data:t,error:null}}catch(t){return wn(t,"An unexpected error occurred during sign in")}}async signOut(){try{try{await this.http.post(this.isServerMode()?"/api/auth/logout?client_type=mobile":"/api/auth/logout",void 0,{credentials:"include"})}catch{}return this.tokenManager.clearSession(),this.http.setAuthToken(null),this.http.setRefreshToken(null),this.isServerMode()||B_(),{error:null}}catch{return{error:new We("Failed to sign out",500,"SIGNOUT_ERROR")}}}async signInWithOAuth(e){try{const{provider:t,redirectTo:n,skipBrowserRedirect:a}=e,s=encodeURIComponent(t.toLowerCase()),o=QA(),u=await XA(o);JA(o);const c={code_challenge:u};n&&(c.redirect_uri=n);const f=yc.options.includes(s)?`/api/auth/oauth/${s}`:`/api/auth/oauth/custom/${s}`,m=await this.http.get(f,{params:c});return!this.isServerMode()&&typeof window<"u"&&!a?(window.location.href=m.authUrl,{data:{},error:null}):{data:{url:m.authUrl,provider:s,codeVerifier:o},error:null}}catch(t){return t instanceof We?{data:{},error:t}:{data:{},error:new We("An unexpected error occurred during OAuth initialization",500,"UNEXPECTED_ERROR")}}}async exchangeOAuthCode(e,t){try{const n=t??eR();if(!n)return{data:null,error:new We("PKCE code verifier not found. Ensure signInWithOAuth was called in the same browser session.",400,"PKCE_VERIFIER_MISSING")};const a={code:e,code_verifier:n},s=await this.http.post(this.isServerMode()?"/api/auth/oauth/exchange?client_type=mobile":"/api/auth/oauth/exchange",a,{credentials:"include"});return this.saveSessionFromResponse(s),{data:s,error:null}}catch(n){return wn(n,"An unexpected error occurred during OAuth code exchange")}}async signInWithIdToken(e){try{const{provider:t,token:n}=e,a=await this.http.post("/api/auth/id-token?client_type=mobile",{provider:t,token:n},{credentials:"include"});return this.saveSessionFromResponse(a),a.refreshToken&&this.http.setRefreshToken(a.refreshToken),{data:a,error:null}}catch(t){return wn(t,"An unexpected error occurred during ID token sign in")}}async refreshSession(e){try{if(this.isServerMode()&&!e?.refreshToken)return{data:null,error:new We("refreshToken is required when refreshing session in server mode",400,"REFRESH_TOKEN_REQUIRED")};const t=this.isServerMode()?null:j_(),n=await this.http.post(this.isServerMode()?"/api/auth/refresh?client_type=mobile":"/api/auth/refresh",this.isServerMode()?{refresh_token:e?.refreshToken}:void 0,{headers:t?{"X-CSRF-Token":t}:{},credentials:"include"});return n.accessToken&&this.saveSessionFromResponse(n),{data:n,error:null}}catch(t){return wn(t,"An unexpected error occurred during session refresh")}}async getCurrentUser(){await this.authCallbackHandled;try{if(this.isServerMode()){const t=this.tokenManager.getAccessToken();return t?(this.http.setAuthToken(t),{data:{user:(await this.http.get("/api/auth/sessions/current")).user??null},error:null}):{data:{user:null},error:null}}const e=this.tokenManager.getSession();if(e)return this.http.setAuthToken(e.accessToken),{data:{user:e.user},error:null};if(typeof window<"u"){const{data:t,error:n}=await this.refreshSession();if(n)return{data:{user:null},error:n};if(t?.accessToken)return{data:{user:t.user??null},error:null}}return{data:{user:null},error:null}}catch(e){return e instanceof We?{data:{user:null},error:e}:{data:{user:null},error:new We("An unexpected error occurred while getting user",500,"UNEXPECTED_ERROR")}}}async getProfile(e){try{return{data:await this.http.get(`/api/auth/profiles/${e}`),error:null}}catch(t){return wn(t,"An unexpected error occurred while fetching user profile")}}async setProfile(e){try{const t=await this.http.patch("/api/auth/profiles/current",{profile:e}),n=this.tokenManager.getUser();return!this.isServerMode()&&n&&t.profile!==void 0&&this.tokenManager.setUser({...n,profile:t.profile}),{data:t,error:null}}catch(t){return wn(t,"An unexpected error occurred while updating user profile")}}async resendVerificationEmail(e){try{return{data:await this.http.post("/api/auth/email/send-verification",e),error:null}}catch(t){return wn(t,"An unexpected error occurred while sending verification email")}}async verifyEmail(e){try{const t=await this.http.post(this.isServerMode()?"/api/auth/email/verify?client_type=mobile":"/api/auth/email/verify",e,{credentials:"include"});return this.saveSessionFromResponse(t),t.refreshToken&&this.http.setRefreshToken(t.refreshToken),{data:t,error:null}}catch(t){return wn(t,"An unexpected error occurred while verifying email")}}async sendResetPasswordEmail(e){try{return{data:await this.http.post("/api/auth/email/send-reset-password",e),error:null}}catch(t){return wn(t,"An unexpected error occurred while sending password reset email")}}async exchangeResetPasswordToken(e){try{return{data:await this.http.post("/api/auth/email/exchange-reset-password-token",e),error:null}}catch(t){return wn(t,"An unexpected error occurred while verifying reset code")}}async resetPassword(e){try{return{data:await this.http.post("/api/auth/email/reset-password",e),error:null}}catch(t){return wn(t,"An unexpected error occurred while resetting password")}}async getPublicAuthConfig(){try{return{data:await this.http.get("/api/auth/public-config"),error:null}}catch(e){return wn(e,"An unexpected error occurred while fetching auth configuration")}}};function nR(e,t){return async(n,a)=>{const s=typeof n=="string"?n:n.toString(),o=new URL(s),u=o.pathname.slice(1),c=u.match(/^rpc\/(.+)$/),h=c?`/api/database/rpc/${c[1]}`:`/api/database/records/${u}`,f=`${e.baseUrl}${h}${o.search}`,m=t.getAccessToken(),y=e.getHeaders(),b=m||y.Authorization?.replace("Bearer ",""),w=new Headers(a?.headers);return b&&!w.has("Authorization")&&w.set("Authorization",`Bearer ${b}`),await fetch(f,{...a,headers:w})}}var rR=class{constructor(e,t){this.postgrest=new QE("http://dummy",{fetch:nR(e,t),headers:{}})}from(e){return this.postgrest.from(e)}rpc(e,t,n){return this.postgrest.rpc(e,t,n)}},aR=class{constructor(e,t){this.bucketName=e,this.http=t}async upload(e,t){try{const n=await this.http.post(`/api/storage/buckets/${this.bucketName}/upload-strategy`,{filename:e,contentType:t.type||"application/octet-stream",size:t.size});if(n.method==="presigned")return await this.uploadWithPresignedUrl(n,t);if(n.method==="direct"){const a=new FormData;return a.append("file",t),{data:await this.http.request("PUT",`/api/storage/buckets/${this.bucketName}/objects/${encodeURIComponent(e)}`,{body:a,headers:{}}),error:null}}throw new We(`Unsupported upload method: ${n.method}`,500,"STORAGE_ERROR")}catch(n){return{data:null,error:n instanceof We?n:new We("Upload failed",500,"STORAGE_ERROR")}}}async uploadAuto(e){try{const t=e instanceof File?e.name:"file",n=await this.http.post(`/api/storage/buckets/${this.bucketName}/upload-strategy`,{filename:t,contentType:e.type||"application/octet-stream",size:e.size});if(n.method==="presigned")return await this.uploadWithPresignedUrl(n,e);if(n.method==="direct"){const a=new FormData;return a.append("file",e),{data:await this.http.request("POST",`/api/storage/buckets/${this.bucketName}/objects`,{body:a,headers:{}}),error:null}}throw new We(`Unsupported upload method: ${n.method}`,500,"STORAGE_ERROR")}catch(t){return{data:null,error:t instanceof We?t:new We("Upload failed",500,"STORAGE_ERROR")}}}async uploadWithPresignedUrl(e,t){try{const n=new FormData;e.fields&&Object.entries(e.fields).forEach(([s,o])=>{n.append(s,o)}),n.append("file",t);const a=await fetch(e.uploadUrl,{method:"POST",body:n});if(!a.ok)throw new We(`Upload to storage failed: ${a.statusText}`,a.status,"STORAGE_ERROR");return e.confirmRequired&&e.confirmUrl?{data:await this.http.post(e.confirmUrl,{size:t.size,contentType:t.type||"application/octet-stream"}),error:null}:{data:{key:e.key,bucket:this.bucketName,size:t.size,mimeType:t.type||"application/octet-stream",uploadedAt:new Date().toISOString(),url:this.getPublicUrl(e.key)},error:null}}catch(n){throw n instanceof We?n:new We("Presigned upload failed",500,"STORAGE_ERROR")}}async download(e){try{const t=await this.http.post(`/api/storage/buckets/${this.bucketName}/objects/${encodeURIComponent(e)}/download-strategy`,{expiresIn:3600}),n=t.url,a={};t.method==="direct"&&Object.assign(a,this.http.getHeaders());const s=await fetch(n,{method:"GET",headers:a});if(!s.ok)try{const u=await s.json();throw We.fromApiError(u)}catch{throw new We(`Download failed: ${s.statusText}`,s.status,"STORAGE_ERROR")}return{data:await s.blob(),error:null}}catch(t){return{data:null,error:t instanceof We?t:new We("Download failed",500,"STORAGE_ERROR")}}}getPublicUrl(e){return`${this.http.baseUrl}/api/storage/buckets/${this.bucketName}/objects/${encodeURIComponent(e)}`}async list(e){try{const t={};return e?.prefix&&(t.prefix=e.prefix),e?.search&&(t.search=e.search),e?.limit&&(t.limit=e.limit.toString()),e?.offset&&(t.offset=e.offset.toString()),{data:await this.http.get(`/api/storage/buckets/${this.bucketName}/objects`,{params:t}),error:null}}catch(t){return{data:null,error:t instanceof We?t:new We("List failed",500,"STORAGE_ERROR")}}}async remove(e){try{return{data:await this.http.delete(`/api/storage/buckets/${this.bucketName}/objects/${encodeURIComponent(e)}`),error:null}}catch(t){return{data:null,error:t instanceof We?t:new We("Delete failed",500,"STORAGE_ERROR")}}}},iR=class{constructor(e){this.http=e}from(e){return new aR(e,this.http)}},sR=class{constructor(e){this.http=e,this.chat=new oR(e),this.images=new cR(e),this.embeddings=new uR(e)}},oR=class{constructor(e){this.completions=new lR(e)}},lR=class{constructor(e){this.http=e}async create(e){const t={model:e.model,messages:e.messages,temperature:e.temperature,maxTokens:e.maxTokens,topP:e.topP,stream:e.stream,webSearch:e.webSearch,fileParser:e.fileParser,thinking:e.thinking,tools:e.tools,toolChoice:e.toolChoice,parallelToolCalls:e.parallelToolCalls};if(e.stream){const s=this.http.getHeaders();s["Content-Type"]="application/json";const o=await this.http.fetch(`${this.http.baseUrl}/api/ai/chat/completion`,{method:"POST",headers:s,body:JSON.stringify(t)});if(!o.ok){const u=await o.json();throw new Error(u.error||"Stream request failed")}return this.parseSSEStream(o,e.model)}const n=await this.http.post("/api/ai/chat/completion",t),a=n.text||"";return{id:`chatcmpl-${Date.now()}`,object:"chat.completion",created:Math.floor(Date.now()/1e3),model:n.metadata?.model,choices:[{index:0,message:{role:"assistant",content:a,...n.tool_calls?.length&&{tool_calls:n.tool_calls},...n.annotations?.length&&{annotations:n.annotations}},finish_reason:n.tool_calls?.length?"tool_calls":"stop"}],usage:n.metadata?.usage||{prompt_tokens:0,completion_tokens:0,total_tokens:0}}}async*parseSSEStream(e,t){const n=e.body.getReader(),a=new TextDecoder;let s="";try{for(;;){const{done:o,value:u}=await n.read();if(o)break;s+=a.decode(u,{stream:!0});const c=s.split(`
|
|
42
|
-
`);s=c.pop()||"";for(const h of c)if(h.startsWith("data: ")){const f=h.slice(6).trim();if(f)try{const m=JSON.parse(f);if((m.chunk||m.content)&&(yield{id:`chatcmpl-${Date.now()}`,object:"chat.completion.chunk",created:Math.floor(Date.now()/1e3),model:t,choices:[{index:0,delta:{content:m.chunk||m.content},finish_reason:null}]}),m.tool_calls?.length&&(yield{id:`chatcmpl-${Date.now()}`,object:"chat.completion.chunk",created:Math.floor(Date.now()/1e3),model:t,choices:[{index:0,delta:{tool_calls:m.tool_calls},finish_reason:"tool_calls"}]}),m.done){n.releaseLock();return}}catch{console.warn("Failed to parse SSE data:",f)}}}}finally{n.releaseLock()}}},uR=class{constructor(e){this.http=e}async create(e){const t=await this.http.post("/api/ai/embeddings",e);return{object:t.object,data:t.data,model:t.metadata?.model,usage:t.metadata?.usage?{prompt_tokens:t.metadata.usage.promptTokens||0,total_tokens:t.metadata.usage.totalTokens||0}:{prompt_tokens:0,total_tokens:0}}}},cR=class{constructor(e){this.http=e}async generate(e){const t=await this.http.post("/api/ai/image/generation",e);let n=[];return t.images&&t.images.length>0?n=t.images.map(a=>({b64_json:a.imageUrl.replace(/^data:image\/\w+;base64,/,""),content:t.text})):t.text&&(n=[{content:t.text}]),{created:Math.floor(Date.now()/1e3),data:n,...t.metadata?.usage&&{usage:{total_tokens:t.metadata.usage.totalTokens||0,input_tokens:t.metadata.usage.promptTokens||0,output_tokens:t.metadata.usage.completionTokens||0}}}}},dR=class z_{constructor(t,n){this.http=t,this.functionsUrl=n||z_.deriveSubhostingUrl(t.baseUrl)}static deriveSubhostingUrl(t){try{const{hostname:n}=new URL(t);return n.endsWith(".insforge.app")?`https://${n.split(".")[0]}.functions.insforge.app`:void 0}catch{return}}async invoke(t,n={}){const{method:a="POST",body:s,headers:o={}}=n;if(this.functionsUrl)try{return{data:await this.http.request(a,`${this.functionsUrl}/${t}`,{body:s,headers:o}),error:null}}catch(u){if(u instanceof Error&&u.name==="AbortError")throw u;if(!(u instanceof We&&u.statusCode===404))return{data:null,error:u instanceof We?u:new We(u instanceof Error?u.message:"Function invocation failed",500,"FUNCTION_ERROR")}}try{const u=`/functions/${t}`;return{data:await this.http.request(a,u,{body:s,headers:o}),error:null}}catch(u){if(u instanceof Error&&u.name==="AbortError")throw u;return{data:null,error:u instanceof We?u:new We(u instanceof Error?u.message:"Function invocation failed",500,"FUNCTION_ERROR")}}}},Nv=1e4,hR=class{constructor(e,t,n){this.socket=null,this.connectPromise=null,this.subscribedChannels=new Set,this.eventListeners=new Map,this.baseUrl=e,this.tokenManager=t,this.anonKey=n,this.tokenManager.onTokenChange=()=>this.onTokenChange()}notifyListeners(e,t){const n=this.eventListeners.get(e);if(n)for(const a of n)try{a(t)}catch(s){console.error(`Error in ${e} callback:`,s)}}connect(){return this.socket?.connected?Promise.resolve():this.connectPromise?this.connectPromise:(this.connectPromise=new Promise((e,t)=>{const n=this.tokenManager.getAccessToken()??this.anonKey;this.socket=Cu(this.baseUrl,{transports:["websocket"],auth:n?{token:n}:void 0});let a=!0,s=null;const o=()=>{s&&(clearTimeout(s),s=null)};s=setTimeout(()=>{a&&(a=!1,this.connectPromise=null,this.socket?.disconnect(),this.socket=null,t(new Error(`Connection timeout after ${Nv}ms`)))},Nv),this.socket.on("connect",()=>{o();for(const u of this.subscribedChannels)this.socket.emit("realtime:subscribe",{channel:u});this.notifyListeners("connect"),a&&(a=!1,this.connectPromise=null,e())}),this.socket.on("connect_error",u=>{o(),this.notifyListeners("connect_error",u),a&&(a=!1,this.connectPromise=null,t(u))}),this.socket.on("disconnect",u=>{this.notifyListeners("disconnect",u)}),this.socket.on("realtime:error",u=>{this.notifyListeners("error",u)}),this.socket.onAny((u,c)=>{u!=="realtime:error"&&this.notifyListeners(u,c)})}),this.connectPromise)}disconnect(){this.socket&&(this.socket.disconnect(),this.socket=null),this.subscribedChannels.clear()}onTokenChange(){const e=this.tokenManager.getAccessToken()??this.anonKey;this.socket&&(this.socket.auth=e?{token:e}:{}),this.socket&&(this.socket.connected||this.connectPromise)&&(this.socket.disconnect(),this.socket.connect())}get isConnected(){return this.socket?.connected??!1}get connectionState(){return this.socket?this.socket.connected?"connected":"connecting":"disconnected"}get socketId(){return this.socket?.id}async subscribe(e){if(this.subscribedChannels.has(e))return{ok:!0,channel:e};if(!this.socket?.connected)try{await this.connect()}catch(t){const n=t instanceof Error?t.message:"Connection failed";return{ok:!1,channel:e,error:{code:"CONNECTION_FAILED",message:n}}}return new Promise(t=>{this.socket.emit("realtime:subscribe",{channel:e},n=>{n.ok&&this.subscribedChannels.add(e),t(n)})})}unsubscribe(e){this.subscribedChannels.delete(e),this.socket?.connected&&this.socket.emit("realtime:unsubscribe",{channel:e})}async publish(e,t,n){if(!this.socket?.connected)throw new Error("Not connected to realtime server. Call connect() first.");this.socket.emit("realtime:publish",{channel:e,event:t,payload:n})}on(e,t){this.eventListeners.has(e)||this.eventListeners.set(e,new Set),this.eventListeners.get(e).add(t)}off(e,t){const n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}once(e,t){const n=a=>{this.off(e,n),t(a)};this.on(e,n)}getSubscribedChannels(){return Array.from(this.subscribedChannels)}},fR=class{constructor(e){this.http=e}async send(e){try{return{data:await this.http.post("/api/email/send-raw",e),error:null}}catch(t){if(t instanceof Error&&t.name==="AbortError")throw t;return{data:null,error:t instanceof We?t:new We(t instanceof Error?t.message:"Email send failed",500,"EMAIL_ERROR")}}}},pR=class{constructor(e={}){const t=new I_(e.debug);this.tokenManager=new F_,this.http=new ZA(e,this.tokenManager,t),e.edgeFunctionToken&&(this.http.setAuthToken(e.edgeFunctionToken),this.tokenManager.setAccessToken(e.edgeFunctionToken)),this.auth=new tR(this.http,this.tokenManager,{isServerMode:e.isServerMode??!1}),this.database=new rR(this.http,this.tokenManager),this.storage=new iR(this.http),this.ai=new sR(this.http),this.functions=new dR(this.http,e.functionsUrl),this.realtime=new hR(this.http.baseUrl,this.tokenManager,e.anonKey),this.emails=new fR(this.http)}getHttpClient(){return this.http}};function mR(e){return new pR(e)}const mp={VITE_INSFORGE_ANON_KEY:"ik_9f35735991b684f7cf57fa00bb4d0487",VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"};function fi(){const e=typeof import.meta<"u"?mp:void 0;return(e?.VITE_INSFORGE_BASE_URL||e?.VITE_TOKENTRACKER_BACKEND_BASE_URL||"").trim()}function $_(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return window.location.origin;const t=typeof import.meta<"u"?mp:void 0;return(t?.VITE_INSFORGE_BASE_URL||t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||"").trim()}function _c(){const e=typeof import.meta<"u"?mp:void 0;return(e?.VITE_INSFORGE_ANON_KEY||e?.VITE_TOKENTRACKER_BACKEND_ANON_KEY||"").trim()}function ff(){return!!$_()}let Sh=null;function gR(){return ff()?(Sh||(Sh=mR({baseUrl:$_(),anonKey:_c()||void 0,autoRefreshToken:!0})),Sh):null}const H_="tokentracker_cloud_sync_enabled",yR="tokentracker_cloud_device_session_v1",gp="tokentracker_cloud_last_sync_ts";let yp=null;function vp(){try{localStorage.removeItem(yR)}catch{}}function vR(){if(typeof window>"u")return!1;const e=window.location.hostname;return e==="localhost"||e==="127.0.0.1"}function bR(){try{const e=localStorage.getItem(H_);return e===null||e===""?!1:e==="1"||e==="true"}catch{return!1}}function Mj(e){try{localStorage.setItem(H_,e?"1":"0")}catch{}}function W_(){return vp(),yp}function _R(e){yp=e,vp()}function K_(){yp=null;try{localStorage.removeItem(gp)}catch{}vp()}function kR(){try{const e=Number(localStorage.getItem(gp));return Number.isFinite(e)?e:0}catch{return 0}}function q_(e){try{localStorage.setItem(gp,String(e))}catch{}}function Ea(e){if(typeof e!="string")return null;const t=e.trim();return t.length>0?t:null}function wR(e){const t=Ea(e);if(!t)return null;const n=t.split(".");if(n.length<2)return null;const a=n[1];try{const s=a.replace(/-/g,"+").replace(/_/g,"/").padEnd(a.length+(4-a.length%4)%4,"="),o=typeof atob=="function"?atob(s):Buffer.from(s,"base64").toString("utf8"),c=JSON.parse(o)?.exp;return typeof c!="number"||!Number.isFinite(c)||c<=0?null:Math.floor(c*1e3)}catch{return null}}function xR(e){const t=Ea(e);if(!t)return!1;const n=t.split(".");if(n.length!==3)return!1;try{for(let a=0;a<2;a++){const s=n[a];if(!/^[A-Za-z0-9_-]+$/.test(s))return!1;const o=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),u=typeof atob=="function"?atob(o):Buffer.from(o,"base64").toString("utf8");a===1&&JSON.parse(u)}return!0}catch{return!1}}function SR(e,t=3e4){const n=wR(e);return n?n<=Date.now()+Math.max(0,Number(t)||0):!1}async function PR(e){if(!e)return null;if(typeof e=="string")return Ea(e);if(typeof e=="function")try{const t=await e();return Ea(t)}catch{return null}if(typeof e=="object"){if(typeof e.getAccessToken=="function"){try{const t=await e.getAccessToken(),n=Ea(t);if(n)return n}catch{}return Ea(e.accessToken)}return null}return Ea(e)}async function Nj(e,t={}){const n=Math.max(1,Math.min(12,Math.floor(Number(t.maxAttempts)||8))),a=Math.max(20,Math.floor(Number(t.baseDelayMs)||50));for(let s=0;s<n;s++){const o=await PR(e);if(o)return o;s<n-1&&await new Promise(u=>setTimeout(u,a*(s+1)))}return null}function Oj(e){return typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1")||typeof e=="function"||e&&typeof e=="object"&&typeof e.getAccessToken=="function"?!0:!!Ea(e)}function Ij(){if(typeof Intl>"u"||!Intl.DateTimeFormat)return null;try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}}function jj(e=new Date){const t=e instanceof Date?e:new Date(e);if(!Number.isFinite(t.getTime()))return 0;const n=t.getTimezoneOffset();return Number.isFinite(n)?-n:0}function G_(e){if(!Number.isFinite(e)||e===0)return"UTC";const t=e>=0?"+":"-",n=Math.abs(e),a=String(Math.floor(n/60)).padStart(2,"0"),s=String(n%60).padStart(2,"0");return`UTC${t}${a}:${s}`}function Uj({timeZone:e,offsetMinutes:t}={}){const n=G_(t);return e&&e!=="UTC"?`${e} (${n})`:n}function Bj({timeZone:e,offsetMinutes:t}={}){return Number.isFinite(t)?G_(t):e||"UTC"}function Fj({timeZone:e,offsetMinutes:t,date:n=new Date}={}){const a=n instanceof Date?n:new Date(n);if(!Number.isFinite(a.getTime()))return"";if(e&&typeof Intl<"u"&&Intl.DateTimeFormat)try{const u=new Intl.DateTimeFormat("en-CA",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(a).reduce((m,y)=>(y.type&&y.value&&(m[y.type]=y.value),m),{}),c=u.year,h=u.month,f=u.day;if(c&&h&&f)return`${c}-${h}-${f}`}catch{}if(typeof t=="number"&&Number.isFinite(t)){const s=new Date(a.getTime()+t*6e4);return CR(s)}return ER(a)}function TR({timeZone:e,offsetMinutes:t,date:n=new Date}={}){const a=n instanceof Date?n:new Date(n);if(!Number.isFinite(a.getTime()))return null;if(e&&typeof Intl<"u"&&Intl.DateTimeFormat)try{const u=new Intl.DateTimeFormat("en-CA",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(a).reduce((m,y)=>(y.type&&y.value&&(m[y.type]=y.value),m),{}),c=Number(u.year),h=Number(u.month),f=Number(u.day);if(Number.isFinite(c)&&Number.isFinite(h)&&Number.isFinite(f))return{year:c,month:h,day:f}}catch{}if(typeof t=="number"&&Number.isFinite(t)){const s=new Date(a.getTime()+t*6e4);return{year:s.getUTCFullYear(),month:s.getUTCMonth()+1,day:s.getUTCDate()}}return{year:a.getFullYear(),month:a.getMonth()+1,day:a.getDate()}}function Vj({timeZone:e,offsetMinutes:t}={}){return e?`tz:${e}`:typeof t=="number"&&Number.isFinite(t)?`offset:${Math.trunc(t)}`:"utc"}function CR(e){const t=e.getUTCFullYear(),n=String(e.getUTCMonth()+1).padStart(2,"0"),a=String(e.getUTCDate()).padStart(2,"0");return`${t}-${n}-${a}`}function ER(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${a}`}function yt(e){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())).toISOString().slice(0,10)}function Sr(e){const t=e instanceof Date?e:new Date(e);if(!Number.isFinite(t.getTime()))return"";const n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return`${n}-${a}-${s}`}function AR(e){if(!e)return null;const t=String(e).trim(),n=t.split("-");if(n.length!==3)return null;const a=Number(n[0]),s=Number(n[1])-1,o=Number(n[2]);if(!Number.isFinite(a)||!Number.isFinite(s)||!Number.isFinite(o))return null;const u=new Date(Date.UTC(a,s,o));return Number.isFinite(u.getTime())&&yt(u)===t?u:null}function RR(e){if(!e)return"";const t=e.year,n=String(e.month).padStart(2,"0"),a=String(e.day).padStart(2,"0");return!t||!n||!a?"":`${t}-${n}-${a}`}function LR(e,{timeZone:t,offsetMinutes:n,now:a}={}){const s=a instanceof Date&&Number.isFinite(a.getTime())?a:new Date,o=TR({timeZone:t,offsetMinutes:n,date:s});if(!o){const h=Sr(new Date);return{from:h,to:h}}const u=RR(o),c=AR(u);if(!c)return{from:u,to:u};if(e==="day")return{from:u,to:u};if(e==="week"){const h=new Date(c),m=(h.getUTCDay()+6)%7;h.setUTCDate(h.getUTCDate()-m);const y=new Date(h);return y.setUTCDate(y.getUTCDate()+6),{from:yt(h),to:yt(y)}}if(e==="month"){const h=new Date(Date.UTC(c.getUTCFullYear(),c.getUTCMonth(),1)),f=new Date(Date.UTC(c.getUTCFullYear(),c.getUTCMonth()+1,0));return{from:yt(h),to:yt(f)}}if(e==="total"){const h=new Date(Date.UTC(c.getUTCFullYear(),c.getUTCMonth()-23,1));return{from:yt(h),to:u}}return LR("week")}function zj(e){if(e==null)return"-";try{if(typeof e=="bigint")return new Intl.NumberFormat().format(e);if(typeof e=="number")return new Intl.NumberFormat().format(e);const t=String(e).trim();return/^[0-9]+$/.test(t)?new Intl.NumberFormat().format(BigInt(t)):t}catch{return String(e)}}function $j(e,{thousandSuffix:t="K",millionSuffix:n="M",billionSuffix:a="B",decimals:s=1}={}){const o=Number(String(e));if(!Number.isFinite(o))return"-";const u=o<0?"-":"",c=Math.abs(o),h=Math.max(0,Math.min(6,Math.floor(s)));if(c<1e3)return`${u}${String(c)}`;const f=(w,S)=>{const T=w.toFixed(h),P=Number(T).toString();return`${u}${P}${S}`},m=(w,S,T)=>{const P=w.toFixed(h),L=Number(P);return T&&L>=1e3?f(L/1e3,T):`${u}${L.toString()}${S}`};if(c>=1e9)return f(c/1e9,a);if(c>=1e6)return m(c/1e6,n,a);const y=c/1e3,b=Number(y.toFixed(h));return b>=1e3?f(b/1e3,n):f(b,t)}function Y_(e){const t=Number(String(e));return Number.isFinite(t)?t:null}function Hj(e,{decimals:t=2}={}){if(e==null)return"-";const n=String(e).trim();if(!n)return"-";const a=n.match(/^(-?\d+)(?:\.(\d+))?$/);if(!a)return n;const s=a[1],o=a[2]||"";let u=s;try{u=new Intl.NumberFormat().format(BigInt(s))}catch{u=s}const c=Math.max(0,Math.min(6,Math.floor(t))),h=c?o.slice(0,c).padEnd(c,"0"):"",f=s.startsWith("-")?"-":"",m=c?`${u.replace("-","")}.${h}`:u.replace("-","");return`${f}$${m}`}function Yu(e){if(typeof e!="string")return null;const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(!t)return null;const n=Number(t[1]),a=Number(t[2])-1,s=Number(t[3]),o=new Date(Date.UTC(n,a,s));return Number.isFinite(o.getTime())&&yt(o)===e.trim()?o:null}function ni(e,t){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()+t))}function DR(e,t){const n=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())-Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.floor(n/864e5)}function Ph(e,t){if(!Array.isArray(e)||e.length===0)return 0;const n=e.length,a=(n-1)*t,s=Math.floor(a),o=a-s,u=e[s]??e[n-1],c=e[Math.min(n-1,s+1)]??e[n-1];return Math.round(u+(c-u)*o)}function MR(e){return e<=0?0:e>=4?4:e}function Z_({weeks:e=52,now:t,weekStartsOn:n="sun"}={}){const a=t instanceof Date&&Number.isFinite(t.getTime())?t:new Date,s=Sr(a),o=Yu(s)||new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())),u=n==="mon"?1:0,c=o.getUTCDay(),h=ni(o,-((c-u+7)%7)),f=ni(h,-7*(Math.max(1,e)-1));return{from:yt(f),to:s}}function NR({dailyRows:e,weeks:t=52,to:n,weekStartsOn:a="sun"}={}){const s=Yu(n)||new Date(Date.UTC(new Date().getFullYear(),new Date().getMonth(),new Date().getDate())),{from:o}=Z_({weeks:t,now:s,weekStartsOn:a}),u=Yu(o)||ni(s,-(t*7-1)),c=(()=>{const j=(u.getUTCDay()-(a==="mon"?1:0)+7)%7;return ni(u,-j)})(),h=new Map;for(const D of Array.isArray(e)?e:[]){const M=typeof D?.day=="string"?D.day:null;if(!M)continue;const j=Y_(D?.billable_total_tokens??D?.total_tokens)??0;h.set(M,{value:Math.max(0,j),models:D?.models||null})}const f=DR(c,s)+1,m=Math.ceil(f/7),y=[];for(let D=0;D<f;D++){const M=ni(c,D),j=yt(M),q=h.get(j),K=q?q.value:0;K>0&&y.push(K)}y.sort((D,M)=>D-M);const b=Ph(y,.5),w=Ph(y,.75),S=Ph(y,.9);function T(D){return!D||D<=0?0:D<=b?1:D<=w?2:D<=S?3:4}const P=[];for(let D=0;D<m;D++){const M=[];for(let j=0;j<7;j++){const q=D*7+j,K=ni(c,q);if(K.getTime()>s.getTime()){M.push(null);continue}const H=yt(K),x=h.get(H),Z=x?x.value:0,Q=x?x.models:null;M.push({day:H,value:Z,level:MR(T(Z)),models:Q})}P.push(M)}const L=P.length>t?P.slice(P.length-t):P;return{from:o,to:yt(s),weeks:L,thresholds:{t1:b,t2:w,t3:S}}}function OR({dailyRows:e,to:t}={}){const n=Yu(t)||new Date(Date.UTC(new Date().getFullYear(),new Date().getMonth(),new Date().getDate())),a=new Map;for(const o of Array.isArray(e)?e:[]){const u=typeof o?.day=="string"?o.day:null;if(!u)continue;const c=Y_(o?.billable_total_tokens??o?.total_tokens)??0;a.set(u,Math.max(0,c))}let s=0;for(let o=0;o<370;o++){const u=yt(ni(n,-o));if((a.get(u)??0)>0){s+=1;continue}break}return s}const kc={},Q_="tokentracker",IR=["tokentracker/tokentracker","spacedriveapp/spacedrive","acme/alpha","acme/beta","neo/nebula","signal/flux","matrix/terminal","orbit/atlas","lumen/core","delta/horizon"],Ov=["NEO","TRINITY","MORPHEUS","ORACLE","CYPHER","SWITCH","APOC","TANK","SMITH","SERAPH","NIOBE","MOUSE","DOZER","LINK","BLADE"];function Pn(){if(typeof window<"u"){const e=new URLSearchParams(window.location.search),t=String(e.get("mock")||"").toLowerCase();if(t==="0"||t==="false"||t==="off"||t==="no")return!1;if(t==="1"||t==="true"||t==="on"||t==="yes")return!0}if(typeof import.meta<"u"&&kc){const e="".toLowerCase();if(e==="1"||e==="true")return!0}return!1}function jR(){if(typeof import.meta<"u"&&kc){const e="".trim();if(e)return e;const t="".trim();if(t)return t}if(typeof window<"u"){const e=new URLSearchParams(window.location.search),t=String(e.get("mock_now")||"").trim();if(t)return t;const n=String(e.get("mock_today")||"").trim();if(n)return n}return""}function UR(e){if(!e)return null;const t=String(e).trim();if(!t)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(t)){const[a,s,o]=t.split("-").map(Number);if(!Number.isFinite(a)||!Number.isFinite(s)||!Number.isFinite(o))return null;const u=new Date(a,s-1,o,12,0,0);return Number.isFinite(u.getTime())?u:null}const n=new Date(t);return Number.isFinite(n.getTime())?n:null}function Wj(){return Pn()?UR(jR()):null}function BR(){if(typeof import.meta<"u"&&kc){const e="".trim();if(e)return e}if(typeof window<"u"){const e=new URLSearchParams(window.location.search),t=String(e.get("mock_seed")||"").trim();if(t)return t}return Q_}function FR(){if(typeof import.meta<"u"&&kc){const e="".trim(),t=Number(e);if(Number.isFinite(t)&&t>0)return Math.floor(t)}if(typeof window<"u"){const e=new URLSearchParams(window.location.search),t=String(e.get("mock_missing")||"").trim(),n=Number(t);if(Number.isFinite(n)&&n>0)return Math.floor(n)}return 0}function Vo(e){return(e==null?BR():String(e)).trim()||Q_}function zo(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function un(e){if(typeof e!="string")return null;const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(!t)return null;const n=Number(t[1]),a=Number(t[2])-1,s=Number(t[3]),o=new Date(Date.UTC(n,a,s));return Number.isFinite(o.getTime())&&yt(o)===e.trim()?o:null}function Lo(e,t){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()+t))}function X_(e,t){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1))}function VR(e){return`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}`}function fs({from:e,to:t,seed:n}){const a=un(Sr(new Date))||new Date,s=un(e)||a,o=un(t)||s,u=[],c=Vo(n),h=Math.floor((Date.UTC(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate())-Date.UTC(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()))/864e5)+1;for(let f=0;f<h;f+=1){const m=Lo(s,f),y=yt(m),b=zo(`${c}:${y}`),w=b%1e3/1e3,S=.6+.4*Math.sin(f/6*Math.PI*.5),T=m.getUTCDay()===0||m.getUTCDay()===6?.65:1,P=18e3+Math.round(12e3*w),L=Math.max(0,Math.round(P*S*T)),D=Math.round(L*.46),M=Math.round(L*.34),j=Math.round(L*.14),q=Math.max(0,L-D-M-j),K={};if(L>0){const H=["gpt-4o","claude-3.5-sonnet","gemini-1.5-pro","deepseek-coder"],x=1+b%3;let Z=L;for(let Q=0;Q<x;Q++){const me=H[(b+Q)%H.length];if(Q===x-1)K[me]=Z;else{const oe=Math.round(Z*(.3+.4*((b+Q*17)%10)/10));K[me]=oe,Z-=oe}}}u.push({day:y,total_tokens:L,billable_total_tokens:L,input_tokens:D,output_tokens:M,cached_input_tokens:j,reasoning_output_tokens:q,conversation_count:1+b%5,models:K})}return u}function zR({day:e,seed:t}){const n=un(e)||un(Sr(new Date))||new Date,a=yt(n),s=Vo(t),o=Array.from({length:48},(c,h)=>{const f=Math.floor(h/2),m=h%2===0?0:30,b=zo(`${s}:${a}:${f}:${m}`)%1e3/1e3,w=(f+m/60)/24,S=.4+.6*Math.sin(w*Math.PI*2),T=900+Math.round(700*b),P=Math.max(0,Math.round(T*S)),L=Math.round(P*.46),D=Math.round(P*.34),M=Math.round(P*.14),j=Math.max(0,P-L-D-M);return{hour:`${a}T${String(f).padStart(2,"0")}:${String(m).padStart(2,"0")}:00`,total_tokens:P,billable_total_tokens:P,input_tokens:L,output_tokens:D,cached_input_tokens:M,reasoning_output_tokens:j}}),u=Math.max(0,Math.min(48,FR()));if(u>0){const c=Date.now(),h=o.map((y,b)=>{const w=Date.parse(y.hour);return Number.isFinite(w)&&w<=c?{index:b,ts:w}:null}).filter(Boolean),f=Math.max(0,h.length-u),m=h.slice(f);for(const y of m){const b=o[y.index];b&&(o[y.index]={...b,missing:!0})}}return o}function $R({months:e=24,to:t,seed:n}){const a=un(t)||un(Sr(new Date))||new Date,s=new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),1)),o=Vo(n),u=[];for(let c=e-1;c>=0;c-=1){const h=X_(s,-c),f=VR(h),y=zo(`${o}:${f}`)%1e3/1e3,b=.7+.3*Math.sin(u.length/6*Math.PI*.5),w=36e4+Math.round(2e5*y),S=Math.max(0,Math.round(w*b)),T=Math.round(S*.46),P=Math.round(S*.34),L=Math.round(S*.14),D=Math.max(0,S-T-P-L);u.push({month:f,total_tokens:S,billable_total_tokens:S,input_tokens:T,output_tokens:P,cached_input_tokens:L,reasoning_output_tokens:D})}return u}function bp(e){return e.reduce((t,n)=>(t.total_tokens+=Number(n.total_tokens||0),t.billable_total_tokens+=Number(n.billable_total_tokens||n.total_tokens||0),t.input_tokens+=Number(n.input_tokens||0),t.output_tokens+=Number(n.output_tokens||0),t.cached_input_tokens+=Number(n.cached_input_tokens||0),t.reasoning_output_tokens+=Number(n.reasoning_output_tokens||0),t.conversation_count+=Number(n.conversation_count||0),t),{total_tokens:0,billable_total_tokens:0,input_tokens:0,output_tokens:0,cached_input_tokens:0,reasoning_output_tokens:0,conversation_count:0})}function HR(e,t=1.75){const n=Number(e||0);return!Number.isFinite(n)||n<=0?"0.000000":(n*t/1e6).toFixed(6)}function Iv(e,t){const n=Number.isFinite(t)?t:0;return{total_tokens:Math.max(0,Math.round(e.total_tokens*n)),billable_total_tokens:Math.max(0,Math.round((e.billable_total_tokens??e.total_tokens)*n)),input_tokens:Math.max(0,Math.round(e.input_tokens*n)),output_tokens:Math.max(0,Math.round(e.output_tokens*n)),cached_input_tokens:Math.max(0,Math.round(e.cached_input_tokens*n)),reasoning_output_tokens:Math.max(0,Math.round(e.reasoning_output_tokens*n))}}function pf(e){return{...e,total_cost_usd:HR(e.total_tokens)}}function WR({from:e,to:t,seed:n}={}){const a=fs({from:e,to:t,seed:n});return{from:e,to:t,data:a}}function KR({day:e,seed:t}={}){const n=un(e)||new Date,a=yt(n),s=zR({day:a,seed:t});return{day:a,data:s}}function qR({months:e=24,to:t,seed:n}={}){const a=un(t)||un(Sr(new Date))||new Date,s=yt(a),o=$R({months:e,to:s,seed:n}),u=X_(new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),1)),-(e-1));return{from:yt(u),to:s,months:e,data:o}}function GR({from:e,to:t,seed:n,rolling:a=!0}={}){const s=fs({from:e,to:t,seed:n}),o=bp(s),u=pf(o),c=a?YR({to:t,seed:n}):null;return{from:e,to:t,days:s.length,totals:u,...c?{rolling:c}:{}}}function YR({to:e,seed:t}={}){const n=un(e)||un(Sr(new Date))||new Date,a=yt(n),s=yt(Lo(n,-6)),o=yt(Lo(n,-29)),u=fs({from:s,to:a,seed:t}),c=fs({from:o,to:a,seed:t});return{last_7d:jv({rows:u,from:s,to:a}),last_30d:jv({rows:c,from:o,to:a})}}function jv({rows:e,from:t,to:n}={}){const a=bp(e||[]),s=(e||[]).filter(u=>Number(u.billable_total_tokens??u.total_tokens)>0).length,o=s>0?Math.floor(a.billable_total_tokens/s):0;return{from:t,to:n,totals:{billable_total_tokens:a.billable_total_tokens,conversation_count:a.conversation_count},active_days:s,avg_per_active_day:o}}function ZR({seed:e,limit:t=3}={}){const n=Vo(e),a=IR.map((s,o)=>{const c=12e4+zo(`${n}:${s}`)%9e5,h=o%4*4200,f=Math.max(0,c+h),m=Math.max(0,Math.round(f*.96));return{project_key:s,project_ref:`https://github.com/${s}`,total_tokens:String(f),billable_total_tokens:String(m)}}).sort((s,o)=>Number(o.billable_total_tokens)-Number(s.billable_total_tokens)).slice(0,Math.max(1,Math.min(10,Math.floor(Number(t)||3))));return{generated_at:new Date().toISOString(),entries:a}}function QR(e){const t=un(Sr(new Date))||new Date,n=String(e).trim().toLowerCase()||"week";if(n==="total")return{from:"1970-01-01",to:"9999-12-31"};if(n==="month"){const u=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),1)),c=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()+1,0));return{from:yt(u),to:yt(c)}}const a=t.getUTCDay(),s=yt(Lo(t,-a)),o=yt(Lo(t,-a+6));return{from:s,to:o}}function J_({seed:e,period:t,metric:n,limit:a=20,offset:s=0}={}){const o=Vo(e),u=Math.max(1,Math.min(100,Math.floor(Number(a)||20))),c=Math.max(0,Math.min(1e4,Math.floor(Number(s)||0))),h=String(n||"all").trim().toLowerCase()||"all",f=String(t||"week").trim().toLowerCase()||"week",m=f==="month"||f==="total"||f==="week"?f:"week",{from:y,to:b}=QR(m),w=250,S=w>0?Math.ceil(w/u):0,T=Math.floor(c/u)+1,P=Array.from({length:w},(H,x)=>{const Z=x+1,Q=`00000000-0000-0000-0000-${String(Z).padStart(12,"0")}`,me=Ov[Z%Ov.length],Ae=18e4+zo(`${o}:${me}:${Z}`)%9e5,fe=Math.max(0,Ae+Z*1200),ce=Math.floor(fe*.28),le=Math.floor(fe*.18),Me=Math.floor(fe*.1),W=Math.floor(fe*.1),Y=Math.floor(fe*.08),$=Math.floor(fe*.03),N=Math.floor(fe*.02),G=Math.floor(fe*.04),xe=Math.floor(fe*.03),Re=Math.max(0,fe-ce-le-Me-W-Y-$-N-G-xe),Se=Z%7!==0;return{id:Z,user_id:Q,is_public:Se,is_me:!1,display_name:Se?me:"Anonymous",avatar_url:null,gpt_tokens:ce,claude_tokens:le,gemini_tokens:Me,cursor_tokens:W,opencode_tokens:Y,openclaw_tokens:Re,hermes_tokens:$,kiro_tokens:N,copilot_tokens:G,kimi_tokens:xe,other_tokens:0,total_tokens:fe}}),L=Math.max(0,Math.min(w-1,Math.floor(w*.8)));P[L]&&(P[L].is_me=!0);const D=h==="gpt"||h==="codex"?"gpt_tokens":h==="claude"?"claude_tokens":h==="gemini"?"gemini_tokens":h==="cursor"?"cursor_tokens":h==="opencode"?"opencode_tokens":h==="openclaw"?"openclaw_tokens":h==="hermes"?"hermes_tokens":h==="kiro"?"kiro_tokens":h==="copilot"?"copilot_tokens":h==="kimi"?"kimi_tokens":"total_tokens",M=P.slice().sort((H,x)=>Number(x[D])-Number(H[D])||H.id-x.id).map((H,x)=>({user_id:H.is_public?H.user_id:null,rank:x+1,is_me:!!H.is_me,display_name:H.display_name,avatar_url:H.avatar_url,gpt_tokens:String(H.gpt_tokens),claude_tokens:String(H.claude_tokens),gemini_tokens:String(H.gemini_tokens),cursor_tokens:String(H.cursor_tokens),opencode_tokens:String(H.opencode_tokens),openclaw_tokens:String(H.openclaw_tokens),hermes_tokens:String(H.hermes_tokens??0),kiro_tokens:String(H.kiro_tokens??0),copilot_tokens:String(H.copilot_tokens??0),kimi_tokens:String(H.kimi_tokens??0),other_tokens:String(H.other_tokens??0),total_tokens:String(H.total_tokens),is_public:!!H.is_public})),j=M.find(H=>H?.is_me)||null,q=j?{rank:j.rank,gpt_tokens:j.gpt_tokens,claude_tokens:j.claude_tokens,gemini_tokens:j.gemini_tokens,cursor_tokens:j.cursor_tokens,opencode_tokens:j.opencode_tokens,openclaw_tokens:j.openclaw_tokens,hermes_tokens:j.hermes_tokens,kiro_tokens:j.kiro_tokens,copilot_tokens:j.copilot_tokens,kimi_tokens:j.kimi_tokens,other_tokens:j.other_tokens,total_tokens:j.total_tokens}:{rank:null,gpt_tokens:"0",claude_tokens:"0",gemini_tokens:"0",cursor_tokens:"0",opencode_tokens:"0",openclaw_tokens:"0",hermes_tokens:"0",kiro_tokens:"0",copilot_tokens:"0",kimi_tokens:"0",other_tokens:"0",total_tokens:"0"},K=M.slice(c,c+u);return{period:m,metric:h,from:y,to:b,generated_at:new Date().toISOString(),page:T,limit:u,offset:c,total_entries:w,total_pages:S,entries:K,me:q}}function XR({weeks:e=52,to:t,weekStartsOn:n="sun",seed:a}={}){const s=Z_({weeks:e,now:un(t)||un(Sr(new Date))||new Date,weekStartsOn:n}),o=fs({from:s.from,to:s.to,seed:a});return{...NR({dailyRows:o,weeks:e,to:s.to,weekStartsOn:n}),week_starts_on:n,active_days:o.filter(c=>Number(c.billable_total_tokens??c.total_tokens)>0).length,streak_days:OR({dailyRows:o,to:s.to})}}function JR({from:e,to:t,seed:n}={}){const a=fs({from:e,to:t,seed:n}),s=bp(a),u=[{source:"codex",weight:.7,models:[{model:"gpt-5.2-codex",model_id:"gpt-5.2-codex",weight:.2},{model:"unknown",model_id:"unknown",weight:.8}]},{source:"claude",weight:.2,models:[{model:"claude-3.5",model_id:"claude-3.5",weight:.3},{model:"unknown",model_id:"unknown",weight:.7}]},{source:"every-code",weight:.1,models:[{model:"unknown",model_id:"unknown",weight:1}]}].map(c=>{const h=Iv(s,c.weight),f=c.models.map(m=>{const y=Iv(h,m.weight);return{model:m.model,model_id:m.model_id||m.model,totals:pf(y)}});return{source:c.source,totals:pf(h),models:f}});return{from:e,to:t,days:a.length,sources:u,pricing:{model:"mock",pricing_mode:"add",source:"mock",effective_from:Sr(new Date),rates_per_million_usd:{input:"1.750000",cached_input:"0.175000",output:"14.000000",reasoning_output:"14.000000"}}}}function eL({from:e,to:t,source:n="claude"}={}){if(n==="codex")return{from:e,to:t,source:"codex",scope:"supported",totals:{input_tokens:142e4,cached_input_tokens:588e4,cache_creation_input_tokens:92e4,output_tokens:256e4,reasoning_output_tokens:61e4,total_tokens:1078e4},session_count:188,message_count:5436,tool_calls_breakdown:{categories:[{name:"Execution",calls:742,totals:{input_tokens:32e4,cached_input_tokens:104e4,cache_creation_input_tokens:11e4,output_tokens:46e4,reasoning_output_tokens:12e4,total_tokens:193e4},tools:[{name:"exec_command",calls:510,totals:{input_tokens:25e4,cached_input_tokens:82e4,cache_creation_input_tokens:8e4,output_tokens:37e4,reasoning_output_tokens:9e4,total_tokens:152e4}},{name:"write_stdin",calls:232,totals:{input_tokens:7e4,cached_input_tokens:22e4,cache_creation_input_tokens:3e4,output_tokens:9e4,reasoning_output_tokens:3e4,total_tokens:41e4}}]},{name:"Browser",calls:406,totals:{input_tokens:21e4,cached_input_tokens:88e4,cache_creation_input_tokens:9e4,output_tokens:42e4,reasoning_output_tokens:1e5,total_tokens:17e5},tools:[{name:"take_snapshot",calls:180,totals:{input_tokens:1e5,cached_input_tokens:4e5,cache_creation_input_tokens:4e4,output_tokens:18e4,reasoning_output_tokens:4e4,total_tokens:76e4}},{name:"click",calls:126,totals:{input_tokens:6e4,cached_input_tokens:25e4,cache_creation_input_tokens:3e4,output_tokens:12e4,reasoning_output_tokens:35e3,total_tokens:495e3}},{name:"evaluate_script",calls:100,totals:{input_tokens:5e4,cached_input_tokens:23e4,cache_creation_input_tokens:2e4,output_tokens:12e4,reasoning_output_tokens:25e3,total_tokens:445e3}}]}],tools_total:363e4,privacy:{includes_inputs:!1,note:"Aggregated tool names only; no tool arguments or outputs are included."}},exec_command_breakdown:{by_type:[{name:"test",calls:168,failures:14,duration_ms:482e3,max_duration_ms:18400,output_chars:45e4,output_lines:8600,totals:{input_tokens:9e4,cached_input_tokens:32e4,output_tokens:16e4,reasoning_output_tokens:42e3,total_tokens:612e3}},{name:"build",calls:116,failures:9,duration_ms:392e3,max_duration_ms:22100,output_chars:31e4,output_lines:5200,totals:{input_tokens:7e4,cached_input_tokens:24e4,output_tokens:13e4,reasoning_output_tokens:3e4,total_tokens:47e4}}],by_exit:[{name:"completed:0",calls:438,failures:0,duration_ms:104e4,max_duration_ms:22100,output_chars:83e4,output_lines:13100,totals:{input_tokens:22e4,cached_input_tokens:78e4,output_tokens:35e4,reasoning_output_tokens:82e3,total_tokens:1432e3}},{name:"completed:1",calls:72,failures:72,duration_ms:155e3,max_duration_ms:11800,output_chars:12e4,output_lines:2300,totals:{input_tokens:3e4,cached_input_tokens:11e4,output_tokens:55e3,reasoning_output_tokens:8e3,total_tokens:195e3}}]}};if(n!=="claude")return{from:e,to:t,source:n,scope:"unsupported",totals:{input_tokens:0,cached_input_tokens:0,cache_creation_input_tokens:0,output_tokens:0,reasoning_output_tokens:0,total_tokens:0},categories:["system_prefix","conversation_history","user_input","tool_calls","subagents","reasoning","assistant_response"].map(u=>({key:u,totals:{input_tokens:0,cached_input_tokens:0,cache_creation_input_tokens:0,output_tokens:0,reasoning_output_tokens:0,total_tokens:0},percent:0})),session_count:0,message_count:0};const a=[{key:"system_prefix",total:12896539},{key:"conversation_history",total:320207200},{key:"user_input",total:998025},{key:"tool_calls",total:4808739},{key:"subagents",total:1022828},{key:"reasoning",total:11073118},{key:"assistant_response",total:1289174}],s=a.reduce((u,c)=>u+c.total,0),o=a.map(({key:u,total:c})=>({key:u,totals:{input_tokens:u==="user_input"?c:0,cached_input_tokens:u==="conversation_history"?Math.round(c*.95):0,cache_creation_input_tokens:u==="system_prefix"?c:u==="conversation_history"?Math.round(c*.05):0,output_tokens:["tool_calls","subagents","reasoning","assistant_response"].includes(u)?c:0,reasoning_output_tokens:u==="reasoning"?c:0,total_tokens:c},percent:Number((c/s*100).toFixed(2))}));return{from:e,to:t,source:"claude",scope:"supported",totals:{input_tokens:998025,cached_input_tokens:Math.round(320207200*.95),cache_creation_input_tokens:12896539+Math.round(320207200*.05),output_tokens:18193859,reasoning_output_tokens:11073118,total_tokens:s},categories:o,session_count:312,message_count:12046}}let Eu=null;function tL(){Eu=null}async function nL(e=fetch){if(Eu)return Eu;const t=await e("/api/local-auth",{method:"GET",headers:{Accept:"application/json"},cache:"no-store"});if(!t.ok)throw new Error(`Local auth request failed with HTTP ${t.status}`);const n=await t.json().catch(()=>null),a=typeof n?.token=="string"?n.token.trim():"";if(!a)throw new Error("Local auth token missing from response");return Eu=a,a}async function _p(e=fetch){return{"x-tokentracker-local-auth":await nL(e)}}const sr={usageSummary:"tokentracker-usage-summary",usageDaily:"tokentracker-usage-daily",usageHourly:"tokentracker-usage-hourly",usageMonthly:"tokentracker-usage-monthly",usageHeatmap:"tokentracker-usage-heatmap",usageModelBreakdown:"tokentracker-usage-model-breakdown",usageCategoryBreakdown:"tokentracker-usage-category-breakdown",projectUsageSummary:"tokentracker-project-usage-summary",userStatus:"tokentracker-user-status",localSync:"tokentracker-local-sync",usageLimits:"tokentracker-usage-limits"};async function Pr(e,t,n){const a=new URL(`/functions/${e}`,window.location.origin);if(t)for(const[o,u]of Object.entries(t))u!=null&&u!==""&&a.searchParams.set(o,String(u));const s=await fetch(a.toString(),{headers:{Accept:"application/json"},cache:"no-store",...n});if(!s.ok){const o=new Error(`Request failed with HTTP ${s.status}`);throw o.status=s.status,o}return s.json()}function Oa({timeZone:e,tzOffsetMinutes:t}={}){const n={},a=typeof e=="string"?e.trim():"";return a&&(n.tz=a),Number.isFinite(t)&&(n.tz_offset_minutes=String(Math.trunc(t))),n}function mi({source:e,model:t}={}){const n={},a=typeof e=="string"?e.trim().toLowerCase():"";a&&(n.source=a);const s=typeof t=="string"?t.trim():"";return s&&(n.model=s),n}async function Kj({from:e,to:t,source:n,model:a,timeZone:s,tzOffsetMinutes:o,rolling:u=!1,accessToken:c}={}){if(Pn())return GR({from:e,to:t,seed:c,rolling:u});const h=Oa({timeZone:s,tzOffsetMinutes:o}),f=mi({source:n,model:a}),m=u?{rolling:"1"}:{};return Pr(sr.usageSummary,{from:e,to:t,...f,...h,...m})}async function qj({from:e,to:t,source:n,limit:a,timeZone:s,tzOffsetMinutes:o,accessToken:u}={}){if(Pn())return ZR({seed:u,limit:a});const c=Oa({timeZone:s,tzOffsetMinutes:o}),f={...mi({source:n}),...c};return e&&(f.from=e),t&&(f.to=t),a!=null&&(f.limit=String(a)),Pr(sr.projectUsageSummary,f)}async function $o(e,t={}){const n=fi();if(!n)throw new Error("InsForge base URL not configured");const a=n.replace(/\/$/,""),s=new URL(`${a}/functions/${e}`);if(t.params)for(const[h,f]of Object.entries(t.params))f!=null&&f!==""&&s.searchParams.set(h,String(f));const o={Accept:"application/json","Content-Type":"application/json"},u=_c();u&&(o.apikey=u),t.accessToken&&xR(t.accessToken)&&(o.Authorization=`Bearer ${t.accessToken}`);const c=await fetch(s.toString(),{method:t.method||"GET",headers:o,...t.body!=null?{body:JSON.stringify(t.body)}:{}});if(!c.ok){const h=new Error(`Request failed with HTTP ${c.status}`);throw h.status=c.status,h}return c.json()}async function Gj({accessToken:e,userId:t,period:n,metric:a,limit:s,offset:o}={}){return Pn()?J_({seed:e||t,period:n,metric:a,limit:s,offset:o}):$o("tokentracker-leaderboard",{params:{period:n,limit:s,offset:o,user_id:t}})}async function Uv({accessToken:e}={}){return $o("tokentracker-public-visibility",{accessToken:e,method:"GET"})}async function Yj({accessToken:e,enabled:t,anonymous:n,display_name:a,github_url:s,show_github_url:o}={}){const u={};return t!==void 0&&(u.enabled=!!t),n!==void 0&&(u.anonymous=!!n),a!==void 0&&(u.display_name=String(a)),s!==void 0&&(u.github_url=s===null?null:String(s)),o!==void 0&&(u.show_github_url=!!o),$o("tokentracker-public-visibility",{accessToken:e,method:"POST",body:u})}async function Zj({accessToken:e,period:t,source:n}={}){const a={};return t&&(a.period=t),typeof n=="string"&&n.trim()&&(a.source=n.trim()),$o("tokentracker-leaderboard-refresh",{accessToken:e,method:"POST",body:a})}async function Qj({accessToken:e,userId:t,period:n}={}){if(Pn()){const a=J_({seed:e,period:n,metric:"all",limit:250,offset:0}),o=(Array.isArray(a?.entries)?a.entries:[]).find(u=>u?.user_id===t)||null;return{period:a?.period??"week",from:a?.from??null,to:a?.to??null,generated_at:a?.generated_at??new Date().toISOString(),entry:o}}return $o("tokentracker-leaderboard-profile",{accessToken:e,params:{user_id:t,period:n}})}async function Xj(e={}){if(Pn()){const t=new Date().toISOString();return{user_id:"local-user",created_at:t,pro:{active:!1,sources:[],expires_at:null,partial:!1,as_of:t},subscriptions:{partial:!1,as_of:t,items:[]},install:{partial:!1,as_of:t,has_active_device_token:!1,has_active_device:!1,active_device_tokens:0,active_devices:0,latest_token_activity_at:null,latest_device_seen_at:null}}}return Pr(sr.userStatus)}async function Jj({signal:e}={}){const t=await _p(),n=await fetch(`/functions/${sr.localSync}`,{method:"POST",headers:{Accept:"application/json",...t},cache:"no-store",signal:e}),a=await n.json().catch(()=>({ok:!1,error:`Local sync request failed with HTTP ${n.status}`}));if(!n.ok||a?.ok===!1){const s=a?.error||a?.message||`Local sync request failed with HTTP ${n.status}`,o=new Error(s);throw o.status=n.status,o}return a}async function e4({from:e,to:t,source:n,timeZone:a,tzOffsetMinutes:s,accessToken:o}={}){if(Pn())return JR({from:e,to:t,seed:o});const u=Oa({timeZone:a,tzOffsetMinutes:s}),c=mi({source:n});return Pr(sr.usageModelBreakdown,{from:e,to:t,...c,...u})}async function t4({from:e,to:t,source:n="claude",timeZone:a,tzOffsetMinutes:s}={}){if(Pn())return eL({from:e,to:t,source:n});const o=Oa({timeZone:a,tzOffsetMinutes:s});return Pr(sr.usageCategoryBreakdown,{from:e,to:t,source:n,...o})}async function n4({from:e,to:t,source:n,model:a,timeZone:s,tzOffsetMinutes:o,accessToken:u}={}){if(Pn())return WR({from:e,to:t,seed:u});const c=Oa({timeZone:s,tzOffsetMinutes:o}),h=mi({source:n,model:a});return Pr(sr.usageDaily,{from:e,to:t,...h,...c})}async function r4({day:e,source:t,model:n,timeZone:a,tzOffsetMinutes:s,accessToken:o}={}){if(Pn())return KR({day:e,seed:o});const u=Oa({timeZone:a,tzOffsetMinutes:s}),c=mi({source:t,model:n}),h=e?{day:e,...c,...u}:{...c,...u};return Pr(sr.usageHourly,h)}async function a4({months:e,to:t,source:n,model:a,timeZone:s,tzOffsetMinutes:o,accessToken:u}={}){if(Pn())return qR({months:e,to:t,seed:u});const c=Oa({timeZone:s,tzOffsetMinutes:o}),h=mi({source:n,model:a});return Pr(sr.usageMonthly,{...e?{months:String(e)}:{},...t?{to:t}:{},...h,...c})}async function i4(e={}){const t=e?.refresh?{refresh:"1"}:void 0;return Pr(sr.usageLimits,t)}async function s4({weeks:e,to:t,weekStartsOn:n,source:a,model:s,timeZone:o,tzOffsetMinutes:u,accessToken:c}={}){if(Pn())return XR({weeks:e,to:t,weekStartsOn:n,seed:c});const h=Oa({timeZone:o,tzOffsetMinutes:u}),f=mi({source:a,model:s});return Pr(sr.usageHeatmap,{weeks:String(e),to:t,week_starts_on:n,...f,...h})}const ek=k.createContext(null);function rL(e){if(!e||typeof e!="object")return"";const t=e.user_metadata&&typeof e.user_metadata=="object"?e.user_metadata:{},n=e.profile&&typeof e.profile=="object"?e.profile:{},a=t.full_name||t.name||n.name||t.user_name||t.preferred_username;return typeof a=="string"&&a.trim()?a.trim():typeof e.email=="string"&&e.email.includes("@")?e.email.split("@")[0].trim()||e.email.trim():typeof e.email=="string"?e.email.trim():""}function Bv(e){if(!e||typeof e!="object")return null;const t=e,n=t.session&&typeof t.session=="object"?t.session:null,a=typeof t.accessToken=="string"&&t.accessToken||typeof t.access_token=="string"&&t.access_token||n&&typeof n.accessToken=="string"&&n.accessToken||n&&typeof n.access_token=="string"&&n.access_token||null;return a&&a.length>0?a:null}async function Th(e,t={}){if(!e)return null;const n=Math.max(0,Math.floor(Number(t.skewMs)||6e4)),a=e.tokenManager,s=()=>a?.getAccessToken?.()??a?.getSession?.()?.accessToken??null;let o=s();if(!o||SR(o,n)){const{data:u}=await e.auth.refreshSession();if(o=s()??Bv(u)??null,!o&&typeof e.auth.getCurrentUser=="function")try{await e.auth.getCurrentUser(),o=s()??Bv(u)??null}catch{}}return o||null}function aL({children:e}){const[t,n]=k.useState(null),[a,s]=k.useState(null),[o,u]=k.useState(!0);k.useEffect(()=>{if(!ff()){n(null),s(null),u(!1);return}n(gR())},[]),k.useEffect(()=>{if(!t)return;let K=!0;return u(!0),(async()=>{try{let{data:H,error:x}=await t.auth.getCurrentUser();if(!K)return;if(!x&&!H?.user){if(await new Promise(Q=>setTimeout(Q,150)),!K)return;const Z=await t.auth.getCurrentUser();H=Z.data,x=Z.error}if(x){s(null);return}s(H?.user??null)}catch{K&&s(null)}finally{K&&u(!1)}})(),()=>{K=!1}},[t]);const c=k.useCallback(async()=>{if(t)try{let{data:K,error:H}=await t.auth.getCurrentUser();if(!H&&!K?.user){await new Promise(Z=>setTimeout(Z,150));const x=await t.auth.getCurrentUser();K=x.data,H=x.error}if(H){s(null);return}s(K?.user??null)}catch{s(null)}},[t]),h=k.useCallback(async(K,H)=>{if(!t)return{error:new Error("InsForge client not configured")};const x=typeof window<"u"&&window.webkit?.messageHandlers?.nativeOAuth;if(x){const me=typeof H=="string"&&H.trim()?H.trim():`${window.location.origin}/auth/callback`,oe=await t.auth.signInWithOAuth({provider:K,redirectTo:me,skipBrowserRedirect:!0});if(oe.data?.url){try{const Ae=await _p();await fetch("/api/auth-bridge/verifier",{method:"PUT",headers:{"Content-Type":"application/json",...Ae},body:JSON.stringify({native:!0})})}catch{}x.postMessage(oe.data.url)}return oe}const Z=typeof H=="string"&&H.trim()?H.trim():typeof window<"u"?`${window.location.origin}/dashboard`:void 0;return await t.auth.signInWithOAuth({provider:K,redirectTo:Z})},[t]),f=k.useCallback(async K=>{if(!t)return{data:null,error:new Error("InsForge client not configured")};const{data:H,error:x}=await t.auth.signInWithPassword(K);return H?.user&&s(H.user),{data:H,error:x}},[t]),m=k.useCallback(async K=>{if(!t)return{data:null,error:new Error("InsForge client not configured")};const{data:H,error:x}=await t.auth.signUp(K);return H?.user&&H?.accessToken&&s(H.user),{data:H,error:x}},[t]),y=k.useCallback(async()=>t?t.auth.getPublicAuthConfig():{data:null,error:new Error("InsForge client not configured")},[t]),b=k.useCallback(async()=>{t&&(await t.auth.signOut(),K_(),tL(),s(null))},[t]),w=k.useCallback(async()=>Th(t),[t]),[S,T]=k.useState(null),[P,L]=k.useState(!1),D=k.useMemo(()=>rL(a),[a]);k.useEffect(()=>{if(!a||!t){T(null),L(!1);return}let K=!0;return(async()=>{try{const H=await Th(t);if(!K||!H){K&&L(!0);return}const x=await Uv({accessToken:H});K&&x?.display_name&&T(x.display_name)}catch{}K&&L(!0)})(),()=>{K=!1}},[a,t]);const M=P?S||D:"",j=k.useCallback(async()=>{if(t)try{const K=await Th(t);if(!K)return;const H=await Uv({accessToken:K});H?.display_name&&T(H.display_name)}catch{}},[t]),q=k.useMemo(()=>!ff()||!t?{enabled:!1,client:null,user:null,signedIn:!1,loading:!1,displayName:"",refreshUser:async()=>{},refreshDisplayName:async()=>{},signInWithOAuth:async()=>({error:new Error("InsForge not configured")}),signInWithPassword:async()=>({data:null,error:new Error("InsForge not configured")}),signUp:async()=>({data:null,error:new Error("InsForge not configured")}),getPublicAuthConfig:async()=>({data:null,error:new Error("InsForge not configured")}),signOut:async()=>{},getAccessToken:async()=>null}:{enabled:!0,client:t,user:a,signedIn:!!a,loading:o,displayName:M,refreshUser:c,refreshDisplayName:j,signInWithOAuth:h,signInWithPassword:f,signUp:m,getPublicAuthConfig:y,signOut:b,getAccessToken:w},[t,a,o,M,c,j,h,f,m,y,b,w]);return I.jsx(ek.Provider,{value:q,children:e})}function Ho(){return k.useContext(ek)}const iL=`key,module,page,component,slot,text,notes,status
|
|
43
|
-
header.auth.sign_in_aria,shared,*,InsforgeUserHeaderControls,sign_in_aria,"Sign in",,active
|
|
44
|
-
login.back_home,shared,LoginPage,LoginPage,back_home,"Back to home",,active
|
|
45
|
-
login.cloud_only,shared,LoginPage,LoginPage,cloud_only,"Cloud sign-in is not configured. Use the local dashboard on localhost.",,active
|
|
46
|
-
login.title,shared,LoginPage,LoginPage,title,"Sign in",,active
|
|
47
|
-
login.subtitle,shared,LoginPage,LoginPage,subtitle,"Choose email or a connected account.",,active
|
|
48
|
-
login.dismiss,shared,LoginPage,LoginPage,dismiss,"Dismiss",,active
|
|
49
|
-
login.verify_email_success,shared,LoginPage,LoginPage,verify_ok,"Email verified. You can sign in below.",,active
|
|
50
|
-
login.verify_email_pending,shared,LoginPage,LoginPage,verify_pending,"Check your email to verify your account, then sign in.",,active
|
|
51
|
-
login.oauth.continue,shared,LoginPage,LoginPage,oauth_continue,"Continue with {{provider}}",,active
|
|
52
|
-
login.divider,shared,LoginPage,LoginPage,divider,"Or",,active
|
|
53
|
-
login.tab.sign_in,shared,LoginPage,LoginPage,tab_sign_in,"Sign in",,active
|
|
54
|
-
login.tab.sign_up,shared,LoginPage,LoginPage,tab_sign_up,"Create account",,active
|
|
55
|
-
login.field.name,shared,LoginPage,LoginPage,field_name,"Display name",,active
|
|
56
|
-
login.field.name_placeholder,shared,LoginPage,LoginPage,name_placeholder,"Optional",,active
|
|
57
|
-
login.field.email,shared,LoginPage,LoginPage,field_email,"Email",,active
|
|
58
|
-
login.field.password,shared,LoginPage,LoginPage,field_password,"Password",,active
|
|
59
|
-
login.password_hint,shared,LoginPage,LoginPage,pw_hint,"At least {{min}} characters.",,active
|
|
60
|
-
login.submit.sign_in,shared,LoginPage,LoginPage,submit_sign_in,"Sign in with email",,active
|
|
61
|
-
login.submit.sign_up,shared,LoginPage,LoginPage,submit_sign_up,"Create account",,active
|
|
62
|
-
login_modal.subtitle,shared,*,LoginModal,subtitle,"Sign in to join the leaderboard",,active
|
|
63
|
-
login_modal.continue_email,shared,*,LoginModal,continue_email,"Continue with Email",,active
|
|
64
|
-
login_modal.divider_email,shared,*,LoginModal,divider_email,"email",,active
|
|
65
|
-
shared.placeholder.short,shared,*,*,placeholder_short,"--",,active
|
|
66
|
-
shared.unit.percent,shared,*,*,unit_percent,"%",,active
|
|
67
|
-
shared.unit.thousand_abbrev,shared,*,*,unit_thousand_abbrev,"K",,active
|
|
68
|
-
shared.unit.million_abbrev,shared,*,*,unit_million_abbrev,"M",,active
|
|
69
|
-
shared.unit.billion_abbrev,shared,*,*,unit_billion_abbrev,"B",,active
|
|
70
|
-
shared.data_source,shared,*,*,label,"Data source: {{source}}",,active
|
|
71
|
-
shared.error.prefix,shared,*,*,label,"Error: {{error}}",,active
|
|
72
|
-
shared.status.unsynced,shared,*,*,status,"—",,active
|
|
73
|
-
error.boundary.title,shared,*,ErrorBoundary,title,"Something went wrong",,active
|
|
74
|
-
error.boundary.subtitle,shared,*,ErrorBoundary,subtitle,"This view failed to render",,active
|
|
75
|
-
error.boundary.hint,shared,*,ErrorBoundary,hint,"Open the console, then reload the page",,active
|
|
76
|
-
error.boundary.no_details,shared,*,ErrorBoundary,details,"No error details",,active
|
|
77
|
-
error.boundary.action.reload,shared,*,ErrorBoundary,action_reload,"Reload",,active
|
|
78
|
-
|
|
79
|
-
landing.handle.default,landing,LandingPage,LandingPage,handle_default,"VIBE_USER",,active
|
|
80
|
-
landing.handle.special,landing,LandingPage,LandingPage,handle_special,"VOLT",,active
|
|
81
|
-
landing.screenshot.alt,landing,LandingPage,LandingPage,screenshot_alt,"TokenTracker dashboard screenshot",,active
|
|
82
|
-
landing.nav.login,landing,LandingPage,LandingPage,nav_login,"LOGIN",,active
|
|
83
|
-
landing.nav.signup,landing,LandingPage,LandingPage,nav_signup,"SIGN UP",,active
|
|
84
|
-
landing.install.command,landing,LandingPage,LandingPage,install_command,"npx --yes tokentracker-cli",,active
|
|
85
|
-
landing.install.action.copy,landing,LandingPage,LandingPage,install_copy,"COPY COMMAND",,active
|
|
86
|
-
landing.install.action.copied,landing,LandingPage,LandingPage,install_copied,"COPIED",,active
|
|
87
|
-
landing.meta.title,landing,LandingPage,Meta,title,"Token Tracker — Token Usage Tracker for AI Agent CLIs",,active
|
|
88
|
-
landing.meta.description,landing,LandingPage,Meta,description,"Automatically monitor token usage across Claude Code, Cursor, Codex, and more. Local-first, privacy-focused, and zero manual configuration.",,active
|
|
89
|
-
landing.meta.og_site_name,landing,LandingPage,Meta,og_site_name,"Token Tracker",,active
|
|
90
|
-
landing.meta.og_type,landing,LandingPage,Meta,og_type,"website",,active
|
|
91
|
-
landing.meta.og_image,landing,LandingPage,Meta,og_image,"https://www.tokentracker.cc/dashboard-dark.png",,active
|
|
92
|
-
landing.meta.og_url,landing,LandingPage,Meta,og_url,"https://www.tokentracker.cc/",,active
|
|
93
|
-
landing.meta.twitter_card,landing,LandingPage,Meta,twitter_card,"summary_large_image",,active
|
|
94
|
-
share.meta.title,share,SharePage,Meta,title,"Token Tracker Share",,active
|
|
95
|
-
share.meta.description,share,SharePage,Meta,description,"Share a Token Tracker dashboard snapshot with token usage insights across models, projects, and time windows.",,active
|
|
96
|
-
share.meta.og_site_name,share,SharePage,Meta,og_site_name,"Token Tracker",,active
|
|
97
|
-
share.meta.og_type,share,SharePage,Meta,og_type,"website",,active
|
|
98
|
-
share.meta.og_image,share,SharePage,Meta,og_image,"https://www.tokentracker.cc/dashboard-dark.png",,active
|
|
99
|
-
share.meta.og_url,share,SharePage,Meta,og_url,"https://www.tokentracker.cc/share",,active
|
|
100
|
-
share.meta.twitter_card,share,SharePage,Meta,twitter_card,"summary_large_image",,active
|
|
101
|
-
landing.handle.placeholder,landing,LandingPage,LandingPage,handle_placeholder,"TRY '{{handle}}'",,active
|
|
102
|
-
landing.rank.expectation,landing,LandingPage,LandingPage,rank_expectation,"RANK_EXPECTATION: {{rank}}",,active
|
|
103
|
-
landing.rank.singularity,landing,LandingPage,LandingPage,rank_singularity,"APEX",,active
|
|
104
|
-
landing.rank.unranked,landing,LandingPage,LandingPage,rank_unranked,"UNRANKED",,active
|
|
105
|
-
landing.cta.primary,landing,LandingPage,LandingPage,cta_primary,"View Dashboard",,active
|
|
106
|
-
landing.cta.secondary,landing,LandingPage,LandingPage,cta_secondary,"GITHUB SOURCE",,active
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
landing.v2.hero.title_line1,landing,LandingPage,MarketingLanding,hero_title_1,"TRACK ALL YOUR",,active
|
|
114
|
-
landing.v2.hero.title_line2,landing,LandingPage,MarketingLanding,hero_title_2,"AI TOKENS",,active
|
|
115
|
-
landing.v2.install.mac_cta,landing,LandingPage,MarketingLanding,mac_cta,"MAC APP (DMG)",,active
|
|
116
|
-
landing.v2.models.title,landing,LandingPage,MarketingLanding,models_title,"SUPPORTED AI CLI TOOLS",,active
|
|
117
|
-
landing.v2.compare.kicker,landing,LandingPage,MarketingLanding,compare_kicker,"SEAMLESS TRACKING",,active
|
|
118
|
-
landing.v2.compare.title,landing,LandingPage,MarketingLanding,compare_title,"Stop guessing your AI usage.",,active
|
|
119
|
-
landing.v2.compare.subtitle,landing,LandingPage,MarketingLanding,compare_subtitle,"AI CLI tools hide your usage data in obscure local files. TokenTracker aggregates them into a single, beautiful dashboard in real-time.",,active
|
|
120
|
-
landing.v2.distill.body,landing,LandingPage,MarketingLanding,distill_body,"100% local processing. No prompts or code are ever collected.",,active
|
|
121
|
-
landing.v2.compare.with.title,landing,LandingPage,MarketingLanding,with_title,"WITH TOKEN TRACKER",,active
|
|
122
|
-
landing.v2.compare.with.p1,landing,LandingPage,MarketingLanding,with_p1,"Centralized usage dashboard",,active
|
|
123
|
-
landing.v2.compare.with.p2,landing,LandingPage,MarketingLanding,with_p2,"Real-time token metrics",,active
|
|
124
|
-
landing.v2.compare.with.p3,landing,LandingPage,MarketingLanding,with_p3,"100% local, privacy-guaranteed",,active
|
|
125
|
-
landing.v2.compare.without.title,landing,LandingPage,MarketingLanding,without_title,"WITHOUT IT",,active
|
|
126
|
-
landing.v2.compare.without.p1,landing,LandingPage,MarketingLanding,without_p1,"Scattered JSON log files",,active
|
|
127
|
-
landing.v2.compare.without.p2,landing,LandingPage,MarketingLanding,without_p2,"Blind to token consumption",,active
|
|
128
|
-
landing.v2.compare.without.p3,landing,LandingPage,MarketingLanding,without_p3,"Unexpected API bills",,active
|
|
129
|
-
landing.v2.footer.line,landing,LandingPage,MarketingLanding,footer_line,"Token Tracker — Made by developers, for developers.",,active
|
|
130
|
-
landing.v2.nav.github,landing,LandingPage,MarketingLanding,nav_github,"GITHUB",,active
|
|
131
|
-
landing.v2.models.agent.codex,landing,LandingPage,MarketingLanding,agent_codex,"CODEX",,active
|
|
132
|
-
landing.v2.models.agent.claude_code,landing,LandingPage,MarketingLanding,agent_claude_code,"CLAUDE CODE",,active
|
|
133
|
-
landing.v2.models.agent.cursor,landing,LandingPage,MarketingLanding,agent_cursor,"CURSOR",,active
|
|
134
|
-
landing.v2.models.agent.gemini,landing,LandingPage,MarketingLanding,agent_gemini,"GEMINI",,active
|
|
135
|
-
landing.v2.models.agent.opencode,landing,LandingPage,MarketingLanding,agent_opencode,"OPENCODE",,active
|
|
136
|
-
landing.v2.models.agent.openclaw,landing,LandingPage,MarketingLanding,agent_openclaw,"OPENCLAW",,active
|
|
137
|
-
landing.v2.cta.primary,landing,LandingPage,MarketingLanding,cta_primary,"Open Dashboard",,active
|
|
138
|
-
landing.v2.hero.subtagline,landing,LandingPage,MarketingLanding,hero_subtagline,"Automatically monitor token usage across Claude Code, Cursor, Codex, and more. Local-first, privacy-focused, and zero manual configuration.",,active
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
identity_card.rank_label,ui,IdentityCard,IdentityCard,rank_label,"Started",,active
|
|
144
|
-
identity_card.streak_label,ui,IdentityCard,IdentityCard,streak_label,"Active days",,active
|
|
145
|
-
identity_card.rank_placeholder,ui,IdentityCard,IdentityCard,rank_placeholder,"—",,active
|
|
146
|
-
identity_card.streak_value,ui,IdentityCard,IdentityCard,streak_value,"{{days}} DAY",,active
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
dashboard.core_index.collapse_label,dashboard,DashboardPage,UsagePanel,toggle,"▾",,active
|
|
150
|
-
dashboard.core_index.expand_label,dashboard,DashboardPage,UsagePanel,toggle,"▸",,active
|
|
151
|
-
dashboard.core_index.collapse_aria,dashboard,DashboardPage,UsagePanel,toggle_aria,"Collapse model breakdown",,active
|
|
152
|
-
dashboard.core_index.expand_aria,dashboard,DashboardPage,UsagePanel,toggle_aria,"Expand model breakdown",,active
|
|
153
|
-
usage.summary.total,ui,UsagePanel,UsagePanel,summary_label_total,"Total tokens",,active
|
|
154
|
-
usage.metric.total,ui,UsagePanel,UsagePanel,metric_total,"Total",,active
|
|
155
|
-
usage.metric.input,ui,UsagePanel,UsagePanel,metric_input,"Input",,active
|
|
156
|
-
usage.metric.output,ui,UsagePanel,UsagePanel,metric_output,"Output",,active
|
|
157
|
-
usage.metric.cached_input,ui,UsagePanel,UsagePanel,metric_cached_input,"Cached input",,active
|
|
158
|
-
usage.metric.reasoning_output,ui,UsagePanel,UsagePanel,metric_reasoning_output,"Reasoning output",,active
|
|
159
|
-
usage.button.refresh,ui,UsagePanel,UsagePanel,button_refresh,"Refresh",,active
|
|
160
|
-
|
|
161
|
-
dashboard.rolling.title,ui,RollingUsagePanel,RollingUsagePanel,title,"Recent Activity",,active
|
|
162
|
-
dashboard.rolling.last_7d,ui,RollingUsagePanel,RollingUsagePanel,label_last_7d,"Last 7 days",,active
|
|
163
|
-
dashboard.rolling.last_30d,ui,RollingUsagePanel,RollingUsagePanel,label_last_30d,"Last 30 days",,active
|
|
164
|
-
dashboard.rolling.avg_active_day,ui,RollingUsagePanel,RollingUsagePanel,label_avg_active_day,"Daily average",,active
|
|
165
|
-
|
|
166
|
-
dashboard.projects.title,ui,ProjectUsagePanel,ProjectUsagePanel,title,"Project Usage",,active
|
|
167
|
-
dashboard.projects.tokens_label,ui,ProjectUsagePanel,ProjectUsagePanel,tokens_label,"Tokens",,active
|
|
168
|
-
dashboard.projects.stars_label,ui,ProjectUsagePanel,ProjectUsagePanel,stars_label,"STAR",,active
|
|
169
|
-
dashboard.projects.limit_label,ui,ProjectUsagePanel,ProjectUsagePanel,limit_label,"Show",,active
|
|
170
|
-
dashboard.projects.limit_aria,ui,ProjectUsagePanel,ProjectUsagePanel,limit_aria,"Select repository limit",,active
|
|
171
|
-
dashboard.projects.limit_top_3,ui,ProjectUsagePanel,ProjectUsagePanel,limit_top_3,"TOP 3",,active
|
|
172
|
-
dashboard.projects.limit_top_6,ui,ProjectUsagePanel,ProjectUsagePanel,limit_top_6,"TOP 6",,active
|
|
173
|
-
dashboard.projects.limit_top_10,ui,ProjectUsagePanel,ProjectUsagePanel,limit_top_10,"TOP 10",,active
|
|
174
|
-
dashboard.projects.empty,ui,ProjectUsagePanel,ProjectUsagePanel,empty,"No public repositories",,active
|
|
175
|
-
dashboard.widgets.title,dashboard,DashboardPage,WidgetOnboardingCard,title,"Desktop Widgets",,active
|
|
176
|
-
dashboard.widgets.hint,dashboard,DashboardPage,WidgetOnboardingCard,hint,"Right-click your desktop → Edit Widgets → search ""TokenTracker""",,active
|
|
177
|
-
dashboard.widgets.dismiss_aria,dashboard,DashboardPage,WidgetOnboardingCard,dismiss_aria,"Dismiss widget intro",,active
|
|
178
|
-
widgets.page.title,dashboard,WidgetsPage,WidgetsPage,title,"Widgets",,active
|
|
179
|
-
widgets.cta.open_gallery,dashboard,WidgetsPage,WidgetsPage,cta_open_gallery,"Open Widget Gallery",,active
|
|
180
|
-
widgets.cta.download,dashboard,WidgetsPage,WidgetsPage,cta_download,"Download Mac App",,active
|
|
181
|
-
widgets.cta.macos_only,dashboard,WidgetsPage,WidgetsPage,cta_macos_only,"macOS only",,active
|
|
182
|
-
widgets.menubar.section.title,dashboard,WidgetsPage,WidgetsPage,menubar_section_title,"Menu Bar",,active
|
|
183
|
-
widgets.gallery.section.title,dashboard,WidgetsPage,WidgetsPage,gallery_section_title,"Desktop Widgets",,active
|
|
184
|
-
widgets.summary.name,dashboard,WidgetsPage,WidgetsPage,summary_name,"Usage Summary",,active
|
|
185
|
-
widgets.summary.description,dashboard,WidgetsPage,WidgetsPage,summary_desc,"Today and seven-day usage with a compact sparkline.",,active
|
|
186
|
-
widgets.heatmap.name,dashboard,WidgetsPage,WidgetsPage,heatmap_name,"Activity Heatmap",,active
|
|
187
|
-
widgets.heatmap.description,dashboard,WidgetsPage,WidgetsPage,heatmap_desc,"GitHub-style daily calendar. Spot streaks and quiet days at a glance.",,active
|
|
188
|
-
widgets.topModels.name,dashboard,WidgetsPage,WidgetsPage,topmodels_name,"Top Models",,active
|
|
189
|
-
widgets.topModels.description,dashboard,WidgetsPage,WidgetsPage,topmodels_desc,"Your heaviest-used models ranked by token share.",,active
|
|
190
|
-
widgets.limits.name,dashboard,WidgetsPage,WidgetsPage,limits_name,"Usage Limits",,active
|
|
191
|
-
widgets.limits.description,dashboard,WidgetsPage,WidgetsPage,limits_desc,"Live rate-limit progress for Claude, Codex, Cursor, Gemini and more.",,active
|
|
192
|
-
dashboard.cost_breakdown.title,ui,CostAnalysisModal,CostAnalysisModal,title,"Cost Breakdown",,active
|
|
193
|
-
dashboard.cost_breakdown.total_label,ui,CostAnalysisModal,CostAnalysisModal,total_label,"Estimated Total Cost",,active
|
|
194
|
-
dashboard.cost_breakdown.close,ui,CostAnalysisModal,CostAnalysisModal,close_label,"Close",,active
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
trend.monitor.label,ui,TrendMonitor,TrendMonitor,label,"Usage Trend",,active
|
|
198
|
-
|
|
199
|
-
heatmap.title,ui,ActivityHeatmap,ActivityHeatmap,title,"Activity Heatmap",,active
|
|
200
|
-
heatmap.empty,ui,ActivityHeatmap,ActivityHeatmap,empty_state,"No activity data yet.",,active
|
|
201
|
-
heatmap.legend.less,ui,ActivityHeatmap,ActivityHeatmap,legend_less,"Less",,active
|
|
202
|
-
heatmap.legend.more,ui,ActivityHeatmap,ActivityHeatmap,legend_more,"More",,active
|
|
203
|
-
heatmap.legend.utc,ui,ActivityHeatmap,ActivityHeatmap,legend_utc,"UTC",,active
|
|
204
|
-
heatmap.tooltip,ui,ActivityHeatmap,ActivityHeatmap,tooltip,"{{day}} • {{value}} {{unit}} • {{tz}}",,active
|
|
205
|
-
heatmap.unit.tokens,ui,ActivityHeatmap,ActivityHeatmap,unit_tokens,"tokens",,active
|
|
206
|
-
heatmap.iso.aria,ui,ActivityHeatmap,ActivityHeatmap3D,iso_aria,"3D isometric activity heatmap",,active
|
|
207
|
-
heatmap.view.2d,ui,ActivityHeatmap,ActivityHeatmap,view_2d,"2D",,active
|
|
208
|
-
heatmap.view.3d,ui,ActivityHeatmap,ActivityHeatmap,view_3d,"3D",,active
|
|
209
|
-
heatmap.month.jan,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Jan",,active
|
|
210
|
-
heatmap.month.feb,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Feb",,active
|
|
211
|
-
heatmap.month.mar,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Mar",,active
|
|
212
|
-
heatmap.month.apr,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Apr",,active
|
|
213
|
-
heatmap.month.may,ui,ActivityHeatmap,ActivityHeatmap,month_label,"May",,active
|
|
214
|
-
heatmap.month.jun,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Jun",,active
|
|
215
|
-
heatmap.month.jul,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Jul",,active
|
|
216
|
-
heatmap.month.aug,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Aug",,active
|
|
217
|
-
heatmap.month.sep,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Sep",,active
|
|
218
|
-
heatmap.month.oct,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Oct",,active
|
|
219
|
-
heatmap.month.nov,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Nov",,active
|
|
220
|
-
heatmap.month.dec,ui,ActivityHeatmap,ActivityHeatmap,month_label,"Dec",,active
|
|
221
|
-
heatmap.day.sun,ui,ActivityHeatmap,ActivityHeatmap,day_label,"Sun",,active
|
|
222
|
-
heatmap.day.mon,ui,ActivityHeatmap,ActivityHeatmap,day_label,"Mon",,active
|
|
223
|
-
heatmap.day.tue,ui,ActivityHeatmap,ActivityHeatmap,day_label,"Tue",,active
|
|
224
|
-
heatmap.day.wed,ui,ActivityHeatmap,ActivityHeatmap,day_label,"Wed",,active
|
|
225
|
-
heatmap.day.thu,ui,ActivityHeatmap,ActivityHeatmap,day_label,"Thu",,active
|
|
226
|
-
heatmap.day.fri,ui,ActivityHeatmap,ActivityHeatmap,day_label,"Fri",,active
|
|
227
|
-
heatmap.day.sat,ui,ActivityHeatmap,ActivityHeatmap,day_label,"Sat",,active
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
daily.sort.date.label,dashboard,DashboardPage,DailyTable,sort_label,"Date",,active
|
|
233
|
-
daily.sort.date.title,dashboard,DashboardPage,DailyTable,sort_title,"Sort by Date",,active
|
|
234
|
-
daily.sort.total.label,dashboard,DashboardPage,DailyTable,sort_label,"Total",,active
|
|
235
|
-
daily.sort.total.title,dashboard,DashboardPage,DailyTable,sort_title,"Sort by Total",,active
|
|
236
|
-
daily.sort.input.label,dashboard,DashboardPage,DailyTable,sort_label,"Input",,active
|
|
237
|
-
daily.sort.input.title,dashboard,DashboardPage,DailyTable,sort_title,"Sort by Input",,active
|
|
238
|
-
daily.sort.output.label,dashboard,DashboardPage,DailyTable,sort_label,"Output",,active
|
|
239
|
-
daily.sort.output.title,dashboard,DashboardPage,DailyTable,sort_title,"Sort by Output",,active
|
|
240
|
-
daily.sort.cached.label,dashboard,DashboardPage,DailyTable,sort_label,"Cached",,active
|
|
241
|
-
daily.sort.cached.title,dashboard,DashboardPage,DailyTable,sort_title,"Sort by Cached input",,active
|
|
242
|
-
daily.sort.reasoning.label,dashboard,DashboardPage,DailyTable,sort_label,"Reasoning",,active
|
|
243
|
-
daily.sort.reasoning.title,dashboard,DashboardPage,DailyTable,sort_title,"Sort by Reasoning output",,active
|
|
244
|
-
daily.sort.conversations.label,dashboard,DashboardPage,DailyTable,sort_label,"Convs",,active
|
|
245
|
-
daily.sort.conversations.title,dashboard,DashboardPage,DailyTable,sort_title,"Sort by Conversations",,active
|
|
246
|
-
details.pagination.prev,dashboard,DashboardPage,DailyTable,pagination_prev,"Prev",,active
|
|
247
|
-
details.pagination.next,dashboard,DashboardPage,DailyTable,pagination_next,"Next",,active
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
leaderboard.profile.nav.back,dashboard,LeaderboardProfilePage,Header,nav_back,"$ Leaderboard",,active
|
|
252
|
-
leaderboard.title,dashboard,LeaderboardPage,LeaderboardPage,title,"Leaderboard",,active
|
|
253
|
-
leaderboard.range,dashboard,LeaderboardPage,LeaderboardPage,range,"UTC {{period}} · {{from}} – {{to}}",,active
|
|
254
|
-
leaderboard.range_loading,dashboard,LeaderboardPage,LeaderboardPage,range_loading,"UTC {{period}} · …",,active
|
|
255
|
-
leaderboard.range.total,dashboard,LeaderboardPage,LeaderboardPage,range_total,"All time",,active
|
|
256
|
-
leaderboard.generated_at,dashboard,LeaderboardPage,LeaderboardPage,generated_at,"Updated {{ts}}",,active
|
|
257
|
-
leaderboard.period.week,dashboard,LeaderboardPage,LeaderboardPage,period_week,"Week",,active
|
|
258
|
-
leaderboard.period.month,dashboard,LeaderboardPage,LeaderboardPage,period_month,"Month",,active
|
|
259
|
-
leaderboard.period.total,dashboard,LeaderboardPage,LeaderboardPage,period_total,"All",,active
|
|
260
|
-
|
|
261
|
-
leaderboard.me_label,dashboard,LeaderboardPage,LeaderboardPage,me_label,"You",,active
|
|
262
|
-
leaderboard.anon_label,dashboard,LeaderboardPage,LeaderboardPage,anon_label,"Anonymous",,active
|
|
263
|
-
leaderboard.error.unknown,dashboard,LeaderboardPage,LeaderboardPage,error_unknown,"Unknown error",,active
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
leaderboard.loading,dashboard,LeaderboardPage,LeaderboardPage,state_loading,"Loading…",,active
|
|
268
|
-
leaderboard.empty,dashboard,LeaderboardPage,LeaderboardPage,state_empty,"No data",,active
|
|
269
|
-
|
|
270
|
-
leaderboard.column.rank,dashboard,LeaderboardPage,LeaderboardPage,column_rank,"Rank",,active
|
|
271
|
-
leaderboard.column.user,dashboard,LeaderboardPage,LeaderboardPage,column_user,"User",,active
|
|
272
|
-
leaderboard.column.total,dashboard,LeaderboardPage,LeaderboardPage,column_total,"Total",,active
|
|
273
|
-
leaderboard.column.codex,dashboard,LeaderboardPage,LeaderboardPage,column_codex,"Codex",,active
|
|
274
|
-
leaderboard.column.claude,dashboard,LeaderboardPage,LeaderboardPage,column_claude,"Claude",,active
|
|
275
|
-
leaderboard.column.gemini,dashboard,LeaderboardPage,LeaderboardPage,column_gemini,"Gemini",,active
|
|
276
|
-
leaderboard.column.cursor,dashboard,LeaderboardPage,LeaderboardPage,column_cursor,"Cursor",,active
|
|
277
|
-
leaderboard.column.opencode,dashboard,LeaderboardPage,LeaderboardPage,column_opencode,"OpenCode",,active
|
|
278
|
-
leaderboard.column.openclaw,dashboard,LeaderboardPage,LeaderboardPage,column_openclaw,"OpenClaw",,active
|
|
279
|
-
leaderboard.column.hermes,dashboard,LeaderboardPage,LeaderboardPage,column_hermes,"Hermes",,active
|
|
280
|
-
leaderboard.column.kiro,dashboard,LeaderboardPage,LeaderboardPage,column_kiro,"Kiro",,active
|
|
281
|
-
leaderboard.column.copilot,dashboard,LeaderboardPage,LeaderboardPage,column_copilot,"GitHub Copilot",,active
|
|
282
|
-
leaderboard.column.kimi,dashboard,LeaderboardPage,LeaderboardPage,column_kimi,"Kimi Code",,active
|
|
283
|
-
leaderboard.column.kilo-cli,dashboard,LeaderboardPage,LeaderboardPage,column_kilo_cli,"Kilo CLI",,active
|
|
284
|
-
leaderboard.column.kilo-code,dashboard,LeaderboardPage,LeaderboardPage,column_kilo_code,"Kilo Code",,active
|
|
285
|
-
limits.copilot.otelHint.title,dashboard,LimitsPage,LimitsPage,otel_hint_title,"Track Copilot token usage",,active
|
|
286
|
-
limits.copilot.otelHint.body,dashboard,LimitsPage,LimitsPage,otel_hint_body,"Limits load via your GitHub OAuth token. To also record per-token usage, enable Copilot's OpenTelemetry export and add these lines to your shell profile (~/.zshrc or ~/.bashrc):",,active
|
|
287
|
-
limits.copilot.otelHint.copy,dashboard,LimitsPage,LimitsPage,otel_hint_copy,"Copy",,active
|
|
288
|
-
limits.copilot.otelHint.copied,dashboard,LimitsPage,LimitsPage,otel_hint_copied,"Copied",,active
|
|
289
|
-
leaderboard.column.supplemental,dashboard,LeaderboardPage,LeaderboardPage,column_supplemental,"Supplemental",,active
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
leaderboard.pagination.prev,dashboard,LeaderboardPage,LeaderboardPage,pagination_prev,"Previous",,active
|
|
293
|
-
leaderboard.pagination.next,dashboard,LeaderboardPage,LeaderboardPage,pagination_next,"Next",,active
|
|
294
|
-
leaderboard.pagination.ellipsis,dashboard,LeaderboardPage,LeaderboardPage,pagination_ellipsis,"…",,active
|
|
295
|
-
leaderboard.pagination.page_unknown,dashboard,LeaderboardPage,LeaderboardPage,pagination_unknown,"Page {{page}}",,active
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
dashboard.session_expired.copy_label,dashboard,DashboardPage,AsciiBox,body,"run npx --yes tokentracker-cli init",,active
|
|
301
|
-
dashboard.session_expired.copied,dashboard,DashboardPage,AsciiBox,body,"copied",,active
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
dashboard.install.prompt,dashboard,DashboardPage,AsciiBox,install_prompt,"Install Node.js 18+ then run:",,active
|
|
305
|
-
dashboard.install.cmd.init,dashboard,DashboardPage,AsciiBox,install_cmd,"npx --yes tokentracker-cli init",,active
|
|
306
|
-
dashboard.install.cmd.init_link_code,dashboard,DashboardPage,AsciiBox,install_cmd,"npx --yes tokentracker-cli init --link-code {{link_code}}",,active
|
|
307
|
-
dashboard.install.copy,dashboard,DashboardPage,AsciiBox,install_copy,"Copy install command",,active
|
|
308
|
-
dashboard.install.copy_base,dashboard,DashboardPage,AsciiBox,install_copy,"Copy init command",,active
|
|
309
|
-
dashboard.install.copied,dashboard,DashboardPage,AsciiBox,install_copy,"Copied to clipboard",,active
|
|
310
|
-
dashboard.install.link_code.loading,dashboard,DashboardPage,AsciiBox,install_status,"Generating private code...",,active
|
|
311
|
-
dashboard.install.link_code.failed,dashboard,DashboardPage,AsciiBox,install_status,"Private code unavailable",,active
|
|
312
|
-
dashboard.install.cmd.sync,dashboard,DashboardPage,AsciiBox,install_cmd,"npx --yes tokentracker-cli sync",,active
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
dashboard.daily.title,dashboard,DashboardPage,AsciiBox,title,"Daily Breakdown",,active
|
|
317
|
-
dashboard.daily.empty,dashboard,DashboardPage,AsciiBox,empty_state,"No data yet. Use your AI CLI then run {{cmd}}.",,active
|
|
318
|
-
|
|
319
|
-
dashboard.identity.title,dashboard,DashboardPage,IdentityCard,title,"Your Profile",,active
|
|
320
|
-
dashboard.identity.subtitle,dashboard,DashboardPage,IdentityCard,subtitle,"Track your coding journey",,active
|
|
321
|
-
dashboard.identity.fallback,dashboard,DashboardPage,IdentityCard,handle_fallback,"Anonymous",,active
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
dashboard.screenshot.title_line1,dashboard,DashboardPage,ScreenshotTitle,title_line,"Coding Agent",,active
|
|
325
|
-
dashboard.screenshot.title_line2,dashboard,DashboardPage,ScreenshotTitle,title_line,"2025 Wrapped",,active
|
|
326
|
-
dashboard.screenshot.twitter_button,dashboard,DashboardPage,ScreenshotShare,button_label,"Share on X",,active
|
|
327
|
-
dashboard.screenshot.twitter_label,dashboard,DashboardPage,ScreenshotShare,aria_label,"Share on X",,active
|
|
328
|
-
dashboard.screenshot.twitter_hint,dashboard,DashboardPage,ScreenshotShare,helper_text,"Auto-copies image to clipboard",,active
|
|
329
|
-
dashboard.screenshot.twitter_text,dashboard,DashboardPage,ScreenshotShare,share_text,"{{total_tokens}} tokens on the record.\\n{{model_name}} led with {{model_percent}}%.\\n\\nMy AI usage, unaudited →\\ntokentracker.cc",,active
|
|
330
|
-
|
|
331
|
-
nav.usage,shared,*,Sidebar,nav_usage,"Tokens",,active
|
|
332
|
-
nav.limits,shared,*,Sidebar,nav_limits,"Limits",,active
|
|
333
|
-
nav.widgets,shared,*,Sidebar,nav_widgets,"macOS Widgets",,active
|
|
334
|
-
nav.leaderboard,shared,*,Sidebar,nav_leaderboard,"Leaderboard",,active
|
|
335
|
-
nav.collapse,shared,*,Sidebar,nav_collapse,"Collapse sidebar",,active
|
|
336
|
-
nav.expand,shared,*,Sidebar,nav_expand,"Expand sidebar",,active
|
|
337
|
-
nav.menu,shared,*,Sidebar,nav_menu,"Open navigation menu",,active
|
|
338
|
-
nav.close_menu,shared,*,Sidebar,nav_close_menu,"Close navigation menu",,active
|
|
339
|
-
nav.aside_label,shared,*,Sidebar,aside_label,"Main navigation",,active
|
|
340
|
-
nav.nav_label,shared,*,Sidebar,nav_label,"Primary",,active
|
|
341
|
-
limits.page.subtitle,ui,LimitsPage,LimitsPage,subtitle,"Rate limits and quota usage across your AI tools.",,active
|
|
342
|
-
limits.settings.toggle_visible,ui,LimitsPage,LimitsSettingsPanel,toggle_visible,"Toggle visibility",,active
|
|
343
|
-
limits.page.openSettings,ui,LimitsPage,LimitsPage,open_settings,"Display settings",,active
|
|
344
|
-
nav.group.general,shared,*,Sidebar,group_general,"General",,active
|
|
345
|
-
nav.group.tools,shared,*,Sidebar,group_tools,"Tools",,active
|
|
346
|
-
nav.group.account,shared,*,Sidebar,group_account,"Account",,active
|
|
347
|
-
nav.settings,shared,*,Sidebar,nav_settings,"Settings",,active
|
|
348
|
-
header.auth.open_settings,shared,*,InsforgeUserHeaderControls,open_settings,"Open settings",,active
|
|
349
|
-
settings.page.title,ui,SettingsPage,SettingsPage,title,"Settings",,active
|
|
350
|
-
settings.page.subtitle,ui,SettingsPage,SettingsPage,subtitle,"Manage your account, appearance, and display preferences.",,active
|
|
351
|
-
settings.section.appearance,ui,SettingsPage,SettingsPage,sec_appearance,"Appearance",,active
|
|
352
|
-
settings.section.account,ui,SettingsPage,SettingsPage,sec_account,"Account",,active
|
|
353
|
-
settings.section.limits,ui,SettingsPage,SettingsPage,sec_limits,"Limits Display",,active
|
|
354
|
-
settings.appearance.theme.label,ui,SettingsPage,SettingsPage,theme_label,"Theme",,active
|
|
355
|
-
settings.appearance.theme.hint,ui,SettingsPage,SettingsPage,theme_hint,"Choose how Token Tracker looks across the dashboard.",,active
|
|
356
|
-
settings.appearance.theme.light,ui,SettingsPage,SettingsPage,theme_light,"Light",,active
|
|
357
|
-
settings.appearance.theme.dark,ui,SettingsPage,SettingsPage,theme_dark,"Dark",,active
|
|
358
|
-
settings.appearance.theme.system,ui,SettingsPage,SettingsPage,theme_system,"System",,active
|
|
359
|
-
settings.account.displayName,ui,SettingsPage,SettingsPage,display_name,"Display name",,active
|
|
360
|
-
settings.account.edit,ui,SettingsPage,SettingsPage,edit,"Edit",,active
|
|
361
|
-
settings.account.save,ui,SettingsPage,SettingsPage,save,"Save",,active
|
|
362
|
-
settings.account.saving,ui,SettingsPage,SettingsPage,saving,"Saving...",,active
|
|
363
|
-
settings.account.cancel,ui,SettingsPage,SettingsPage,cancel,"Cancel",,active
|
|
364
|
-
settings.account.userId,ui,SettingsPage,SettingsPage,user_id,"User ID",,active
|
|
365
|
-
settings.account.copyUserId,ui,SettingsPage,SettingsPage,copy_user_id,"Copy user ID",,active
|
|
366
|
-
settings.account.copy,ui,SettingsPage,SettingsPage,copy,"Copy",,active
|
|
367
|
-
settings.account.copied,ui,SettingsPage,SettingsPage,copied,"Copied",,active
|
|
368
|
-
settings.account.cloudSync,ui,SettingsPage,SettingsPage,cloud_sync,"Cloud sync",,active
|
|
369
|
-
settings.account.cloudSyncHint,ui,SettingsPage,SettingsPage,cloud_sync_hint,"Upload local usage to your Token Tracker cloud account.",,active
|
|
370
|
-
settings.account.publicProfile,ui,SettingsPage,SettingsPage,public_profile,"Public profile",,active
|
|
371
|
-
settings.account.publicProfileHint,ui,SettingsPage,SettingsPage,public_profile_hint,"Show your usage on the public leaderboard.",,active
|
|
372
|
-
settings.account.displayNameAnonymousHint,ui,SettingsPage,SettingsPage,display_name_anon_hint,"Anonymous — your name and avatar are hidden on the leaderboard",,active
|
|
373
|
-
settings.account.displayNameDisabledWhileAnon,ui,SettingsPage,SettingsPage,display_name_disabled,"Turn on the switch first to edit your name",,active
|
|
374
|
-
settings.account.githubUrl,ui,SettingsPage,SettingsPage,github_url,"GitHub profile",,active
|
|
375
|
-
settings.account.githubUrlHint,ui,SettingsPage,SettingsPage,github_url_hint,"Show a GitHub link next to your name on the leaderboard.",,active
|
|
376
|
-
settings.account.githubUrlPlaceholder,ui,SettingsPage,SettingsPage,github_url_placeholder,"username or https://github.com/username",,active
|
|
377
|
-
settings.account.githubUrlInvalid,ui,SettingsPage,SettingsPage,github_url_invalid,"Use a GitHub username or https://github.com/username URL.",,active
|
|
378
|
-
leaderboard.github.aria,ui,LeaderboardPage,LeaderboardPage,github_aria,"Open GitHub profile",,active
|
|
379
|
-
auth.callback.processing,ui,*,NativeAuthCallbackPage,processing,"Processing…",,active
|
|
380
|
-
auth.callback.success,ui,*,NativeAuthCallbackPage,success,"Signed in successfully",,active
|
|
381
|
-
auth.callback.redirecting,ui,*,NativeAuthCallbackPage,redirecting,"Returning to TokenTracker…",,active
|
|
382
|
-
auth.callback.failed,ui,*,NativeAuthCallbackPage,failed,"Sign-in incomplete. Please try again.",,active
|
|
383
|
-
auth.callback.close,ui,*,NativeAuthCallbackPage,close,"Close this page",,active
|
|
384
|
-
stats.period.today,ui,DashboardPage,StatsPanel,period_today,"today",,active
|
|
385
|
-
stats.period.week,ui,DashboardPage,StatsPanel,period_week,"week",,active
|
|
386
|
-
stats.period.month,ui,DashboardPage,StatsPanel,period_month,"month",,active
|
|
387
|
-
stats.period.all,ui,DashboardPage,StatsPanel,period_all,"all",,active
|
|
388
|
-
stats.period.convs,ui,DashboardPage,StatsPanel,period_convs,"convs",,active
|
|
389
|
-
leaderboard.column.est_cost,ui,LeaderboardPage,LeaderboardPage,column_est_cost,"Est. Cost",,active
|
|
390
|
-
leaderboard.signin_prompt,ui,LeaderboardPage,LeaderboardPage,signin_prompt,"Sign in to join the leaderboard",,active
|
|
391
|
-
leaderboard.signin_button,ui,LeaderboardPage,LeaderboardPage,signin_button,"Sign In",,active
|
|
392
|
-
leaderboard.sync_prompt,ui,LeaderboardPage,LeaderboardPage,sync_prompt,"Enable Cloud Sync to appear in rankings",,active
|
|
393
|
-
leaderboard.sync_button.idle,ui,LeaderboardPage,LeaderboardPage,sync_button_idle,"Enable & Sync",,active
|
|
394
|
-
leaderboard.sync_button.busy,ui,LeaderboardPage,LeaderboardPage,sync_button_busy,"Syncing...",,active
|
|
395
|
-
leaderboard.pagination.page_size_label,ui,LeaderboardPage,LeaderboardPage,page_size_label,"Rows per page",,active
|
|
396
|
-
leaderboard.github.tooltipAction,ui,LeaderboardPage,LeaderboardPage,github_tooltip_action,"Click to open GitHub profile",,active
|
|
397
|
-
leaderboard.github.tooltipPrefix,ui,LeaderboardPage,LeaderboardPage,github_tooltip_prefix,"Set yours in",,active
|
|
398
|
-
leaderboard.github.tooltipSettingsLink,ui,LeaderboardPage,LeaderboardPage,github_tooltip_link,"Settings",,active
|
|
399
|
-
leaderboard.github.tooltipSuffix,ui,LeaderboardPage,LeaderboardPage,github_tooltip_suffix," to appear here",,active
|
|
400
|
-
leaderboard.summary.percentile,ui,LeaderboardPage,LeaderboardMeChip,summary_percentile,"Top {{p}}%",,active
|
|
401
|
-
leaderboard.summary.jump_to_me,ui,LeaderboardPage,LeaderboardMeChip,summary_jump_to_me,"Jump to my row",,active
|
|
402
|
-
settings.account.signOut,ui,SettingsPage,SettingsPage,sign_out,"Sign out",,active
|
|
403
|
-
settings.account.signIn,ui,SettingsPage,SettingsPage,sign_in,"Sign in",,active
|
|
404
|
-
settings.account.signedOutHint,ui,SettingsPage,SettingsPage,signed_out_hint,"Sign in to manage cloud sync and leaderboard preferences.",,active
|
|
405
|
-
settings.section.menubar,ui,SettingsPage,SettingsPage,sec_menubar,"Menu Bar App",,active
|
|
406
|
-
settings.menubar.showStats,ui,SettingsPage,SettingsPage,mb_show_stats,"Show stats in menu bar",,active
|
|
407
|
-
settings.menubar.showStatsHint,ui,SettingsPage,SettingsPage,mb_show_stats_hint,"Display today's token count and cost beside the menu bar icon.",,active
|
|
408
|
-
settings.menubar.animatedIcon,ui,SettingsPage,SettingsPage,mb_anim,"Animated icon",,active
|
|
409
|
-
settings.menubar.animatedIconHint,ui,SettingsPage,SettingsPage,mb_anim_hint,"Blink the Clawd character and play the syncing animation in the menu bar.",,active
|
|
410
|
-
settings.menubar.launchAtLogin,ui,SettingsPage,SettingsPage,mb_login,"Launch at login",,active
|
|
411
|
-
settings.menubar.launchAtLoginHint,ui,SettingsPage,SettingsPage,mb_login_hint,"Start TokenTrackerBar automatically when you sign in to macOS.",,active
|
|
412
|
-
settings.menubar.syncNow,ui,SettingsPage,SettingsPage,mb_sync_now,"Sync now",,active
|
|
413
|
-
settings.menubar.syncNowHint,ui,SettingsPage,SettingsPage,mb_sync_now_hint,"Trigger an immediate parse and upload of local AI tool logs.",,active
|
|
414
|
-
settings.menubar.syncing,ui,SettingsPage,SettingsPage,mb_syncing,"Syncing…",,active
|
|
415
|
-
settings.menubar.updates,ui,SettingsPage,SettingsPage,mb_updates,"Updates",,active
|
|
416
|
-
settings.menubar.checkUpdates,ui,SettingsPage,SettingsPage,mb_check_updates,"Check for updates",,active
|
|
417
|
-
menubar.slot.primary,ui,WidgetsPage,MenuBarDisplayCard,slot_primary,"Primary slot",,active
|
|
418
|
-
menubar.slot.secondary,ui,WidgetsPage,MenuBarDisplayCard,slot_secondary,"Secondary slot",,active
|
|
419
|
-
menubar.native_only,ui,WidgetsPage,MenuBarDisplayCard,native_only,"Open TokenTrackerBar for macOS to edit the live menu bar display.",,active
|
|
420
|
-
menubar.metric.today_tokens,ui,WidgetsPage,MenuBarDisplayCard,metric_today_tokens,"Today Tokens",,active
|
|
421
|
-
menubar.metric.today_cost,ui,WidgetsPage,MenuBarDisplayCard,metric_today_cost,"Today Cost",,active
|
|
422
|
-
menubar.metric.last_7d_tokens,ui,WidgetsPage,MenuBarDisplayCard,metric_last_7d,"Last 7 Days",,active
|
|
423
|
-
menubar.metric.total_tokens,ui,WidgetsPage,MenuBarDisplayCard,metric_total_tokens,"Total Tokens",,active
|
|
424
|
-
menubar.metric.total_cost,ui,WidgetsPage,MenuBarDisplayCard,metric_total_cost,"Total Cost",,active
|
|
425
|
-
menubar.metric.claude_5h,ui,WidgetsPage,MenuBarDisplayCard,metric_claude_5h,"Claude 5h Limit",,active
|
|
426
|
-
menubar.metric.claude_7d,ui,WidgetsPage,MenuBarDisplayCard,metric_claude_7d,"Claude 7d Limit",,active
|
|
427
|
-
menubar.metric.codex_5h,ui,WidgetsPage,MenuBarDisplayCard,metric_codex_5h,"Codex 5h Limit",,active
|
|
428
|
-
menubar.metric.codex_7d,ui,WidgetsPage,MenuBarDisplayCard,metric_codex_7d,"Codex 7d Limit",,active
|
|
429
|
-
share.modal.title,share,DashboardPage,ShareModal,title,"Share your stats",,active
|
|
430
|
-
share.modal.subtitle,share,DashboardPage,ShareModal,subtitle,"Generate a poster-style card and share anywhere.",,active
|
|
431
|
-
share.modal.close,share,DashboardPage,ShareModal,close,"Close",,active
|
|
432
|
-
share.modal.action.x,share,DashboardPage,ShareModal,action_x,"Share on X",,active
|
|
433
|
-
share.modal.action.download,share,DashboardPage,ShareModal,action_download,"Download",,active
|
|
434
|
-
share.modal.action.copy,share,DashboardPage,ShareModal,action_copy,"Copy image",,active
|
|
435
|
-
share.modal.hint.x,share,DashboardPage,ShareModal,hint_x,"Paste image in tweet",,active
|
|
436
|
-
share.modal.hint.copy,share,DashboardPage,ShareModal,hint_copy,"to clipboard",,active
|
|
437
|
-
share.modal.name_label,share,DashboardPage,ShareModal,name_label,"Display name",,active
|
|
438
|
-
share.modal.name_placeholder,share,DashboardPage,ShareModal,name_placeholder,"Enter your name",,active
|
|
439
|
-
share.modal.footer,share,DashboardPage,ShareModal,footer,"Your data stays local — images are generated in your browser and never uploaded.",,active
|
|
440
|
-
share.button.label,share,DashboardPage,DashboardHeader,share_button,"Share",,active
|
|
441
|
-
share.button.aria,share,DashboardPage,DashboardHeader,share_button_aria,"Open share card",,active
|
|
442
|
-
share.toast.copied,share,DashboardPage,ShareModal,toast_copied,"Image copied to clipboard",,active
|
|
443
|
-
share.toast.downloaded,share,DashboardPage,ShareModal,toast_downloaded,"Image saved",,active
|
|
444
|
-
share.toast.failed,share,DashboardPage,ShareModal,toast_failed,"Couldn't generate image",,active
|
|
445
|
-
share.toast.working,share,DashboardPage,ShareModal,toast_working,"Generating…",,active
|
|
446
|
-
share.modal.style_label,share,DashboardPage,ShareModal,style_label,"Style",,active
|
|
447
|
-
share.variant.neon,share,DashboardPage,ShareModal,variant_neon,"Neon",,active
|
|
448
|
-
share.variant.broadsheet,share,DashboardPage,ShareModal,variant_broadsheet,"Broadsheet",,active
|
|
449
|
-
share.date.month_year,share,DashboardPage,ShareCard,date_month_year,"{{month}} {{year}}",,active
|
|
450
|
-
share.issue.all_time,share,DashboardPage,ShareCard,issue_all_time,"ALL TIME",,active
|
|
451
|
-
share.month_short.jan,share,DashboardPage,ShareCard,month_short,"JAN",,active
|
|
452
|
-
share.month_short.feb,share,DashboardPage,ShareCard,month_short,"FEB",,active
|
|
453
|
-
share.month_short.mar,share,DashboardPage,ShareCard,month_short,"MAR",,active
|
|
454
|
-
share.month_short.apr,share,DashboardPage,ShareCard,month_short,"APR",,active
|
|
455
|
-
share.month_short.may,share,DashboardPage,ShareCard,month_short,"MAY",,active
|
|
456
|
-
share.month_short.jun,share,DashboardPage,ShareCard,month_short,"JUN",,active
|
|
457
|
-
share.month_short.jul,share,DashboardPage,ShareCard,month_short,"JUL",,active
|
|
458
|
-
share.month_short.aug,share,DashboardPage,ShareCard,month_short,"AUG",,active
|
|
459
|
-
share.month_short.sep,share,DashboardPage,ShareCard,month_short,"SEP",,active
|
|
460
|
-
share.month_short.oct,share,DashboardPage,ShareCard,month_short,"OCT",,active
|
|
461
|
-
share.month_short.nov,share,DashboardPage,ShareCard,month_short,"NOV",,active
|
|
462
|
-
share.month_short.dec,share,DashboardPage,ShareCard,month_short,"DEC",,active
|
|
463
|
-
share.hook.top_loyal,share,DashboardPage,ShareCard,hook_top_loyal,"{{percent}}% loyal to {{name}}.",,active
|
|
464
|
-
share.hook.days_record,share,DashboardPage,ShareCard,hook_days_record,"{{days}} days on the record.",,active
|
|
465
|
-
share.hook.top_led,share,DashboardPage,ShareCard,hook_top_led,"Led by {{name}} ({{percent}}%).",,active
|
|
466
|
-
share.hook.multi_models,share,DashboardPage,ShareCard,hook_multi_models,"Across {{count}} models, {{days}} days.",,active
|
|
467
|
-
share.hook.days_with_model,share,DashboardPage,ShareCard,hook_days_with_model,"{{days}} days with {{name}}.",,active
|
|
468
|
-
share.hook.new_chapter,share,DashboardPage,ShareCard,hook_new_chapter,"The beginning of a new chapter.",,active
|
|
469
|
-
share.card.broadsheet.issue,share,DashboardPage,BroadsheetCard,issue_label,"Issue",,active
|
|
470
|
-
share.card.broadsheet.by,share,DashboardPage,BroadsheetCard,by_label,"By",,active
|
|
471
|
-
share.card.broadsheet.tracked_since,share,DashboardPage,BroadsheetCard,tracked_since,"Tracked since",,active
|
|
472
|
-
share.card.broadsheet.total_tokens,share,DashboardPage,BroadsheetCard,total_tokens,"Total tokens",,active
|
|
473
|
-
share.card.broadsheet.estimated_spend,share,DashboardPage,BroadsheetCard,estimated_spend,"Estimated spend",,active
|
|
474
|
-
share.card.broadsheet.billable_days,share,DashboardPage,BroadsheetCard,billable_days,"{{days}} billable days",,active
|
|
475
|
-
share.card.broadsheet.heatmap_title,share,DashboardPage,BroadsheetCard,heatmap_title,"The Year in Print",,active
|
|
476
|
-
share.card.broadsheet.heatmap_days_on_record,share,DashboardPage,BroadsheetCard,heatmap_days,"{{active}} / {{total}} days on record",,active
|
|
477
|
-
share.card.broadsheet.roster_title,share,DashboardPage,BroadsheetCard,roster_title,"The Roster",,active
|
|
478
|
-
share.card.broadsheet.roster_subtitle,share,DashboardPage,BroadsheetCard,roster_subtitle,"Models in regular rotation",,active
|
|
479
|
-
share.card.broadsheet.empty,share,DashboardPage,BroadsheetCard,empty,"An empty week — the press was quiet.",,active
|
|
480
|
-
share.card.broadsheet.global_rank,share,DashboardPage,BroadsheetCard,global_rank,"Global rank",,active
|
|
481
|
-
share.card.broadsheet.active_days,share,DashboardPage,BroadsheetCard,active_days,"Active",,active
|
|
482
|
-
share.card.broadsheet.days_count,share,DashboardPage,BroadsheetCard,days_count,"{{days}} days",,active
|
|
483
|
-
share.card.broadsheet.track_yours,share,DashboardPage,BroadsheetCard,track_yours,"Track yours",,active
|
|
484
|
-
share.card.annual.report_title,share,DashboardPage,AnnualReportCard,report_title,"Token Report",,active
|
|
485
|
-
share.card.annual.less,share,DashboardPage,AnnualReportCard,legend_less,"Less",,active
|
|
486
|
-
share.card.annual.more,share,DashboardPage,AnnualReportCard,legend_more,"More",,active
|
|
487
|
-
share.card.annual.heatmap_title,share,DashboardPage,AnnualReportCard,heatmap_title,"TOKEN USAGE HEATMAP",,active
|
|
488
|
-
share.card.annual.total_tokens,share,DashboardPage,AnnualReportCard,total_tokens,"Total Tokens",,active
|
|
489
|
-
share.card.annual.estimated_cost,share,DashboardPage,AnnualReportCard,estimated_cost,"Estimated Cost",,active
|
|
490
|
-
share.card.annual.longest_streak,share,DashboardPage,AnnualReportCard,longest_streak,"Longest Streak",,active
|
|
491
|
-
share.card.annual.days_count,share,DashboardPage,AnnualReportCard,days_count,"{{days}} days",,active
|
|
492
|
-
share.card.annual.top_model,share,DashboardPage,AnnualReportCard,top_model,"Top Model",,active
|
|
493
|
-
usage.period.day,ui,DashboardPage,UsageOverview,period_day,"Day",,active
|
|
494
|
-
usage.period.week,ui,DashboardPage,UsageOverview,period_week,"Week",,active
|
|
495
|
-
usage.period.month,ui,DashboardPage,UsageOverview,period_month,"Month",,active
|
|
496
|
-
usage.period.total,ui,DashboardPage,UsageOverview,period_total,"Total",,active
|
|
497
|
-
usage.period.custom,ui,DashboardPage,UsageOverview,period_custom,"Custom",,active
|
|
498
|
-
usage.overview.tablist_aria,ui,DashboardPage,UsageOverview,tablist_aria,"Time period",,active
|
|
499
|
-
usage.overview.cost_breakdown_aria,ui,DashboardPage,UsageOverview,cost_breakdown_aria,"View cost breakdown",,active
|
|
500
|
-
usage.overview.distribution_aria,ui,DashboardPage,UsageOverview,distribution_aria,"Provider distribution: {{items}}",,active
|
|
501
|
-
usage.overview.distribution_item,ui,DashboardPage,UsageOverview,distribution_item,"{{label}} {{percent}}%",,active
|
|
502
|
-
usage.overview.provider_card_aria,ui,DashboardPage,UsageOverview,provider_card_aria,"{{provider}}: {{percent}}%, {{tokens}} tokens, {{cost}}. Click to {{action}} details",,active
|
|
503
|
-
usage.overview.expand,ui,DashboardPage,UsageOverview,expand,"expand",,active
|
|
504
|
-
usage.overview.collapse,ui,DashboardPage,UsageOverview,collapse,"collapse",,active
|
|
505
|
-
usage.overview.model_count,ui,DashboardPage,UsageOverview,model_count,"{{count}} models",,active
|
|
506
|
-
usage.overview.model_details_aria,ui,DashboardPage,UsageOverview,model_details_aria,"{{provider}} model details",,active
|
|
507
|
-
usage.overview.antigravity_notice_title,ui,DashboardPage,UsageOverview,antigravity_notice_title,"Estimated tokens",,active
|
|
508
|
-
usage.overview.antigravity_notice_body,ui,DashboardPage,UsageOverview,antigravity_notice_body,"Antigravity transcripts don't record real usage numbers. These counts are estimated from text length (~4 chars/token) and don't reflect Gemini's prompt-cache discount, so treat them as an upper bound, not a billing figure.",,active
|
|
509
|
-
limits.panel.title,ui,LimitsPage,UsageLimitsPanel,title,"Usage Limits",,active
|
|
510
|
-
limits.label.cursor_plan,ui,LimitsPage,UsageLimitsPanel,cursor_plan,"Plan",,active
|
|
511
|
-
limits.label.cursor_auto,ui,LimitsPage,UsageLimitsPanel,cursor_auto,"Auto",,active
|
|
512
|
-
limits.label.cursor_api,ui,LimitsPage,UsageLimitsPanel,cursor_api,"API",,active
|
|
513
|
-
limits.label.kiro_month,ui,LimitsPage,UsageLimitsPanel,kiro_month,"Month",,active
|
|
514
|
-
limits.label.kiro_bonus,ui,LimitsPage,UsageLimitsPanel,kiro_bonus,"Bonus",,active
|
|
515
|
-
limits.label.kimi_weekly,ui,LimitsPage,UsageLimitsPanel,kimi_weekly,"Weekly",,active
|
|
516
|
-
limits.label.kimi_5h,ui,LimitsPage,UsageLimitsPanel,kimi_5h,"5h",,active
|
|
517
|
-
limits.label.kimi_total,ui,LimitsPage,UsageLimitsPanel,kimi_total,"Total",,active
|
|
518
|
-
limits.label.kimi_parallel,ui,LimitsPage,UsageLimitsPanel,kimi_parallel,"Parallel: {{count}}",,active
|
|
519
|
-
limits.label.copilot_premium,ui,LimitsPage,UsageLimitsPanel,copilot_premium,"Premium",,active
|
|
520
|
-
limits.label.copilot_chat,ui,LimitsPage,UsageLimitsPanel,copilot_chat,"Chat",,active
|
|
521
|
-
limits.status.not_connected,ui,LimitsPage,UsageLimitsPanel,status_not_connected,"Not connected",,active
|
|
522
|
-
limits.status.no_data,ui,LimitsPage,UsageLimitsPanel,status_no_data,"No live limit data returned",,active
|
|
523
|
-
limits.status.all_hidden,ui,LimitsPage,UsageLimitsPanel,status_all_hidden,"All limit providers are hidden. Open display settings to show them.",,active
|
|
524
|
-
shared.time.now,shared,*,Shared,time_now,"now",,active
|
|
525
|
-
nav.ip_check,shared,*,Sidebar,nav_ip_check,Claude IP Check,,active
|
|
526
|
-
nav.skills,shared,*,Sidebar,nav_skills,Skills,,active
|
|
527
|
-
skills.page.title,ui,SkillsPage,SkillsPage,title,Skills,,active
|
|
528
|
-
skills.tab.my,ui,SkillsPage,SkillsPage,tab_my,My Skills,,active
|
|
529
|
-
skills.tab.browse,ui,SkillsPage,SkillsPage,tab_browse,Browse,,active
|
|
530
|
-
skills.action.refresh,ui,SkillsPage,SkillsPage,action_refresh,Refresh,,active
|
|
531
|
-
skills.action.install,ui,SkillsPage,SkillCard,action_install,Install,,active
|
|
532
|
-
skills.action.choose_targets,ui,SkillsPage,SkillCard,action_choose_targets,"Choose targets",,active
|
|
533
|
-
skills.target.menu_label,ui,SkillsPage,SkillCard,target_menu_label,"Install to",,active
|
|
534
|
-
skills.target.none,ui,SkillsPage,SkillsPage,target_none,"no targets",,active
|
|
535
|
-
skills.toast.installed,ui,SkillsPage,SkillsPage,toast_installed,"Installed {{name}} to {{targets}}.",,active
|
|
536
|
-
skills.action.remove,ui,SkillsPage,SkillsPage,action_remove,Remove,,active
|
|
537
|
-
skills.action.search,ui,SkillsPage,SkillsPage,action_search,Search,,active
|
|
538
|
-
skills.action.search_aria,ui,SkillsPage,SkillsPage,action_search_aria,"Search skills",,active
|
|
539
|
-
skills.target.synced_summary,ui,SkillsPage,InstalledSkillRow,target_synced_summary,"Synced to {{targets}}",,active
|
|
540
|
-
skills.target.synced_none,ui,SkillsPage,InstalledSkillRow,target_synced_none,"Not synced to any agent",,active
|
|
541
|
-
skills.row.open_details,ui,SkillsPage,InstalledSkillRow,row_open_details,"Open details for {{name}}",,active
|
|
542
|
-
skills.detail.close,ui,SkillsPage,SkillDetailPanel,detail_close,"Close details",,active
|
|
543
|
-
skills.detail.sync_section_title,ui,SkillsPage,SkillDetailPanel,detail_sync_section_title,"Sync to",,active
|
|
544
|
-
skills.detail.remove_button,ui,SkillsPage,SkillDetailPanel,detail_remove_button,"Remove from all agents",,active
|
|
545
|
-
skills.detail.remove_confirm_hint,ui,SkillsPage,SkillDetailPanel,detail_remove_confirm_hint,"This unsyncs the skill from every agent and deletes its local copy.",,active
|
|
546
|
-
skills.filter.agent_label,ui,SkillsPage,SkillsPage,filter_agent_label,"Agent",,active
|
|
547
|
-
skills.filter.agent_all,ui,SkillsPage,SkillsPage,filter_agent_all,"All agents",,active
|
|
548
|
-
skills.filter.clear,ui,SkillsPage,SkillsPage,filter_clear,"Clear filters",,active
|
|
549
|
-
skills.filter.result_count,ui,SkillsPage,SkillsPage,filter_result_count,"{{filtered}} of {{total}} skills",,active
|
|
550
|
-
skills.filter.result_count_browse,ui,SkillsPage,SkillsPage,filter_result_count_browse,"{{count}} results",,active
|
|
551
|
-
skills.empty.no_match,ui,SkillsPage,SkillsPage,empty_no_match,"No skills match the current filters.",,active
|
|
552
|
-
hint.dismiss,ui,shared,DismissibleHint,hint_dismiss,"Dismiss hint",,active
|
|
553
|
-
hint.dismissible_aria,ui,shared,DismissibleHint,hint_dismissible_aria,"Dismissible hint",,active
|
|
554
|
-
skills.card.installed,ui,SkillsPage,SkillCard,card_installed,Installed,,active
|
|
555
|
-
skills.card.targets_prefix,ui,SkillsPage,SkillCard,card_targets_prefix,"Will install to:",,active
|
|
556
|
-
skills.card.targets_change,ui,SkillsPage,SkillCard,card_targets_change,Change,,active
|
|
557
|
-
skills.card.installs,ui,SkillsPage,SkillCard,installs,"{{count}} installs",,active
|
|
558
|
-
skills.source.label,ui,SkillsPage,SkillsPage,source_label,Source,,active
|
|
559
|
-
skills.source.all,ui,SkillsPage,SkillsPage,source_all,All repositories,,active
|
|
560
|
-
skills.mode.repo,ui,SkillsPage,SkillsPage,mode_repo,Repositories,,active
|
|
561
|
-
skills.mode.skillssh,ui,SkillsPage,SkillsPage,mode_skillssh,skills.sh,,active
|
|
562
|
-
skills.browse.placeholder_all,ui,SkillsPage,SkillsPage,browse_placeholder_all,"Search across enabled repositories…",,active
|
|
563
|
-
skills.browse.placeholder_repo,ui,SkillsPage,SkillsPage,browse_placeholder_repo,"Search in {{repo}}…",,active
|
|
564
|
-
skills.browse.placeholder_skillssh,ui,SkillsPage,SkillsPage,browse_placeholder_skillssh,"Search the skills.sh registry…",,active
|
|
565
|
-
skills.browse.empty_sources,ui,SkillsPage,SkillsPage,browse_empty_sources,"Add a GitHub repository below to start browsing skills.",,active
|
|
566
|
-
skills.browse.add_repo_hint,ui,SkillsPage,SkillsPage,browse_add_repo_hint,"Need more skills? Add a GitHub repository.",,active
|
|
567
|
-
skills.browse.manage_sources,ui,SkillsPage,SkillsPage,browse_manage_sources,Manage sources,,active
|
|
568
|
-
skills.browse.hint_skillssh,ui,SkillsPage,SkillsPage,browse_hint_skillssh,"Type at least 2 characters to search skills.sh.",,active
|
|
569
|
-
skills.browse.loading_hint,ui,SkillsPage,SkillsPage,browse_loading_hint,"Fetching skill metadata from GitHub. First load can take up to a minute; results are cached.",,active
|
|
570
|
-
skills.error.generic,ui,SkillsPage,SkillsPage,error_generic,"Skill operation failed.",,active
|
|
571
|
-
skills.confirm.remove_title,ui,SkillsPage,SkillsPage,confirm_remove_title,"Remove {{name}}?",,active
|
|
572
|
-
skills.confirm.remove_managed,ui,SkillsPage,SkillsPage,confirm_remove_managed,"This skill will be removed from every connected AI tool. You'll have a few seconds to undo.",,active
|
|
573
|
-
skills.confirm.remove_local,ui,SkillsPage,SkillsPage,confirm_remove_local,"This will delete the skill folder on disk from every connected AI tool. This cannot be undone.",,active
|
|
574
|
-
skills.toast.removed,ui,SkillsPage,SkillsPage,toast_removed,"Removed {{name}}.",,active
|
|
575
|
-
shared.action.undo,shared,*,Shared,action_undo,"Undo",,active
|
|
576
|
-
shared.action.cancel,shared,*,Shared,action_cancel,"Cancel",,active
|
|
577
|
-
skills.empty.my,ui,SkillsPage,SkillsPage,empty_my,"No skills yet. Open Discover to search and install.",,active
|
|
578
|
-
skills.empty.my_cta,ui,SkillsPage,SkillsPage,empty_my_cta,"Browse",,active
|
|
579
|
-
skills.empty.browse,ui,SkillsPage,SkillsPage,empty_browse,"No skills found for this source.",,active
|
|
580
|
-
skills.empty.search,ui,SkillsPage,SkillsPage,empty_search,"No results. Try a different query.",,active
|
|
581
|
-
skills.repo.placeholder,ui,SkillsPage,SkillsPage,repo_placeholder,"owner/repository",,active
|
|
582
|
-
skills.repo.add,ui,SkillsPage,SkillsPage,repo_add,"Add repository",,active
|
|
583
|
-
skills.repo.invalid,ui,SkillsPage,SkillsPage,repo_invalid,"Use owner/repository or a GitHub repository URL.",,active
|
|
584
|
-
skills.repo.remove,ui,SkillsPage,RepoRow,repo_remove,"Remove repository",,active
|
|
585
|
-
settings.appearance.language.label,ui,SettingsPage,SettingsPage,language_label,Language,,active
|
|
586
|
-
settings.appearance.language.hint,ui,SettingsPage,SettingsPage,language_hint,Use System to follow your computer language by default.,,active
|
|
587
|
-
settings.appearance.language.system,ui,SettingsPage,SettingsPage,language_system,System,,active
|
|
588
|
-
settings.appearance.language.english,ui,SettingsPage,SettingsPage,language_english,English,,active
|
|
589
|
-
settings.appearance.language.chinese,ui,SettingsPage,SettingsPage,language_chinese,Simplified Chinese,,active
|
|
590
|
-
dashboard.context_breakdown.empty,dashboard,DashboardPage,ContextBreakdownPanel,empty,"No Claude Code activity in the selected period.",,active
|
|
591
|
-
dashboard.context_breakdown.empty_codex,dashboard,DashboardPage,ContextBreakdownPanel,empty_codex,"No Codex activity in the selected period.",,active
|
|
592
|
-
dashboard.context_breakdown.error,dashboard,DashboardPage,ContextBreakdownPanel,error,"Couldn't read Claude Code logs for this view.",,active
|
|
593
|
-
dashboard.context_breakdown.error_codex,dashboard,DashboardPage,ContextBreakdownPanel,error_codex,"Couldn't read Codex logs for this view.",,active
|
|
594
|
-
dashboard.context_breakdown.bar_aria,dashboard,DashboardPage,ContextBreakdownPanel,bar_aria,"Token distribution: {{summary}}",,active
|
|
595
|
-
dashboard.context_breakdown.system_prefix_tooltip,dashboard,DashboardPage,ContextBreakdownPanel,tooltip,"System prompt, tools schema, skills, rules, and MCP descriptions are cached together as one prefix and can't be separated from the logs.",,active
|
|
596
|
-
dashboard.context_breakdown.footnote,dashboard,DashboardPage,ContextBreakdownPanel,footnote,"Approximate: cache reads accumulate across turns, so conversation history dominates over time. Only Claude Code logs expose the per-message detail this view requires.",,active
|
|
597
|
-
dashboard.context_breakdown.footnote_codex,dashboard,DashboardPage,ContextBreakdownPanel,footnote_codex,"Codex uses non-overlapping token buckets here. Tool and exec drill-downs are separate heuristic attributions over the same turns.",,active
|
|
598
|
-
dashboard.context_breakdown.category.system_prompt,dashboard,DashboardPage,ContextBreakdownPanel,cat,"System prompt",,active
|
|
599
|
-
dashboard.context_breakdown.category.messages,dashboard,DashboardPage,ContextBreakdownPanel,cat,"Messages",,active
|
|
600
|
-
dashboard.context_breakdown.category.tool_calls,dashboard,DashboardPage,ContextBreakdownPanel,cat,"Tool calls",,active
|
|
601
|
-
dashboard.context_breakdown.category.mcp_servers,dashboard,DashboardPage,ContextBreakdownPanel,cat,"MCP servers",,active
|
|
602
|
-
dashboard.context_breakdown.category.custom_agents,dashboard,DashboardPage,ContextBreakdownPanel,cat,"Custom agents",,active
|
|
603
|
-
dashboard.context_breakdown.category.reasoning,dashboard,DashboardPage,ContextBreakdownPanel,cat,"Reasoning",,active
|
|
604
|
-
dashboard.context_breakdown.category.skills,dashboard,DashboardPage,ContextBreakdownPanel,cat,"Skills",,active
|
|
605
|
-
dashboard.context_breakdown.loading_aria,dashboard,DashboardPage,ContextBreakdownPanel,loading_aria,"Loading context breakdown",,active
|
|
606
|
-
dashboard.context_breakdown.loading_hint,dashboard,DashboardPage,ContextBreakdownPanel,loading_hint,"Scanning session logs…",,active
|
|
607
|
-
dashboard.context_breakdown.tool_details.total_column,dashboard,DashboardPage,ContextBreakdownPanel,tool_details_total_column,"Total",,active
|
|
608
|
-
dashboard.context_breakdown.tool_details.unavailable_codex,dashboard,DashboardPage,ContextBreakdownPanel,tool_details_unavailable_codex,"Tool-level Codex details are unavailable for this period; showing queue totals only.",,active
|
|
609
|
-
dashboard.context_breakdown.message_details.title,dashboard,DashboardPage,ContextBreakdownPanel,message_details_title,"Message details",,active
|
|
610
|
-
dashboard.context_breakdown.message_details.note,dashboard,DashboardPage,ContextBreakdownPanel,message_details_note,"Aggregated only — message text is not stored.",,active
|
|
611
|
-
dashboard.context_breakdown.message_details.category_column,dashboard,DashboardPage,ContextBreakdownPanel,message_details_category_column,"Category",,active
|
|
612
|
-
dashboard.context_breakdown.message_details.user_input,dashboard,DashboardPage,ContextBreakdownPanel,message_details_user_input,"User input",,active
|
|
613
|
-
dashboard.context_breakdown.message_details.conversation_history,dashboard,DashboardPage,ContextBreakdownPanel,message_details_conversation_history,"Conversation history",,active
|
|
614
|
-
dashboard.context_breakdown.message_details.assistant_response,dashboard,DashboardPage,ContextBreakdownPanel,message_details_assistant_response,"Assistant response",,active
|
|
615
|
-
dashboard.context_breakdown.exec_details.title,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_title,"Exec command details",,active
|
|
616
|
-
dashboard.context_breakdown.exec_details.kind_column,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_kind_column,"Type",,active
|
|
617
|
-
dashboard.context_breakdown.exec_details.calls_column,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_calls_column,"Calls",,active
|
|
618
|
-
dashboard.context_breakdown.exec_details.failures_column,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_failures_column,"Fail",,active
|
|
619
|
-
dashboard.context_breakdown.exec_details.duration_column,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_duration_column,"Duration",,active
|
|
620
|
-
dashboard.context_breakdown.exec_details.max_duration_column,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_max_duration_column,"Max",,active
|
|
621
|
-
dashboard.context_breakdown.exec_details.output_column,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_output_column,"Lines",,active
|
|
622
|
-
dashboard.context_breakdown.exec_details.group_by_type,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_group_by_type,"By type",,active
|
|
623
|
-
dashboard.context_breakdown.exec_details.group_by_executable,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_group_by_executable,"Executable",,active
|
|
624
|
-
dashboard.context_breakdown.exec_details.group_by_command,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_group_by_command,"Command",,active
|
|
625
|
-
dashboard.context_breakdown.exec_details.group_by_duration,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_group_by_duration,"Duration",,active
|
|
626
|
-
dashboard.context_breakdown.exec_details.group_by_output,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_group_by_output,"Output",,active
|
|
627
|
-
dashboard.context_breakdown.exec_details.group_by_exit,dashboard,DashboardPage,ContextBreakdownPanel,exec_details_group_by_exit,"By exit",,active
|
|
628
|
-
heatmap.3d.hover_tip,ui,ActivityHeatmap,ActivityHeatmap,hover_tip,"Click to enter 3D fullscreen rotation analysis mode",,active
|
|
629
|
-
heatmap.3d.modal.title,ui,ActivityHeatmap,ActivityHeatmap,title,"Token 3D Perspective",,active
|
|
630
|
-
heatmap.3d.modal.desc,ui,ActivityHeatmap,ActivityHeatmap,desc,"Drag with left mouse button to rotate. Hover to inspect daily activity and multidimensional metrics.",,active
|
|
631
|
-
heatmap.3d.modal.stats.total_tokens,ui,ActivityHeatmap,ActivityHeatmap,stats_total_tokens,"Annual Total Tokens",,active
|
|
632
|
-
heatmap.3d.modal.stats.precision_total_tokens,ui,ActivityHeatmap,ActivityHeatmap,stats_precision_total_tokens,"Precise annual consumption",,active
|
|
633
|
-
heatmap.3d.modal.stats.estimated_cost,ui,ActivityHeatmap,ActivityHeatmap,stats_estimated_cost,"Annual Estimated Cost",,active
|
|
634
|
-
heatmap.3d.modal.stats.active_rate_days,ui,ActivityHeatmap,ActivityHeatmap,stats_active_rate_days,"Active Rate / Days",,active
|
|
635
|
-
heatmap.3d.modal.stats.max_streak,ui,ActivityHeatmap,ActivityHeatmap,stats_max_streak,"Longest Active Streak",,active
|
|
636
|
-
heatmap.3d.modal.stats.days_suffix,ui,ActivityHeatmap,ActivityHeatmap,stats_days_suffix,"Days",,active
|
|
637
|
-
heatmap.3d.modal.stats.peak_day,ui,ActivityHeatmap,ActivityHeatmap,stats_peak_day,"Peak Day Blowout",,active
|
|
638
|
-
heatmap.3d.modal.stats.precision_peak_value,ui,ActivityHeatmap,ActivityHeatmap,stats_precision_peak_value,"Precise daily peak",,active
|
|
639
|
-
heatmap.3d.modal.stats.no_data,ui,ActivityHeatmap,ActivityHeatmap,stats_no_data,"No data",,active
|
|
640
|
-
heatmap.3d.modal.legend.title,ui,ActivityHeatmap,ActivityHeatmap,legend_title,"Activity Levels",,active
|
|
641
|
-
heatmap.3d.modal.palette.emerald,ui,ActivityHeatmap,ActivityHeatmap,palette_emerald,"Emerald City",,active
|
|
642
|
-
heatmap.3d.modal.palette.ocean,ui,ActivityHeatmap,ActivityHeatmap,palette_ocean,"Ocean Abyss",,active
|
|
643
|
-
heatmap.3d.modal.palette.neon,ui,ActivityHeatmap,ActivityHeatmap,palette_neon,"Cyber Neon",,active
|
|
644
|
-
heatmap.3d.modal.palette.amber,ui,ActivityHeatmap,ActivityHeatmap,palette_amber,"Blazing Amber",,active
|
|
645
|
-
heatmap.3d.modal.control.play,ui,ActivityHeatmap,ActivityHeatmap,control_play,"Start slow rotation",,active
|
|
646
|
-
heatmap.3d.modal.control.pause,ui,ActivityHeatmap,ActivityHeatmap,control_pause,"Pause auto-rotation",,active
|
|
647
|
-
heatmap.3d.modal.control.reset,ui,ActivityHeatmap,ActivityHeatmap,control_reset,"Reset 3D view",,active
|
|
648
|
-
heatmap.3d.modal.footer.tip,ui,ActivityHeatmap,ActivityHeatmap,footer_tip,"Pinch to zoom / Scroll to zoom / Drag to rotate 3D chart",,active
|
|
649
|
-
heatmap.3d.modal.ai.title.default,ui,ActivityHeatmap,ActivityHeatmap,ai_title_default,"Persistent Creator",,active
|
|
650
|
-
heatmap.3d.modal.ai.eval.default,ui,ActivityHeatmap,ActivityHeatmap,ai_eval_default,"Persist in the river of technology. Daily coding may not always be majestic, but every tiny active point records your thoughts and exploration. Sparks accumulate, eventually converging into your own digital ocean.",,active
|
|
651
|
-
heatmap.3d.modal.ai.title.peak,ui,ActivityHeatmap,ActivityHeatmap,ai_title_peak,"Peak Contributor",,active
|
|
652
|
-
heatmap.3d.modal.ai.eval.peak,ui,ActivityHeatmap,ActivityHeatmap,ai_eval_peak,"This year, your token output shows extremely high engineering density. This scale of development is equivalent to deeply participating in the refactoring of a medium-to-large system base, with each keystroke converging complex logic into deterministic code. A testament to pure engineering passion.",,active
|
|
653
|
-
heatmap.3d.modal.ai.title.heavy,ui,ActivityHeatmap,ActivityHeatmap,ai_title_heavy,"Heavy Producer",,active
|
|
654
|
-
heatmap.3d.modal.ai.eval.heavy,ui,ActivityHeatmap,ActivityHeatmap,ai_eval_heavy,"Exceptional continuous output. Your accumulated tokens have reached millions, equivalent to the volume of dozens of technical novellas. The highly saturated coding pace demonstrates your great execution in building digital assets.",,active
|
|
655
|
-
heatmap.3d.modal.ai.title.core,ui,ActivityHeatmap,ActivityHeatmap,ai_title_core,"Core Productivity Expert",,active
|
|
656
|
-
heatmap.3d.modal.ai.eval.core,ui,ActivityHeatmap,ActivityHeatmap,ai_eval_core,"Highly resilient long-term commitment. Over the past year, you have steadily maintained a high-intensity development rhythm. With solid code volume and token output, you have silently built the core architecture, a true engineering backbone.",,active
|
|
657
|
-
heatmap.3d.modal.ai.title.steady,ui,ActivityHeatmap,ActivityHeatmap,ai_title_steady,"Steady Developer",,active
|
|
658
|
-
heatmap.3d.modal.ai.eval.steady,ui,ActivityHeatmap,ActivityHeatmap,ai_eval_steady,"Steady and firm accumulation of technology. Every step of token increment is a brick in the foundation of your future. This slow but steady pace is the path for an excellent developer to become an engineering master.",,active
|
|
659
|
-
heatmap.3d.voxel.joke.1,ui,ActivityHeatmap3D,ActivityHeatmap3D,voxel_joke1,"🔥 Extremely crazy! Produced {{value}} tokens! Are you training a large language model or writing a compiler by hand?",,active
|
|
660
|
-
heatmap.3d.voxel.joke.2,ui,ActivityHeatmap3D,ActivityHeatmap3D,voxel_joke2,"🚀 Epic output! Total {{value}} tokens. Today's production can circle the earth once, even the AI is amazed by you!",,active
|
|
661
|
-
heatmap.3d.voxel.joke.3,ui,ActivityHeatmap3D,ActivityHeatmap3D,voxel_joke3,"⚡ Critical Day! {{value}} tokens. Code is gushing out, and the keyboard is starting to smoke!",,active
|
|
662
|
-
heatmap.3d.voxel.level3,ui,ActivityHeatmap3D,ActivityHeatmap3D,voxel_level3,"⚡ Productivity explosion ({{value}} tokens)! High efficiency and focus, keep up this peak state!",,active
|
|
663
|
-
heatmap.3d.voxel.level2,ui,ActivityHeatmap3D,ActivityHeatmap3D,voxel_level2,"🌱 Getting into the groove ({{value}} tokens)! Steady output, every keystroke is contributing to the architecture.",,active
|
|
664
|
-
heatmap.3d.voxel.level1,ui,ActivityHeatmap3D,ActivityHeatmap3D,voxel_level1,"🍃 Every drop counts ({{value}} tokens). Tiny commits are investments in the future, embrace compound interest!",,active
|
|
665
|
-
heatmap.3d.voxel.level0,ui,ActivityHeatmap3D,ActivityHeatmap3D,voxel_level0,"💤 Recharging. On days without coding, inspiration grows silently.",,active
|
|
666
|
-
`,sL={"header.auth.sign_in_aria":"登录","login.back_home":"返回首页","login.cloud_only":"未配置云端登录。请使用 localhost 上的本地仪表盘。","login.title":"登录","login.subtitle":"选择邮箱或已连接账号。","login.dismiss":"关闭","login.verify_email_success":"邮箱已验证。你现在可以登录。","login.verify_email_pending":"请先在邮箱中完成验证,然后再登录。","login.oauth.continue":"使用 {{provider}} 继续","login.divider":"或","login.tab.sign_in":"登录","login.tab.sign_up":"创建账户","login.field.name":"显示名称","login.field.name_placeholder":"可选","login.field.email":"电子邮件","login.field.password":"密码","login.password_hint":"至少 {{min}} 个字符。","login.submit.sign_in":"使用邮箱登录","login.submit.sign_up":"创建账号","auth.callback.processing":"处理中…","auth.callback.success":"登录成功","auth.callback.redirecting":"正在返回 TokenTracker…","auth.callback.failed":"登录未完成,请重试。","auth.callback.close":"关闭此页","login_modal.subtitle":"登录以加入排行榜","login_modal.continue_email":"使用邮箱继续","login_modal.divider_email":"邮箱","shared.placeholder.short":"--","shared.unit.percent":"%","shared.unit.thousand_abbrev":"K","shared.unit.million_abbrev":"M","shared.unit.billion_abbrev":"B","shared.data_source":"数据来源:{{source}}","shared.error.prefix":"错误:{{error}}","shared.status.unsynced":"—","shared.time.now":"刚刚","error.boundary.title":"出了点问题","error.boundary.subtitle":"这个视图渲染失败了","error.boundary.hint":"打开控制台,然后重新加载页面","error.boundary.no_details":"没有错误详细信息","error.boundary.action.reload":"重新加载","identity_card.rank_label":"排名","identity_card.streak_label":"活跃天数","identity_card.rank_placeholder":"—","identity_card.streak_value":"{{days}} 天","usage.summary.total":"Token 总数","usage.period.day":"日","usage.period.week":"周","usage.period.month":"月","usage.period.total":"总计","usage.period.custom":"自定义","usage.metric.total":"总计","usage.metric.input":"输入","usage.metric.output":"输出","usage.metric.cached_input":"缓存输入","usage.metric.reasoning_output":"推理输出","usage.button.refresh":"刷新","usage.overview.tablist_aria":"时间范围","usage.overview.cost_breakdown_aria":"查看成本明细","usage.overview.distribution_aria":"来源占比:{{items}}","usage.overview.distribution_item":"{{label}} {{percent}}%","usage.overview.provider_card_aria":"{{provider}}:{{percent}}%,{{tokens}} Token,{{cost}}。点击{{action}}详情","usage.overview.expand":"展开","usage.overview.collapse":"收起","usage.overview.model_count":"{{count}} 个模型","usage.overview.model_details_aria":"{{provider}} 模型详情","widgets.page.title":"组件","widgets.cta.open_gallery":"打开小组件库","widgets.cta.download":"下载 Mac 应用","widgets.cta.macos_only":"仅限 macOS","widgets.menubar.section.title":"菜单栏","widgets.gallery.section.title":"桌面小组件","widgets.summary.name":"使用概览","widgets.summary.description":"今天和近 7 天的用量,以及紧凑趋势线。","widgets.heatmap.name":"热力图","widgets.heatmap.description":"像 GitHub 一样,一眼看清活跃和空闲的日子。","widgets.topModels.name":"热门模型","widgets.topModels.description":"你最常用的模型,按 Token 占比排序。","widgets.limits.name":"使用限制","widgets.limits.description":"Claude、Codex、Cursor、Gemini 等的实时速率限制进度。","daily.sort.date.label":"日期","daily.sort.date.title":"按日期排序","daily.sort.total.label":"总计","daily.sort.total.title":"按总计排序","daily.sort.input.label":"输入","daily.sort.input.title":"按输入排序","daily.sort.output.label":"输出","daily.sort.output.title":"按输出排序","daily.sort.cached.label":"缓存","daily.sort.cached.title":"按缓存输入排序","daily.sort.reasoning.label":"推理","daily.sort.reasoning.title":"按推理输出排序","daily.sort.conversations.label":"对话数","daily.sort.conversations.title":"按对话排序","details.pagination.prev":"上一页","details.pagination.next":"下一页","limits.copilot.otelHint.title":"跟踪 Copilot Token 使用情况","limits.copilot.otelHint.body":"限额信息通过你的 GitHub OAuth 令牌读取。如果还想记录逐 Token 用量,请启用 Copilot 的 OpenTelemetry 导出,把下面这段加到你的 shell 配置文件(~/.zshrc 或 ~/.bashrc):","limits.copilot.otelHint.copy":"复制","limits.copilot.otelHint.copied":"已复制","limits.panel.title":"使用限制","limits.label.cursor_plan":"套餐","limits.label.cursor_auto":"自动","limits.label.cursor_api":"API","limits.label.kiro_month":"月度","limits.label.kiro_bonus":"奖励","limits.label.kimi_weekly":"周","limits.label.kimi_5h":"5h","limits.label.kimi_total":"总量","limits.label.kimi_parallel":"并发:{{count}}","limits.label.copilot_premium":"高级","limits.label.copilot_chat":"对话","limits.status.not_connected":"未连接","limits.status.no_data":"未返回实时限额数据","limits.status.all_hidden":"所有限额提供商都已隐藏。请打开显示设置重新显示。","nav.usage":"用量","nav.limits":"限额","nav.widgets":"小组件","nav.skills":"Skills","nav.leaderboard":"排行榜","nav.collapse":"折叠侧边栏","nav.expand":"展开侧边栏","nav.menu":"打开导航菜单","nav.close_menu":"关闭导航菜单","nav.aside_label":"主导航","nav.nav_label":"导航","limits.page.subtitle":"AI 工具的速率限制和配额使用情况。","limits.settings.toggle_visible":"切换可见性","limits.page.openSettings":"显示设置","nav.group.general":"常规","nav.group.tools":"工具","nav.group.account":"账户","nav.settings":"设置","header.auth.open_settings":"打开设置","settings.page.title":"设置","settings.page.subtitle":"管理你的账户、外观和显示偏好。","settings.section.appearance":"外观","settings.section.account":"账户","settings.section.limits":"限制显示","settings.appearance.theme.label":"主题","settings.appearance.theme.hint":"选择 Token Tracker 在仪表盘中的显示方式。","settings.appearance.theme.light":"浅色","settings.appearance.theme.dark":"深色","settings.appearance.theme.system":"系统","settings.account.displayName":"显示名称","settings.account.edit":"编辑","settings.account.save":"保存","settings.account.saving":"保存...","settings.account.cancel":"取消","settings.account.userId":"用户 ID","settings.account.copyUserId":"复制用户 ID","settings.account.copy":"复制","settings.account.copied":"已复制","settings.account.cloudSync":"云同步","settings.account.cloudSyncHint":"将本地用量上传到你的 Token Tracker 云端账号。","settings.account.publicProfile":"公开主页","settings.account.publicProfileHint":"在公开排行榜中展示你的用量。","settings.account.displayNameAnonymousHint":"匿名状态下,排行榜会隐藏你的名字和头像","settings.account.displayNameDisabledWhileAnon":"请先关闭匿名,再编辑名字","settings.account.githubUrl":"GitHub 主页","settings.account.githubUrlHint":"在排行榜名字旁显示 GitHub 链接。","settings.account.githubUrlPlaceholder":"用户名或 https://github.com/用户名","settings.account.githubUrlInvalid":"请输入 GitHub 用户名,或 https://github.com/用户名","leaderboard.github.aria":"打开 GitHub 主页","leaderboard.github.tooltipAction":"点击查看 GitHub 主页","leaderboard.github.tooltipPrefix":"可在","leaderboard.github.tooltipSettingsLink":"设置","leaderboard.github.tooltipSuffix":"中配置你的主页","settings.account.signOut":"退出登录","settings.account.signIn":"登录","settings.account.signedOutHint":"登录后可管理云同步和排行榜偏好。","settings.section.menubar":"菜单栏应用","settings.menubar.showStats":"在菜单栏中显示统计信息","settings.menubar.showStatsHint":"在菜单栏图标旁边显示今天的Token 数量和成本。","settings.menubar.animatedIcon":"动画图标","settings.menubar.animatedIconHint":"闪烁 Clawd 角色并在菜单栏中播放同步动画。","settings.menubar.launchAtLogin":"登录时启动","settings.menubar.launchAtLoginHint":"登录 macOS 时自动启动 TokenTrackerBar。","settings.menubar.syncNow":"立即同步","settings.menubar.syncNowHint":"触发本地AI工具日志立即解析并上传。","settings.menubar.syncing":"正在同步...","settings.menubar.updates":"更新","settings.menubar.checkUpdates":"检查更新","menubar.slot.primary":"第一个位置","menubar.slot.secondary":"第二个位置","menubar.native_only":"打开 macOS 版 TokenTrackerBar 后可编辑菜单栏显示。","menubar.metric.today_tokens":"今日 Token","menubar.metric.today_cost":"今日成本","menubar.metric.last_7d_tokens":"近 7 天 Token","menubar.metric.total_tokens":"总 Token","menubar.metric.total_cost":"总成本","menubar.metric.claude_5h":"Claude 5 小时限额","menubar.metric.claude_7d":"Claude 7 天限额","menubar.metric.codex_5h":"Codex 5 小时限额","menubar.metric.codex_7d":"Codex 7 天限额","nav.ip_check":"Claude IP 检查","skills.page.title":"Skills","skills.tab.my":"我的","skills.tab.browse":"发现","skills.action.refresh":"刷新","skills.action.install":"安装","skills.action.choose_targets":"选择目标","skills.target.menu_label":"安装到","skills.target.none":"未选目标","skills.toast.installed":"已把 {{name}} 安装到 {{targets}}。","skills.action.remove":"移除","skills.action.search":"搜索","skills.action.search_aria":"搜索 skills","skills.target.synced_summary":"已同步到 {{targets}}","skills.target.synced_none":"尚未同步到任何 agent","skills.row.open_details":"查看 {{name}} 详情","skills.detail.close":"关闭详情","skills.detail.sync_section_title":"同步到","skills.detail.remove_button":"从所有 agent 移除","skills.detail.remove_confirm_hint":"这会从每个 agent 取消同步并删除本地副本。","skills.filter.agent_label":"Agent","skills.filter.agent_all":"全部 agent","skills.filter.clear":"清除筛选","skills.filter.result_count":"{{filtered}} / {{total}} 个 skill","skills.filter.result_count_browse":"{{count}} 个结果","skills.empty.no_match":"当前筛选下没有匹配的 skill。","hint.dismiss":"关闭提示","hint.dismissible_aria":"可关闭的提示","skills.card.installed":"已安装","skills.card.targets_prefix":"将安装到:","skills.card.targets_change":"更改","skills.card.installs":"{{count}} 次安装","skills.source.label":"来源","skills.source.all":"全部仓库","skills.mode.repo":"仓库","skills.mode.skillssh":"skills.sh","skills.browse.placeholder_all":"在已启用的仓库里搜索…","skills.browse.placeholder_repo":"在 {{repo}} 中搜索…","skills.browse.placeholder_skillssh":"在 skills.sh 仓库中搜索…","skills.browse.empty_sources":"添加一个 GitHub 仓库以开始浏览技能。","skills.browse.add_repo_hint":"想要更多 skill?添加一个 GitHub 仓库。","skills.browse.manage_sources":"管理来源","skills.browse.hint_skillssh":"至少输入 2 个字符以搜索 skills.sh。","skills.browse.loading_hint":"正在从 GitHub 拉取 skill 信息,首次加载可能需要一分钟,结果会缓存。","skills.error.generic":"Skill 操作失败。","skills.confirm.remove_title":"要移除 {{name}} 吗?","skills.confirm.remove_managed":"这个 skill 将从所有已连接的 AI 工具中移除,几秒内可以撤销。","skills.confirm.remove_local":"将从所有 AI 工具目录中删除该 skill 文件夹。此操作无法撤销。","skills.toast.removed":"已移除 {{name}}。","shared.action.undo":"撤销","shared.action.cancel":"取消","skills.empty.my":"还没有 skill。去「发现」搜索或安装。","skills.empty.my_cta":"去发现","skills.empty.browse":"这个来源下没有找到技能。","skills.empty.search":"没有结果,换个关键词试试。","skills.repo.placeholder":"owner/repository","skills.repo.add":"添加仓库","skills.repo.invalid":"请输入 owner/repository 或 GitHub 仓库 URL。","skills.repo.remove":"移除仓库","settings.appearance.language.label":"语言","settings.appearance.language.hint":"使用“系统”时会默认跟随本机语言。","settings.appearance.language.system":"系统","settings.appearance.language.english":"英语","settings.appearance.language.chinese":"简体中文"},oL={"usage.overview.antigravity_notice_title":"Token 为估算值","usage.overview.antigravity_notice_body":"Antigravity 的本地日志没有真实用量字段,这里的数字是按字符长度(约 4 字符/Token)估算出来的,也没有扣除 Gemini 的 prompt cache 折扣。请把它当作上限估算,不要直接对账账单。","stats.period.today":"今日","stats.period.week":"本周","stats.period.month":"本月","stats.period.all":"全部","stats.period.convs":"对话","dashboard.core_index.collapse_label":"▾","dashboard.core_index.expand_label":"▸","dashboard.core_index.collapse_aria":"折叠模型分解","dashboard.core_index.expand_aria":"展开模型细分","dashboard.rolling.title":"最近的活动","dashboard.rolling.last_7d":"过去 7 天","dashboard.rolling.last_30d":"过去 30 天","dashboard.rolling.avg_active_day":"日平均","dashboard.projects.title":"项目用量","dashboard.projects.tokens_label":"Token","dashboard.projects.stars_label":"星标","dashboard.projects.limit_label":"展示","dashboard.projects.limit_aria":"选择仓库显示数量","dashboard.projects.limit_top_3":"前 3 名","dashboard.projects.limit_top_6":"前 6 名","dashboard.projects.limit_top_10":"前 10 名","dashboard.projects.empty":"没有公开仓库","dashboard.widgets.title":"桌面小组件","dashboard.widgets.hint":"右键点按桌面 → 编辑小组件 → 搜索“TokenTracker”","dashboard.widgets.dismiss_aria":"关闭小组件介绍","dashboard.cost_breakdown.title":"成本明细","dashboard.cost_breakdown.total_label":"预计总成本","dashboard.cost_breakdown.close":"关闭","trend.monitor.label":"使用趋势","heatmap.title":"热力图","heatmap.empty":"尚无活动数据。","heatmap.legend.less":"少","heatmap.legend.more":"多","heatmap.legend.utc":"UTC","heatmap.tooltip":"{{day}} • {{value}} {{unit}} • {{tz}}","heatmap.unit.tokens":"Token","heatmap.month.jan":"1月","heatmap.month.feb":"2月","heatmap.month.mar":"3月","heatmap.month.apr":"4月","heatmap.month.may":"5月","heatmap.month.jun":"6月","heatmap.month.jul":"7月","heatmap.month.aug":"8月","heatmap.month.sep":"9月","heatmap.month.oct":"10月","heatmap.month.nov":"11月","heatmap.month.dec":"12月","heatmap.day.sun":"日","heatmap.day.mon":"一","heatmap.day.tue":"二","heatmap.day.wed":"三","heatmap.day.thu":"四","heatmap.day.fri":"五","heatmap.day.sat":"六","dashboard.session_expired.copy_label":"运行 npx --yes tokentracker-cli init","dashboard.session_expired.copied":"已复制","dashboard.install.prompt":"安装 Node.js 18+ 然后运行:","dashboard.install.cmd.init":"npx --yes tokentracker-cli init","dashboard.install.cmd.init_link_code":"npx --yes tokentracker-cli init --link-code {{link_code}}","dashboard.install.copy":"复制安装命令","dashboard.install.copy_base":"复制初始化命令","dashboard.install.copied":"已复制到剪贴板","dashboard.install.link_code.loading":"正在生成专属代码...","dashboard.install.link_code.failed":"专属代码不可用","dashboard.install.cmd.sync":"npx --yes tokentracker-cli sync","dashboard.daily.title":"每日细目","dashboard.daily.empty":"还没有数据。先使用 AI CLI,再运行 {{cmd}}。","dashboard.identity.title":"你的个人资料","dashboard.identity.subtitle":"记录你的编码之旅","dashboard.identity.fallback":"匿名用户","dashboard.screenshot.title_line1":"AI 编程助手","dashboard.screenshot.title_line2":"2025 年度回顾","dashboard.screenshot.twitter_button":"分享到 X","dashboard.screenshot.twitter_label":"分享到 X","dashboard.screenshot.twitter_hint":"自动将图像复制到剪贴板","dashboard.screenshot.twitter_text":"记录中的 {{total_tokens}} Token。\\n{{model_name}} 以 {{model_percent}}% 领先。\\n\\n我的 AI 使用情况,未经审计 →\\ntokentracker.cc","heatmap.3d.hover_tip":"点击进入 3D 全屏旋转分析模式","heatmap.3d.modal.title":"Token 三维透视","heatmap.3d.modal.desc":"按住左键拖拽可任意旋转,悬浮感知每日活跃数据与多维统计。","heatmap.3d.modal.stats.total_tokens":"年度 Token 总量","heatmap.3d.modal.stats.precision_total_tokens":"精准年消耗量","heatmap.3d.modal.stats.estimated_cost":"年度估算费用","heatmap.3d.modal.stats.active_rate_days":"活跃占比 / 天数","heatmap.3d.modal.stats.max_streak":"最长连续活跃","heatmap.3d.modal.stats.days_suffix":"天","heatmap.3d.modal.stats.peak_day":"单日峰值暴击","heatmap.3d.modal.stats.precision_peak_value":"精确单日峰值","heatmap.3d.modal.stats.no_data":"无数据","heatmap.3d.modal.legend.title":"活跃度层级","heatmap.3d.modal.palette.emerald":"翡翠之城","heatmap.3d.modal.palette.ocean":"深海浩瀚","heatmap.3d.modal.palette.neon":"赛博霓虹","heatmap.3d.modal.palette.amber":"烈焰余晖","heatmap.3d.modal.control.play":"启动慢速自转","heatmap.3d.modal.control.pause":"暂停自动旋转","heatmap.3d.modal.control.reset":"重置 3D 视角","heatmap.3d.modal.footer.tip":"双指缩放 / 滚轮缩放 / 鼠标拖拽旋转 3D 图表","heatmap.3d.modal.ai.title.default":"持之以恒的行者","heatmap.3d.modal.ai.eval.default":"在技术的长河中持之以恒。也许日常的编码并不总是波澜壮阔,但每一个微小的活跃点都在记录着您的思考与探索。星火成留,终将汇聚成属于您的数字海洋。","heatmap.3d.modal.ai.title.peak":"极限活跃级贡献者","heatmap.3d.modal.ai.eval.peak":"这一年中,您的 Token 产出表现出极高的工程密度。如此规模 of 开发量相当于深度参与了中大型系统底座的重构,每一次击键都在将复杂的逻辑收敛为确定性的代码。这是极度专注与纯粹工程热爱的最好印证。","heatmap.3d.modal.ai.title.heavy":"高频产出级开发者","heatmap.3d.modal.ai.eval.heavy":"卓越的持续输出。您的 Token 累积量已达数百万字,相当于数十部中篇技术巨著的体量。高饱和度的编码节奏表明您正在以极高的执行力构建属于您的数字资产,展现了卓越的创造力。","heatmap.3d.modal.ai.title.core":"核心生产力专家","heatmap.3d.modal.ai.eval.core":"极具韧性的长期投入。在过去的一年中,您在较长周期内稳定保持着高强度的开发节奏。您用扎实的代码行数与 Token 产出,默默筑起了项目的核心架构,是当之无愧的工程支柱。","heatmap.3d.modal.ai.title.steady":"稳健成长型工程师","heatmap.3d.modal.ai.eval.steady":"踏实而坚定的技术积累。每一次 Token 的递增,都是您在坚实地砌下通往未来的代码基石。这种细水长流的稳健节奏,往往是一个优秀开发者通往工程大师的必经之路。","heatmap.3d.voxel.joke.1":"🔥 极度疯狂!产出 {{value}} tokens!你是在疯狂训练大模型,还是手撸了一个编译器?","heatmap.3d.voxel.joke.2":"🚀 史诗级输出!共 {{value}} tokens。今日产出可绕地球一圈,AI 都在为你惊叹!","heatmap.3d.voxel.joke.3":"⚡ 爆击日!{{value}} tokens。代码如泉涌,键盘已经开始冒烟了!","heatmap.3d.voxel.level3":"⚡ 生产力大爆发({{value}} tokens)!高效专注的黄金时刻,继续保持这个巅峰状态!","heatmap.3d.voxel.level2":"🌱 渐入佳境({{value}} tokens)!稳步产出,每一次敲击键盘都是在为大厦添砖加瓦。","heatmap.3d.voxel.level1":"🍃 聚沙成塔({{value}} tokens)。微小的提交也是对未来的投资,保持复利的力量!","heatmap.3d.voxel.level0":"💤 养精蓄锐。在不写代码的日子里,灵感也在悄悄生长。"},lL={"landing.handle.default":"VIBE_USER","landing.handle.special":"伏特","landing.screenshot.alt":"TokenTracker 仪表板截图","landing.nav.login":"登录","landing.nav.signup":"注册","landing.install.command":"npx --yes tokentracker-cli","landing.install.action.copy":"复制命令","landing.install.action.copied":"已复制","landing.meta.title":"Token Tracker —— AI Coding CLI 的 Token 用量追踪器","landing.meta.description":"自动监控 Claude Code、Cursor、Codex 等工具的 Token 用量。本地优先、注重隐私、零配置。","landing.meta.og_site_name":"Token Tracker","landing.meta.og_type":"website","landing.meta.og_image":"https://www.tokentracker.cc/og-image.jpg","landing.meta.og_url":"https://www.tokentracker.cc/","landing.meta.twitter_card":"summary_large_image","share.meta.title":"Token Tracker 分享","share.meta.description":"分享你的 Token Tracker 仪表板快照,包含跨模型、项目和时间窗口的用量洞察。","share.meta.og_site_name":"Token Tracker","share.meta.og_type":"website","share.meta.og_image":"https://www.tokentracker.cc/share-dashboard.jpg","share.meta.og_url":"https://www.tokentracker.cc/share","share.meta.twitter_card":"summary_large_image","landing.handle.placeholder":"试试 “{{handle}}”","landing.rank.expectation":"预期排名:{{rank}}","landing.rank.singularity":"登顶","landing.rank.unranked":"未上榜","landing.cta.primary":"进入仪表板","landing.cta.secondary":"查看 GitHub 源码","landing.v2.hero.title_line1":"追踪你所有的","landing.v2.hero.title_line2":"AI Token","landing.v2.install.mac_cta":"Mac 应用 (DMG)","landing.v2.models.title":"支持的 AI CLI 工具","landing.v2.compare.kicker":"无缝追踪","landing.v2.compare.title":"别再瞎猜你的 AI 用量。","landing.v2.compare.subtitle":"AI CLI 把用量数据藏在零散的本地文件里。TokenTracker 把它们实时聚合到一个清晰的仪表板里。","landing.v2.distill.body":"100% 本地处理,不上传任何 prompt 或代码。","landing.v2.compare.with.title":"用 Token Tracker","landing.v2.compare.with.p1":"集中式用量仪表板","landing.v2.compare.with.p2":"实时 Token 指标","landing.v2.compare.with.p3":"100% 本地,隐私无忧","landing.v2.compare.without.title":"不用","landing.v2.compare.without.p1":"散落的 JSON 日志文件","landing.v2.compare.without.p2":"对 Token 消耗一无所知","landing.v2.compare.without.p3":"突如其来的 API 账单","landing.v2.footer.line":"Token Tracker —— 开发者打造,服务开发者。","landing.v2.nav.github":"GitHub","landing.v2.models.agent.codex":"Codex","landing.v2.models.agent.claude_code":"Claude Code","landing.v2.models.agent.cursor":"Cursor","landing.v2.models.agent.gemini":"Gemini","landing.v2.models.agent.opencode":"OpenCode","landing.v2.models.agent.openclaw":"OpenClaw","landing.v2.cta.primary":"进入仪表板","landing.v2.hero.subtagline":"自动监控 Claude Code、Cursor、Codex 等工具的 Token 用量。本地优先、注重隐私、零配置。","leaderboard.profile.nav.back":"$ 排行榜","leaderboard.title":"排行榜","leaderboard.range":"UTC {{period}} · {{from}} – {{to}}","leaderboard.range_loading":"UTC {{period}} · …","leaderboard.range.total":"全部时间","leaderboard.generated_at":"更新于 {{ts}}","leaderboard.period.week":"周","leaderboard.period.month":"月","leaderboard.period.total":"全部","leaderboard.me_label":"你","leaderboard.anon_label":"匿名","leaderboard.error.unknown":"未知错误","leaderboard.loading":"加载中…","leaderboard.empty":"暂无数据","leaderboard.column.rank":"排名","leaderboard.column.user":"用户","leaderboard.column.total":"总计","leaderboard.column.codex":"Codex","leaderboard.column.claude":"Claude","leaderboard.column.gemini":"Gemini","leaderboard.column.cursor":"Cursor","leaderboard.column.opencode":"OpenCode","leaderboard.column.openclaw":"OpenClaw","leaderboard.column.hermes":"Hermes","leaderboard.column.kiro":"Kiro","leaderboard.column.copilot":"Copilot","leaderboard.column.kimi":"Kimi","leaderboard.column.supplemental":"其他","leaderboard.column.est_cost":"预估花费","leaderboard.signin_prompt":"登录后即可上榜","leaderboard.signin_button":"登录","leaderboard.sync_prompt":"开启云同步即可参与排名","leaderboard.sync_button.idle":"开启并同步","leaderboard.sync_button.busy":"同步中…","leaderboard.pagination.page_size_label":"每页显示","leaderboard.pagination.prev":"上一页","leaderboard.pagination.next":"下一页","leaderboard.pagination.ellipsis":"……","leaderboard.pagination.page_unknown":"第 {{page}} 页","share.modal.title":"分享你的数据","share.modal.subtitle":"生成海报卡片,随处分享。","share.modal.close":"关闭","share.modal.action.x":"分享到 X","share.modal.action.download":"下载","share.modal.action.copy":"复制图片","share.modal.hint.x":"把图片粘贴到推文里","share.modal.hint.copy":"到剪贴板","share.modal.name_label":"显示名称","share.modal.name_placeholder":"输入你的名字","share.modal.style_label":"样式","share.modal.footer":"数据始终保留在本地——图片在你的浏览器内生成,绝不上传。","share.button.label":"分享","share.button.aria":"打开分享卡片","share.toast.copied":"图片已复制到剪贴板","share.toast.downloaded":"图片已保存","share.toast.failed":"图片生成失败","share.toast.working":"生成中…","share.variant.neon":"霓虹","share.variant.broadsheet":"特刊","share.date.month_year":"{{year}} 年 {{month}}","share.issue.all_time":"总计","share.month_short.jan":"1 月","share.month_short.feb":"2 月","share.month_short.mar":"3 月","share.month_short.apr":"4 月","share.month_short.may":"5 月","share.month_short.jun":"6 月","share.month_short.jul":"7 月","share.month_short.aug":"8 月","share.month_short.sep":"9 月","share.month_short.oct":"10 月","share.month_short.nov":"11 月","share.month_short.dec":"12 月","share.hook.top_loyal":"{{name}} 占了 {{percent}}% 的用量。","share.hook.days_record":"共记录 {{days}} 天。","share.hook.top_led":"{{name}} 领跑,占比 {{percent}}%。","share.hook.multi_models":"{{days}} 天里用了 {{count}} 个模型。","share.hook.days_with_model":"{{name}} 陪你跑了 {{days}} 天。","share.hook.new_chapter":"新的记录,从这里开始。","share.card.broadsheet.issue":"期号","share.card.broadsheet.by":"分享者","share.card.broadsheet.tracked_since":"追踪起始","share.card.broadsheet.total_tokens":"总 Token 数","share.card.broadsheet.estimated_spend":"预估花费","share.card.broadsheet.billable_days":"{{days}} 个活跃日","share.card.broadsheet.heatmap_title":"年度热图","share.card.broadsheet.heatmap_days_on_record":"{{active}} / {{total}} 天有记录","share.card.broadsheet.roster_title":"模型榜","share.card.broadsheet.roster_subtitle":"常用模型轮换","share.card.broadsheet.empty":"这一周很安静,还没有模型数据。","share.card.broadsheet.global_rank":"全站排名","share.card.broadsheet.active_days":"活跃","share.card.broadsheet.days_count":"{{days}} 天","share.card.broadsheet.track_yours":"追踪你自己的","share.card.annual.report_title":"用量报告","share.card.annual.less":"少","share.card.annual.more":"多","share.card.annual.heatmap_title":"Token 热图","share.card.annual.total_tokens":"总 Token 数","share.card.annual.estimated_cost":"预估成本","share.card.annual.longest_streak":"最长连击","share.card.annual.days_count":"{{days}} 天","share.card.annual.top_model":"热门模型"};function tk(){return typeof window>"u"?null:window.localStorage||null}function nk(){return typeof navigator>"u"?null:navigator.clipboard||null}function uL(){return typeof window>"u"?null:window.ClipboardItem||null}function cL(e,{storage:t}={}){const n=t??tk();if(!n||typeof n.getItem!="function")return null;try{return n.getItem(e)}catch{return null}}function dL(e,t,{storage:n}={}){const a=n??tk();if(!a||typeof a.setItem!="function")return!1;try{return a.setItem(e,t),!0}catch{return!1}}async function o4(e,{clipboard:t}={}){const n=t??nk();if(!n||typeof n.writeText!="function")return!1;try{return await n.writeText(e),!0}catch{return!1}}async function l4(e,{clipboard:t}={}){const n=t??nk(),a=uL();if(!e||!n||typeof n.write!="function"||!a)return!1;try{const s=e.type||"image/png",o=e.type&&e.type!==s?e.slice(0,e.size,s):e.type?e:e.slice(0,e.size,s),u=new a({[s]:o});return await n.write([u]),!0}catch{return!1}}const rk="tokentracker-locale",ps="system",Zu="en",kp="zh-CN";function ak(e){return typeof e!="string"?Zu:/^zh(?:[-_]|$)/i.test(e.trim())?kp:Zu}function wc(e){return e===ps?ps:ak(e)}function hL(){return typeof navigator>"u"?[]:Array.isArray(navigator.languages)&&navigator.languages.length?navigator.languages.filter(e=>typeof e=="string"):typeof navigator.language=="string"?[navigator.language]:[]}function Qu(e,t=hL()){const n=wc(e);if(n!==ps)return n;const a=t.map(s=>typeof s=="string"?s.trim():"").find(s=>s.length>0);return a&&/^zh(?:[-_]|$)/i.test(a)?kp:Zu}function wp(){return wc(cL(rk)||ps)}function fL(e){return dL(rk,wc(e))}const pL=["key","module","page","component","slot","text"],mL={[kp]:{...sL,...oL,...lL}};let Ch=null,ik=Qu(wp());function gL(e){const t=[];let n=[],a="",s=!1;for(let o=0;o<e.length;o+=1){const u=e[o];if(s){u==='"'?e[o+1]==='"'?(a+='"',o+=1):s=!1:a+=u;continue}if(u==='"'){s=!0;continue}if(u===","){n.push(a),a="";continue}if(u===`
|
|
667
|
-
`){n.push(a),a="",n.every(c=>c.trim()==="")||t.push(n),n=[];continue}u!=="\r"&&(a+=u)}return n.push(a),n.every(o=>o.trim()==="")||t.push(n),t}function yL(e){const t=gL(e);if(!t.length)return{map:new Map,rows:[]};const n=t[0].map(c=>String(c).trim());if(pL.filter(c=>!n.includes(c)).length)return{map:new Map,rows:[]};const s=Object.fromEntries(n.map((c,h)=>[c,h])),o=[],u=new Map;return t.slice(1).forEach((c,h)=>{const f={key:String(c[s.key]||"").trim(),module:String(c[s.module]||"").trim(),page:String(c[s.page]||"").trim(),component:String(c[s.component]||"").trim(),slot:String(c[s.slot]||"").trim(),text:String(c[s.text]??"").trim()};f.key&&(u.has(f.key),u.set(f.key,f),o.push(f))}),{map:u,rows:o}}function vL(){return Ch||(Ch=yL(iL)),Ch}function bL(){return mL[ik]||{}}function _L(e){const t=bL()[String(e)];return typeof t=="string"&&t.trim()?t:null}function kL(e,t){return t?e.replace(/\{\{(\w+)\}\}/g,(n,a)=>t[a]==null?n:String(t[a])):e}function wL(e){return String(e).replace(/\\n/g,`
|
|
668
|
-
`)}function xL(e,t){return _L(t)||e?.text||t}function SL(e){ik=ak(e)}function Fe(e,t){const a=vL().map.get(e);return kL(wL(xL(a,e)),t)}const Fv="tokentracker_native_app";let sk=null;const mf=new Set;typeof window<"u"&&window.addEventListener("native:systemAppearanceChanged",e=>{const t=e?.detail?.isDark;if(typeof t=="boolean"){sk=t;try{const n=document.documentElement;t?n.classList.add("dark"):n.classList.remove("dark")}catch{}mf.forEach(n=>{try{n(t)}catch{}})}});function Vv(){return sk}function PL(e){return mf.add(e),()=>mf.delete(e)}function ok(){if(typeof window>"u")return!1;try{if(new URLSearchParams(window.location.search).get("app")==="1"){try{window.localStorage.setItem(Fv,"1")}catch{}return!0}return window.localStorage.getItem(Fv)==="1"}catch{return!1}}function mr(){return typeof window>"u"?!1:!!window.webkit?.messageHandlers?.nativeBridge}function lk(){return typeof window>"u"?null:window.webkit?.messageHandlers?.nativeBridge??null}function u4(){return!!lk()}function Wo(e){const t=lk();if(!t)return!1;try{return t.postMessage(e),!0}catch(n){return console.warn("[tokentracker] nativeBridge post failed:",n),!1}}function c4(){return Wo({type:"getSettings"})}function zv(e,t){return Wo({type:"setSetting",key:e,value:t})}function d4(e){return Wo({type:"action",name:e})}function TL(){return Wo({type:"getSystemAppearance"})}function CL(e,t){if(!mr())return;Wo({type:"setChromeAppearance",isDark:e==="dark",theme:t??"system"})}function h4(e){if(typeof window>"u")return()=>{};const t=n=>{n&&n.detail&&typeof n.detail=="object"&&e(n.detail)};return window.addEventListener("native:settings",t),()=>window.removeEventListener("native:settings",t)}const uk=k.createContext(null);function EL(){return Qu(wp())}function AL(e){typeof document>"u"||(document.documentElement.lang=e)}function $v(e,t){SL(e),t(n=>n===e?n:e)}function RL({children:e}){const[t,n]=k.useState(wp),[a,s]=k.useState(EL);k.useLayoutEffect(()=>{AL(a)},[a]),k.useLayoutEffect(()=>{mr()&&zv("locale",t)},[t]),k.useLayoutEffect(()=>{if(t!==ps||typeof window>"u")return;const c=()=>$v(Qu(ps),s);return window.addEventListener("languagechange",c),()=>window.removeEventListener("languagechange",c)},[t]);const o=k.useCallback(c=>{const h=wc(c);$v(Qu(h),s),n(h),fL(h),mr()&&zv("locale",h)},[]),u=k.useMemo(()=>({locale:t,setLocale:o,resolvedLocale:a}),[t,a,o]);return I.jsx(uk.Provider,{value:u,children:e})}const LL="modulepreload",DL=function(e){return"/"+e},Hv={},$n=function(t,n,a){let s=Promise.resolve();if(n&&n.length>0){let h=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),c=u?.nonce||u?.getAttribute("nonce");s=h(n.map(f=>{if(f=DL(f),f in Hv)return;Hv[f]=!0;const m=f.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${y}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":LL,m||(b.as="script"),b.crossOrigin="",b.href=f,c&&b.setAttribute("nonce",c),document.head.appendChild(b),m)return new Promise((w,S)=>{b.addEventListener("load",w),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return s.then(u=>{for(const c of u||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})};var Xu={},ML=()=>{window.va||(window.va=function(...t){window.vaq||(window.vaq=[]),window.vaq.push(t)})},NL="@vercel/analytics",OL="2.0.1";function ck(){return typeof window<"u"}function dk(){try{const e="production"}catch{}return"production"}function IL(e="auto"){if(e==="auto"){window.vam=dk();return}window.vam=e}function jL(){return(ck()?window.vam:dk())||"production"}function xp(){return jL()==="development"}function UL(e){return e.scriptSrc?rs(e.scriptSrc):xp()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?rs(`${e.basePath}/insights/script.js`):"/_vercel/insights/script.js"}function BL(e,t){var n;let a=e;if(t)try{a={...(n=JSON.parse(t))==null?void 0:n.analytics,...e}}catch{}IL(a.mode);const s={sdkn:NL+(a.framework?`/${a.framework}`:""),sdkv:OL};return a.disableAutoTrack&&(s.disableAutoTrack="1"),a.viewEndpoint&&(s.viewEndpoint=rs(a.viewEndpoint)),a.eventEndpoint&&(s.eventEndpoint=rs(a.eventEndpoint)),a.sessionEndpoint&&(s.sessionEndpoint=rs(a.sessionEndpoint)),xp()&&a.debug===!1&&(s.debug="false"),a.dsn&&(s.dsn=a.dsn),a.endpoint?s.endpoint=a.endpoint:a.basePath&&(s.endpoint=rs(`${a.basePath}/insights`)),{beforeSend:a.beforeSend,src:UL(a),dataset:s}}function rs(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function FL(e={debug:!0},t){var n;if(!ck())return;const{beforeSend:a,src:s,dataset:o}=BL(e,t);if(ML(),a&&((n=window.va)==null||n.call(window,"beforeSend",a)),document.head.querySelector(`script[src*="${s}"]`))return;const u=document.createElement("script");u.src=s;for(const[c,h]of Object.entries(o))u.dataset[c]=h;u.defer=!0,u.onerror=()=>{const c=xp()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${s}. ${c}`)},document.head.appendChild(u)}function VL({route:e,path:t}){var n;(n=window.va)==null||n.call(window,"pageview",{route:e,path:t})}function zL(){if(!(typeof process>"u"||typeof Xu>"u"))return Xu.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function $L(){if(!(typeof process>"u"||typeof Xu>"u"))return Xu.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}function HL(e){return k.useEffect(()=>{var t;e.beforeSend&&((t=window.va)==null||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),k.useEffect(()=>{FL({framework:e.framework||"react",basePath:e.basePath??zL(),...e.route!==void 0&&{disableAutoTrack:!0},...e},e.configString??$L())},[]),k.useEffect(()=>{e.route&&e.path&&VL({route:e.route,path:e.path})},[e.route,e.path]),null}var Ju={},WL=()=>{window.si||(window.si=function(...t){window.siq=window.siq||[],window.siq.push(t)})},KL="@vercel/speed-insights",qL="2.0.0";function GL(){return typeof window<"u"}function YL(){try{const e="production"}catch{}return"production"}function hk(){return YL()==="development"}function ZL(e){return e.scriptSrc?ec(e.scriptSrc):hk()?"https://va.vercel-scripts.com/v1/speed-insights/script.debug.js":e.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":e.basePath?ec(`${e.basePath}/speed-insights/script.js`):"/_vercel/speed-insights/script.js"}function QL(e,t){var n;let a=e;if(t)try{a={...(n=JSON.parse(t))==null?void 0:n.speedInsights,...e}}catch{}const s={sdkn:KL+(a.framework?`/${a.framework}`:""),sdkv:qL};return a.sampleRate&&(s.sampleRate=a.sampleRate.toString()),a.route&&(s.route=a.route),hk()&&a.debug===!1&&(s.debug="false"),a.dsn&&(s.dsn=a.dsn),a.endpoint?s.endpoint=ec(a.endpoint):a.basePath&&(s.endpoint=ec(`${a.basePath}/speed-insights/vitals`)),{src:ZL(a),beforeSend:a.beforeSend,dataset:s}}function ec(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function XL(e={},t){var n;if(!GL()||e.route===null)return null;WL();const{beforeSend:a,src:s,dataset:o}=QL(e,t);if(document.head.querySelector(`script[src*="${s}"]`))return null;a&&((n=window.si)==null||n.call(window,"beforeSend",a));const u=document.createElement("script");u.src=s,u.defer=!0;for(const[c,h]of Object.entries(o))u.dataset[c]=h;return u.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${s}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(u),{setRoute:c=>{u.dataset.route=c??void 0}}}function JL(){if(!(typeof process>"u"||typeof Ju>"u"))return Ju.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function eD(){if(!(typeof process>"u"||typeof Ju>"u"))return Ju.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}function tD(e){k.useEffect(()=>{var n;e.beforeSend&&((n=window.si)==null||n.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);const t=k.useRef(null);return k.useEffect(()=>{if(!t.current){const n=XL({framework:e.framework??"react",basePath:e.basePath??JL(),...e},e.configString??eD());n&&(t.current=n.setRoute)}},[e]),k.useEffect(()=>{t.current&&e.route&&t.current(e.route)},[e.route]),null}const fk=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim();const nD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const rD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase());const Wv=e=>{const t=rD(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Eh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const aD=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},iD=k.createContext({}),sD=()=>k.useContext(iD),oD=k.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:a,className:s="",children:o,iconNode:u,...c},h)=>{const{size:f=24,strokeWidth:m=2,absoluteStrokeWidth:y=!1,color:b="currentColor",className:w=""}=sD()??{},S=a??y?Number(n??m)*24/Number(t??f):n??m;return k.createElement("svg",{ref:h,...Eh,width:t??f??Eh.width,height:t??f??Eh.height,stroke:e??b,strokeWidth:S,className:fk("lucide",w,s),...!o&&!aD(c)&&{"aria-hidden":"true"},...c},[...u.map(([T,P])=>k.createElement(T,P)),...Array.isArray(o)?o:[o]])});const dn=(e,t)=>{const n=k.forwardRef(({className:a,...s},o)=>k.createElement(oD,{ref:o,iconNode:t,className:fk(`lucide-${nD(Wv(e))}`,`lucide-${e}`,a),...s}));return n.displayName=Wv(e),n};const lD=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],uD=dn("chart-column",lD);const cD=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],dD=dn("gauge",cD);const hD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],fD=dn("globe",hD);const pD=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],mD=dn("layout-grid",pD);const gD=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],yD=dn("mail",gD);const vD=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],bD=dn("menu",vD);const _D=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],kD=dn("monitor",_D);const wD=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],pk=dn("moon",wD);const xD=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],SD=dn("puzzle",xD);const PD=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],TD=dn("refresh-cw",PD);const CD=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ED=dn("settings",CD);const AD=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],mk=dn("sun",AD);const RD=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],LD=dn("triangle-alert",RD);const DD=[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]],MD=dn("trophy",DD);const ND=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gk=dn("x",ND);function OD({children:e,variant:t="primary",size:n="md",onClick:a,disabled:s=!1,className:o="",as:u="button",...c}){const h="inline-flex items-center justify-center font-medium transition-all duration-200 rounded-md focus:outline-none focus:ring-2 focus:ring-oai-blue/30 active:scale-[0.98] active:duration-100",f={primary:"bg-oai-black dark:bg-oai-white text-white dark:text-oai-black border border-transparent hover:bg-oai-gray-800 dark:hover:bg-oai-gray-200 active:bg-oai-gray-900 dark:active:bg-oai-gray-300 disabled:bg-oai-gray-300 dark:disabled:bg-oai-gray-700 disabled:text-oai-gray-500 dark:disabled:text-oai-gray-400 focus:ring-oai-brand/30 transition-colors duration-200",secondary:"bg-oai-white dark:bg-oai-gray-900 text-oai-black dark:text-oai-white border border-oai-gray-300 dark:border-oai-gray-700 hover:border-oai-brand hover:text-oai-brand active:bg-oai-gray-50 dark:active:bg-oai-gray-800 active:border-oai-brand-dark disabled:text-oai-gray-400 dark:disabled:text-oai-gray-500 disabled:border-oai-gray-200 dark:disabled:border-oai-gray-700 focus:ring-oai-brand/30 transition-colors duration-200",ghost:"bg-transparent text-oai-gray-600 dark:text-oai-gray-300 border border-transparent hover:text-oai-brand hover:bg-oai-brand-50/50 dark:hover:bg-oai-brand-950/30 active:bg-oai-brand-50 dark:active:bg-oai-brand-900/50 disabled:text-oai-gray-400 dark:disabled:text-oai-gray-500 focus:ring-oai-brand/30 transition-colors duration-200"},m={sm:"h-8 px-3 text-sm",md:"h-10 px-4 text-sm",lg:"h-12 px-6 text-base"},y=s?"cursor-not-allowed opacity-60":"cursor-pointer",b=`${h} ${f[t]} ${m[n]} ${y} ${o}`;return I.jsx(u,{className:b,onClick:a,disabled:s,...c,children:e})}class ID extends Hf.Component{constructor(t){super(t),this.state={error:null},this.handleReload=this.handleReload.bind(this)}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){console.error("ErrorBoundary caught an error:",t)}handleReload(){typeof window>"u"||window.location.reload()}render(){const{error:t}=this.state;if(!t)return this.props.children;const n=String(t?.message||t||""),a=n?Fe("shared.error.prefix",{error:n}):Fe("error.boundary.no_details");return I.jsx("div",{className:"flex min-h-screen items-center justify-center bg-oai-white p-6 font-oai text-oai-black antialiased dark:bg-oai-gray-950 dark:text-oai-white",children:I.jsxs("div",{className:"w-full max-w-lg rounded-xl border border-oai-gray-200 bg-white p-6 text-center shadow-sm dark:border-oai-gray-800 dark:bg-oai-gray-900",children:[I.jsx("div",{className:"mx-auto flex h-10 w-10 items-center justify-center rounded-full bg-amber-50 text-amber-600 dark:bg-amber-950/30 dark:text-amber-300",children:I.jsx(LD,{className:"h-5 w-5","aria-hidden":!0})}),I.jsx("div",{className:"mt-4 text-xs font-medium uppercase text-oai-gray-500 dark:text-oai-gray-400",children:Fe("error.boundary.title")}),I.jsx("h1",{className:"mt-2 text-xl font-semibold text-oai-black dark:text-white",children:Fe("error.boundary.subtitle")}),I.jsx("p",{className:"mt-2 text-sm text-oai-gray-500 dark:text-oai-gray-400",children:Fe("error.boundary.hint")}),I.jsx("div",{className:"mt-4 max-h-32 overflow-auto rounded-lg border border-oai-gray-200 bg-oai-gray-50 px-3 py-2 text-left text-xs leading-5 text-oai-gray-600 dark:border-oai-gray-800 dark:bg-oai-gray-950 dark:text-oai-gray-300",children:a}),I.jsxs(OD,{type:"button",size:"md",onClick:this.handleReload,className:"mt-5",children:[I.jsx(TD,{className:"mr-2 h-4 w-4","aria-hidden":!0}),Fe("error.boundary.action.reload")]})]})})}}function Ko(){const e=k.useContext(uk);if(e===null)throw new Error("useLocale must be used within a LocaleProvider");return e}const gf="tokentracker-theme",yk=k.createContext(null);function jD(){if(typeof window>"u")return"system";try{const e=localStorage.getItem(gf);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}function du(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function UD(e){if(typeof document>"u")return;const t=document.documentElement;e==="dark"?t.classList.add("dark"):t.classList.remove("dark")}function BD({children:e}){const[t,n]=k.useState(jD),[a,s]=k.useState(()=>{if(t!=="system")return t;if(mr()){const f=Vv();if(typeof f=="boolean")return f?"dark":"light"}return du()}),o=k.useRef(t);k.useEffect(()=>{o.current=t},[t]),k.useEffect(()=>{UD(a)},[a]),k.useLayoutEffect(()=>{if(t==="system"){if(mr()){const f=Vv();s(typeof f=="boolean"?f?"dark":"light":du()),TL();return}s(du())}else s(t)},[t]),k.useEffect(()=>mr()?PL(m=>{o.current==="system"&&s(m?"dark":"light")}):void 0,[]),k.useEffect(()=>{if(typeof window>"u"||t!=="system"||mr())return;const f=window.matchMedia("(prefers-color-scheme: dark)"),m=y=>{const b=y.matches?"dark":"light";s(b)};return f.addEventListener?(f.addEventListener("change",m),()=>f.removeEventListener("change",m)):(f.addListener(m),()=>f.removeListener(m))},[t]),k.useEffect(()=>{const f=t==="system"&&!mr()?du():a;CL(f,t)},[a,t]);const u=k.useCallback(f=>{if(n(f),typeof window<"u")try{localStorage.setItem(gf,f)}catch{}},[]),c=k.useCallback(()=>{u(f=>{const m=f==="dark"?"light":"dark";if(typeof window<"u")try{localStorage.setItem(gf,m)}catch{}return m})},[]),h=k.useMemo(()=>({theme:t,setTheme:u,toggleTheme:c,resolvedTheme:a}),[t,u,c,a]);return I.jsx(yk.Provider,{value:h,children:e})}const vk=k.createContext({isOpen:!1,openLoginModal:()=>{},closeLoginModal:()=>{}});function FD({children:e}){const[t,n]=k.useState(!1),a=k.useCallback(()=>n(!0),[]),s=k.useCallback(()=>n(!1),[]);return I.jsx(vk.Provider,{value:{isOpen:t,openLoginModal:a,closeLoginModal:s},children:e})}function bk(){return k.useContext(vk)}const Sp=k.createContext({});function Pp(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const VD=typeof window<"u",_k=VD?k.useLayoutEffect:k.useEffect,xc=k.createContext(null);function Tp(e,t){e.indexOf(t)===-1&&e.push(t)}function tc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const xr=(e,t,n)=>n>t?t:n<e?e:n;let Cp=()=>{};const Ma={},kk=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function wk(e){return typeof e=="object"&&e!==null}const xk=e=>/^0[^.\s]+$/u.test(e);function Sk(e){let t;return()=>(t===void 0&&(t=e()),t)}const jn=e=>e,zD=(e,t)=>n=>t(e(n)),qo=(...e)=>e.reduce(zD),Do=(e,t,n)=>{const a=t-e;return a===0?1:(n-e)/a};class Ep{constructor(){this.subscriptions=[]}add(t){return Tp(this.subscriptions,t),()=>tc(this.subscriptions,t)}notify(t,n,a){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,a);else for(let o=0;o<s;o++){const u=this.subscriptions[o];u&&u(t,n,a)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Sn=e=>e*1e3,In=e=>e/1e3;function Pk(e,t){return t?e*(1e3/t):0}const Tk=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,$D=1e-7,HD=12;function WD(e,t,n,a,s){let o,u,c=0;do u=t+(n-t)/2,o=Tk(u,a,s)-e,o>0?n=u:t=u;while(Math.abs(o)>$D&&++c<HD);return u}function Go(e,t,n,a){if(e===t&&n===a)return jn;const s=o=>WD(o,0,1,e,n);return o=>o===0||o===1?o:Tk(s(o),t,a)}const Ck=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ek=e=>t=>1-e(1-t),Ak=Go(.33,1.53,.69,.99),Ap=Ek(Ak),Rk=Ck(Ap),Lk=e=>e>=1?1:(e*=2)<1?.5*Ap(e):.5*(2-Math.pow(2,-10*(e-1))),Rp=e=>1-Math.sin(Math.acos(e)),Dk=Ek(Rp),Mk=Ck(Rp),KD=Go(.42,0,1,1),qD=Go(0,0,.58,1),Nk=Go(.42,0,.58,1),GD=e=>Array.isArray(e)&&typeof e[0]!="number",Ok=e=>Array.isArray(e)&&typeof e[0]=="number",YD={linear:jn,easeIn:KD,easeInOut:Nk,easeOut:qD,circIn:Rp,circInOut:Mk,circOut:Dk,backIn:Ap,backInOut:Rk,backOut:Ak,anticipate:Lk},ZD=e=>typeof e=="string",Kv=e=>{if(Ok(e)){Cp(e.length===4);const[t,n,a,s]=e;return Go(t,n,a,s)}else if(ZD(e))return YD[e];return e},hu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function QD(e,t){let n=new Set,a=new Set,s=!1,o=!1;const u=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function h(m){u.has(m)&&(f.schedule(m),e()),m(c)}const f={schedule:(m,y=!1,b=!1)=>{const S=b&&s?n:a;return y&&u.add(m),S.add(m),m},cancel:m=>{a.delete(m),u.delete(m)},process:m=>{if(c=m,s){o=!0;return}s=!0;const y=n;n=a,a=y,n.forEach(h),n.clear(),s=!1,o&&(o=!1,f.process(m))}};return f}const XD=40;function Ik(e,t){let n=!1,a=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,u=hu.reduce((M,j)=>(M[j]=QD(o),M),{}),{setup:c,read:h,resolveKeyframes:f,preUpdate:m,update:y,preRender:b,render:w,postRender:S}=u,T=()=>{const M=Ma.useManualTiming,j=M?s.timestamp:performance.now();n=!1,M||(s.delta=a?1e3/60:Math.max(Math.min(j-s.timestamp,XD),1)),s.timestamp=j,s.isProcessing=!0,c.process(s),h.process(s),f.process(s),m.process(s),y.process(s),b.process(s),w.process(s),S.process(s),s.isProcessing=!1,n&&t&&(a=!1,e(T))},P=()=>{n=!0,a=!0,s.isProcessing||e(T)};return{schedule:hu.reduce((M,j)=>{const q=u[j];return M[j]=(K,H=!1,x=!1)=>(n||P(),q.schedule(K,H,x)),M},{}),cancel:M=>{for(let j=0;j<hu.length;j++)u[hu[j]].cancel(M)},state:s,steps:u}}const{schedule:dt,cancel:Na,state:Kt,steps:Ah}=Ik(typeof requestAnimationFrame<"u"?requestAnimationFrame:jn,!0);let Au;function JD(){Au=void 0}const on={now:()=>(Au===void 0&&on.set(Kt.isProcessing||Ma.useManualTiming?Kt.timestamp:performance.now()),Au),set:e=>{Au=e,queueMicrotask(JD)}},jk=e=>t=>typeof t=="string"&&t.startsWith(e),Uk=jk("--"),eM=jk("var(--"),Lp=e=>eM(e)?tM.test(e.split("/*")[0].trim()):!1,tM=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qv(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const bs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Mo={...bs,transform:e=>xr(0,1,e)},fu={...bs,default:1},xo=e=>Math.round(e*1e5)/1e5,Dp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function nM(e){return e==null}const rM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Mp=(e,t)=>n=>!!(typeof n=="string"&&rM.test(n)&&n.startsWith(e)||t&&!nM(n)&&Object.prototype.hasOwnProperty.call(n,t)),Bk=(e,t,n)=>a=>{if(typeof a!="string")return a;const[s,o,u,c]=a.match(Dp);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(u),alpha:c!==void 0?parseFloat(c):1}},aM=e=>xr(0,255,e),Rh={...bs,transform:e=>Math.round(aM(e))},ri={test:Mp("rgb","red"),parse:Bk("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:a=1})=>"rgba("+Rh.transform(e)+", "+Rh.transform(t)+", "+Rh.transform(n)+", "+xo(Mo.transform(a))+")"};function iM(e){let t="",n="",a="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),a=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),a=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,a+=a,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(a,16),alpha:s?parseInt(s,16)/255:1}}const yf={test:Mp("#"),parse:iM,transform:ri.transform},Yo=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Sa=Yo("deg"),vr=Yo("%"),_e=Yo("px"),sM=Yo("vh"),oM=Yo("vw"),Gv={...vr,parse:e=>vr.parse(e)/100,transform:e=>vr.transform(e*100)},as={test:Mp("hsl","hue"),parse:Bk("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:a=1})=>"hsla("+Math.round(e)+", "+vr.transform(xo(t))+", "+vr.transform(xo(n))+", "+xo(Mo.transform(a))+")"},Lt={test:e=>ri.test(e)||yf.test(e)||as.test(e),parse:e=>ri.test(e)?ri.parse(e):as.test(e)?as.parse(e):yf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ri.transform(e):as.transform(e),getAnimatableNone:e=>{const t=Lt.parse(e);return t.alpha=0,Lt.transform(t)}},lM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function uM(e){return isNaN(e)&&typeof e=="string"&&(e.match(Dp)?.length||0)+(e.match(lM)?.length||0)>0}const Fk="number",Vk="color",cM="var",dM="var(",Yv="${}",hM=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ms(e){const t=e.toString(),n=[],a={color:[],number:[],var:[]},s=[];let o=0;const c=t.replace(hM,h=>(Lt.test(h)?(a.color.push(o),s.push(Vk),n.push(Lt.parse(h))):h.startsWith(dM)?(a.var.push(o),s.push(cM),n.push(h)):(a.number.push(o),s.push(Fk),n.push(parseFloat(h))),++o,Yv)).split(Yv);return{values:n,split:c,indexes:a,types:s}}function fM(e){return ms(e).values}function zk({split:e,types:t}){const n=e.length;return a=>{let s="";for(let o=0;o<n;o++)if(s+=e[o],a[o]!==void 0){const u=t[o];u===Fk?s+=xo(a[o]):u===Vk?s+=Lt.transform(a[o]):s+=a[o]}return s}}function pM(e){return zk(ms(e))}const mM=e=>typeof e=="number"?0:Lt.test(e)?Lt.getAnimatableNone(e):e,gM=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:mM(e);function yM(e){const t=ms(e);return zk(t)(t.values.map((a,s)=>gM(a,t.split[s])))}const ir={test:uM,parse:fM,createTransformer:pM,getAnimatableNone:yM};function Lh(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function vM({hue:e,saturation:t,lightness:n,alpha:a}){e/=360,t/=100,n/=100;let s=0,o=0,u=0;if(!t)s=o=u=n;else{const c=n<.5?n*(1+t):n+t-n*t,h=2*n-c;s=Lh(h,c,e+1/3),o=Lh(h,c,e),u=Lh(h,c,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(u*255),alpha:a}}function nc(e,t){return n=>n>0?t:e}const vt=(e,t,n)=>e+(t-e)*n,Dh=(e,t,n)=>{const a=e*e,s=n*(t*t-a)+a;return s<0?0:Math.sqrt(s)},bM=[yf,ri,as],_M=e=>bM.find(t=>t.test(e));function Zv(e){const t=_M(e);if(!t)return!1;let n=t.parse(e);return t===as&&(n=vM(n)),n}const Qv=(e,t)=>{const n=Zv(e),a=Zv(t);if(!n||!a)return nc(e,t);const s={...n};return o=>(s.red=Dh(n.red,a.red,o),s.green=Dh(n.green,a.green,o),s.blue=Dh(n.blue,a.blue,o),s.alpha=vt(n.alpha,a.alpha,o),ri.transform(s))},vf=new Set(["none","hidden"]);function kM(e,t){return vf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function wM(e,t){return n=>vt(e,t,n)}function Np(e){return typeof e=="number"?wM:typeof e=="string"?Lp(e)?nc:Lt.test(e)?Qv:PM:Array.isArray(e)?$k:typeof e=="object"?Lt.test(e)?Qv:xM:nc}function $k(e,t){const n=[...e],a=n.length,s=e.map((o,u)=>Np(o)(o,t[u]));return o=>{for(let u=0;u<a;u++)n[u]=s[u](o);return n}}function xM(e,t){const n={...e,...t},a={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(a[s]=Np(e[s])(e[s],t[s]));return s=>{for(const o in a)n[o]=a[o](s);return n}}function SM(e,t){const n=[],a={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],u=e.indexes[o][a[o]],c=e.values[u]??0;n[s]=c,a[o]++}return n}const PM=(e,t)=>{const n=ir.createTransformer(t),a=ms(e),s=ms(t);return a.indexes.var.length===s.indexes.var.length&&a.indexes.color.length===s.indexes.color.length&&a.indexes.number.length>=s.indexes.number.length?vf.has(e)&&!s.values.length||vf.has(t)&&!a.values.length?kM(e,t):qo($k(SM(a,s),s.values),n):nc(e,t)};function Hk(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?vt(e,t,n):Np(e)(e,t)}const TM=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>dt.update(t,n),stop:()=>Na(t),now:()=>Kt.isProcessing?Kt.timestamp:on.now()}},Wk=(e,t,n=10)=>{let a="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)a+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${a.substring(0,a.length-2)})`},rc=2e4;function Op(e){let t=0;const n=50;let a=e.next(t);for(;!a.done&&t<rc;)t+=n,a=e.next(t);return t>=rc?1/0:t}function CM(e,t=100,n){const a=n({...e,keyframes:[0,t]}),s=Math.min(Op(a),rc);return{type:"keyframes",ease:o=>a.next(s*o).value/t,duration:In(s)}}const St={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function bf(e,t){return e*Math.sqrt(1-t*t)}const EM=12;function AM(e,t,n){let a=n;for(let s=1;s<EM;s++)a=a-e(a)/t(a);return a}const Mh=.001;function RM({duration:e=St.duration,bounce:t=St.bounce,velocity:n=St.velocity,mass:a=St.mass}){let s,o,u=1-t;u=xr(St.minDamping,St.maxDamping,u),e=xr(St.minDuration,St.maxDuration,In(e)),u<1?(s=f=>{const m=f*u,y=m*e,b=m-n,w=bf(f,u),S=Math.exp(-y);return Mh-b/w*S},o=f=>{const y=f*u*e,b=y*n+n,w=Math.pow(u,2)*Math.pow(f,2)*e,S=Math.exp(-y),T=bf(Math.pow(f,2),u);return(-s(f)+Mh>0?-1:1)*((b-w)*S)/T}):(s=f=>{const m=Math.exp(-f*e),y=(f-n)*e+1;return-Mh+m*y},o=f=>{const m=Math.exp(-f*e),y=(n-f)*(e*e);return m*y});const c=5/e,h=AM(s,o,c);if(e=Sn(e),isNaN(h))return{stiffness:St.stiffness,damping:St.damping,duration:e};{const f=Math.pow(h,2)*a;return{stiffness:f,damping:u*2*Math.sqrt(a*f),duration:e}}}const LM=["duration","bounce"],DM=["stiffness","damping","mass"];function Xv(e,t){return t.some(n=>e[n]!==void 0)}function MM(e){let t={velocity:St.velocity,stiffness:St.stiffness,damping:St.damping,mass:St.mass,isResolvedFromDuration:!1,...e};if(!Xv(e,DM)&&Xv(e,LM))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,a=2*Math.PI/(n*1.2),s=a*a,o=2*xr(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:St.mass,stiffness:s,damping:o}}else{const n=RM({...e,velocity:0});t={...t,...n,mass:St.mass},t.isResolvedFromDuration=!0}return t}function ac(e=St.visualDuration,t=St.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:a,restDelta:s}=n;const o=n.keyframes[0],u=n.keyframes[n.keyframes.length-1],c={done:!1,value:o},{stiffness:h,damping:f,mass:m,duration:y,velocity:b,isResolvedFromDuration:w}=MM({...n,velocity:-In(n.velocity||0)}),S=b||0,T=f/(2*Math.sqrt(h*m)),P=u-o,L=In(Math.sqrt(h/m)),D=Math.abs(P)<5;a||(a=D?St.restSpeed.granular:St.restSpeed.default),s||(s=D?St.restDelta.granular:St.restDelta.default);let M,j,q,K,H,x;if(T<1)q=bf(L,T),K=(S+T*L*P)/q,M=Q=>{const me=Math.exp(-T*L*Q);return u-me*(K*Math.sin(q*Q)+P*Math.cos(q*Q))},H=T*L*K+P*q,x=T*L*P-K*q,j=Q=>Math.exp(-T*L*Q)*(H*Math.sin(q*Q)+x*Math.cos(q*Q));else if(T===1){M=me=>u-Math.exp(-L*me)*(P+(S+L*P)*me);const Q=S+L*P;j=me=>Math.exp(-L*me)*(L*Q*me-S)}else{const Q=L*Math.sqrt(T*T-1);M=fe=>{const ce=Math.exp(-T*L*fe),le=Math.min(Q*fe,300);return u-ce*((S+T*L*P)*Math.sinh(le)+Q*P*Math.cosh(le))/Q};const me=(S+T*L*P)/Q,oe=T*L*me-P*Q,Ae=T*L*P-me*Q;j=fe=>{const ce=Math.exp(-T*L*fe),le=Math.min(Q*fe,300);return ce*(oe*Math.sinh(le)+Ae*Math.cosh(le))}}const Z={calculatedDuration:w&&y||null,velocity:Q=>Sn(j(Q)),next:Q=>{if(!w&&T<1){const oe=Math.exp(-T*L*Q),Ae=Math.sin(q*Q),fe=Math.cos(q*Q),ce=u-oe*(K*Ae+P*fe),le=Sn(oe*(H*Ae+x*fe));return c.done=Math.abs(le)<=a&&Math.abs(u-ce)<=s,c.value=c.done?u:ce,c}const me=M(Q);if(w)c.done=Q>=y;else{const oe=Sn(j(Q));c.done=Math.abs(oe)<=a&&Math.abs(u-me)<=s}return c.value=c.done?u:me,c},toString:()=>{const Q=Math.min(Op(Z),rc),me=Wk(oe=>Z.next(Q*oe).value,Q,30);return Q+"ms "+me},toTransition:()=>{}};return Z}ac.applyToOptions=e=>{const t=CM(e,100,ac);return e.ease=t.ease,e.duration=Sn(t.duration),e.type="keyframes",e};const NM=5;function Kk(e,t,n){const a=Math.max(t-NM,0);return Pk(n-e(a),t-a)}function _f({keyframes:e,velocity:t=0,power:n=.8,timeConstant:a=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:u,min:c,max:h,restDelta:f=.5,restSpeed:m}){const y=e[0],b={done:!1,value:y},w=x=>c!==void 0&&x<c||h!==void 0&&x>h,S=x=>c===void 0?h:h===void 0||Math.abs(c-x)<Math.abs(h-x)?c:h;let T=n*t;const P=y+T,L=u===void 0?P:u(P);L!==P&&(T=L-y);const D=x=>-T*Math.exp(-x/a),M=x=>L+D(x),j=x=>{const Z=D(x),Q=M(x);b.done=Math.abs(Z)<=f,b.value=b.done?L:Q};let q,K;const H=x=>{w(b.value)&&(q=x,K=ac({keyframes:[b.value,S(b.value)],velocity:Kk(M,x,b.value),damping:s,stiffness:o,restDelta:f,restSpeed:m}))};return H(0),{calculatedDuration:null,next:x=>{let Z=!1;return!K&&q===void 0&&(Z=!0,j(x),H(x)),q!==void 0&&x>=q?K.next(x-q):(!Z&&j(x),b)}}}function OM(e,t,n){const a=[],s=n||Ma.mix||Hk,o=e.length-1;for(let u=0;u<o;u++){let c=s(e[u],e[u+1]);if(t){const h=Array.isArray(t)?t[u]||jn:t;c=qo(h,c)}a.push(c)}return a}function IM(e,t,{clamp:n=!0,ease:a,mixer:s}={}){const o=e.length;if(Cp(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const u=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=OM(t,a,s),h=c.length,f=m=>{if(u&&m<e[0])return t[0];let y=0;if(h>1)for(;y<e.length-2&&!(m<e[y+1]);y++);const b=Do(e[y],e[y+1],m);return c[y](b)};return n?m=>f(xr(e[0],e[o-1],m)):f}function jM(e,t){const n=e[e.length-1];for(let a=1;a<=t;a++){const s=Do(0,t,a);e.push(vt(n,1,s))}}function UM(e){const t=[0];return jM(t,e.length-1),t}function BM(e,t){return e.map(n=>n*t)}function FM(e,t){return e.map(()=>t||Nk).splice(0,e.length-1)}function So({duration:e=300,keyframes:t,times:n,ease:a="easeInOut"}){const s=GD(a)?a.map(Kv):Kv(a),o={done:!1,value:t[0]},u=BM(n&&n.length===t.length?n:UM(t),e),c=IM(u,t,{ease:Array.isArray(s)?s:FM(t,s)});return{calculatedDuration:e,next:h=>(o.value=c(h),o.done=h>=e,o)}}const VM=e=>e!==null;function Sc(e,{repeat:t,repeatType:n="loop"},a,s=1){const o=e.filter(VM),c=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!c||a===void 0?o[c]:a}const zM={decay:_f,inertia:_f,tween:So,keyframes:So,spring:ac};function qk(e){typeof e.type=="string"&&(e.type=zM[e.type])}class Ip{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const $M=e=>e/100;class ic extends Ip{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==on.now()&&this.tick(on.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;qk(t);const{type:n=So,repeat:a=0,repeatDelay:s=0,repeatType:o,velocity:u=0}=t;let{keyframes:c}=t;const h=n||So;h!==So&&typeof c[0]!="number"&&(this.mixKeyframes=qo($M,Hk(c[0],c[1])),c=[0,100]);const f=h({...t,keyframes:c});o==="mirror"&&(this.mirroredGenerator=h({...t,keyframes:[...c].reverse(),velocity:-u})),f.calculatedDuration===null&&(f.calculatedDuration=Op(f));const{calculatedDuration:m}=f;this.calculatedDuration=m,this.resolvedDuration=m+s,this.totalDuration=this.resolvedDuration*(a+1)-s,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:a,totalDuration:s,mixKeyframes:o,mirroredGenerator:u,resolvedDuration:c,calculatedDuration:h}=this;if(this.startTime===null)return a.next(0);const{delay:f=0,keyframes:m,repeat:y,repeatType:b,repeatDelay:w,type:S,onUpdate:T,finalKeyframe:P}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const L=this.currentTime-f*(this.playbackSpeed>=0?1:-1),D=this.playbackSpeed>=0?L<0:L>s;this.currentTime=Math.max(L,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let M=this.currentTime,j=a;if(y){const x=Math.min(this.currentTime,s)/c;let Z=Math.floor(x),Q=x%1;!Q&&x>=1&&(Q=1),Q===1&&Z--,Z=Math.min(Z,y+1),Z%2&&(b==="reverse"?(Q=1-Q,w&&(Q-=w/c)):b==="mirror"&&(j=u)),M=xr(0,1,Q)*c}let q;D?(this.delayState.value=m[0],q=this.delayState):q=j.next(M),o&&!D&&(q.value=o(q.value));let{done:K}=q;!D&&h!==null&&(K=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const H=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&K);return H&&S!==_f&&(q.value=Sc(m,this.options,P,this.speed)),T&&T(q.value),H&&this.finish(),q}then(t,n){return this.finished.then(t,n)}get duration(){return In(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+In(t)}get time(){return In(this.currentTime)}set time(t){t=Sn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return Kk(a=>this.generator.next(a).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(on.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=In(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=TM,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const a=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=a):this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime||(this.startTime=n??a),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(on.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function HM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ai=e=>e*180/Math.PI,kf=e=>{const t=ai(Math.atan2(e[1],e[0]));return wf(t)},WM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:kf,rotateZ:kf,skewX:e=>ai(Math.atan(e[1])),skewY:e=>ai(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},wf=e=>(e=e%360,e<0&&(e+=360),e),Jv=kf,e0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),t0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),KM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:e0,scaleY:t0,scale:e=>(e0(e)+t0(e))/2,rotateX:e=>wf(ai(Math.atan2(e[6],e[5]))),rotateY:e=>wf(ai(Math.atan2(-e[2],e[0]))),rotateZ:Jv,rotate:Jv,skewX:e=>ai(Math.atan(e[4])),skewY:e=>ai(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function xf(e){return e.includes("scale")?1:0}function Sf(e,t){if(!e||e==="none")return xf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let a,s;if(n)a=KM,s=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);a=WM,s=c}if(!s)return xf(t);const o=a[t],u=s[1].split(",").map(GM);return typeof o=="function"?o(u):u[o]}const qM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Sf(n,t)};function GM(e){return parseFloat(e.trim())}const _s=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ks=new Set(_s),n0=e=>e===bs||e===_e,YM=new Set(["x","y","z"]),ZM=_s.filter(e=>!YM.has(e));function QM(e){const t=[];return ZM.forEach(n=>{const a=e.getValue(n);a!==void 0&&(t.push([n,a.get()]),a.set(n.startsWith("scale")?1:0))}),t}const Ra={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:a})=>{const s=e.max-e.min;return a==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:a})=>{const s=e.max-e.min;return a==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Sf(t,"x"),y:(e,{transform:t})=>Sf(t,"y")};Ra.translateX=Ra.x;Ra.translateY=Ra.y;const ii=new Set;let Pf=!1,Tf=!1,Cf=!1;function Gk(){if(Tf){const e=Array.from(ii).filter(a=>a.needsMeasurement),t=new Set(e.map(a=>a.element)),n=new Map;t.forEach(a=>{const s=QM(a);s.length&&(n.set(a,s),a.render())}),e.forEach(a=>a.measureInitialState()),t.forEach(a=>{a.render();const s=n.get(a);s&&s.forEach(([o,u])=>{a.getValue(o)?.set(u)})}),e.forEach(a=>a.measureEndState()),e.forEach(a=>{a.suspendedScrollY!==void 0&&window.scrollTo(0,a.suspendedScrollY)})}Tf=!1,Pf=!1,ii.forEach(e=>e.complete(Cf)),ii.clear()}function Yk(){ii.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Tf=!0)})}function XM(){Cf=!0,Yk(),Gk(),Cf=!1}class jp{constructor(t,n,a,s,o,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=a,this.motionValue=s,this.element=o,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(ii.add(this),Pf||(Pf=!0,dt.read(Yk),dt.resolveKeyframes(Gk))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:a,motionValue:s}=this;if(t[0]===null){const o=s?.get(),u=t[t.length-1];if(o!==void 0)t[0]=o;else if(a&&n){const c=a.readValue(n,u);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=u),s&&o===void 0&&s.set(t[0])}HM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ii.delete(this)}cancel(){this.state==="scheduled"&&(ii.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const JM=e=>e.startsWith("--");function Zk(e,t,n){JM(t)?e.style.setProperty(t,n):e.style[t]=n}const e2={};function Qk(e,t){const n=Sk(e);return()=>e2[t]??n()}const t2=Qk(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Xk=Qk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),_o=([e,t,n,a])=>`cubic-bezier(${e}, ${t}, ${n}, ${a})`,r0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_o([0,.65,.55,1]),circOut:_o([.55,0,1,.45]),backIn:_o([.31,.01,.66,-.59]),backOut:_o([.33,1.53,.69,.99])};function Jk(e,t){if(e)return typeof e=="function"?Xk()?Wk(e,t):"ease-out":Ok(e)?_o(e):Array.isArray(e)?e.map(n=>Jk(n,t)||r0.easeOut):r0[e]}function n2(e,t,n,{delay:a=0,duration:s=300,repeat:o=0,repeatType:u="loop",ease:c="easeOut",times:h}={},f=void 0){const m={[t]:n};h&&(m.offset=h);const y=Jk(c,s);Array.isArray(y)&&(m.easing=y);const b={delay:a,duration:s,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:o+1,direction:u==="reverse"?"alternate":"normal"};return f&&(b.pseudoElement=f),e.animate(m,b)}function ew(e){return typeof e=="function"&&"applyToOptions"in e}function r2({type:e,...t}){return ew(e)&&Xk()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class tw extends Ip{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:a,keyframes:s,pseudoElement:o,allowFlatten:u=!1,finalKeyframe:c,onComplete:h}=t;this.isPseudoElement=!!o,this.allowFlatten=u,this.options=t,Cp(typeof t.type!="string");const f=r2(t);this.animation=n2(n,a,s,f,o),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const m=Sc(s,this.options,c,this.speed);this.updateMotionValue&&this.updateMotionValue(m),Zk(n,a,m),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return In(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+In(t)}get time(){return In(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Sn(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:a,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&t2()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),a&&(this.animation.rangeEnd=a),jn):s(this)}}const nw={anticipate:Lk,backInOut:Rk,circInOut:Mk};function a2(e){return e in nw}function i2(e){typeof e.ease=="string"&&a2(e.ease)&&(e.ease=nw[e.ease])}const Nh=10;class s2 extends tw{constructor(t){i2(t),qk(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:a,onComplete:s,element:o,...u}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new ic({...u,autoplay:!1}),h=Math.max(Nh,on.now()-this.startTime),f=xr(0,Nh,h-Nh),m=c.sample(h).value,{name:y}=this.options;o&&y&&Zk(o,y,m),n.setWithVelocity(c.sample(Math.max(0,h-f)).value,m,f),c.stop()}}const a0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ir.test(e)||e==="0")&&!e.startsWith("url("));function o2(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function l2(e,t,n,a){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],u=a0(s,t),c=a0(o,t);return!u||!c?!1:o2(e)||(n==="spring"||ew(n))&&a}function Ef(e){e.duration=0,e.type="keyframes"}const rw=new Set(["opacity","clipPath","filter","transform"]),u2=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function c2(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&u2.test(e[t]))return!0;return!1}const d2=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),h2=Sk(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function f2(e){const{motionValue:t,name:n,repeatDelay:a,repeatType:s,damping:o,type:u,keyframes:c}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:m}=t.owner.getProps();return h2()&&n&&(rw.has(n)||d2.has(n)&&c2(c))&&(n!=="transform"||!m)&&!f&&!a&&s!=="mirror"&&o!==0&&u!=="inertia"}const p2=40;class m2 extends Ip{constructor({autoplay:t=!0,delay:n=0,type:a="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:u="loop",keyframes:c,name:h,motionValue:f,element:m,...y}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=on.now();const b={autoplay:t,delay:n,type:a,repeat:s,repeatDelay:o,repeatType:u,name:h,motionValue:f,element:m,...y},w=m?.KeyframeResolver||jp;this.keyframeResolver=new w(c,(S,T,P)=>this.onKeyframesResolved(S,T,b,!P),h,f,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,a,s){this.keyframeResolver=void 0;const{name:o,type:u,velocity:c,delay:h,isHandoff:f,onUpdate:m}=a;this.resolvedAt=on.now();let y=!0;l2(t,o,u,c)||(y=!1,(Ma.instantAnimations||!h)&&m?.(Sc(t,a,n)),t[0]=t[t.length-1],Ef(a),a.repeat=0);const w={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>p2?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...a,keyframes:t},S=y&&!f&&f2(w),T=w.motionValue?.owner?.current;let P;if(S)try{P=new s2({...w,element:T})}catch{P=new ic(w)}else P=new ic(w);P.finished.then(()=>{this.notifyFinished()}).catch(jn),this.pendingTimeline&&(this.stopTimeline=P.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=P}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),XM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function aw(e,t,n,a=0,s=1){const o=Array.from(e).sort((f,m)=>f.sortNodePosition(m)).indexOf(t),u=e.size,c=(u-1)*a;return typeof n=="function"?n(o,u):s===1?o*a:c-o*a}const g2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function y2(e){const t=g2.exec(e);if(!t)return[,];const[,n,a,s]=t;return[`--${n??a}`,s]}function iw(e,t,n=1){const[a,s]=y2(e);if(!a)return;const o=window.getComputedStyle(t).getPropertyValue(a);if(o){const u=o.trim();return kk(u)?parseFloat(u):u}return Lp(s)?iw(s,t,n+1):s}const v2={type:"spring",stiffness:500,damping:25,restSpeed:10},b2=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_2={type:"keyframes",duration:.8},k2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},w2=(e,{keyframes:t})=>t.length>2?_2:ks.has(e)?e.startsWith("scale")?b2(t[1]):v2:k2;function sw(e,t){if(e?.inherit&&t){const{inherit:n,...a}=e;return{...t,...a}}return e}function Up(e,t){const n=e?.[t]??e?.default??e;return n!==e?sw(n,e):n}const x2=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function S2(e){for(const t in e)if(!x2.has(t))return!0;return!1}const Bp=(e,t,n,a={},s,o)=>u=>{const c=Up(a,e)||{},h=c.delay||a.delay||0;let{elapsed:f=0}=a;f=f-Sn(h);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-f,onUpdate:b=>{t.set(b),c.onUpdate&&c.onUpdate(b)},onComplete:()=>{u(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:o?void 0:s};S2(c)||Object.assign(m,w2(e,m)),m.duration&&(m.duration=Sn(m.duration)),m.repeatDelay&&(m.repeatDelay=Sn(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let y=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(Ef(m),m.delay===0&&(y=!0)),(Ma.instantAnimations||Ma.skipAnimations||s?.shouldSkipAnimations)&&(y=!0,Ef(m),m.delay=0),m.allowFlatten=!c.type&&!c.ease,y&&!o&&t.get()!==void 0){const b=Sc(m.keyframes,c);if(b!==void 0){dt.update(()=>{m.onUpdate(b),m.onComplete()});return}}return c.isSync?new ic(m):new m2(m)};function i0(e){const t=[{},{}];return e?.values.forEach((n,a)=>{t[0][a]=n.get(),t[1][a]=n.getVelocity()}),t}function Fp(e,t,n,a){if(typeof t=="function"){const[s,o]=i0(a);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=i0(a);t=t(n!==void 0?n:e.custom,s,o)}return t}function si(e,t,n){const a=e.getProps();return Fp(a,t,n!==void 0?n:a.custom,e)}const ow=new Set(["width","height","top","left","right","bottom",..._s]),s0=30,P2=e=>!isNaN(parseFloat(e)),o0={current:void 0};class T2{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=a=>{const s=on.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(a),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=on.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=P2(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ep);const a=this.events[t].add(n);return t==="change"?()=>{a(),dt.read(()=>{this.events.change.getSize()||this.stop()})}:a}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,a){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-a}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return o0.current&&o0.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=on.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>s0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,s0);return Pk(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gs(e,t){return new T2(e,t)}const Af=e=>Array.isArray(e);function C2(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,gs(n))}function E2(e){return Af(e)?e[e.length-1]||0:e}function A2(e,t){const n=si(e,t);let{transitionEnd:a={},transition:s={},...o}=n||{};o={...o,...a};for(const u in o){const c=E2(o[u]);C2(e,u,c)}}const qt=e=>!!(e&&e.getVelocity);function R2(e){return!!(qt(e)&&e.add)}function Rf(e,t){const n=e.getValue("willChange");if(R2(n))return n.add(t);if(!n&&Ma.WillChange){const a=new Ma.WillChange("auto");e.addValue("willChange",a),a.add(t)}}function Vp(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const L2="framerAppearId",lw="data-"+Vp(L2);function uw(e){return e.props[lw]}function D2({protectedKeys:e,needsAnimating:t},n){const a=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,a}function cw(e,t,{delay:n=0,transitionOverride:a,type:s}={}){let{transition:o,transitionEnd:u,...c}=t;const h=e.getDefaultTransition();o=o?sw(o,h):h;const f=o?.reduceMotion;a&&(o=a);const m=[],y=s&&e.animationState&&e.animationState.getState()[s];for(const b in c){const w=e.getValue(b,e.latestValues[b]??null),S=c[b];if(S===void 0||y&&D2(y,b))continue;const T={delay:n,...Up(o||{},b)},P=w.get();if(P!==void 0&&!w.isAnimating()&&!Array.isArray(S)&&S===P&&!T.velocity){dt.update(()=>w.set(S));continue}let L=!1;if(window.MotionHandoffAnimation){const j=uw(e);if(j){const q=window.MotionHandoffAnimation(j,b,dt);q!==null&&(T.startTime=q,L=!0)}}Rf(e,b);const D=f??e.shouldReduceMotion;w.start(Bp(b,w,S,D&&ow.has(b)?{type:!1}:T,e,L));const M=w.animation;M&&m.push(M)}if(u){const b=()=>dt.update(()=>{u&&A2(e,u)});m.length?Promise.all(m).then(b):b()}return m}function Lf(e,t,n={}){const a=si(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(s=n.transitionOverride);const o=a?()=>Promise.all(cw(e,a,n)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:f=0,staggerChildren:m,staggerDirection:y}=s;return M2(e,t,h,f,m,y,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[h,f]=c==="beforeChildren"?[o,u]:[u,o];return h().then(()=>f())}else return Promise.all([o(),u(n.delay)])}function M2(e,t,n=0,a=0,s=0,o=1,u){const c=[];for(const h of e.variantChildren)h.notify("AnimationStart",t),c.push(Lf(h,t,{...u,delay:n+(typeof a=="function"?0:a)+aw(e.variantChildren,h,a,s,o)}).then(()=>h.notify("AnimationComplete",t)));return Promise.all(c)}function N2(e,t,n={}){e.notify("AnimationStart",t);let a;if(Array.isArray(t)){const s=t.map(o=>Lf(e,o,n));a=Promise.all(s)}else if(typeof t=="string")a=Lf(e,t,n);else{const s=typeof t=="function"?si(e,t,n.custom):t;a=Promise.all(cw(e,s,n))}return a.then(()=>{e.notify("AnimationComplete",t)})}const O2={test:e=>e==="auto",parse:e=>e},dw=e=>t=>t.test(e),hw=[bs,_e,vr,Sa,oM,sM,O2],l0=e=>hw.find(dw(e));function I2(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xk(e):!0}const j2=new Set(["brightness","contrast","saturate","opacity"]);function U2(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[a]=n.match(Dp)||[];if(!a)return e;const s=n.replace(a,"");let o=j2.has(t)?1:0;return a!==n&&(o*=100),t+"("+o+s+")"}const B2=/\b([a-z-]*)\(.*?\)/gu,Df={...ir,getAnimatableNone:e=>{const t=e.match(B2);return t?t.map(U2).join(" "):e}},Mf={...ir,getAnimatableNone:e=>{const t=ir.parse(e);return ir.createTransformer(e)(t.map(a=>typeof a=="number"?0:typeof a=="object"?{...a,alpha:1}:a))}},u0={...bs,transform:Math.round},F2={rotate:Sa,rotateX:Sa,rotateY:Sa,rotateZ:Sa,scale:fu,scaleX:fu,scaleY:fu,scaleZ:fu,skew:Sa,skewX:Sa,skewY:Sa,distance:_e,translateX:_e,translateY:_e,translateZ:_e,x:_e,y:_e,z:_e,perspective:_e,transformPerspective:_e,opacity:Mo,originX:Gv,originY:Gv,originZ:_e},zp={borderWidth:_e,borderTopWidth:_e,borderRightWidth:_e,borderBottomWidth:_e,borderLeftWidth:_e,borderRadius:_e,borderTopLeftRadius:_e,borderTopRightRadius:_e,borderBottomRightRadius:_e,borderBottomLeftRadius:_e,width:_e,maxWidth:_e,height:_e,maxHeight:_e,top:_e,right:_e,bottom:_e,left:_e,inset:_e,insetBlock:_e,insetBlockStart:_e,insetBlockEnd:_e,insetInline:_e,insetInlineStart:_e,insetInlineEnd:_e,padding:_e,paddingTop:_e,paddingRight:_e,paddingBottom:_e,paddingLeft:_e,paddingBlock:_e,paddingBlockStart:_e,paddingBlockEnd:_e,paddingInline:_e,paddingInlineStart:_e,paddingInlineEnd:_e,margin:_e,marginTop:_e,marginRight:_e,marginBottom:_e,marginLeft:_e,marginBlock:_e,marginBlockStart:_e,marginBlockEnd:_e,marginInline:_e,marginInlineStart:_e,marginInlineEnd:_e,fontSize:_e,backgroundPositionX:_e,backgroundPositionY:_e,...F2,zIndex:u0,fillOpacity:Mo,strokeOpacity:Mo,numOctaves:u0},V2={...zp,color:Lt,backgroundColor:Lt,outlineColor:Lt,fill:Lt,stroke:Lt,borderColor:Lt,borderTopColor:Lt,borderRightColor:Lt,borderBottomColor:Lt,borderLeftColor:Lt,filter:Df,WebkitFilter:Df,mask:Mf,WebkitMask:Mf},fw=e=>V2[e],z2=new Set([Df,Mf]);function pw(e,t){let n=fw(e);return z2.has(n)||(n=ir),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const $2=new Set(["auto","none","0"]);function H2(e,t,n){let a=0,s;for(;a<e.length&&!s;){const o=e[a];typeof o=="string"&&!$2.has(o)&&ms(o).values.length&&(s=e[a]),a++}if(s&&n)for(const o of t)e[o]=pw(n,s)}class W2 extends jp{constructor(t,n,a,s,o){super(t,n,a,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:a}=this;if(!n||!n.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let y=t[m];if(typeof y=="string"&&(y=y.trim(),Lp(y))){const b=iw(y,n.current);b!==void 0&&(t[m]=b),m===t.length-1&&(this.finalKeyframe=y)}}if(this.resolveNoneKeyframes(),!ow.has(a)||t.length!==2)return;const[s,o]=t,u=l0(s),c=l0(o),h=qv(s),f=qv(o);if(h!==f&&Ra[a]){this.needsMeasurement=!0;return}if(u!==c)if(n0(u)&&n0(c))for(let m=0;m<t.length;m++){const y=t[m];typeof y=="string"&&(t[m]=parseFloat(y))}else Ra[a]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,a=[];for(let s=0;s<t.length;s++)(t[s]===null||I2(t[s]))&&a.push(s);a.length&&H2(t,a,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:a}=this;if(!t||!t.current)return;a==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ra[a](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(a,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:a}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=a.length-1,u=a[o];a[o]=Ra[n](t.measureViewportBox(),window.getComputedStyle(t.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,h])=>{t.getValue(c).set(h)}),this.resolveNoneKeyframes()}}function mw(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let a=document;const s=n?.[e]??a.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(a=>a!=null)}const gw=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ru(e){return wk(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:$p}=Ik(queueMicrotask,!1),nr={x:!1,y:!1};function yw(){return nr.x||nr.y}function K2(e){return e==="x"||e==="y"?nr[e]?null:(nr[e]=!0,()=>{nr[e]=!1}):nr.x||nr.y?null:(nr.x=nr.y=!0,()=>{nr.x=nr.y=!1})}function vw(e,t){const n=mw(e),a=new AbortController,s={passive:!0,...t,signal:a.signal};return[n,s,()=>a.abort()]}function q2(e){return!(e.pointerType==="touch"||yw())}function G2(e,t,n={}){const[a,s,o]=vw(e,n);return a.forEach(u=>{let c=!1,h=!1,f;const m=()=>{u.removeEventListener("pointerleave",S)},y=P=>{f&&(f(P),f=void 0),m()},b=P=>{c=!1,window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",b),h&&(h=!1,y(P))},w=()=>{c=!0,window.addEventListener("pointerup",b,s),window.addEventListener("pointercancel",b,s)},S=P=>{if(P.pointerType!=="touch"){if(c){h=!0;return}y(P)}},T=P=>{if(!q2(P))return;h=!1;const L=t(u,P);typeof L=="function"&&(f=L,u.addEventListener("pointerleave",S,s))};u.addEventListener("pointerenter",T,s),u.addEventListener("pointerdown",w,s)}),o}const bw=(e,t)=>t?e===t?!0:bw(e,t.parentElement):!1,Hp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Y2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Z2(e){return Y2.has(e.tagName)||e.isContentEditable===!0}const Q2=new Set(["INPUT","SELECT","TEXTAREA"]);function X2(e){return Q2.has(e.tagName)||e.isContentEditable===!0}const Lu=new WeakSet;function c0(e){return t=>{t.key==="Enter"&&e(t)}}function Oh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const J2=(e,t)=>{const n=e.currentTarget;if(!n)return;const a=c0(()=>{if(Lu.has(n))return;Oh(n,"down");const s=c0(()=>{Oh(n,"up")}),o=()=>Oh(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",a,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",a),t)};function d0(e){return Hp(e)&&!yw()}const h0=new WeakSet;function eN(e,t,n={}){const[a,s,o]=vw(e,n),u=c=>{const h=c.currentTarget;if(!d0(c)||h0.has(c))return;Lu.add(h),n.stopPropagation&&h0.add(c);const f=t(h,c),m=(w,S)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",b),Lu.has(h)&&Lu.delete(h),d0(w)&&typeof f=="function"&&f(w,{success:S})},y=w=>{m(w,h===window||h===document||n.useGlobalTarget||bw(h,w.target))},b=w=>{m(w,!1)};window.addEventListener("pointerup",y,s),window.addEventListener("pointercancel",b,s)};return a.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",u,s),Ru(c)&&(c.addEventListener("focus",f=>J2(f,s)),!Z2(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),o}function Wp(e){return wk(e)&&"ownerSVGElement"in e}const Du=new WeakMap;let Mu;const _w=(e,t,n)=>(a,s)=>s&&s[0]?s[0][e+"Size"]:Wp(a)&&"getBBox"in a?a.getBBox()[t]:a[n],tN=_w("inline","width","offsetWidth"),nN=_w("block","height","offsetHeight");function rN({target:e,borderBoxSize:t}){Du.get(e)?.forEach(n=>{n(e,{get width(){return tN(e,t)},get height(){return nN(e,t)}})})}function aN(e){e.forEach(rN)}function iN(){typeof ResizeObserver>"u"||(Mu=new ResizeObserver(aN))}function sN(e,t){Mu||iN();const n=mw(e);return n.forEach(a=>{let s=Du.get(a);s||(s=new Set,Du.set(a,s)),s.add(t),Mu?.observe(a)}),()=>{n.forEach(a=>{const s=Du.get(a);s?.delete(t),s?.size||Mu?.unobserve(a)})}}const Nu=new Set;let is;function oN(){is=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Nu.forEach(t=>t(e))},window.addEventListener("resize",is)}function lN(e){return Nu.add(e),is||oN(),()=>{Nu.delete(e),!Nu.size&&typeof is=="function"&&(window.removeEventListener("resize",is),is=void 0)}}function f0(e,t){return typeof e=="function"?lN(e):sN(e,t)}function uN(e){return Wp(e)&&e.tagName==="svg"}const cN=[...hw,Lt,ir],dN=e=>cN.find(dw(e)),p0=()=>({translate:0,scale:1,origin:0,originPoint:0}),ss=()=>({x:p0(),y:p0()}),m0=()=>({min:0,max:0}),It=()=>({x:m0(),y:m0()}),hN=new WeakMap;function Pc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function No(e){return typeof e=="string"||Array.isArray(e)}const Kp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qp=["initial",...Kp];function Tc(e){return Pc(e.animate)||qp.some(t=>No(e[t]))}function kw(e){return!!(Tc(e)||e.variants)}function fN(e,t,n){for(const a in t){const s=t[a],o=n[a];if(qt(s))e.addValue(a,s);else if(qt(o))e.addValue(a,gs(s,{owner:e}));else if(o!==s)if(e.hasValue(a)){const u=e.getValue(a);u.liveStyle===!0?u.jump(s):u.hasAnimated||u.set(s)}else{const u=e.getStaticValue(a);e.addValue(a,gs(u!==void 0?u:s,{owner:e}))}}for(const a in n)t[a]===void 0&&e.removeValue(a);return t}const Nf={current:null},ww={current:!1},pN=typeof window<"u";function mN(){if(ww.current=!0,!!pN)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Nf.current=e.matches;e.addEventListener("change",t),t()}else Nf.current=!1}const g0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let sc={};function xw(e){sc=e}function gN(){return sc}class yN{scrapeMotionValuesFromProps(t,n,a){return{}}constructor({parent:t,props:n,presenceContext:a,reducedMotionConfig:s,skipAnimations:o,blockInitialAnimation:u,visualState:c},h={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=jp,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const w=on.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,dt.render(this.render,!1,!0))};const{latestValues:f,renderState:m}=c;this.latestValues=f,this.baseTarget={...f},this.initialValues=n.initial?{...f}:{},this.renderState=m,this.parent=t,this.props=n,this.presenceContext=a,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=o,this.options=h,this.blockInitialAnimation=!!u,this.isControllingVariants=Tc(n),this.isVariantNode=kw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:y,...b}=this.scrapeMotionValuesFromProps(n,{},this);for(const w in b){const S=b[w];f[w]!==void 0&&qt(S)&&S.set(f[w])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,hN.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,a)=>this.bindToMotionValue(a,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ww.current||mN(),this.shouldReduceMotion=Nf.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Na(this.notifyUpdate),Na(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&rw.has(t)&&this.current instanceof HTMLElement){const{factory:u,keyframes:c,times:h,ease:f,duration:m}=n.accelerate,y=new tw({element:this.current,name:t,keyframes:c,times:h,ease:f,duration:Sn(m)}),b=u(y);this.valueSubscriptions.set(t,()=>{b(),y.cancel()});return}const a=ks.has(t);a&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&dt.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in sc){const n=sc[t];if(!n)continue;const{isEnabled:a,Feature:s}=n;if(!this.features[t]&&s&&a(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):It()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let a=0;a<g0.length;a++){const s=g0[a];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,u=t[o];u&&(this.propEventSubscriptions[s]=this.on(s,u))}this.prevMotionValues=fN(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const a=this.values.get(t);n!==a&&(a&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let a=this.values.get(t);return a===void 0&&n!==void 0&&(a=gs(n===null?void 0:n,{owner:this}),this.addValue(t,a)),a}readValue(t,n){let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(kk(a)||xk(a))?a=parseFloat(a):!dN(a)&&ir.test(n)&&(a=pw(t,n)),this.setBaseTarget(t,qt(a)?a.get():a)),qt(a)?a.get():a}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let a;if(typeof n=="string"||typeof n=="object"){const o=Fp(this.props,n,this.presenceContext?.custom);o&&(a=o[t])}if(n&&a!==void 0)return a;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!qt(s)?s:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ep),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){$p.render(this.render)}}class Sw extends yN{constructor(){super(...arguments),this.KeyframeResolver=W2}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const a=t.style;return a?a[n]:void 0}removeValueFromRenderState(t,{vars:n,style:a}){delete n[t],delete a[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;qt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ia{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Pw({top:e,left:t,right:n,bottom:a}){return{x:{min:t,max:n},y:{min:e,max:a}}}function vN({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function bN(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),a=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:a.y,right:a.x}}function Ih(e){return e===void 0||e===1}function Of({scale:e,scaleX:t,scaleY:n}){return!Ih(e)||!Ih(t)||!Ih(n)}function ei(e){return Of(e)||Tw(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Tw(e){return y0(e.x)||y0(e.y)}function y0(e){return e&&e!=="0%"}function oc(e,t,n){const a=e-n,s=t*a;return n+s}function v0(e,t,n,a,s){return s!==void 0&&(e=oc(e,s,a)),oc(e,n,a)+t}function If(e,t=0,n=1,a,s){e.min=v0(e.min,t,n,a,s),e.max=v0(e.max,t,n,a,s)}function Cw(e,{x:t,y:n}){If(e.x,t.translate,t.scale,t.originPoint),If(e.y,n.translate,n.scale,n.originPoint)}const b0=.999999999999,_0=1.0000000000001;function _N(e,t,n,a=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,u;for(let c=0;c<s;c++){o=n[c],u=o.projectionDelta;const{visualElement:h}=o.options;h&&h.props.style&&h.props.style.display==="contents"||(a&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(pr(e.x,-o.scroll.offset.x),pr(e.y,-o.scroll.offset.y)),u&&(t.x*=u.x.scale,t.y*=u.y.scale,Cw(e,u)),a&&ei(o.latestValues)&&Ou(e,o.latestValues,o.layout?.layoutBox))}t.x<_0&&t.x>b0&&(t.x=1),t.y<_0&&t.y>b0&&(t.y=1)}function pr(e,t){e.min+=t,e.max+=t}function k0(e,t,n,a,s=.5){const o=vt(e.min,e.max,s);If(e,t,n,o,a)}function w0(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Ou(e,t,n){const a=n??e;k0(e.x,w0(t.x,a.x),t.scaleX,t.scale,t.originX),k0(e.y,w0(t.y,a.y),t.scaleY,t.scale,t.originY)}function Ew(e,t){return Pw(bN(e.getBoundingClientRect(),t))}function kN(e,t,n){const a=Ew(e,n),{scroll:s}=t;return s&&(pr(a.x,s.offset.x),pr(a.y,s.offset.y)),a}const wN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xN=_s.length;function SN(e,t,n){let a="",s=!0;for(let o=0;o<xN;o++){const u=_s[o],c=e[u];if(c===void 0)continue;let h=!0;if(typeof c=="number")h=c===(u.startsWith("scale")?1:0);else{const f=parseFloat(c);h=u.startsWith("scale")?f===1:f===0}if(!h||n){const f=gw(c,zp[u]);if(!h){s=!1;const m=wN[u]||u;a+=`${m}(${f}) `}n&&(t[u]=f)}}return a=a.trim(),n?a=n(t,s?"":a):s&&(a="none"),a}function Gp(e,t,n){const{style:a,vars:s,transformOrigin:o}=e;let u=!1,c=!1;for(const h in t){const f=t[h];if(ks.has(h)){u=!0;continue}else if(Uk(h)){s[h]=f;continue}else{const m=gw(f,zp[h]);h.startsWith("origin")?(c=!0,o[h]=m):a[h]=m}}if(t.transform||(u||n?a.transform=SN(t,e.transform,n):a.transform&&(a.transform="none")),c){const{originX:h="50%",originY:f="50%",originZ:m=0}=o;a.transformOrigin=`${h} ${f} ${m}`}}function Aw(e,{style:t,vars:n},a,s){const o=e.style;let u;for(u in t)o[u]=t[u];s?.applyProjectionStyles(o,a);for(u in n)o.setProperty(u,n[u])}function x0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const po={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(_e.test(e))e=parseFloat(e);else return e;const n=x0(e,t.target.x),a=x0(e,t.target.y);return`${n}% ${a}%`}},PN={correct:(e,{treeScale:t,projectionDelta:n})=>{const a=e,s=ir.parse(e);if(s.length>5)return a;const o=ir.createTransformer(e),u=typeof s[0]!="number"?1:0,c=n.x.scale*t.x,h=n.y.scale*t.y;s[0+u]/=c,s[1+u]/=h;const f=vt(c,h,.5);return typeof s[2+u]=="number"&&(s[2+u]/=f),typeof s[3+u]=="number"&&(s[3+u]/=f),o(s)}},jf={borderRadius:{...po,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:po,borderTopRightRadius:po,borderBottomLeftRadius:po,borderBottomRightRadius:po,boxShadow:PN};function Rw(e,{layout:t,layoutId:n}){return ks.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!jf[e]||e==="opacity")}function Yp(e,t,n){const a=e.style,s=t?.style,o={};if(!a)return o;for(const u in a)(qt(a[u])||s&&qt(s[u])||Rw(u,e)||n?.getValue(u)?.liveStyle!==void 0)&&(o[u]=a[u]);return o}function TN(e){return window.getComputedStyle(e)}class CN extends Sw{constructor(){super(...arguments),this.type="html",this.renderInstance=Aw}readValueFromInstance(t,n){if(ks.has(n))return this.projection?.isProjecting?xf(n):qM(t,n);{const a=TN(t),s=(Uk(n)?a.getPropertyValue(n):a[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ew(t,n)}build(t,n,a){Gp(t,n,a.transformTemplate)}scrapeMotionValuesFromProps(t,n,a){return Yp(t,n,a)}}const EN={offset:"stroke-dashoffset",array:"stroke-dasharray"},AN={offset:"strokeDashoffset",array:"strokeDasharray"};function RN(e,t,n=1,a=0,s=!0){e.pathLength=1;const o=s?EN:AN;e[o.offset]=`${-a}`,e[o.array]=`${t} ${n}`}const LN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Lw(e,{attrX:t,attrY:n,attrScale:a,pathLength:s,pathSpacing:o=1,pathOffset:u=0,...c},h,f,m){if(Gp(e,c,f),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:b}=e;y.transform&&(b.transform=y.transform,delete y.transform),(b.transform||y.transformOrigin)&&(b.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),b.transform&&(b.transformBox=m?.transformBox??"fill-box",delete y.transformBox);for(const w of LN)y[w]!==void 0&&(b[w]=y[w],delete y[w]);t!==void 0&&(y.x=t),n!==void 0&&(y.y=n),a!==void 0&&(y.scale=a),s!==void 0&&RN(y,s,o,u,!1)}const Dw=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Mw=e=>typeof e=="string"&&e.toLowerCase()==="svg";function DN(e,t,n,a){Aw(e,t,void 0,a);for(const s in t.attrs)e.setAttribute(Dw.has(s)?s:Vp(s),t.attrs[s])}function Nw(e,t,n){const a=Yp(e,t,n);for(const s in e)if(qt(e[s])||qt(t[s])){const o=_s.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;a[o]=e[s]}return a}class MN extends Sw{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=It}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ks.has(n)){const a=fw(n);return a&&a.default||0}return n=Dw.has(n)?n:Vp(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,a){return Nw(t,n,a)}build(t,n,a){Lw(t,n,this.isSVGTag,a.transformTemplate,a.style)}renderInstance(t,n,a,s){DN(t,n,a,s)}mount(t){this.isSVGTag=Mw(t.tagName),super.mount(t)}}const NN=qp.length;function Ow(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ow(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<NN;n++){const a=qp[n],s=e.props[a];(No(s)||s===!1)&&(t[a]=s)}return t}function Iw(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let a=0;a<n;a++)if(t[a]!==e[a])return!1;return!0}const ON=[...Kp].reverse(),IN=Kp.length;function jN(e){return t=>Promise.all(t.map(({animation:n,options:a})=>N2(e,n,a)))}function UN(e){let t=jN(e),n=S0(),a=!0,s=!1;const o=f=>(m,y)=>{const b=si(e,y,f==="exit"?e.presenceContext?.custom:void 0);if(b){const{transition:w,transitionEnd:S,...T}=b;m={...m,...T,...S}}return m};function u(f){t=f(e)}function c(f){const{props:m}=e,y=Ow(e.parent)||{},b=[],w=new Set;let S={},T=1/0;for(let L=0;L<IN;L++){const D=ON[L],M=n[D],j=m[D]!==void 0?m[D]:y[D],q=No(j),K=D===f?M.isActive:null;K===!1&&(T=L);let H=j===y[D]&&j!==m[D]&&q;if(H&&(a||s)&&e.manuallyAnimateOnMount&&(H=!1),M.protectedKeys={...S},!M.isActive&&K===null||!j&&!M.prevProp||Pc(j)||typeof j=="boolean")continue;if(D==="exit"&&M.isActive&&K!==!0){M.prevResolvedValues&&(S={...S,...M.prevResolvedValues});continue}const x=BN(M.prevProp,j);let Z=x||D===f&&M.isActive&&!H&&q||L>T&&q,Q=!1;const me=Array.isArray(j)?j:[j];let oe=me.reduce(o(D),{});K===!1&&(oe={});const{prevResolvedValues:Ae={}}=M,fe={...Ae,...oe},ce=W=>{Z=!0,w.has(W)&&(Q=!0,w.delete(W)),M.needsAnimating[W]=!0;const Y=e.getValue(W);Y&&(Y.liveStyle=!1)};for(const W in fe){const Y=oe[W],$=Ae[W];if(S.hasOwnProperty(W))continue;let N=!1;Af(Y)&&Af($)?N=!Iw(Y,$):N=Y!==$,N?Y!=null?ce(W):w.add(W):Y!==void 0&&w.has(W)?ce(W):M.protectedKeys[W]=!0}M.prevProp=j,M.prevResolvedValues=oe,M.isActive&&(S={...S,...oe}),(a||s)&&e.blockInitialAnimation&&(Z=!1);const le=H&&x;Z&&(!le||Q)&&b.push(...me.map(W=>{const Y={type:D};if(typeof W=="string"&&(a||s)&&!le&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,N=si($,W);if($.enteringChildren&&N){const{delayChildren:G}=N.transition||{};Y.delay=aw($.enteringChildren,e,G)}}return{animation:W,options:Y}}))}if(w.size){const L={};if(typeof m.initial!="boolean"){const D=si(e,Array.isArray(m.initial)?m.initial[0]:m.initial);D&&D.transition&&(L.transition=D.transition)}w.forEach(D=>{const M=e.getBaseTarget(D),j=e.getValue(D);j&&(j.liveStyle=!0),L[D]=M??null}),b.push({animation:L})}let P=!!b.length;return a&&(m.initial===!1||m.initial===m.animate)&&!e.manuallyAnimateOnMount&&(P=!1),a=!1,s=!1,P?t(b):Promise.resolve()}function h(f,m){if(n[f].isActive===m)return Promise.resolve();e.variantChildren?.forEach(b=>b.animationState?.setActive(f,m)),n[f].isActive=m;const y=c(f);for(const b in n)n[b].protectedKeys={};return y}return{animateChanges:c,setActive:h,setAnimateFunction:u,getState:()=>n,reset:()=>{n=S0(),s=!0}}}function BN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Iw(t,e):!1}function Xa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function S0(){return{animate:Xa(!0),whileInView:Xa(),whileHover:Xa(),whileTap:Xa(),whileDrag:Xa(),whileFocus:Xa(),exit:Xa()}}function Uf(e,t){e.min=t.min,e.max=t.max}function tr(e,t){Uf(e.x,t.x),Uf(e.y,t.y)}function P0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const jw=1e-4,FN=1-jw,VN=1+jw,Uw=.01,zN=0-Uw,$N=0+Uw;function ln(e){return e.max-e.min}function HN(e,t,n){return Math.abs(e-t)<=n}function T0(e,t,n,a=.5){e.origin=a,e.originPoint=vt(t.min,t.max,e.origin),e.scale=ln(n)/ln(t),e.translate=vt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=FN&&e.scale<=VN||isNaN(e.scale))&&(e.scale=1),(e.translate>=zN&&e.translate<=$N||isNaN(e.translate))&&(e.translate=0)}function Po(e,t,n,a){T0(e.x,t.x,n.x,a?a.originX:void 0),T0(e.y,t.y,n.y,a?a.originY:void 0)}function C0(e,t,n,a=0){const s=a?vt(n.min,n.max,a):n.min;e.min=s+t.min,e.max=e.min+ln(t)}function WN(e,t,n,a){C0(e.x,t.x,n.x,a?.x),C0(e.y,t.y,n.y,a?.y)}function E0(e,t,n,a=0){const s=a?vt(n.min,n.max,a):n.min;e.min=t.min-s,e.max=e.min+ln(t)}function lc(e,t,n,a){E0(e.x,t.x,n.x,a?.x),E0(e.y,t.y,n.y,a?.y)}function A0(e,t,n,a,s){return e-=t,e=oc(e,1/n,a),s!==void 0&&(e=oc(e,1/s,a)),e}function KN(e,t=0,n=1,a=.5,s,o=e,u=e){if(vr.test(t)&&(t=parseFloat(t),t=vt(u.min,u.max,t/100)-u.min),typeof t!="number")return;let c=vt(o.min,o.max,a);e===o&&(c-=t),e.min=A0(e.min,t,n,c,s),e.max=A0(e.max,t,n,c,s)}function R0(e,t,[n,a,s],o,u){KN(e,t[n],t[a],t[s],t.scale,o,u)}const qN=["x","scaleX","originX"],GN=["y","scaleY","originY"];function L0(e,t,n,a){R0(e.x,t,qN,n?n.x:void 0,a?a.x:void 0),R0(e.y,t,GN,n?n.y:void 0,a?a.y:void 0)}function D0(e){return e.translate===0&&e.scale===1}function Bw(e){return D0(e.x)&&D0(e.y)}function M0(e,t){return e.min===t.min&&e.max===t.max}function YN(e,t){return M0(e.x,t.x)&&M0(e.y,t.y)}function N0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Fw(e,t){return N0(e.x,t.x)&&N0(e.y,t.y)}function O0(e){return ln(e.x)/ln(e.y)}function I0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function fr(e){return[e("x"),e("y")]}function ZN(e,t,n){let a="";const s=e.x.translate/t.x,o=e.y.translate/t.y,u=n?.z||0;if((s||o||u)&&(a=`translate3d(${s}px, ${o}px, ${u}px) `),(t.x!==1||t.y!==1)&&(a+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:m,rotateX:y,rotateY:b,skewX:w,skewY:S}=n;f&&(a=`perspective(${f}px) ${a}`),m&&(a+=`rotate(${m}deg) `),y&&(a+=`rotateX(${y}deg) `),b&&(a+=`rotateY(${b}deg) `),w&&(a+=`skewX(${w}deg) `),S&&(a+=`skewY(${S}deg) `)}const c=e.x.scale*t.x,h=e.y.scale*t.y;return(c!==1||h!==1)&&(a+=`scale(${c}, ${h})`),a||"none"}const Vw=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],QN=Vw.length,j0=e=>typeof e=="string"?parseFloat(e):e,U0=e=>typeof e=="number"||_e.test(e);function XN(e,t,n,a,s,o){s?(e.opacity=vt(0,n.opacity??1,JN(a)),e.opacityExit=vt(t.opacity??1,0,eO(a))):o&&(e.opacity=vt(t.opacity??1,n.opacity??1,a));for(let u=0;u<QN;u++){const c=Vw[u];let h=B0(t,c),f=B0(n,c);if(h===void 0&&f===void 0)continue;h||(h=0),f||(f=0),h===0||f===0||U0(h)===U0(f)?(e[c]=Math.max(vt(j0(h),j0(f),a),0),(vr.test(f)||vr.test(h))&&(e[c]+="%")):e[c]=f}(t.rotate||n.rotate)&&(e.rotate=vt(t.rotate||0,n.rotate||0,a))}function B0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const JN=zw(0,.5,Dk),eO=zw(.5,.95,jn);function zw(e,t,n){return a=>a<e?0:a>t?1:n(Do(e,t,a))}function tO(e,t,n){const a=qt(e)?e:gs(e);return a.start(Bp("",a,t,n)),a.animation}function Oo(e,t,n,a={passive:!0}){return e.addEventListener(t,n,a),()=>e.removeEventListener(t,n)}const nO=(e,t)=>e.depth-t.depth;class rO{constructor(){this.children=[],this.isDirty=!1}add(t){Tp(this.children,t),this.isDirty=!0}remove(t){tc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(nO),this.isDirty=!1,this.children.forEach(t)}}function aO(e,t){const n=on.now(),a=({timestamp:s})=>{const o=s-n;o>=t&&(Na(a),e(o-t))};return dt.setup(a,!0),()=>Na(a)}function Iu(e){return qt(e)?e.get():e}class iO{constructor(){this.members=[]}add(t){Tp(this.members,t);for(let n=this.members.length-1;n>=0;n--){const a=this.members[n];if(a===t||a===this.lead||a===this.prevLead)continue;const s=a.instance;(!s||s.isConnected===!1)&&!a.snapshot&&(tc(this.members,a),a.unmount())}t.scheduleRender()}remove(t){if(tc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){for(let n=this.members.indexOf(t)-1;n>=0;n--){const a=this.members[n];if(a.isPresent!==!1&&a.instance?.isConnected!==!1)return this.promote(a),!0}return!1}promote(t,n){const a=this.lead;if(t!==a&&(this.prevLead=a,this.lead=t,t.show(),a)){a.updateSnapshot(),t.scheduleRender();const{layoutDependency:s}=a.options,{layoutDependency:o}=t.options;(s===void 0||s!==o)&&(t.resumeFrom=a,n&&(a.preserveOpacity=!0),a.snapshot&&(t.snapshot=a.snapshot,t.snapshot.latestValues=a.animationValues||a.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&a.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const ju={hasAnimatedSinceResize:!0,hasEverUpdated:!1},jh=["","X","Y","Z"],sO=1e3;let oO=0;function Uh(e,t,n,a){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),a&&(a[e]=0))}function $w(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=uw(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",dt,!(s||o))}const{parent:a}=e;a&&!a.hasCheckedOptimisedAppear&&$w(a)}function Hw({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:a,resetTransform:s}){return class{constructor(u={},c=t?.()){this.id=oO++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(cO),this.nodes.forEach(gO),this.nodes.forEach(yO),this.nodes.forEach(dO)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let h=0;h<this.path.length;h++)this.path[h].shouldResetTransform=!0;this.root===this&&(this.nodes=new rO)}addEventListener(u,c){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new Ep),this.eventHandlers.get(u).add(c)}notifyListeners(u,...c){const h=this.eventHandlers.get(u);h&&h.notify(...c)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=Wp(u)&&!uN(u),this.instance=u;const{layoutId:c,layout:h,visualElement:f}=this.options;if(f&&!f.current&&f.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(h||c)&&(this.isLayoutDirty=!0),e){let m,y=0;const b=()=>this.root.updateBlockedByResize=!1;dt.read(()=>{y=window.innerWidth}),e(u,()=>{const w=window.innerWidth;w!==y&&(y=w,this.root.updateBlockedByResize=!0,m&&m(),m=aO(b,250),ju.hasAnimatedSinceResize&&(ju.hasAnimatedSinceResize=!1,this.nodes.forEach(z0)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:y,hasRelativeLayoutChanged:b,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||f.getDefaultTransition()||wO,{onLayoutAnimationStart:T,onLayoutAnimationComplete:P}=f.getProps(),L=!this.targetLayout||!Fw(this.targetLayout,w),D=!y&&b;if(this.options.layoutRoot||this.resumeFrom||D||y&&(L||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const M={...Up(S,"layout"),onPlay:T,onComplete:P};(f.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M),this.setAnimationOrigin(m,D)}else y||z0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Na(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(vO),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&$w(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const y=this.path[m];y.shouldResetTransform=!0,(typeof y.latestValues.x=="string"||typeof y.latestValues.y=="string")&&(y.isLayoutDirty=!0),y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:c,layout:h}=this.options;if(c===void 0&&!h)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const h=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),h&&this.nodes.forEach(fO),this.nodes.forEach(F0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(V0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(pO),this.nodes.forEach(mO),this.nodes.forEach(lO),this.nodes.forEach(uO)):this.nodes.forEach(V0),this.clearAllSnapshots();const c=on.now();Kt.delta=xr(0,1e3/60,c-Kt.timestamp),Kt.timestamp=c,Kt.isProcessing=!0,Ah.update.process(Kt),Ah.preRender.process(Kt),Ah.render.process(Kt),Kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$p.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hO),this.sharedNodes.forEach(bO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,dt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){dt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ln(this.snapshot.measuredBox.x)&&!ln(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let h=0;h<this.path.length;h++)this.path[h].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=It()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(c=!1),c&&this.instance){const h=a(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:h,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:h}}}resetTransform(){if(!s)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!Bw(this.projectionDelta),h=this.getTransformTemplate(),f=h?h(this.latestValues,""):void 0,m=f!==this.prevTransformTemplateValue;u&&this.instance&&(c||ei(this.latestValues)||m)&&(s(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const c=this.measurePageBox();let h=this.removeElementScroll(c);return u&&(h=this.removeTransform(h)),xO(h),{animationId:this.root.animationId,measuredBox:c,layoutBox:h,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:u}=this.options;if(!u)return It();const c=u.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(SO))){const{scroll:f}=this.root;f&&(pr(c.x,f.offset.x),pr(c.y,f.offset.y))}return c}removeElementScroll(u){const c=It();if(tr(c,u),this.scroll?.wasRoot)return c;for(let h=0;h<this.path.length;h++){const f=this.path[h],{scroll:m,options:y}=f;f!==this.root&&m&&y.layoutScroll&&(m.wasRoot&&tr(c,u),pr(c.x,m.offset.x),pr(c.y,m.offset.y))}return c}applyTransform(u,c=!1,h){const f=h||It();tr(f,u);for(let m=0;m<this.path.length;m++){const y=this.path[m];!c&&y.options.layoutScroll&&y.scroll&&y!==y.root&&(pr(f.x,-y.scroll.offset.x),pr(f.y,-y.scroll.offset.y)),ei(y.latestValues)&&Ou(f,y.latestValues,y.layout?.layoutBox)}return ei(this.latestValues)&&Ou(f,this.latestValues,this.layout?.layoutBox),f}removeTransform(u){const c=It();tr(c,u);for(let h=0;h<this.path.length;h++){const f=this.path[h];if(!ei(f.latestValues))continue;let m;f.instance&&(Of(f.latestValues)&&f.updateSnapshot(),m=It(),tr(m,f.measurePageBox())),L0(c,f.latestValues,f.snapshot?.layoutBox,m)}return ei(this.latestValues)&&L0(c,this.latestValues),c}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Kt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const h=!!this.resumingFrom||this!==c;if(!(u||h&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:y}=this.options;if(!this.layout||!(m||y))return;this.resolvedRelativeTargetAt=Kt.timestamp;const b=this.getClosestProjectingParent();b&&this.linkedParentVersion!==b.layoutVersion&&!b.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&b&&b.layout?this.createRelativeTarget(b,this.layout.layoutBox,b.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=It(),this.targetWithTransforms=It()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),WN(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):tr(this.target,this.layout.layoutBox),Cw(this.target,this.targetDelta)):tr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?this.createRelativeTarget(b,this.target,b.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Of(this.parent.latestValues)||Tw(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(u,c,h){this.relativeParent=u,this.linkedParentVersion=u.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=It(),this.relativeTargetOrigin=It(),lc(this.relativeTargetOrigin,c,h,this.options.layoutAnchor||void 0),tr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const u=this.getLead(),c=!!this.resumingFrom||this!==u;let h=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(h=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(h=!1),this.resolvedRelativeTargetAt===Kt.timestamp&&(h=!1),h)return;const{layout:f,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||m))return;tr(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,b=this.treeScale.y;_N(this.layoutCorrected,this.treeScale,this.path,c),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=It());const{target:w}=u;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(P0(this.prevProjectionDelta.x,this.projectionDelta.x),P0(this.prevProjectionDelta.y,this.projectionDelta.y)),Po(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==b||!I0(this.projectionDelta.x,this.prevProjectionDelta.x)||!I0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){if(this.options.visualElement?.scheduleRender(),u){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ss(),this.projectionDelta=ss(),this.projectionDeltaWithTransform=ss()}setAnimationOrigin(u,c=!1){const h=this.snapshot,f=h?h.latestValues:{},m={...this.latestValues},y=ss();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const b=It(),w=h?h.source:void 0,S=this.layout?this.layout.source:void 0,T=w!==S,P=this.getStack(),L=!P||P.members.length<=1,D=!!(T&&!L&&this.options.crossfade===!0&&!this.path.some(kO));this.animationProgress=0;let M;this.mixTargetDelta=j=>{const q=j/1e3;$0(y.x,u.x,q),$0(y.y,u.y,q),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(lc(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),_O(this.relativeTarget,this.relativeTargetOrigin,b,q),M&&YN(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=It()),tr(M,this.relativeTarget)),T&&(this.animationValues=m,XN(m,f,this.latestValues,q,D,L)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=q},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Na(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=dt.update(()=>{ju.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=gs(0)),this.motionValue.jump(0,!1),this.currentAnimation=tO(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),u.onUpdate&&u.onUpdate(c)},onStop:()=>{},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(sO),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:c,target:h,layout:f,latestValues:m}=u;if(!(!c||!h||!f)){if(this!==u&&this.layout&&f&&Ww(this.options.animationType,this.layout.layoutBox,f.layoutBox)){h=this.target||It();const y=ln(this.layout.layoutBox.x);h.x.min=u.target.x.min,h.x.max=h.x.min+y;const b=ln(this.layout.layoutBox.y);h.y.min=u.target.y.min,h.y.max=h.y.min+b}tr(c,h),Ou(c,m),Po(this.projectionDeltaWithTransform,this.layoutCorrected,c,m)}}registerSharedNode(u,c){this.sharedNodes.has(u)||this.sharedNodes.set(u,new iO),this.sharedNodes.get(u).add(c);const f=c.options.initialPromotionConfig;c.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(c):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){const{layoutId:u}=this.options;return u?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:u}=this.options;return u?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:c,preserveFollowOpacity:h}={}){const f=this.getStack();f&&f.promote(this,h),u&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let c=!1;const{latestValues:h}=u;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(c=!0),!c)return;const f={};h.z&&Uh("z",u,f,this.animationValues);for(let m=0;m<jh.length;m++)Uh(`rotate${jh[m]}`,u,f,this.animationValues),Uh(`skew${jh[m]}`,u,f,this.animationValues);u.render();for(const m in f)u.setStaticValue(m,f[m]),this.animationValues&&(this.animationValues[m]=f[m]);u.scheduleRender()}applyProjectionStyles(u,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const h=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=Iu(c?.pointerEvents)||"",u.transform=h?h(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(u.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,u.pointerEvents=Iu(c?.pointerEvents)||""),this.hasProjected&&!ei(this.latestValues)&&(u.transform=h?h({},""):"none",this.hasProjected=!1);return}u.visibility="";const m=f.animationValues||f.latestValues;this.applyTransformsToTarget();let y=ZN(this.projectionDeltaWithTransform,this.treeScale,m);h&&(y=h(m,y)),u.transform=y;const{x:b,y:w}=this.projectionDelta;u.transformOrigin=`${b.origin*100}% ${w.origin*100}% 0`,f.animationValues?u.opacity=f===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:u.opacity=f===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const S in jf){if(m[S]===void 0)continue;const{correct:T,applyTo:P,isCSSVariable:L}=jf[S],D=y==="none"?m[S]:T(m[S],f);if(P){const M=P.length;for(let j=0;j<M;j++)u[P[j]]=D}else L?this.options.visualElement.renderState.vars[S]=D:u[S]=D}this.options.layoutId&&(u.pointerEvents=f===this?Iu(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>u.currentAnimation?.stop()),this.root.nodes.forEach(F0),this.root.sharedNodes.clear()}}}function lO(e){e.updateLayout()}function uO(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:a}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;if(s==="size")fr(m=>{const y=o?t.measuredBox[m]:t.layoutBox[m],b=ln(y);y.min=n[m].min,y.max=y.min+b});else if(s==="x"||s==="y"){const m=s==="x"?"y":"x";Uf(o?t.measuredBox[m]:t.layoutBox[m],n[m])}else Ww(s,t.layoutBox,n)&&fr(m=>{const y=o?t.measuredBox[m]:t.layoutBox[m],b=ln(n[m]);y.max=y.min+b,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+b)});const u=ss();Po(u,n,t.layoutBox);const c=ss();o?Po(c,e.applyTransform(a,!0),t.measuredBox):Po(c,n,t.layoutBox);const h=!Bw(u);let f=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:y,layout:b}=m;if(y&&b){const w=e.options.layoutAnchor||void 0,S=It();lc(S,t.layoutBox,y.layoutBox,w);const T=It();lc(T,n,b.layoutBox,w),Fw(S,T)||(f=!0),m.options.layoutRoot&&(e.relativeTarget=T,e.relativeTargetOrigin=S,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function cO(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function dO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function hO(e){e.clearSnapshot()}function F0(e){e.clearMeasurements()}function fO(e){e.isLayoutDirty=!0,e.updateLayout()}function V0(e){e.isLayoutDirty=!1}function pO(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function mO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function z0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function gO(e){e.resolveTargetDelta()}function yO(e){e.calcProjection()}function vO(e){e.resetSkewAndRotation()}function bO(e){e.removeLeadSnapshot()}function $0(e,t,n){e.translate=vt(t.translate,0,n),e.scale=vt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function H0(e,t,n,a){e.min=vt(t.min,n.min,a),e.max=vt(t.max,n.max,a)}function _O(e,t,n,a){H0(e.x,t.x,n.x,a),H0(e.y,t.y,n.y,a)}function kO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const wO={duration:.45,ease:[.4,0,.1,1]},W0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),K0=W0("applewebkit/")&&!W0("chrome/")?Math.round:jn;function q0(e){e.min=K0(e.min),e.max=K0(e.max)}function xO(e){q0(e.x),q0(e.y)}function Ww(e,t,n){return e==="position"||e==="preserve-aspect"&&!HN(O0(t),O0(n),.2)}function SO(e){return e!==e.root&&e.scroll?.wasRoot}const PO=Hw({attachResizeListener:(e,t)=>Oo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Bh={current:void 0},Kw=Hw({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bh.current){const e=new PO({});e.mount(window),e.setOptions({layoutScroll:!0}),Bh.current=e}return Bh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Zp=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function G0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function TO(...e){return t=>{let n=!1;const a=e.map(s=>{const o=G0(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<a.length;s++){const o=a[s];typeof o=="function"?o():G0(e[s],null)}}}}function CO(...e){return k.useCallback(TO(...e),e)}class EO extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Ru(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const a=n.offsetParent,s=Ru(a)&&a.offsetWidth||0,o=Ru(a)&&a.offsetHeight||0,u=getComputedStyle(n),c=this.props.sizeRef.current;c.height=parseFloat(u.height),c.width=parseFloat(u.width),c.top=n.offsetTop,c.left=n.offsetLeft,c.right=s-c.width-c.left,c.bottom=o-c.height-c.top}return null}componentDidUpdate(){}render(){return this.props.children}}function AO({children:e,isPresent:t,anchorX:n,anchorY:a,root:s,pop:o}){const u=k.useId(),c=k.useRef(null),h=k.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:f}=k.useContext(Zp),m=e.props?.ref??e?.ref,y=CO(c,m);return k.useInsertionEffect(()=>{const{width:b,height:w,top:S,left:T,right:P,bottom:L}=h.current;if(t||o===!1||!c.current||!b||!w)return;const D=n==="left"?`left: ${T}`:`right: ${P}`,M=a==="bottom"?`bottom: ${L}`:`top: ${S}`;c.current.dataset.motionPopId=u;const j=document.createElement("style");f&&(j.nonce=f);const q=s??document.head;return q.appendChild(j),j.sheet&&j.sheet.insertRule(`
|
|
669
|
-
[data-motion-pop-id="${u}"] {
|
|
670
|
-
position: absolute !important;
|
|
671
|
-
width: ${b}px !important;
|
|
672
|
-
height: ${w}px !important;
|
|
673
|
-
${D}px !important;
|
|
674
|
-
${M}px !important;
|
|
675
|
-
}
|
|
676
|
-
`),()=>{c.current?.removeAttribute("data-motion-pop-id"),q.contains(j)&&q.removeChild(j)}},[t]),I.jsx(EO,{isPresent:t,childRef:c,sizeRef:h,pop:o,children:o===!1?e:k.cloneElement(e,{ref:y})})}const RO=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:s,presenceAffectsLayout:o,mode:u,anchorX:c,anchorY:h,root:f})=>{const m=Pp(LO),y=k.useId();let b=!0,w=k.useMemo(()=>(b=!1,{id:y,initial:t,isPresent:n,custom:s,onExitComplete:S=>{m.set(S,!0);for(const T of m.values())if(!T)return;a&&a()},register:S=>(m.set(S,!1),()=>m.delete(S))}),[n,m,a]);return o&&b&&(w={...w}),k.useMemo(()=>{m.forEach((S,T)=>m.set(T,!1))},[n]),k.useEffect(()=>{!n&&!m.size&&a&&a()},[n]),e=I.jsx(AO,{pop:u==="popLayout",isPresent:n,anchorX:c,anchorY:h,root:f,children:e}),I.jsx(xc.Provider,{value:w,children:e})};function LO(){return new Map}function qw(e=!0){const t=k.useContext(xc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:s}=t,o=k.useId();k.useEffect(()=>{if(e)return s(o)},[e]);const u=k.useCallback(()=>e&&a&&a(o),[o,a,e]);return!n&&a?[!1,u]:[!0]}const pu=e=>e.key||"";function Y0(e){const t=[];return k.Children.forEach(e,n=>{k.isValidElement(n)&&t.push(n)}),t}const DO=({children:e,custom:t,initial:n=!0,onExitComplete:a,presenceAffectsLayout:s=!0,mode:o="sync",propagate:u=!1,anchorX:c="left",anchorY:h="top",root:f})=>{const[m,y]=qw(u),b=k.useMemo(()=>Y0(e),[e]),w=u&&!m?[]:b.map(pu),S=k.useRef(!0),T=k.useRef(b),P=Pp(()=>new Map),L=k.useRef(new Set),[D,M]=k.useState(b),[j,q]=k.useState(b);_k(()=>{S.current=!1,T.current=b;for(let x=0;x<j.length;x++){const Z=pu(j[x]);w.includes(Z)?(P.delete(Z),L.current.delete(Z)):P.get(Z)!==!0&&P.set(Z,!1)}},[j,w.length,w.join("-")]);const K=[];if(b!==D){let x=[...b];for(let Z=0;Z<j.length;Z++){const Q=j[Z],me=pu(Q);w.includes(me)||(x.splice(Z,0,Q),K.push(Q))}return o==="wait"&&K.length&&(x=K),q(Y0(x)),M(b),null}const{forceRender:H}=k.useContext(Sp);return I.jsx(I.Fragment,{children:j.map(x=>{const Z=pu(x),Q=u&&!m?!1:b===j||w.includes(Z),me=()=>{if(L.current.has(Z))return;if(P.has(Z))L.current.add(Z),P.set(Z,!0);else return;let oe=!0;P.forEach(Ae=>{Ae||(oe=!1)}),oe&&(H?.(),q(T.current),u&&y?.(),a&&a())};return I.jsx(RO,{isPresent:Q,initial:!S.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:f,onExitComplete:Q?void 0:me,anchorX:c,anchorY:h,children:x},Z)})})},Gw=k.createContext({strict:!1}),Z0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Q0=!1;function MO(){if(Q0)return;const e={};for(const t in Z0)e[t]={isEnabled:n=>Z0[t].some(a=>!!n[a])};xw(e),Q0=!0}function Yw(){return MO(),gN()}function NO(e){const t=Yw();for(const n in e)t[n]={...t[n],...e[n]};xw(t)}const OO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function uc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||OO.has(e)}let Zw=e=>!uc(e);function IO(e){typeof e=="function"&&(Zw=t=>t.startsWith("on")?!uc(t):e(t))}try{IO(require("@emotion/is-prop-valid").default)}catch{}function jO(e,t,n){const a={};for(const s in e)s==="values"&&typeof e.values=="object"||qt(e[s])||(Zw(s)||n===!0&&uc(s)||!t&&!uc(s)||e.draggable&&s.startsWith("onDrag"))&&(a[s]=e[s]);return a}const Cc=k.createContext({});function UO(e,t){if(Tc(e)){const{initial:n,animate:a}=e;return{initial:n===!1||No(n)?n:void 0,animate:No(a)?a:void 0}}return e.inherit!==!1?t:{}}function BO(e){const{initial:t,animate:n}=UO(e,k.useContext(Cc));return k.useMemo(()=>({initial:t,animate:n}),[X0(t),X0(n)])}function X0(e){return Array.isArray(e)?e.join(" "):e}const Qp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Qw(e,t,n){for(const a in t)!qt(t[a])&&!Rw(a,n)&&(e[a]=t[a])}function FO({transformTemplate:e},t){return k.useMemo(()=>{const n=Qp();return Gp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function VO(e,t){const n=e.style||{},a={};return Qw(a,n,e),Object.assign(a,FO(e,t)),a}function zO(e,t){const n={},a=VO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=a,n}const Xw=()=>({...Qp(),attrs:{}});function $O(e,t,n,a){const s=k.useMemo(()=>{const o=Xw();return Lw(o,t,Mw(a),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Qw(o,e.style,e),s.style={...o,...s.style}}return s}const HO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Xp(e){return typeof e!="string"||e.includes("-")?!1:!!(HO.indexOf(e)>-1||/[A-Z]/u.test(e))}function WO(e,t,n,{latestValues:a},s,o=!1,u){const h=(u??Xp(e)?$O:zO)(t,a,s,e),f=jO(t,typeof e=="string",o),m=e!==k.Fragment?{...f,...h,ref:n}:{},{children:y}=t,b=k.useMemo(()=>qt(y)?y.get():y,[y]);return k.createElement(e,{...m,children:b})}function KO({scrapeMotionValuesFromProps:e,createRenderState:t},n,a,s){return{latestValues:qO(n,a,s,e),renderState:t()}}function qO(e,t,n,a){const s={},o=a(e,{});for(const b in o)s[b]=Iu(o[b]);let{initial:u,animate:c}=e;const h=Tc(e),f=kw(e);t&&f&&!h&&e.inherit!==!1&&(u===void 0&&(u=t.initial),c===void 0&&(c=t.animate));let m=n?n.initial===!1:!1;m=m||u===!1;const y=m?c:u;if(y&&typeof y!="boolean"&&!Pc(y)){const b=Array.isArray(y)?y:[y];for(let w=0;w<b.length;w++){const S=Fp(e,b[w]);if(S){const{transitionEnd:T,transition:P,...L}=S;for(const D in L){let M=L[D];if(Array.isArray(M)){const j=m?M.length-1:0;M=M[j]}M!==null&&(s[D]=M)}for(const D in T)s[D]=T[D]}}}return s}const Jw=e=>(t,n)=>{const a=k.useContext(Cc),s=k.useContext(xc),o=()=>KO(e,t,a,s);return n?o():Pp(o)},GO=Jw({scrapeMotionValuesFromProps:Yp,createRenderState:Qp}),YO=Jw({scrapeMotionValuesFromProps:Nw,createRenderState:Xw}),ZO=Symbol.for("motionComponentSymbol");function QO(e,t,n){const a=k.useRef(n);k.useInsertionEffect(()=>{a.current=n});const s=k.useRef(null);return k.useCallback(o=>{o&&e.onMount?.(o);const u=a.current;if(typeof u=="function")if(o){const c=u(o);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):u(o);else u&&(u.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const ex=k.createContext({});function ts(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function XO(e,t,n,a,s,o){const{visualElement:u}=k.useContext(Cc),c=k.useContext(Gw),h=k.useContext(xc),f=k.useContext(Zp),m=f.reducedMotion,y=f.skipAnimations,b=k.useRef(null),w=k.useRef(!1);a=a||c.renderer,!b.current&&a&&(b.current=a(e,{visualState:t,parent:u,props:n,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:m,skipAnimations:y,isSVG:o}),w.current&&b.current&&(b.current.manuallyAnimateOnMount=!0));const S=b.current,T=k.useContext(ex);S&&!S.projection&&s&&(S.type==="html"||S.type==="svg")&&JO(b.current,n,s,T);const P=k.useRef(!1);k.useInsertionEffect(()=>{S&&P.current&&S.update(n,h)});const L=n[lw],D=k.useRef(!!L&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(L)&&window.MotionHasOptimisedAnimation?.(L));return _k(()=>{w.current=!0,S&&(P.current=!0,window.MotionIsMounted=!0,S.updateFeatures(),S.scheduleRenderMicrotask(),D.current&&S.animationState&&S.animationState.animateChanges())}),k.useEffect(()=>{S&&(!D.current&&S.animationState&&S.animationState.animateChanges(),D.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(L)}),D.current=!1),S.enteringChildren=void 0)}),S}function JO(e,t,n,a){const{layoutId:s,layout:o,drag:u,dragConstraints:c,layoutScroll:h,layoutRoot:f,layoutAnchor:m,layoutCrossfade:y}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:tx(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!u||c&&ts(c),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:a,crossfade:y,layoutScroll:h,layoutRoot:f,layoutAnchor:m})}function tx(e){if(e)return e.options.allowProjection!==!1?e.projection:tx(e.parent)}function Fh(e,{forwardMotionProps:t=!1,type:n}={},a,s){a&&NO(a);const o=n?n==="svg":Xp(e),u=o?YO:GO;function c(f,m){let y;const b={...k.useContext(Zp),...f,layoutId:eI(f)},{isStatic:w}=b,S=BO(f),T=u(f,w);if(!w&&typeof window<"u"){tI();const P=nI(b);y=P.MeasureLayout,S.visualElement=XO(e,T,b,s,P.ProjectionNode,o)}return I.jsxs(Cc.Provider,{value:S,children:[y&&S.visualElement?I.jsx(y,{visualElement:S.visualElement,...b}):null,WO(e,f,QO(T,S.visualElement,m),T,w,t,o)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=k.forwardRef(c);return h[ZO]=e,h}function eI({layoutId:e}){const t=k.useContext(Sp).id;return t&&e!==void 0?t+"-"+e:e}function tI(e,t){k.useContext(Gw).strict}function nI(e){const t=Yw(),{drag:n,layout:a}=t;if(!n&&!a)return{};const s={...n,...a};return{MeasureLayout:n?.isEnabled(e)||a?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function rI(e,t){if(typeof Proxy>"u")return Fh;const n=new Map,a=(o,u)=>Fh(o,u,e,t),s=(o,u)=>a(o,u);return new Proxy(s,{get:(o,u)=>u==="create"?a:(n.has(u)||n.set(u,Fh(u,void 0,e,t)),n.get(u))})}const aI=(e,t)=>t.isSVG??Xp(e)?new MN(t):new CN(t,{allowProjection:e!==k.Fragment});class iI extends Ia{constructor(t){super(t),t.animationState||(t.animationState=UN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Pc(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let sI=0;class oI extends Ia{constructor(){super(...arguments),this.id=sI++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;if(t&&a===!1){if(this.isExitComplete){const{initial:o,custom:u}=this.node.getProps();if(typeof o=="string"){const c=si(this.node,o,u);if(c){const{transition:h,transitionEnd:f,...m}=c;for(const y in m)this.node.getValue(y)?.jump(m[y])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const lI={animation:{Feature:iI},exit:{Feature:oI}};function Zo(e){return{point:{x:e.pageX,y:e.pageY}}}const uI=e=>t=>Hp(t)&&e(t,Zo(t));function To(e,t,n,a){return Oo(e,t,uI(n),a)}const nx=({current:e})=>e?e.ownerDocument.defaultView:null,J0=(e,t)=>Math.abs(e-t);function cI(e,t){const n=J0(e.x,t.x),a=J0(e.y,t.y);return Math.sqrt(n**2+a**2)}const eb=new Set(["auto","scroll"]);class rx{constructor(t,n,{transformPagePoint:a,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:u=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=w=>{this.handleScroll(w.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=mu(this.lastRawMoveEventInfo,this.transformPagePoint));const w=Vh(this.lastMoveEventInfo,this.history),S=this.startEvent!==null,T=cI(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!S&&!T)return;const{point:P}=w,{timestamp:L}=Kt;this.history.push({...P,timestamp:L});const{onStart:D,onMove:M}=this.handlers;S||(D&&D(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),M&&M(this.lastMoveEvent,w)},this.handlePointerMove=(w,S)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=S,this.lastMoveEventInfo=mu(S,this.transformPagePoint),dt.update(this.updatePoint,!0)},this.handlePointerUp=(w,S)=>{this.end();const{onEnd:T,onSessionEnd:P,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const D=Vh(w.type==="pointercancel"?this.lastMoveEventInfo:mu(S,this.transformPagePoint),this.history);this.startEvent&&T&&T(w,D),P&&P(w,D)},!Hp(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=u,this.contextWindow=s||window;const h=Zo(t),f=mu(h,this.transformPagePoint),{point:m}=f,{timestamp:y}=Kt;this.history=[{...m,timestamp:y}];const{onSessionStart:b}=n;b&&b(t,Vh(f,this.history)),this.removeListeners=qo(To(this.contextWindow,"pointermove",this.handlePointerMove),To(this.contextWindow,"pointerup",this.handlePointerUp),To(this.contextWindow,"pointercancel",this.handlePointerUp)),c&&this.startScrollTracking(c)}startScrollTracking(t){let n=t.parentElement;for(;n;){const a=getComputedStyle(n);(eb.has(a.overflowX)||eb.has(a.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const a=t===window,s=a?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-n.x,y:s.y-n.y};o.x===0&&o.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),dt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Na(this.updatePoint)}}function mu(e,t){return t?{point:t(e.point)}:e}function tb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vh({point:e},t){return{point:e,delta:tb(e,ax(t)),offset:tb(e,dI(t)),velocity:hI(t,.1)}}function dI(e){return e[0]}function ax(e){return e[e.length-1]}function hI(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,a=null;const s=ax(e);for(;n>=0&&(a=e[n],!(s.timestamp-a.timestamp>Sn(t)));)n--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&s.timestamp-a.timestamp>Sn(t)*2&&(a=e[1]);const o=In(s.timestamp-a.timestamp);if(o===0)return{x:0,y:0};const u={x:(s.x-a.x)/o,y:(s.y-a.y)/o};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function fI(e,{min:t,max:n},a){return t!==void 0&&e<t?e=a?vt(t,e,a.min):Math.max(e,t):n!==void 0&&e>n&&(e=a?vt(n,e,a.max):Math.min(e,n)),e}function nb(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function pI(e,{top:t,left:n,bottom:a,right:s}){return{x:nb(e.x,n,s),y:nb(e.y,t,a)}}function rb(e,t){let n=t.min-e.min,a=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,a]=[a,n]),{min:n,max:a}}function mI(e,t){return{x:rb(e.x,t.x),y:rb(e.y,t.y)}}function gI(e,t){let n=.5;const a=ln(e),s=ln(t);return s>a?n=Do(t.min,t.max-a,e.min):a>s&&(n=Do(e.min,e.max-s,t.min)),xr(0,1,n)}function yI(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Bf=.35;function vI(e=Bf){return e===!1?e=0:e===!0&&(e=Bf),{x:ab(e,"left","right"),y:ab(e,"top","bottom")}}function ab(e,t,n){return{min:ib(e,t),max:ib(e,n)}}function ib(e,t){return typeof e=="number"?e:e[t]||0}const bI=new WeakMap;class _I{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=It(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:a}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=y=>{n&&this.snapToCursor(Zo(y).point),this.stopAnimation()},u=(y,b)=>{const{drag:w,dragPropagation:S,onDragStart:T}=this.getProps();if(w&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=K2(w),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fr(L=>{let D=this.getAxisMotionValue(L).get()||0;if(vr.test(D)){const{projection:M}=this.visualElement;if(M&&M.layout){const j=M.layout.layoutBox[L];j&&(D=ln(j)*(parseFloat(D)/100))}}this.originPoint[L]=D}),T&&dt.update(()=>T(y,b),!1,!0),Rf(this.visualElement,"transform");const{animationState:P}=this.visualElement;P&&P.setActive("whileDrag",!0)},c=(y,b)=>{this.latestPointerEvent=y,this.latestPanInfo=b;const{dragPropagation:w,dragDirectionLock:S,onDirectionLock:T,onDrag:P}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:L}=b;if(S&&this.currentDirection===null){this.currentDirection=wI(L),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",b.point,L),this.updateAxis("y",b.point,L),this.visualElement.render(),P&&dt.update(()=>P(y,b),!1,!0)},h=(y,b)=>{this.latestPointerEvent=y,this.latestPanInfo=b,this.stop(y,b),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:y}=this.getProps();(y||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new rx(t,{onSessionStart:o,onStart:u,onMove:c,onSessionEnd:h,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:a,contextWindow:nx(this.visualElement),element:this.visualElement.current})}stop(t,n){const a=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!a)return;const{velocity:u}=s;this.startAnimation(u);const{onDragEnd:c}=this.getProps();c&&dt.postRender(()=>c(a,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:a}=this.getProps();!a&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,a){const{drag:s}=this.getProps();if(!a||!gu(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let u=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(u=fI(u,this.constraints[t],this.elastic[t])),o.set(u)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&ts(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=pI(a.layoutBox,t):this.constraints=!1,this.elastic=vI(n),s!==this.constraints&&!ts(t)&&a&&this.constraints&&!this.hasMutatedConstraints&&fr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=yI(a.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ts(t))return!1;const a=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=kN(a,s.root,this.visualElement.getTransformPagePoint());let u=mI(s.layout.layoutBox,o);if(n){const c=n(vN(u));this.hasMutatedConstraints=!!c,c&&(u=Pw(c))}return u}startAnimation(t){const{drag:n,dragMomentum:a,dragElastic:s,dragTransition:o,dragSnapToOrigin:u,onDragTransitionEnd:c}=this.getProps(),h=this.constraints||{},f=fr(m=>{if(!gu(m,n,this.currentDirection))return;let y=h&&h[m]||{};(u===!0||u===m)&&(y={min:0,max:0});const b=s?200:1e6,w=s?40:1e7,S={type:"inertia",velocity:a?t[m]:0,bounceStiffness:b,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...o,...y};return this.startAxisValueAnimation(m,S)});return Promise.all(f).then(c)}startAxisValueAnimation(t,n){const a=this.getAxisMotionValue(t);return Rf(this.visualElement,t),a.start(Bp(t,a,0,n,this.visualElement,!1))}stopAnimation(){fr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,a=this.visualElement.getProps(),s=a[n];return s||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){fr(n=>{const{drag:a}=this.getProps();if(!gu(n,a,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:u,max:c}=s.layout.layoutBox[n],h=o.get()||0;o.set(t[n]-vt(u,c,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:a}=this.visualElement;if(!ts(n)||!a||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};fr(u=>{const c=this.getAxisMotionValue(u);if(c&&this.constraints!==!1){const h=c.get();s[u]=gI({min:h,max:h},this.constraints[u])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),fr(u=>{if(!gu(u,t,null))return;const c=this.getAxisMotionValue(u),{min:h,max:f}=this.constraints[u];c.set(vt(h,f,s[u]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;bI.set(this.visualElement,this);const t=this.visualElement.current,n=To(t,"pointerdown",f=>{const{drag:m,dragListener:y=!0}=this.getProps(),b=f.target,w=b!==t&&X2(b);m&&y&&!w&&this.start(f)});let a;const s=()=>{const{dragConstraints:f}=this.getProps();ts(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),a||(a=kI(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,u=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),dt.read(s);const c=Oo(window,"resize",()=>this.scalePositionWithinConstraints()),h=o.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:m})=>{this.isDragging&&m&&(fr(y=>{const b=this.getAxisMotionValue(y);b&&(this.originPoint[y]+=f[y].translate,b.set(b.get()+f[y].translate))}),this.visualElement.render())}));return()=>{c(),n(),u(),h&&h(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:a=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:u=Bf,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:a,dragPropagation:s,dragConstraints:o,dragElastic:u,dragMomentum:c}}}function sb(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function kI(e,t,n){const a=f0(e,sb(n)),s=f0(t,sb(n));return()=>{a(),s()}}function gu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function wI(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class xI extends Ia{constructor(t){super(t),this.removeGroupControls=jn,this.removeListeners=jn,this.controls=new _I(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||jn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const zh=e=>(t,n)=>{e&&dt.update(()=>e(t,n),!1,!0)};class SI extends Ia{constructor(){super(...arguments),this.removePointerDownListener=jn}onPointerDown(t){this.session=new rx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:nx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:a,onPanEnd:s}=this.node.getProps();return{onSessionStart:zh(t),onStart:zh(n),onMove:zh(a),onEnd:(o,u)=>{delete this.session,s&&dt.postRender(()=>s(o,u))}}}mount(){this.removePointerDownListener=To(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let $h=!1;class PI extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a,layoutId:s}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),a&&a.register&&s&&a.register(o),$h&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ju.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:a,drag:s,isPresent:o}=this.props,{projection:u}=a;return u&&(u.isPresent=o,t.layoutDependency!==n&&u.setOptions({...u.options,layoutDependency:n}),$h=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?u.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?u.promote():u.relegate()||dt.postRender(()=>{const c=u.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:a}=t;a&&(a.options.layoutAnchor=n,a.root.didUpdate(),$p.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:s}=t;$h=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),a&&a.deregister&&a.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ix(e){const[t,n]=qw(),a=k.useContext(Sp);return I.jsx(PI,{...e,layoutGroup:a,switchLayoutGroup:k.useContext(ex),isPresent:t,safeToRemove:n})}const TI={pan:{Feature:SI},drag:{Feature:xI,ProjectionNode:Kw,MeasureLayout:ix}};function ob(e,t,n){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=a[s];o&&dt.postRender(()=>o(t,Zo(t)))}class CI extends Ia{mount(){const{current:t}=this.node;t&&(this.unmount=G2(t,(n,a)=>(ob(this.node,a,"Start"),s=>ob(this.node,s,"End"))))}unmount(){}}class EI extends Ia{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=qo(Oo(this.node.current,"focus",()=>this.onFocus()),Oo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function lb(e,t,n){const{props:a}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&a.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=a[s];o&&dt.postRender(()=>o(t,Zo(t)))}class AI extends Ia{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:a}=this.node.props;this.unmount=eN(t,(s,o)=>(lb(this.node,o,"Start"),(u,{success:c})=>lb(this.node,u,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:a?.tap===!1})}unmount(){}}const Ff=new WeakMap,Hh=new WeakMap,RI=e=>{const t=Ff.get(e.target);t&&t(e)},LI=e=>{e.forEach(RI)};function DI({root:e,...t}){const n=e||document;Hh.has(n)||Hh.set(n,{});const a=Hh.get(n),s=JSON.stringify(t);return a[s]||(a[s]=new IntersectionObserver(LI,{root:e,...t})),a[s]}function MI(e,t,n){const a=DI(t);return Ff.set(e,n),a.observe(e),()=>{Ff.delete(e),a.unobserve(e)}}const NI={some:0,all:1};class OI extends Ia{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:a,amount:s="some",once:o}=t,u={root:n?n.current:void 0,rootMargin:a,threshold:typeof s=="number"?s:NI[s]},c=h=>{const{isIntersecting:f}=h;if(this.isInView===f||(this.isInView=f,o&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),b=f?m:y;b&&b(h)};this.stopObserver=MI(this.node.current,u,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(II(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function II({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const jI={inView:{Feature:OI},tap:{Feature:AI},focus:{Feature:EI},hover:{Feature:CI}},UI={layout:{ProjectionNode:Kw,MeasureLayout:ix}},BI={...lI,...jI,...TI,...UI},Wh=rI(BI,aI);function sx(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=sx(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function FI(){for(var e,t,n=0,a="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=sx(e))&&(a&&(a+=" "),a+=t);return a}const VI=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},zI=(e,t)=>({classGroupId:e,validator:t}),ox=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),cc="-",ub=[],$I="arbitrary..",HI=e=>{const t=KI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return WI(u);const c=u.split(cc),h=c[0]===""&&c.length>1?1:0;return lx(c,h,t)},getConflictingClassGroupIds:(u,c)=>{if(c){const h=a[u],f=n[u];return h?f?VI(f,h):h:f||ub}return n[u]||ub}}},lx=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],o=n.nextPart.get(s);if(o){const f=lx(e,t+1,o);if(f)return f}const u=n.validators;if(u===null)return;const c=t===0?e.join(cc):e.slice(t).join(cc),h=u.length;for(let f=0;f<h;f++){const m=u[f];if(m.validator(c))return m.classGroupId}},WI=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?$I+a:void 0})(),KI=e=>{const{theme:t,classGroups:n}=e;return qI(n,t)},qI=(e,t)=>{const n=ox();for(const a in e){const s=e[a];Jp(s,n,a,t)}return n},Jp=(e,t,n,a)=>{const s=e.length;for(let o=0;o<s;o++){const u=e[o];GI(u,t,n,a)}},GI=(e,t,n,a)=>{if(typeof e=="string"){YI(e,t,n);return}if(typeof e=="function"){ZI(e,t,n,a);return}QI(e,t,n,a)},YI=(e,t,n)=>{const a=e===""?t:ux(t,e);a.classGroupId=n},ZI=(e,t,n,a)=>{if(XI(e)){Jp(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(zI(n,e))},QI=(e,t,n,a)=>{const s=Object.entries(e),o=s.length;for(let u=0;u<o;u++){const[c,h]=s[u];Jp(h,ux(t,c),n,a)}},ux=(e,t)=>{let n=e;const a=t.split(cc),s=a.length;for(let o=0;o<s;o++){const u=a[o];let c=n.nextPart.get(u);c||(c=ox(),n.nextPart.set(u,c)),n=c}return n},XI=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,JI=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const s=(o,u)=>{n[o]=u,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(o){let u=n[o];if(u!==void 0)return u;if((u=a[o])!==void 0)return s(o,u),u},set(o,u){o in n?n[o]=u:s(o,u)}}},Vf="!",cb=":",e3=[],db=(e,t,n,a,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:s}),t3=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=s=>{const o=[];let u=0,c=0,h=0,f;const m=s.length;for(let T=0;T<m;T++){const P=s[T];if(u===0&&c===0){if(P===cb){o.push(s.slice(h,T)),h=T+1;continue}if(P==="/"){f=T;continue}}P==="["?u++:P==="]"?u--:P==="("?c++:P===")"&&c--}const y=o.length===0?s:s.slice(h);let b=y,w=!1;y.endsWith(Vf)?(b=y.slice(0,-1),w=!0):y.startsWith(Vf)&&(b=y.slice(1),w=!0);const S=f&&f>h?f-h:void 0;return db(o,w,b,S)};if(t){const s=t+cb,o=a;a=u=>u.startsWith(s)?o(u.slice(s.length)):db(e3,!1,u,void 0,!0)}if(n){const s=a;a=o=>n({className:o,parseClassName:s})}return a},n3=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let s=[];for(let o=0;o<n.length;o++){const u=n[o],c=u[0]==="[",h=t.has(u);c||h?(s.length>0&&(s.sort(),a.push(...s),s=[]),a.push(u)):s.push(u)}return s.length>0&&(s.sort(),a.push(...s)),a}},r3=e=>({cache:JI(e.cacheSize),parseClassName:t3(e),sortModifiers:n3(e),...HI(e)}),a3=/\s+/,i3=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:o}=t,u=[],c=e.trim().split(a3);let h="";for(let f=c.length-1;f>=0;f-=1){const m=c[f],{isExternal:y,modifiers:b,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:T}=n(m);if(y){h=m+(h.length>0?" "+h:h);continue}let P=!!T,L=a(P?S.substring(0,T):S);if(!L){if(!P){h=m+(h.length>0?" "+h:h);continue}if(L=a(S),!L){h=m+(h.length>0?" "+h:h);continue}P=!1}const D=b.length===0?"":b.length===1?b[0]:o(b).join(":"),M=w?D+Vf:D,j=M+L;if(u.indexOf(j)>-1)continue;u.push(j);const q=s(L,P);for(let K=0;K<q.length;++K){const H=q[K];u.push(M+H)}h=m+(h.length>0?" "+h:h)}return h},s3=(...e)=>{let t=0,n,a,s="";for(;t<e.length;)(n=e[t++])&&(a=cx(n))&&(s&&(s+=" "),s+=a);return s},cx=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=cx(e[a]))&&(n&&(n+=" "),n+=t);return n},o3=(e,...t)=>{let n,a,s,o;const u=h=>{const f=t.reduce((m,y)=>y(m),e());return n=r3(f),a=n.cache.get,s=n.cache.set,o=c,c(h)},c=h=>{const f=a(h);if(f)return f;const m=i3(h,n);return s(h,m),m};return o=u,(...h)=>o(s3(...h))},l3=[],Ot=e=>{const t=n=>n[e]||l3;return t.isThemeGetter=!0,t},dx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,hx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,u3=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,c3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,d3=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,h3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,f3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,p3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wa=e=>u3.test(e),Ge=e=>!!e&&!Number.isNaN(Number(e)),xa=e=>!!e&&Number.isInteger(Number(e)),Kh=e=>e.endsWith("%")&&Ge(e.slice(0,-1)),Fr=e=>c3.test(e),fx=()=>!0,m3=e=>d3.test(e)&&!h3.test(e),em=()=>!1,g3=e=>f3.test(e),y3=e=>p3.test(e),v3=e=>!be(e)&&!ke(e),b3=e=>ja(e,gx,em),be=e=>dx.test(e),Ja=e=>ja(e,yx,m3),hb=e=>ja(e,C3,Ge),_3=e=>ja(e,bx,fx),k3=e=>ja(e,vx,em),fb=e=>ja(e,px,em),w3=e=>ja(e,mx,y3),yu=e=>ja(e,_x,g3),ke=e=>hx.test(e),mo=e=>gi(e,yx),x3=e=>gi(e,vx),pb=e=>gi(e,px),S3=e=>gi(e,gx),P3=e=>gi(e,mx),vu=e=>gi(e,_x,!0),T3=e=>gi(e,bx,!0),ja=(e,t,n)=>{const a=dx.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},gi=(e,t,n=!1)=>{const a=hx.exec(e);return a?a[1]?t(a[1]):n:!1},px=e=>e==="position"||e==="percentage",mx=e=>e==="image"||e==="url",gx=e=>e==="length"||e==="size"||e==="bg-size",yx=e=>e==="length",C3=e=>e==="number",vx=e=>e==="family-name",bx=e=>e==="number"||e==="weight",_x=e=>e==="shadow",E3=()=>{const e=Ot("color"),t=Ot("font"),n=Ot("text"),a=Ot("font-weight"),s=Ot("tracking"),o=Ot("leading"),u=Ot("breakpoint"),c=Ot("container"),h=Ot("spacing"),f=Ot("radius"),m=Ot("shadow"),y=Ot("inset-shadow"),b=Ot("text-shadow"),w=Ot("drop-shadow"),S=Ot("blur"),T=Ot("perspective"),P=Ot("aspect"),L=Ot("ease"),D=Ot("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],q=()=>[...j(),ke,be],K=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],x=()=>[ke,be,h],Z=()=>[wa,"full","auto",...x()],Q=()=>[xa,"none","subgrid",ke,be],me=()=>["auto",{span:["full",xa,ke,be]},xa,ke,be],oe=()=>[xa,"auto",ke,be],Ae=()=>["auto","min","max","fr",ke,be],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ce=()=>["start","end","center","stretch","center-safe","end-safe"],le=()=>["auto",...x()],Me=()=>[wa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],W=()=>[wa,"screen","full","dvw","lvw","svw","min","max","fit",...x()],Y=()=>[wa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...x()],$=()=>[e,ke,be],N=()=>[...j(),pb,fb,{position:[ke,be]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",S3,b3,{size:[ke,be]}],Re=()=>[Kh,mo,Ja],Se=()=>["","none","full",f,ke,be],Ce=()=>["",Ge,mo,Ja],qe=()=>["solid","dashed","dotted","double"],Xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ue=()=>[Ge,Kh,pb,fb],jt=()=>["","none",S,ke,be],Hn=()=>["none",Ge,ke,be],Tr=()=>["none",Ge,ke,be],pt=()=>[Ge,ke,be],en=()=>[wa,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fr],breakpoint:[Fr],color:[fx],container:[Fr],"drop-shadow":[Fr],ease:["in","out","in-out"],font:[v3],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fr],shadow:[Fr],spacing:["px",Ge],text:[Fr],"text-shadow":[Fr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",wa,be,ke,P]}],container:["container"],columns:[{columns:[Ge,be,ke,c]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:q()}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{"inset-s":Z(),start:Z()}],end:[{"inset-e":Z(),end:Z()}],"inset-bs":[{"inset-bs":Z()}],"inset-be":[{"inset-be":Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[xa,"auto",ke,be]}],basis:[{basis:[wa,"full","auto",c,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ge,wa,"auto","initial","none",be]}],grow:[{grow:["",Ge,ke,be]}],shrink:[{shrink:["",Ge,ke,be]}],order:[{order:[xa,"first","last","none",ke,be]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:me()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:me()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ae()}],"auto-rows":[{"auto-rows":Ae()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...ce(),"normal"]}],"justify-self":[{"justify-self":["auto",...ce()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...ce(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ce(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...ce(),"baseline"]}],"place-self":[{"place-self":["auto",...ce()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pbs:[{pbs:x()}],pbe:[{pbe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:le()}],mx:[{mx:le()}],my:[{my:le()}],ms:[{ms:le()}],me:[{me:le()}],mbs:[{mbs:le()}],mbe:[{mbe:le()}],mt:[{mt:le()}],mr:[{mr:le()}],mb:[{mb:le()}],ml:[{ml:le()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:Me()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...Y()]}],"min-block-size":[{"min-block":["auto",...Y()]}],"max-block-size":[{"max-block":["none",...Y()]}],w:[{w:[c,"screen",...Me()]}],"min-w":[{"min-w":[c,"screen","none",...Me()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[u]},...Me()]}],h:[{h:["screen","lh",...Me()]}],"min-h":[{"min-h":["screen","lh","none",...Me()]}],"max-h":[{"max-h":["screen","lh",...Me()]}],"font-size":[{text:["base",n,mo,Ja]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,T3,_3]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Kh,be]}],"font-family":[{font:[x3,k3,t]}],"font-features":[{"font-features":[be]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,ke,be]}],"line-clamp":[{"line-clamp":[Ge,"none",ke,hb]}],leading:[{leading:[o,...x()]}],"list-image":[{"list-image":["none",ke,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ke,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...qe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ge,"from-font","auto",ke,Ja]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[Ge,"auto",ke,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke,be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:xe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},xa,ke,be],radial:["",ke,be],conic:[xa,ke,be]},P3,w3]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:Re()}],"gradient-via-pos":[{via:Re()}],"gradient-to-pos":[{to:Re()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:Se()}],"rounded-s":[{"rounded-s":Se()}],"rounded-e":[{"rounded-e":Se()}],"rounded-t":[{"rounded-t":Se()}],"rounded-r":[{"rounded-r":Se()}],"rounded-b":[{"rounded-b":Se()}],"rounded-l":[{"rounded-l":Se()}],"rounded-ss":[{"rounded-ss":Se()}],"rounded-se":[{"rounded-se":Se()}],"rounded-ee":[{"rounded-ee":Se()}],"rounded-es":[{"rounded-es":Se()}],"rounded-tl":[{"rounded-tl":Se()}],"rounded-tr":[{"rounded-tr":Se()}],"rounded-br":[{"rounded-br":Se()}],"rounded-bl":[{"rounded-bl":Se()}],"border-w":[{border:Ce()}],"border-w-x":[{"border-x":Ce()}],"border-w-y":[{"border-y":Ce()}],"border-w-s":[{"border-s":Ce()}],"border-w-e":[{"border-e":Ce()}],"border-w-bs":[{"border-bs":Ce()}],"border-w-be":[{"border-be":Ce()}],"border-w-t":[{"border-t":Ce()}],"border-w-r":[{"border-r":Ce()}],"border-w-b":[{"border-b":Ce()}],"border-w-l":[{"border-l":Ce()}],"divide-x":[{"divide-x":Ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...qe(),"hidden","none"]}],"divide-style":[{divide:[...qe(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...qe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ge,ke,be]}],"outline-w":[{outline:["",Ge,mo,Ja]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",m,vu,yu]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",y,vu,yu]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:Ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[Ge,Ja]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":Ce()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",b,vu,yu]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[Ge,ke,be]}],"mix-blend":[{"mix-blend":[...Xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Xe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ue()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":Ue()}],"mask-image-t-to-pos":[{"mask-t-to":Ue()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":Ue()}],"mask-image-r-to-pos":[{"mask-r-to":Ue()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":Ue()}],"mask-image-b-to-pos":[{"mask-b-to":Ue()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":Ue()}],"mask-image-l-to-pos":[{"mask-l-to":Ue()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":Ue()}],"mask-image-x-to-pos":[{"mask-x-to":Ue()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":Ue()}],"mask-image-y-to-pos":[{"mask-y-to":Ue()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[ke,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ue()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[Ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ue()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:xe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ke,be]}],filter:[{filter:["","none",ke,be]}],blur:[{blur:jt()}],brightness:[{brightness:[Ge,ke,be]}],contrast:[{contrast:[Ge,ke,be]}],"drop-shadow":[{"drop-shadow":["","none",w,vu,yu]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",Ge,ke,be]}],"hue-rotate":[{"hue-rotate":[Ge,ke,be]}],invert:[{invert:["",Ge,ke,be]}],saturate:[{saturate:[Ge,ke,be]}],sepia:[{sepia:["",Ge,ke,be]}],"backdrop-filter":[{"backdrop-filter":["","none",ke,be]}],"backdrop-blur":[{"backdrop-blur":jt()}],"backdrop-brightness":[{"backdrop-brightness":[Ge,ke,be]}],"backdrop-contrast":[{"backdrop-contrast":[Ge,ke,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ge,ke,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ge,ke,be]}],"backdrop-invert":[{"backdrop-invert":["",Ge,ke,be]}],"backdrop-opacity":[{"backdrop-opacity":[Ge,ke,be]}],"backdrop-saturate":[{"backdrop-saturate":[Ge,ke,be]}],"backdrop-sepia":[{"backdrop-sepia":["",Ge,ke,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ke,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ge,"initial",ke,be]}],ease:[{ease:["linear","initial",L,ke,be]}],delay:[{delay:[Ge,ke,be]}],animate:[{animate:["none",D,ke,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,ke,be]}],"perspective-origin":[{"perspective-origin":q()}],rotate:[{rotate:Hn()}],"rotate-x":[{"rotate-x":Hn()}],"rotate-y":[{"rotate-y":Hn()}],"rotate-z":[{"rotate-z":Hn()}],scale:[{scale:Tr()}],"scale-x":[{"scale-x":Tr()}],"scale-y":[{"scale-y":Tr()}],"scale-z":[{"scale-z":Tr()}],"scale-3d":["scale-3d"],skew:[{skew:pt()}],"skew-x":[{"skew-x":pt()}],"skew-y":[{"skew-y":pt()}],transform:[{transform:[ke,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:en()}],"translate-x":[{"translate-x":en()}],"translate-y":[{"translate-y":en()}],"translate-z":[{"translate-z":en()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ke,be]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mbs":[{"scroll-mbs":x()}],"scroll-mbe":[{"scroll-mbe":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pbs":[{"scroll-pbs":x()}],"scroll-pbe":[{"scroll-pbe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke,be]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[Ge,mo,Ja,hb]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},A3=o3(E3);function Ct(...e){return A3(FI(e))}const R3=I.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[I.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1Z",fill:"#4285F4"}),I.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23Z",fill:"#34A853"}),I.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18A10.96 10.96 0 0 0 1 12c0 1.77.42 3.44 1.18 4.93l3.66-2.84Z",fill:"#FBBC05"}),I.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53Z",fill:"#EA4335"})]}),L3=I.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:I.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12Z"})}),D3={google:R3,github:L3},M3={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function N3(e){return M3[e]||String(e||"").replace(/-/g," ")}function O3(){Ko();const{isOpen:e,closeLoginModal:t}=bk(),{enabled:n,signedIn:a,refreshUser:s,signInWithPassword:o,signUp:u,signInWithOAuth:c,getPublicAuthConfig:h}=Ho(),[f,m]=k.useState("signin"),[y,b]=k.useState(""),[w,S]=k.useState(""),[T,P]=k.useState(""),[L,D]=k.useState(!1),[M,j]=k.useState(null),[q,K]=k.useState(null),[H,x]=k.useState(!1),[Z,Q]=k.useState(!0),[me,oe]=k.useState([]),[Ae,fe]=k.useState(8);k.useEffect(()=>{e&&(j(null),K(null),m("signin"),b(""),S(""),P(""),x(!1))},[e]),k.useEffect(()=>{if(!e||!n){Q(!1);return}let W=!0;return(async()=>{const{data:Y,error:$}=await h();if(W){if($||!Y)oe(["google","github"]);else{const N=Array.isArray(Y.oAuthProviders)?Y.oAuthProviders:[],G=Array.isArray(Y.customOAuthProviders)?Y.customOAuthProviders:[];oe([...N,...G]),typeof Y.passwordMinLength=="number"&&Y.passwordMinLength>0&&fe(Y.passwordMinLength)}Q(!1)}})(),()=>{W=!1}},[e,n,h]),k.useEffect(()=>{e&&a&&t()},[e,a,t]);const ce=k.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),le=k.useCallback(async W=>{j(null),D(!0);try{const{error:Y}=await c(W,ce);Y&&j(Y.message||String(Y))}finally{D(!1)}},[c,ce]),Me=k.useCallback(async W=>{W.preventDefault(),j(null),D(!0);try{if(f==="signup"){const{data:$,error:N}=await u({email:y.trim(),password:w,name:T.trim()||void 0});if(N){j(N.message||String(N));return}if($?.requireEmailVerification){K(Fe("login.verify_email_pending")),m("signin");return}await s();return}const{error:Y}=await o({email:y.trim(),password:w});if(Y){j(Y.message||String(Y));return}await s()}finally{D(!1)}},[f,y,w,T,u,o,s]);return k.useEffect(()=>{if(!e)return;const W=Y=>{Y.key==="Escape"&&t()};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[e,t]),n?I.jsx(DO,{children:e&&I.jsxs(Wh.div,{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:[I.jsx(Wh.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60 ",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),I.jsxs(Wh.div,{className:"relative w-full max-w-[420px] rounded-2xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-950 p-6 shadow-2xl",initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{duration:.2},onClick:W=>W.stopPropagation(),children:[I.jsx("button",{type:"button",onClick:t,className:"absolute right-4 top-4 text-oai-gray-400 dark:text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors",children:I.jsx(gk,{className:"h-5 w-5"})}),I.jsxs("div",{className:"text-center mb-6",children:[I.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[I.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),I.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white",children:"Token Tracker"})]}),I.jsx("p",{className:"text-sm text-oai-gray-500",children:Fe("login_modal.subtitle")})]}),q&&I.jsx("div",{className:"mb-4 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900/50 px-3 py-2 text-xs text-oai-gray-700 dark:text-oai-gray-300",children:q}),M&&I.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400",role:"alert",children:M}),I.jsx("div",{className:"space-y-2.5 mb-5",children:Z?I.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900 animate-pulse"}):me.map(W=>I.jsxs("button",{type:"button",disabled:L,onClick:()=>le(W),className:Ct("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors disabled:opacity-50","flex items-center justify-center gap-2.5"),children:[D3[W]||null,Fe("login.oauth.continue",{provider:N3(W)})]},W))}),H?I.jsxs(I.Fragment,{children:[I.jsxs("div",{className:"relative mb-5",children:[I.jsx("div",{className:"absolute inset-0 flex items-center",children:I.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),I.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:I.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:Fe("login_modal.divider_email")})})]}),I.jsxs("div",{className:"flex rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 p-0.5 bg-oai-gray-50 dark:bg-oai-gray-900/50 mb-4",children:[I.jsx("button",{type:"button",className:Ct("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",f==="signin"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{m("signin"),j(null)},children:Fe("login.tab.sign_in")}),I.jsx("button",{type:"button",className:Ct("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",f==="signup"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{m("signup"),j(null)},children:Fe("login.tab.sign_up")})]}),I.jsxs("form",{onSubmit:Me,className:"space-y-3",children:[f==="signup"&&I.jsxs("div",{children:[I.jsx("label",{htmlFor:"modal-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.name")}),I.jsx("input",{id:"modal-name",type:"text",autoComplete:"name",value:T,onChange:W=>P(W.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500",placeholder:Fe("login.field.name_placeholder")})]}),I.jsxs("div",{children:[I.jsx("label",{htmlFor:"modal-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.email")}),I.jsx("input",{id:"modal-email",type:"email",autoComplete:"email",required:!0,value:y,onChange:W=>b(W.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),I.jsxs("div",{children:[I.jsx("label",{htmlFor:"modal-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.password")}),I.jsx("input",{id:"modal-password",type:"password",autoComplete:f==="signup"?"new-password":"current-password",required:!0,minLength:f==="signup"?Ae:void 0,value:w,onChange:W=>S(W.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"}),f==="signup"&&I.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:Fe("login.password_hint",{min:String(Ae)})})]}),I.jsx("button",{type:"submit",disabled:L,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:Fe(f==="signup"?"login.submit.sign_up":"login.submit.sign_in")})]})]}):I.jsxs(I.Fragment,{children:[I.jsxs("div",{className:"relative mb-5",children:[I.jsx("div",{className:"absolute inset-0 flex items-center",children:I.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),I.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:I.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:Fe("login.divider")})})]}),I.jsxs("button",{type:"button",onClick:()=>x(!0),className:Ct("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors","flex items-center justify-center gap-2.5"),children:[I.jsx(yD,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),Fe("login_modal.continue_email")]})]})]})]})}):null}const I3={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"};function j3(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?I3:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||"").trim()}function p4(){return fi()}function U3(e=""){if(typeof e!="string"||e.length===0)return!1;const t=new URLSearchParams(e),n=String(t.get("screenshot")||"").toLowerCase();return n==="1"||n==="true"}const B3=300*1e3,F3=720*60*1e3;function tm(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function V3(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const n=Date.parse(e.issuedAt);return Number.isFinite(n)?n+F3<=t:!0}async function kx(e,t){const n=fi();if(!tm(n)||!e)return;const a=n.replace(/\/$/,""),s=_c(),o={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};s&&(o.apikey=s);try{await fetch(`${a}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:o,body:JSON.stringify({period:"week",source:t})})}catch{}}async function z3(e){const t=fi();if(!tm(t)||!e)return null;const n=t.replace(/\/$/,""),a=_c(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};a&&(s.apikey=a);const o=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",u=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:s,body:JSON.stringify({device_name:"Token Tracker (dashboard)",platform:o})});if(!u.ok)return null;const c=await u.json().catch(()=>null),h=typeof c?.token=="string"?c.token:null,f=typeof c?.device_id=="string"?c.device_id:null;return!h||!f?null:{token:h,deviceId:f,issuedAt:typeof c?.created_at=="string"?c.created_at:new Date().toISOString()}}async function mb(e){const{deviceToken:t,insforgeBaseUrl:n}=e,a={deviceToken:t},s=n||fi();tm(s)&&(a.insforgeBaseUrl=s.trim());const o=await _p(),u=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...o},body:JSON.stringify(a)}),c=await u.json().catch(()=>({}));if(!u.ok){const h=typeof c.error=="string"?c.error:`HTTP ${u.status}`;throw new Error(h)}return c}async function gb(e){const t=await e();if(!t)return null;const n=W_();if(n&&!V3(n))return n;const a=await z3(t);return a?(_R(a),a):null}async function wx(e){let t=await e();if(!t)return null;let n=await gb(async()=>t);if(!n)return t;try{return await mb({deviceToken:n.token,insforgeBaseUrl:fi()}),t}catch(a){if(!W_()||(K_(),t=await e(),!t)||(n=await gb(async()=>t),!n))throw a;return await mb({deviceToken:n.token,insforgeBaseUrl:fi()}),t}}async function $3(e){const t=kR();if(Date.now()-t<B3)return;const n=await wx(e);n&&(q_(Date.now()),await kx(n,"cloud-sync-auto"))}async function m4(e){const t=await wx(e);t&&(q_(Date.now()),await kx(t,"cloud-sync-now"))}function H3(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function W3(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||H3(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function K3(){const e=Fn(),t=Ho(),n=k.useRef(!1);k.useEffect(()=>{if(!vR()||!W3(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!bR())return;let a=!1;const s=window.setTimeout(()=>{(async()=>{if(!(a||n.current)){n.current=!0;try{await $3(()=>t.getAccessToken())}catch(o){console.warn("[tokentracker] cloud usage sync:",o)}finally{n.current=!1}}})()},2500);return()=>{a=!0,window.clearTimeout(s)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function q3(){const e=k.useContext(yk);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}function G3({prefersReducedMotion:e,screenshotCapture:t}){return!(t||e)}function Y3(e){if(!e||typeof e!="object")return null;const t=e.user_metadata&&typeof e.user_metadata=="object"?e.user_metadata:{},n=e.profile&&typeof e.profile=="object"?e.profile:{},a=t.avatar_url||t.picture||n.avatar_url||e.avatar_url;return typeof a=="string"&&a.trim()?a.trim():null}function yb(e){const t=String(e||"").trim();if(!t)return"?";const n=t.split(/\s+/).filter(Boolean);return n.length>=2?(n[0][0]+n[n.length-1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function vb({className:e,variant:t="header",collapsed:n=!1,onAfterAction:a}){Ko();const s=t==="sidebar",{enabled:o,loading:u,signedIn:c,user:h,displayName:f}=Ho(),{openLoginModal:m}=bk(),y=fc(),b=k.useMemo(()=>Y3(h),[h]);if(!o)return null;if(u)return I.jsx("div",{className:Ct("h-9 w-9 shrink-0 rounded-full bg-oai-gray-200 dark:bg-oai-gray-800 animate-pulse",e),"aria-hidden":!0});if(!c)return s?I.jsxs("button",{type:"button",onClick:()=>{m(),a?.()},className:Ct("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] font-medium text-oai-gray-700 dark:text-oai-gray-300 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 min-w-0",n?"h-8 w-8 justify-center px-0":"w-full",e),"aria-label":Fe("header.auth.sign_in_aria"),title:n?Fe("header.auth.sign_in_aria"):void 0,children:[I.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:I.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!n&&I.jsx("span",{className:"truncate flex-1 text-left",children:Fe("header.auth.sign_in_aria")})]}):I.jsx("button",{type:"button",onClick:m,className:Ct("shrink-0 inline-flex h-9 items-center justify-center gap-1.5 rounded-full px-5 text-sm font-medium transition-colors duration-200 ease-out shadow-sm ring-1 ring-oai-gray-200 dark:ring-white/10 bg-oai-gray-900 text-white hover:bg-oai-gray-800 active:bg-oai-gray-950 dark:bg-white dark:text-oai-gray-900 dark:hover:bg-oai-gray-100 dark:active:bg-oai-gray-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-oai-gray-950",e),"aria-label":Fe("header.auth.sign_in_aria"),children:Fe("header.auth.sign_in_aria")});const w=()=>{y("/settings"),a?.()};return I.jsx("div",{className:Ct(s?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",e),children:I.jsxs("button",{type:"button",onClick:w,className:Ct(s?Ct("flex w-full items-center gap-2 rounded-md px-2 py-1.5 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 transition-colors min-w-0",n&&"justify-center px-0 py-0 h-9 w-9"):"flex items-center gap-2 rounded-full pl-1 pr-2 py-1 border border-transparent hover:bg-oai-gray-100 dark:hover:bg-oai-gray-900/80 hover:border-oai-gray-200 dark:hover:border-oai-gray-800 transition-colors"),"aria-label":Fe("header.auth.open_settings"),title:s&&n?f:void 0,children:[s?I.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:b?I.jsx("img",{src:b,alt:"",width:20,height:20,className:"h-5 w-5 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700",referrerPolicy:"no-referrer"}):I.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600 text-[9px] font-semibold text-white ring-1 ring-oai-brand-500/50",children:yb(f)})}):b?I.jsx("img",{src:b,alt:"",width:32,height:32,className:"h-8 w-8 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700 shrink-0",referrerPolicy:"no-referrer"}):I.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600 text-xs font-semibold text-white ring-1 ring-oai-brand-500/50",children:yb(f)}),s?!n&&I.jsx("span",{className:"truncate text-[13px] font-medium text-oai-gray-900 dark:text-oai-gray-200 flex-1 text-left min-w-0",children:f}):I.jsx("span",{className:"hidden sm:inline truncate text-sm font-medium text-oai-gray-900 dark:text-oai-gray-200 max-w-[120px]",children:f})]})})}const zf="tt.sidebarCollapsed";function Z3(){return[{id:"general",label:Fe("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:uD,label:Fe("nav.usage")},{id:"limits",to:"/limits",icon:dD,label:Fe("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:MD,label:Fe("nav.leaderboard")}]},{id:"tools",label:Fe("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:mD,label:Fe("nav.widgets")},{id:"skills",to:"/skills",icon:SD,label:Fe("nav.skills")},{id:"ip-check",to:"/ip-check",icon:fD,label:Fe("nav.ip_check")}]},{id:"account",label:Fe("nav.group.account"),items:[{id:"settings",to:"/settings",icon:ED,label:Fe("nav.settings")}]}]}function Q3(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(zf)==="1"}catch{return!1}}function X3(){const[e,t]=k.useState(Q3),n=k.useCallback(()=>{t(a=>{const s=!a;try{typeof window<"u"&&window.localStorage.setItem(zf,s?"1":"0")}catch{}return s})},[]);return k.useEffect(()=>{if(typeof window>"u")return;const a=s=>{s.key===zf&&t(s.newValue==="1")};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),{collapsed:e,toggle:n}}function J3(e,t){const n=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?n==="/dashboard"||n==="/":t==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===t}function ej({label:e,collapsed:t,first:n}){return t?n?null:I.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):I.jsx("div",{className:Ct("px-3 pb-1 text-[10px] uppercase tracking-wider text-oai-gray-500 dark:text-oai-gray-500",n?"pt-2":"pt-4"),children:e})}function tj({item:e,collapsed:t,active:n,onClick:a}){const s=e.icon;return I.jsxs(mc,{to:e.to,onClick:a,title:t?e.label:void 0,"aria-current":n?"page":void 0,className:Ct("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] no-underline transition-colors",t&&"justify-center px-0 py-2",n?"bg-oai-gray-200/70 text-oai-black font-medium dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/50 hover:text-oai-black dark:hover:bg-oai-gray-800/60 dark:hover:text-white"),children:[I.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:I.jsx(s,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&I.jsx("span",{className:"truncate",children:e.label})]})}function nj({as:e="button",title:t,onClick:n,href:a,children:s,className:o,...u}){const c=Ct("flex h-10 w-10 items-center justify-center rounded-lg text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",o);return e==="a"?I.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:c,...u,children:s}):I.jsx("button",{type:"button",title:t,"aria-label":t,onClick:n,className:c,...u,children:s})}function rj({repo:e="mm7894215/TokenTracker",glassChrome:t=!1}){const[n,a]=k.useState(null);return k.useEffect(()=>{if(typeof window>"u")return;const s=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;G3({prefersReducedMotion:s,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${e}`).then(o=>o.json()).then(o=>{o&&typeof o.stargazers_count=="number"&&a(o.stargazers_count)}).catch(()=>{})},[e]),I.jsxs("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer","aria-label":n!==null?`Star on GitHub (${n})`:"Star on GitHub",className:Ct("inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",t?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:[I.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:I.jsx("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})}),I.jsx("span",{children:"Star"}),n!==null&&I.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const aj=[{value:"light",label:"Light",Icon:mk},{value:"dark",label:"Dark",Icon:pk},{value:"system",label:"System",Icon:kD}];function ij({theme:e,resolvedTheme:t,onSetTheme:n,glassChrome:a=!1}){const[s,o]=k.useState(!1),u=k.useRef(null),c=t==="dark"?pk:mk;return k.useEffect(()=>{if(!s)return;const h=m=>{u.current&&!u.current.contains(m.target)&&o(!1)},f=m=>{m.key==="Escape"&&o(!1)};return document.addEventListener("mousedown",h),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",f)}},[s]),I.jsxs("div",{ref:u,className:"relative",children:[I.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":s,"aria-haspopup":"menu",title:"Theme",onClick:()=>o(h=>!h),className:Ct("inline-flex h-7 w-7 items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",a?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:I.jsx(c,{className:"h-3.5 w-3.5","aria-hidden":!0})}),s&&I.jsx("div",{role:"menu",className:"absolute bottom-full left-0 mb-2 z-50 min-w-[140px] py-1 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 shadow-lg",children:aj.map(({value:h,label:f,Icon:m})=>{const y=e===h;return I.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(h),o(!1)},className:Ct("flex w-full items-center gap-2.5 px-3 py-1.5 text-[13px] transition-colors",y?"text-oai-black dark:text-white bg-oai-gray-100 dark:bg-oai-gray-800":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-50 dark:hover:bg-oai-gray-800/60 hover:text-oai-black dark:hover:text-white"),children:[I.jsx(m,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),I.jsx("span",{children:f})]},h)})})]})}function xx({collapsed:e,onToggleCollapsed:t,onItemClick:n,showCloseButton:a=!1,onClose:s,glassChrome:o=!1}){const c=Fn()?.pathname||"/",{theme:h,resolvedTheme:f,setTheme:m}=q3(),{resolvedLocale:y}=Ko(),b=k.useMemo(()=>Z3(),[y]);return I.jsxs(I.Fragment,{children:[I.jsx("div",{className:Ct("px-2 pt-2 pb-2",e&&"flex justify-center"),children:a?I.jsxs("div",{className:"flex items-center gap-2",children:[I.jsx("div",{className:"flex-1 min-w-0",children:I.jsx(vb,{variant:"sidebar",collapsed:e,onAfterAction:n})}),I.jsx("button",{type:"button",onClick:s,"aria-label":Fe("nav.close_menu"),title:Fe("nav.close_menu"),className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-oai-gray-500 dark:text-oai-gray-500 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-gray-900 dark:hover:text-oai-gray-200 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",children:I.jsx(gk,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):I.jsx(vb,{variant:"sidebar",collapsed:e,onAfterAction:n})}),I.jsx("nav",{"aria-label":Fe("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:b.map((w,S)=>I.jsxs("div",{className:"flex flex-col",children:[I.jsx(ej,{label:w.label,collapsed:e,first:S===0}),I.jsx("div",{className:"flex flex-col gap-0.5",children:w.items.map(T=>I.jsx(tj,{item:T,collapsed:e,active:J3(c,T.to),onClick:n},T.id))})]},w.id))}),I.jsxs("div",{className:Ct("flex items-center px-2 py-3",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[I.jsx(ij,{theme:h,resolvedTheme:f,onSetTheme:m,glassChrome:o}),I.jsx("div",{className:"flex items-center gap-1.5",children:!e&&I.jsx(rj,{glassChrome:o})})]})]})}function sj({collapsed:e,onToggleCollapsed:t}){const n=k.useMemo(()=>typeof window>"u"?!1:mr()||ok(),[]);return I.jsx("aside",{"aria-label":Fe("nav.aside_label"),className:Ct("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",e?"w-[72px]":"w-[220px]"),children:I.jsx(xx,{collapsed:e,onToggleCollapsed:t,glassChrome:n})})}function oj({open:e,onClose:t}){return k.useEffect(()=>{if(!e)return;const n=a=>{a.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),k.useEffect(()=>{if(!e)return;const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[e]),e?I.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[I.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),I.jsx("aside",{"aria-label":Fe("nav.aside_label"),className:"relative w-[260px] max-w-[80vw] flex flex-col bg-oai-white dark:bg-oai-gray-900 border-r border-oai-gray-200 dark:border-oai-gray-800 shadow-2xl",children:I.jsx(xx,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function lj({onOpenDrawer:e}){return I.jsxs("div",{className:"lg:hidden flex items-center justify-between gap-2 px-3 h-14 border-b border-oai-gray-200 dark:border-oai-gray-800",children:[I.jsx(nj,{title:Fe("nav.menu"),onClick:e,children:I.jsx(bD,{className:"h-5 w-5","aria-hidden":!0})}),I.jsxs(mc,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[I.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),I.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),I.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function uj({children:e}){const{collapsed:t,toggle:n}=X3(),[a,s]=k.useState(!1),o=k.useCallback(()=>s(!0),[]),u=k.useCallback(()=>s(!1),[]),c=k.useMemo(()=>typeof window>"u"?!1:mr()||ok(),[]);return I.jsxs("div",{className:Ct("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",c?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[c&&I.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),I.jsxs("div",{className:"flex-1 min-h-0 flex",children:[I.jsx(sj,{collapsed:t,onToggleCollapsed:n}),I.jsx(oj,{open:a,onClose:u}),I.jsx("div",{className:"flex-1 min-w-0 min-h-0 p-2 lg:pl-0 lg:pr-3 lg:pb-3 flex flex-col",children:I.jsxs("div",{className:Ct("flex-1 min-h-0 flex flex-col bg-oai-white dark:bg-oai-gray-900 border border-oai-gray-200 dark:border-oai-gray-800 overflow-hidden",c?"tt-native-main-card":"rounded-2xl",!c&&"shadow-sm"),children:[I.jsx(lj,{onOpenDrawer:o}),I.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}const cj=typeof window<"u"?window.location.search:"",bb=new URLSearchParams(cj),bu=bb.get("insforge_code")||bb.get("code")||null;function dj(){Ko();const{loading:e,signedIn:t}=Ho(),n=fc(),[a,s]=k.useState("processing"),[o,u]=k.useState(null),c=k.useRef(!1);k.useEffect(()=>{!bu||c.current||(c.current=!0,(async()=>{try{const m=await(await fetch("/api/auth-bridge/verifier")).json();u(!!m?.native)}catch{u(!1)}})())},[]),k.useEffect(()=>{if(o!==!0||!bu)return;s("redirecting");const f=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(bu)}`},200);return()=>clearTimeout(f)},[o]),k.useEffect(()=>{if(o!==!1||e)return;if(t){n("/dashboard",{replace:!0});return}const f=setTimeout(()=>{t||s("failed")},5e3);return()=>clearTimeout(f)},[o,e,t,n]),k.useEffect(()=>{if(!bu&&o===null){const f=setTimeout(()=>s("failed"),3e3);return()=>clearTimeout(f)}},[o]);const h=()=>{n("/dashboard",{replace:!0})};return a==="processing"&&o!==!0&&(o===null||o===!1&&e)?I.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):I.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:I.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[a==="processing"&&I.jsxs(I.Fragment,{children:[I.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),I.jsx("p",{className:"text-oai-gray-400 text-sm",children:Fe("auth.callback.processing")})]}),a==="redirecting"&&I.jsxs(I.Fragment,{children:[I.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:I.jsx("svg",{className:"w-6 h-6 text-green-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:I.jsx("path",{d:"M20 6 9 17l-5-5"})})}),I.jsx("p",{className:"text-white text-sm font-medium",children:Fe("auth.callback.success")}),I.jsx("p",{className:"text-oai-gray-500 text-xs",children:Fe("auth.callback.redirecting")})]}),a==="failed"&&I.jsxs("div",{className:"space-y-3",children:[I.jsx("p",{className:"text-oai-gray-300 text-sm",children:Fe("auth.callback.failed")}),I.jsx("button",{type:"button",onClick:h,className:"px-4 py-2 rounded-lg bg-oai-gray-800 text-sm text-white hover:bg-oai-gray-700 transition-colors",children:Fe("auth.callback.close")})]})]})})}const hj=k.lazy(()=>$n(()=>import("./DashboardPage-NVAsY99I.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.DashboardPage}))),fj=k.lazy(()=>$n(()=>import("./IpCheckPage-cCSBXnv2.js"),[])),pj=k.lazy(()=>$n(()=>import("./LandingPage-DDUROVcN.js"),__vite__mapDeps([7,8,4])).then(e=>({default:e.LandingPage}))),mj=k.lazy(()=>$n(()=>import("./LeaderboardPage-BaETRtBF.js"),__vite__mapDeps([9,5,10,11])).then(e=>({default:e.LeaderboardPage}))),gj=k.lazy(()=>$n(()=>import("./LeaderboardProfilePage-BthYFghU.js"),__vite__mapDeps([12,8,10])).then(e=>({default:e.LeaderboardProfilePage}))),yj=k.lazy(()=>$n(()=>import("./LimitsPage-BQpint0k.js"),__vite__mapDeps([13,1,14,3,6,4])).then(e=>({default:e.LimitsPage}))),vj=k.lazy(()=>$n(()=>import("./LoginPage-EUjSrjOv.js"),[]).then(e=>({default:e.LoginPage}))),bj=k.lazy(()=>$n(()=>import("./DevicePage-CWTFzGYj.js"),[])),_j=k.lazy(()=>$n(()=>import("./WrappedPage-0iiBrhBo.js"),[])),kj=k.lazy(()=>$n(()=>import("./SettingsPage-9lfQ1c28.js"),__vite__mapDeps([15,14,16,3,17,18])).then(e=>({default:e.SettingsPage}))),wj=k.lazy(()=>$n(()=>import("./SkillsPage-Bt7d1kd0.js"),__vite__mapDeps([19,3,2,5,17,4,11,18])).then(e=>({default:e.SkillsPage}))),xj=k.lazy(()=>$n(()=>import("./WidgetsPage-QfPgS0dO.js"),__vite__mapDeps([20,16,3,6,4,18,11])).then(e=>({default:e.WidgetsPage})));function Sj(){const{resolvedLocale:e}=Ko(),t=Fn(),n=Ho();K3();const a=Pn(),s=k.useMemo(()=>typeof window>"u"?!1:U3(window.location.search),[]),o=t?.pathname||"/",u=new URL(window.location.href),c=u.pathname.replace(/\/+$/,"")||"/",f=c.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,m=u.searchParams.get("token")||null,y=f||m,b=c==="/share"||c==="/share.html"||c.startsWith("/share/"),w=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),S=o.replace(/\/+$/,"")||"/",T=S.match(/^\/leaderboard\/u\/([^/]+)$/i),P=T?T[1]:null,L=S==="/leaderboard"||!!P,D=!!(n.enabled&&n.signedIn),M=w||D,j=!1,q=j3(),K=k.useMemo(()=>!n.enabled||!D?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[D,n]);let H=w||a||s?"dashboard":"landing";S==="/landing"&&(H="landing"),S==="/dashboard"&&(H="dashboard"),L&&(H="dashboard");const x=S==="/limits",Z=S==="/settings",Q=S==="/skills",me=S==="/widgets",oe=S==="/ip-check";(x||Z||Q||me||oe)&&(H="dashboard");let Ae=hj;P?Ae=gj:S==="/leaderboard"?Ae=mj:x?Ae=yj:Z?Ae=kj:Q?Ae=wj:me?Ae=xj:oe&&(Ae=fj);const ce=!b&&(S==="/dashboard"||S==="/"||S==="/leaderboard"||x||Z||Q||me||oe);let le=null;if(S==="/auth/callback"||S==="/auth/native-callback")le=I.jsx(dj,{});else if(S==="/login")le=I.jsx(vj,{});else if(S==="/device")le=I.jsx(bj,{});else if(S==="/wrapped")le=I.jsx(_j,{});else if(H==="landing")le=I.jsx(pj,{signInUrl:"/login",signUpUrl:"/login"});else{const Me=I.jsx(Ae,{baseUrl:q,auth:K,signedIn:M,sessionSoftExpired:j,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:b,publicToken:y,userId:P,signInUrl:"/login",signUpUrl:"/login"},e);ce?le=I.jsx(uj,{children:Me}):le=Me}return I.jsx(ID,{children:I.jsx(BD,{children:I.jsxs(FD,{children:[I.jsx(k.Suspense,{fallback:null,children:le}),I.jsx(O3,{}),I.jsx(HL,{}),I.jsx(tD,{})]})})})}const Pj=CT([{path:"*",element:I.jsx(Sj,{})}]);mP.createRoot(document.getElementById("root")).render(I.jsx(Hf.StrictMode,{children:I.jsx(RL,{children:I.jsx(aL,{children:I.jsx(FT,{router:Pj})})})}));export{LR as $,Y_ as A,Fe as B,I as C,q3 as D,$j as E,Wh as F,Hj as G,OD as H,t4 as I,ic as J,jj as K,mc as L,Zp as M,Ij as N,DO as O,bk as P,Ho as Q,Hf as R,l4 as S,Gj as T,Ko as U,U3 as V,Ea as W,gk as X,Xj as Y,Wj as Z,$n as _,qt as a,Uj as a0,Bj as a1,Jj as a2,zj as a3,o4 as a4,Ct as a5,vb as a6,BT as a7,Fn as a8,fc as a9,d4 as aA,mr as aB,ok as aC,u4 as aD,h4 as aE,c4 as aF,zv as aG,ww as aH,mN as aI,Nf as aJ,p4 as aa,bR as ab,Mj as ac,m4 as ad,Nj as ae,Zj as af,Qj as ag,G3 as ah,ED as ai,i4 as aj,Tj as ak,gR as al,Sp as am,vR as an,Uv as ao,Yj as ap,mk as aq,pk as ar,kD as as,ps as at,Zu as au,kp as av,TD as aw,_p as ax,cP as ay,$f as az,_k as b,dn as c,Na as d,o0 as e,dt as f,Z_ as g,Pn as h,IM as i,Oj as j,PR as k,s4 as l,gs as m,NR as n,OR as o,n4 as p,Vj as q,k as r,qj as s,r4 as t,Pp as u,a4 as v,Fj as w,yt as x,Kj as y,e4 as z};
|